ravensight-playtest 0.13.3 → 0.17.0

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 (41) hide show
  1. package/README.md +82 -1
  2. package/addons/ravensight_driver/driver.gd +472 -28
  3. package/docs/godot-driver.md +66 -2
  4. package/package.json +4 -4
  5. package/src/api/README.md +8 -1
  6. package/src/api/client.js +24 -1
  7. package/src/cli.js +19 -0
  8. package/src/commands/check.js +5 -2
  9. package/src/commands/run.js +40 -5
  10. package/src/commands/setup.js +176 -0
  11. package/src/packs/index.js +37 -5
  12. package/src/packs/keys.json +11 -0
  13. package/src/packs/pack-signing-hashes.json +7 -0
  14. package/src/packs/pack-signing-vectors.json +119 -0
  15. package/src/packs/signature.js +186 -0
  16. package/src/run/anygame/gamenotes.js +74 -12
  17. package/src/run/anygame/index.js +97 -34
  18. package/src/run/anygame/language.js +100 -10
  19. package/src/run/anygame/memory.js +70 -13
  20. package/src/run/anygame/shared-hashes.json +9 -8
  21. package/src/run/anygame/shared.js +6 -5
  22. package/src/run/anygame/sound.js +59 -16
  23. package/src/run/args.js +5 -0
  24. package/src/run/claimwords.js +43 -7
  25. package/src/run/drivers/godot-cursor.js +96 -0
  26. package/src/run/drivers/godot-observation.js +29 -5
  27. package/src/run/drivers/godot.js +60 -5
  28. package/src/run/drivers/web.js +181 -10
  29. package/src/run/egress.js +282 -0
  30. package/src/run/eventclaims.js +102 -6
  31. package/src/run/events.js +64 -6
  32. package/src/run/gameMemory.js +14 -5
  33. package/src/run/honesty.js +49 -2
  34. package/src/run/judge.js +22 -10
  35. package/src/run/liveFeed.js +254 -0
  36. package/src/run/networkRun.js +54 -0
  37. package/src/run/personaLoop.js +70 -20
  38. package/src/run/pixels.js +491 -2
  39. package/src/run/replay.js +11 -0
  40. package/src/run/resume.js +3 -1
  41. package/src/run/tools.js +2 -2
package/README.md CHANGED
@@ -274,6 +274,24 @@ Credential Manager, libsecret on Linux). With no keychain available it falls
274
274
  back to a file with 0600 permissions under your home directory, and says so.
275
275
  In CI, set `RAVENSIGHT_TOKEN` instead and skip `login` entirely.
276
276
 
277
+ Or let `setup` walk you through it after `login`:
278
+
279
+ ```bash
280
+ ravensight-playtest setup # link, where it runs, what to learn, the plan and its price
281
+ ```
282
+
283
+ `setup` links the repo (as `init` does), asks where the game should run (on
284
+ this computer, in the Ravensight cloud from an uploaded web build, or a live
285
+ web address in the cloud) and what you want to learn, then shows Ravensight's
286
+ plan: the personas that fit the goal, what the brief still needs and the price
287
+ of each option, from the same pricing as the real quote. It offers to write
288
+ the brief with the plan's suggestions as the answers to keep, and for a local
289
+ run offers to start it through `run`, which shows the price again and asks
290
+ before anything is charged. A cloud plan ends with the commands that upload
291
+ and quote it. The plan itself is free and starts nothing. Flags: `--game`,
292
+ `--where local|cloud|url`, `--goal <text>`, `--personas <list>`, `--force`, and
293
+ `--json` to print the plan and ask nothing. `--yes` is never passed on to `run`.
294
+
277
295
  ## Upgrading to 0.3.2
278
296
 
279
297
  - **A plain `run` plays one persona, not two.** The default persona set is now
@@ -299,7 +317,7 @@ In CI, set `RAVENSIGHT_TOKEN` instead and skip `login` entirely.
299
317
 
300
318
  ## Commands
301
319
 
302
- Fourteen commands. Flags below are the ones the code accepts, not the ones the
320
+ Fifteen commands, `setup` among them. Flags below are the ones the code accepts, not the ones the
303
321
  prose elsewhere describes; `--help` on any command prints the same list.
304
322
 
305
323
  Every command takes these four:
@@ -506,6 +524,53 @@ godot_driver` and `build: { kind: godot_project, ref: "." }`, so `run` needs no
506
524
  `--driver` or `--godot-project`. The concurrency written is the one `check`
507
525
  recommends for this machine.
508
526
 
527
+ ### setup
528
+
529
+ The guided first playtest, after `login`. Four steps, each printed as it goes:
530
+
531
+ 1. **The game.** A linked repo keeps its link; otherwise `setup` links it
532
+ through `init` (so `--game` and `--force` work as they do there).
533
+ 2. **The plan.** It asks where the game should run (this computer, the
534
+ Ravensight cloud from an uploaded web build, or a live web address played in
535
+ the cloud; Enter lets Ravensight recommend one) and what you want to learn,
536
+ then asks the server for a plan (`POST .../plan`, see
537
+ [docs/api-contract.md](docs/api-contract.md)) and prints it: the personas
538
+ (`fresh-eyes` first, then up to two the goal points at), who plays (Geri
539
+ locally, Geri and Freki in the cloud), the price, the other places it could
540
+ run with theirs, and the exact commands that start it. A place the studio
541
+ cannot use right now prints why and no price.
542
+ 3. **The brief.** When it is not complete, `setup` offers to write it, with the
543
+ plan's suggested goals and success criteria as answers you keep with Enter.
544
+ What the brief already says wins; the controls and how to start come from
545
+ you. A version saved by someone else meanwhile is not overwritten without
546
+ asking.
547
+ 4. **Start it.** A local plan with a complete brief offers to hand over to
548
+ `run` with the plan's personas. `run` quotes again and asks you to confirm before anything is charged; `--yes` is never
549
+ passed on, so the price is always confirmed by a person. A cloud or live
550
+ address plan stops at its commands instead: `build upload` (cloud only),
551
+ `hosted quote ... --output quote.json`, which is your consent to that exact
552
+ price and charges nothing, then `hosted run quote.json`, or the Playtest
553
+ page in the dashboard.
554
+
555
+ The plan is free: nothing is started, held, charged or saved. Its prices come
556
+ from the server's own pricing, the same as `run`'s quote for a local run and a
557
+ combined cloud quote for the cloud (priced on the smallest tier; `hosted quote`
558
+ picks the tier the build needs and shows it before any charge). Any role may
559
+ ask for a plan; only the studio owner sees the balance against it. A plan over
560
+ the balance prints where to add funds.
561
+
562
+ | Flag | Effect |
563
+ |---|---|
564
+ | `--game <gameId>` | The game to link, when this repo is not linked. |
565
+ | `--where <place>` | `local`, `cloud` or `url`. Default: Ravensight recommends one. |
566
+ | `--goal <text>` | What you want to learn, at most 500 characters. Asked for in a terminal when left out; required otherwise. |
567
+ | `--personas <list>` | Persona slugs to use instead of the suggestion, comma separated. An unknown slug is refused with the known ones named. |
568
+ | `--force` | Relink a repo that is already linked to another game. |
569
+ | `--json` | Print the server's plan as JSON and ask nothing: no brief, no hand over to `run`. Needs `--goal`, and `--game` when the repo is not linked. |
570
+
571
+ Your own agent gets the same plan from the MCP tool `plan_playtest`. No MCP
572
+ tool starts a playtest.
573
+
509
574
  ### personas
510
575
 
511
576
  Lists the persona slugs `--personas` accepts, from the content pack this game
@@ -691,6 +756,7 @@ splitting the job in two is what gets everything played.
691
756
  | `--no-upload-step-log` | Keep the step log (`transcript.jsonl`) on this machine. By default it uploads with the reports, because the evidence report in the dashboard is built from it: the inputs sent, what each observation read, the persona's notes and the checks made on its findings, with the local brief's secrets already scrubbed. `"uploads": { "step_log": false }` in the project config does the same for every run. This default applies to projects set up before 0.10.0 too: the older `"uploads": { "transcript": false }` that `init` used to write is not read as an opt out. Every run prints one line saying whether the step log uploads and how to keep it local; without it the dashboard shows the written report, not the evidence report. |
692
757
  | `--upload-step-log` | Upload the step log for this run even when the project config sets `"step_log": false`. `--upload-transcript` is its older name. |
693
758
  | `--no-replay` | `godot_driver` and `playwright_web`. Do not play the findings' recorded inputs again after the report. A replay makes no model call and costs nothing; it opens the game again for a few seconds (a second browser for a web build). |
759
+ | `--no-live` | Send nothing to the job's Watch live tab in the dashboard while the run plays. By default a persona run that uploads sends its recent steps (the input, what it meant to do, whether the screen changed) every few seconds and, only while someone has the tab open, a small picture of the latest changed screen, made in a temporary folder with ffmpeg when it is on this machine (steps only without it). It is free, is never retried, never slows or fails the run, and stops quietly if the server does not answer; the uploaded reports stay the record. `--dry-upload` and a step log kept on this machine (`--no-upload-step-log`, or `"step_log": false`) turn it off too. Every run prints one line saying which. |
694
760
  | `--dry-upload` | List every file and byte that would be sent, and send nothing. |
695
761
  | `--key-modifier <meta\|control>` | The modifier the browser driver uses for editing shortcuts such as select all. Defaults to this machine's own (Command on macOS, Control elsewhere); set it when the browser's platform is not this machine's. `RAVENSIGHT_KEY_MODIFIER` does the same. |
696
762
  | `--build-dir <dir>` | Serve an exported web build folder from this machine and play it: `index.html`, or the folder's one `.html` page (a Godot export named after the project). The local server sends `application/wasm`, Content-Encoding for Unity's Brotli and gzip files (`.br`, `.gz`), and cross-origin isolation, so threaded Godot, love.js and Emscripten builds get SharedArrayBuffer. `resume` serves the same folder again. Not with `--build-url`. The server answers only `127.0.0.1` or `localhost` on its own port and never serves dotfiles. |
@@ -1276,6 +1342,21 @@ optional job id.
1276
1342
  Opens the dashboard page for a job, or for the game. Takes `--game <gameId>` and
1277
1343
  an optional job id.
1278
1344
 
1345
+
1346
+ ### Let a run reach your game's servers
1347
+
1348
+ A browser build's run reaches nothing outside the build unless you ask. List the hosts your game's own servers
1349
+ answer on under Playtest, Network in the dashboard (an exact name such as `api.example.com`, or `*.example.com` for
1350
+ the names one level under it), then add `--allow-network`:
1351
+
1352
+ ```
1353
+ ravensight-playtest run --driver playwright_web --build-dir ./export --allow-network
1354
+ ```
1355
+
1356
+ The run reaches those hosts over https and wss and nothing else; the report's Network section lists the hosts it
1357
+ reached and the attempts that were blocked, by host. It costs the same. A Godot, desktop or native game is its own
1358
+ program on your machine, which the playtester cannot limit, so the flag is refused for it.
1359
+
1279
1360
  ## Playtest a live URL
1280
1361
 
1281
1362
  `run --url` points a playtest at your web game where it already runs: a staging