Coverage for app / services / scenarios / __init__.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-10-31 11:21 +0000

1"""Scenario runs: a developer's scripted agent chats, run on the real chat 

2path in a project of their own and exported whole for review 

3(docs/guides/scenario-runs.md). 

4 

5- ``schema``: the scenario file, validated at the boundary; 

6- ``provision``: the run's project, agents and grants; 

7- ``driver``: one turn through the chat route, every frame kept; 

8- ``export`` and ``checks``: what each turn did, and whether it was what 

9 the file expected; 

10- ``runner``: the background run and its record (``scenario_runs``); 

11- ``__main__``: the same, from a shell. 

12 

13Gated twice where a browser reaches it: ``SCENARIO_RUNS_ENABLED`` and the 

14``developer`` platform role (``router/app/scenario_runs``). 

15""" 

16 

17from app.services.scenarios.export import EXPORT_SCHEMA, filename 

18from app.services.scenarios.runner import RunInProgress, Status, execute, start 

19from app.services.scenarios.schema import ScenarioFile, ScenarioInvalid, load 

20 

21__all__ = [ 

22 "EXPORT_SCHEMA", 

23 "RunInProgress", 

24 "ScenarioFile", 

25 "ScenarioInvalid", 

26 "Status", 

27 "execute", 

28 "filename", 

29 "load", 

30 "start", 

31]