{"at":"2026-11-23T01:21:36.558Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:21:36.910Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"no method server/discover"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:21:37.011Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:21:37.379Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"instructions":"playcal tools, which when (`playcal X` below is the tool playcal_X):\n- Before anything in a Unity project: `playcal doctor`. It says whether the CLI and an open Editor are reachable.\n- Any Editor write (create, set_field, save_scene, recompile): `playcal loop run NAME -- ARGS` with `--verify` and `--expect`. Never call `unity command` directly for a write; a success during a domain reload is not a landed change.\n- Scripts changed: `playcal loop run ... --compile`, then `playcal logs --since \"Reloading assemblies\"` for the first cause.\n- Something is red in the console: `playcal logs` first, it collapses repeats and names the first cause.\n- Big command output: `playcal query` to keep only the fields you need instead of reading the whole hierarchy.\n- Moved, renamed, copied or deleted files under Assets/ outside the Editor: `playcal meta` before Unity imports them.\n- Before a risky step: `playcal checkpoint save`; `playcal loop run --checkpoint` does it for you.\n- Does it still run: `playcal observe` (press Play, diff the scene, collect errors), `playcal visual check` for a screenshot diff.\n- Playtest data: `ingest` validates, `report` summarizes, `calibrate` predicts human pass rates from bot runs.","protocolVersion":"2025-11-25","serverInfo":{"name":"playcal","version":"0.2.2"}}}}
{"at":"2026-11-23T01:21:37.379Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:21:37.379Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:21:37.381Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"check texture import settings (.meta / .import) against a folder policy: type, mipmaps, Read/Write, compression, max size, offline","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"check: texture import settings against the policy","enum":["check"],"type":"string"},"paths":{"description":"images to check (default: every image in the project)","items":{"type":"string"},"type":"array"},"policy":{"description":"JSON {\"rules\": [{\"match\": \"*/UI/*\", \"texture_type\": [\"Sprite\"], \"mipmaps\": false, \"readable\": false, \"compressed\": true, \"max_size\": 2048}]}; default: UI as sprites without mipmaps, everything compressed, not readable, at most 4096","type":"string"},"project_path":{"default":".","description":"Unity or Godot project folder (default .)","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_assets"},{"description":"check audio import settings (.meta / .import) against a folder policy, and WAV loudness (LUFS), true peak and clipping, offline","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"check: import settings against the policy, WAV loudness and peaks","enum":["check"],"type":"string"},"paths":{"description":"clips to check (default: every audio file in the project)","items":{"type":"string"},"type":"array"},"policy":{"description":"JSON {\"rules\": [{\"match\": \"*/UI/*\", \"load_type\": [...], \"mono\": true, \"max_true_peak\": -1, \"lufs\": [lo, hi]}]}; default: UI and SFX in memory, Music streamed, peaks under -1 dBTP","type":"string"},"project_path":{"default":".","description":"Unity or Godot project folder (default .)","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_audio"},{"description":"keep a perf baseline (p95 frame time, GC, memory) and fail only when a run is worse by more than noise","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"save NAME FILE: keep a run as the baseline. check NAME FILE: compare a new run. show NAME","enum":["save","check","show"],"type":"string"},"dir":{"default":".playcal/baselines","description":"where baselines live (default .playcal/baselines)","type":"string"},"floor":{"description":"ignore slowdowns smaller than this in absolute units, e.g. frame_ms=0.5. Repeatable","items":{"type":"string"},"type":"array"},"metric":{"description":"only these metrics (default: all in both)","items":{"type":"string"},"type":"array"},"name":{"description":"baseline name, e.g. level4-android","type":"string"},"percentile":{"default":95,"description":"percentile to compare (default 95)","type":"number"},"source":{"default":"-","description":"samples JSON file, or - for stdin (default)","type":"string"},"tolerance":{"default":10,"description":"allowed slowdown in percent (default 10)","type":"number"}},"required":["action","name"],"type":"object"},"name":"playcal_baseline"},{"description":"predict each level's human pass rate from bot runs, calibrated on a small human panel, with 95% intervals","inputSchema":{"additionalProperties":false,"properties":{"bot":{"description":"event JSONL from bot runs, same schema","items":{"type":"string"},"type":"array"},"human":{"description":"event JSONL from the human panel (accepted.jsonl from ingest)","items":{"type":"string"},"type":"array"},"min_attempts":{"default":5,"description":"human attempts a level needs to count for calibration (default 5)","type":"integer"},"targets":{"description":"JSON {\"4\": [40, 60]}: predicted human pass-rate band per level; a level outside its band exits 1","type":"string"}},"required":[],"type":"object"},"name":"playcal_calibrate"},{"description":"save project files to a private git ref before each step, and restore any save","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"save the files now, list saves, diff a save against now, restore a save","enum":["save","list","diff","restore"],"type":"string"},"limit":{"default":20,"description":"how many saves to list (default 20)","type":"integer"},"repo":{"default":".","description":"folder inside the git repo (default: current folder)","type":"string"},"target":{"description":"save: a message. diff/restore: checkpoint id, latest, or ~N (N saves back)","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_checkpoint"},{"description":"check Python, git, the Unity CLI, open Editors and the SDK before a run","inputSchema":{"additionalProperties":false,"properties":{"project":{"description":"Unity project folder to check (default: whatever Editors are open)","type":"string"}},"required":[],"type":"object"},"name":"playcal_doctor"},{"description":"validate gameplay events (JSONL or pasted PC0 blobs) against the event schema","inputSchema":{"additionalProperties":false,"properties":{"files":{"description":"JSONL files, or '-' for stdin","items":{"type":"string"},"type":"array"},"out":{"default":"accepted.jsonl","description":"where valid events go (default: accepted.jsonl)","type":"string"},"paste":{"description":"inputs are free text containing PC0: blobs","type":"boolean"},"rejected":{"default":"rejected.jsonl","description":"where invalid lines go, with a reason","type":"string"}},"required":["files"],"type":"object"},"name":"playcal_ingest"},{"description":"lock scenes and assets so several agents don't edit the same file at once","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"take PATH...: lock all or none. release PATH...: unlock yours. list: live locks. check PATH...: exit 1 if someone else holds one","enum":["take","release","list","check"],"type":"string"},"dir":{"default":".playcal/locks","description":"where locks live (default .playcal/locks)","type":"string"},"force":{"description":"release: also drop someone else's lock","type":"boolean"},"owner":{"default":"","description":"who holds the lock (default $PLAYCAL_OWNER)","type":"string"},"paths":{"description":"scene or asset paths, e.g. Assets/Scenes/Level4.unity","items":{"type":"string"},"type":"array"},"ttl":{"default":1800.0,"description":"how long a lock lasts, e.g. 90s, 30m, 2h (default 30m)","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_lock"},{"description":"summarize a Unity log: collapse repeats, show the first cause","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":20,"description":"most distinct errors to list (default 20)","type":"integer"},"path":{"description":"log file, or - for stdin (default: this machine's Unity Editor.log)","type":"string"},"since":{"description":"only read after the last line containing TEXT, e.g. \"Reloading assemblies\"","type":"string"}},"required":[],"type":"object"},"name":"playcal_logs"},{"description":"run a Unity Editor command safely: wait until ready, run, wait again, one digest","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"settle: wait for a ready Editor. run: settle, run, settle","enum":["settle","run"],"type":"string"},"checkpoint":{"description":"save files with playcal checkpoint before the write; on failure the digest says how to undo","type":"string"},"compile":{"description":"also run `unity recompile` and fail with the compile errors; the Editor says ready even when scripts don't build","type":"boolean"},"diff":{"description":"run --verify before the write too and report only what changed","type":"boolean"},"engine":{"default":"unity","description":"godot: settle loads every script headless and reports parse errors as compile_error (default unity)","enum":["unity","godot"],"type":"string"},"expect":{"description":"check on the --verify read (or the command result). PATH=VALUE, PATH!=VALUE, PATH~TEXT, or bare PATH (exists). * matches any list item: objects.*.name=Probe. Repeatable","items":{"type":"string"},"type":"array"},"name":{"description":"Editor command for `run` (see `unity command`)","type":"string"},"params":{"description":"passed to the command unchanged; put them after --, e.g. run save_scene -- --name x","items":{"type":"string"},"type":"array"},"project_path":{"description":"Unity project folder (needed when several Editors are open), or the Godot project folder","type":"string"},"reload_wait":{"description":"after the write, wait this long for a reload to start before trusting ready (default: 20 when the command says it needs a recompile, else 0)","type":"number"},"timeout":{"default":120,"description":"seconds to wait for a ready Editor (default 120)","type":"number"},"verify":{"description":"read command run after the write, e.g. \"get_hierarchy --depth 1\"","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_loop"},{"description":"find .meta and GUID damage (copied, moved or missing .meta files, missing scripts) before Unity imports it, without an Editor","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":20,"description":"text output: lines per kind (default 20, 0 = all)","type":"integer"},"project":{"default":".","description":"Unity project folder (the one with Assets/), default .","type":"string"}},"required":[],"type":"object"},"name":"playcal_meta"},{"description":"press Play, run the game a few seconds, diff the scene and collect console errors; screenshot only on red","inputSchema":{"additionalProperties":false,"properties":{"engine":{"default":"unity","description":"unity talks to the open Editor; godot runs the main scene headless (default unity)","enum":["unity","godot"],"type":"string"},"expect":{"description":"check on the read during play, same syntax as playcal loop --expect. Repeatable","items":{"type":"string"},"type":"array"},"ignore":{"description":"field to leave out of the diff, repeatable (default: instanceId, isDirty)","items":{"type":"string"},"type":"array"},"limit":{"default":50,"description":"most diff entries to list (default 50)","type":"integer"},"name":{"default":"observe","description":"screenshot file name without .png (default observe)","type":"string"},"no_play":{"description":"don't touch Play Mode; diff two reads --seconds apart","type":"boolean"},"no_shot":{"description":"never take a screenshot","type":"boolean"},"project_path":{"description":"Unity project folder (needed when several Editors are open), or the Godot project folder","type":"string"},"read":{"default":"scene get_hierarchy","description":"Editor read to diff before and during play (default \"scene get_hierarchy\")","type":"string"},"repeat":{"default":1,"description":"run N times; some red and some green is inconclusive (exit 7), see playcal playtest","type":"integer"},"scene":{"description":"godot only: scene to run instead of the main scene (res://...)","type":"string"},"seconds":{"default":3,"description":"how long to let the game run before the second read (default 3)","type":"number"},"shots":{"default":".playcal/observe","description":"where the red-run screenshot goes, relative to the Unity project (default .playcal/observe)","type":"string"},"timeout":{"default":120,"description":"seconds to wait for a ready Editor (default 120)","type":"number"}},"required":[],"type":"object"},"name":"playcal_observe"},{"description":"run observe N times: a checklist of pass/fail/skip per run, red vs flaky (inconclusive), runs saved as PC0 events for calibrate","inputSchema":{"additionalProperties":false,"properties":{"engine":{"default":"unity","description":"unity talks to the open Editor; godot runs the main scene headless (default unity)","enum":["unity","godot"],"type":"string"},"events":{"description":"write the runs as PC0 events (JSONL) for report and calibrate","type":"string"},"expect":{"description":"check on the read during play, same syntax as playcal loop --expect. Repeatable","items":{"type":"string"},"type":"array"},"game":{"default":"game","description":"game name in the events (default game)","type":"string"},"game_version":{"default":"dev","description":"game_version in the events (default dev)","type":"string"},"ignore":{"description":"field to leave out of the diff, repeatable (default: instanceId, isDirty)","items":{"type":"string"},"type":"array"},"level":{"default":"playtest","description":"level name in the events (default playtest)","type":"string"},"limit":{"default":50,"description":"most diff entries to list (default 50)","type":"integer"},"name":{"default":"observe","description":"screenshot file name without .png (default observe)","type":"string"},"no_play":{"description":"don't touch Play Mode; diff two reads --seconds apart","type":"boolean"},"no_shot":{"description":"never take a screenshot","type":"boolean"},"project_path":{"description":"Unity project folder (needed when several Editors are open), or the Godot project folder","type":"string"},"read":{"default":"scene get_hierarchy","description":"Editor read to diff before and during play (default \"scene get_hierarchy\")","type":"string"},"repeat":{"default":3,"description":"run N times; some red and some green is inconclusive (exit 7), see playcal playtest","type":"integer"},"scene":{"description":"godot only: scene to run instead of the main scene (res://...)","type":"string"},"seconds":{"default":3,"description":"how long to let the game run before the second read (default 3)","type":"number"},"shots":{"default":".playcal/observe","description":"where the red-run screenshot goes, relative to the Unity project (default .playcal/observe)","type":"string"},"timeout":{"default":120,"description":"seconds to wait for a ready Editor (default 120)","type":"number"}},"required":[],"type":"object"},"name":"playcal_playtest"},{"description":"pick a list, filter it and keep only the fields you need from a big JSON result","inputSchema":{"additionalProperties":false,"properties":{"frm":{"default":"","description":"the list to read, e.g. data.objects; ** walks nested children at any depth","type":"string"},"limit":{"default":50,"description":"most items to return (default 50)","type":"integer"},"project_path":{"description":"Unity project folder, with --unity","type":"string"},"select":{"description":"field to keep per item. Repeatable","items":{"type":"string"},"type":"array"},"source":{"default":"-","description":"JSON file, or - for stdin (default). Ignored with --unity","type":"string"},"unity":{"description":"read from a Unity Editor command instead, e.g. \"get_hierarchy --depth 3\"","type":"string"},"where":{"description":"keep items where EXPR holds: name~Enemy, active=true, tag!=Untagged. Repeatable","items":{"type":"string"},"type":"array"}},"required":[],"type":"object"},"name":"playcal_query"},{"description":"record input through the SDK, replay it as a regression test with fixed frame rate and seed, step frames","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"record NAME: record a play session. run NAME: replay it and compare. step: advance a paused Editor. check NAME or check A B: compare offline","enum":["record","run","step","check"],"type":"string"},"force":{"description":"record: overwrite an existing recording","type":"boolean"},"fps":{"default":60,"description":"record: fixed frame rate the game steps at (default 60)","type":"integer"},"frames":{"description":"record: frames to record, 0 = until Play stops (default 600). step: frames to step (default 1)","type":"integer"},"names":{"description":"replay name (files in <project>/.playcal/replays/), or two files for check","items":{"type":"string"},"type":"array"},"project_path":{"description":"Unity project folder (default: the open Editor's)","type":"string"},"seed":{"description":"record: UnityEngine.Random seed (default 0)","type":"integer"},"stop_at":{"description":"run: pause the Editor on this replay frame and stay in Play Mode","type":"integer"},"timeout":{"default":120,"description":"seconds to wait for a ready Editor (default 120)","type":"number"},"tolerance":{"default":0.0001,"description":"decimal marks may differ by this much, absolute; whole numbers must match exactly (default 1e-4)","type":"number"},"wait":{"description":"seconds to wait for the SDK to finish (default from the frame count)","type":"number"}},"required":["action"],"type":"object"},"name":"playcal_replay"},{"description":"per-level pass rate, attempts and quit rate with 95% Wilson intervals","inputSchema":{"additionalProperties":false,"properties":{"files":{"description":"event JSONL files (usually accepted.jsonl from ingest)","items":{"type":"string"},"type":"array"},"targets":{"description":"JSON {\"4\": [40, 60]}: attempt pass-rate band per level; a level outside its band exits 1","type":"string"}},"required":["files"],"type":"object"},"name":"playcal_report"},{"description":"save a JSON read under a name and diff two saves, with ids that change between sessions left out","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"save NAME: store a read. diff A [B]: what changed from A to B (or to a live --unity read). list","enum":["save","diff","list"],"type":"string"},"dir":{"default":".playcal/snaps","description":"where saves live (default .playcal/snaps)","type":"string"},"godot":{"description":"read the node tree of the Godot main scene (one headless frame)","type":"boolean"},"ignore":{"description":"field to leave out of the diff, repeatable (default: instanceId). --ignore '' keeps everything","items":{"type":"string"},"type":"array"},"limit":{"default":50,"description":"most changes to list (default 50)","type":"integer"},"project_path":{"description":"Unity project folder with --unity, Godot project folder with --godot","type":"string"},"refs":{"description":"save: NAME [FILE or - for stdin]. diff: A [B], each a saved name or a .json file","items":{"type":"string"},"type":"array"},"scene":{"description":"with --godot: scene to read instead of the main scene (res://...)","type":"string"},"unity":{"description":"read from the Editor, e.g. \"scene get_hierarchy\"","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_snap"},{"description":"test result history: spot flaky tests, fail CI only on real failures, run only affected test assemblies","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"record FILE...: add results to the history. check FILE...: fail only on non-flaky failures, then record. flaky: list tests that passed and failed on one commit. affected [PATH...]: test assemblies a change can break (default: git diff --base)","enum":["record","check","flaky","affected"],"type":"string"},"base":{"default":"HEAD","description":"affected: git ref to diff against (default HEAD: uncommitted work)","type":"string"},"commit":{"description":"commit the run belongs to (default: git rev-parse HEAD)","type":"string"},"dir":{"default":".playcal/tests","description":"where the history lives (default .playcal/tests)","type":"string"},"files":{"description":"NUnit3 (Unity -testResults) or JUnit XML files; for affected, changed paths","items":{"type":"string"},"type":"array"},"no_record":{"description":"check without adding this run to the history","type":"boolean"},"project":{"default":".","description":"affected: Unity project folder (default .)","type":"string"}},"required":["action"],"type":"object"},"name":"playcal_tests"},{"description":"draw the run history (loop, observe, replay, visual) as one static HTML page, newest first","inputSchema":{"additionalProperties":false,"properties":{"history":{"description":"history file (default: $PLAYCAL_HISTORY or .playcal/history.jsonl)","type":"string"},"last":{"description":"only the newest N runs","type":"integer"},"open":{"description":"open the page in the default browser","type":"boolean"},"out":{"default":".playcal/ui.html","description":"where to write the page (default .playcal/ui.html)","type":"string"}},"required":[],"type":"object"},"name":"playcal_ui"},{"description":"screenshot gate: compare a PNG to a saved baseline with a per-pixel tolerance, write a diff PNG on a fail","inputSchema":{"additionalProperties":false,"properties":{"action":{"description":"save: make this PNG the baseline; check: compare a PNG to it","enum":["save","check"],"type":"string"},"dir":{"default":".playcal/visual","description":"where baselines live (default .playcal/visual)","type":"string"},"ignore":{"description":"skip a box that changes on its own, like a clock or FPS counter (repeatable)","items":{"type":"string"},"type":"array"},"max_changed":{"default":0.1,"description":"percent of pixels allowed to change (default 0.1)","type":"number"},"name":{"description":"baseline name, e.g. level4-start","type":"string"},"png":{"description":"the screenshot (8- or 16-bit PNG)","type":"string"},"tolerance":{"default":8,"description":"per-channel difference a pixel may have, 0-255 (default 8)","type":"integer"}},"required":["action","name","png"],"type":"object"},"name":"playcal_visual"}]}}}
