ghostlab 0.2.1__tar.gz → 0.4.0__tar.gz

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 (190) hide show
  1. ghostlab-0.4.0/CONTRIBUTING.md +114 -0
  2. ghostlab-0.4.0/PKG-INFO +935 -0
  3. ghostlab-0.4.0/README.md +893 -0
  4. ghostlab-0.4.0/docs/cli.md +852 -0
  5. ghostlab-0.4.0/docs/concepts.md +163 -0
  6. ghostlab-0.4.0/docs/configured-agent-lab.md +268 -0
  7. {ghostlab-0.2.1 → ghostlab-0.4.0}/docs/datasets-evaluation.md +15 -10
  8. ghostlab-0.4.0/docs/getting-started.md +388 -0
  9. ghostlab-0.4.0/docs/ghostlab-vision-gap-and-roadmap.md +197 -0
  10. ghostlab-0.4.0/docs/index.md +49 -0
  11. {ghostlab-0.2.1 → ghostlab-0.4.0}/docs/publishing.md +4 -2
  12. ghostlab-0.4.0/docs/run-an-agent.md +147 -0
  13. {ghostlab-0.2.1 → ghostlab-0.4.0}/examples/README.md +38 -2
  14. ghostlab-0.4.0/examples/agent-lab/AGENTS.md +4 -0
  15. ghostlab-0.4.0/examples/agent-lab/agent.json +22 -0
  16. ghostlab-0.4.0/examples/agent-lab/mcp.json +5 -0
  17. ghostlab-0.4.0/examples/agent-lab/repo/CHANGELOG.md +4 -0
  18. ghostlab-0.4.0/examples/agent-lab/repo/README.md +3 -0
  19. ghostlab-0.4.0/examples/agent-lab/repo/src/app.py +2 -0
  20. ghostlab-0.4.0/examples/agent-lab/skills/release-notes/SKILL.md +7 -0
  21. ghostlab-0.4.0/examples/agent-lab/task-agent.json +20 -0
  22. ghostlab-0.4.0/examples/agent-lab/tiny-mcp.js +62 -0
  23. ghostlab-0.4.0/examples/agent.json +50 -0
  24. ghostlab-0.4.0/examples/copilot-agent.json +46 -0
  25. ghostlab-0.4.0/examples/demo-skill/SKILL.md +9 -0
  26. {ghostlab-0.2.1 → ghostlab-0.4.0}/llms.txt +28 -13
  27. {ghostlab-0.2.1 → ghostlab-0.4.0}/mkdocs.yml +3 -1
  28. {ghostlab-0.2.1 → ghostlab-0.4.0}/pyproject.toml +12 -3
  29. ghostlab-0.4.0/rehearsal/__init__.py +3 -0
  30. ghostlab-0.4.0/rehearsal/agent_exec.py +675 -0
  31. ghostlab-0.4.0/rehearsal/agent_profile.py +303 -0
  32. ghostlab-0.4.0/rehearsal/agent_sandbox.py +339 -0
  33. ghostlab-0.4.0/rehearsal/agents.py +251 -0
  34. ghostlab-0.4.0/rehearsal/artifact_run.py +919 -0
  35. ghostlab-0.4.0/rehearsal/cli.py +4369 -0
  36. ghostlab-0.4.0/rehearsal/cli_ui.py +118 -0
  37. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/codex_backend.py +50 -1
  38. ghostlab-0.4.0/rehearsal/config.py +863 -0
  39. ghostlab-0.4.0/rehearsal/copilot_backend.py +256 -0
  40. ghostlab-0.4.0/rehearsal/copilot_llm_backend.py +299 -0
  41. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/dashboard.py +90 -26
  42. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/dataset.py +5 -1
  43. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/evaluate.py +208 -13
  44. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/generate.py +43 -13
  45. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/hosts/__init__.py +26 -4
  46. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/hosts/base.py +1 -1
  47. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/hosts/direct.py +17 -2
  48. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/hosts/runner.py +39 -14
  49. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/inspect.py +3 -2
  50. ghostlab-0.4.0/rehearsal/jobs.py +808 -0
  51. ghostlab-0.4.0/rehearsal/lab.py +345 -0
  52. ghostlab-0.4.0/rehearsal/llm_backend.py +110 -0
  53. ghostlab-0.4.0/rehearsal/opencode_backend.py +228 -0
  54. ghostlab-0.4.0/rehearsal/opencode_config.py +223 -0
  55. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/orchestrator.py +232 -11
  56. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/personas.py +3 -3
  57. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/plan.py +21 -13
  58. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/plan_generate.py +24 -4
  59. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/profile.py +73 -13
  60. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/prompts.py +135 -3
  61. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/report.py +7 -3
  62. ghostlab-0.4.0/rehearsal/resolved_config.py +228 -0
  63. ghostlab-0.4.0/rehearsal/rollout_report.py +327 -0
  64. ghostlab-0.4.0/rehearsal/runner_presets.py +282 -0
  65. ghostlab-0.4.0/rehearsal/runners.py +604 -0
  66. ghostlab-0.4.0/rehearsal/sandbox.py +1000 -0
  67. ghostlab-0.4.0/rehearsal/scorecard.py +617 -0
  68. ghostlab-0.4.0/rehearsal/scorer_wrapper.py +154 -0
  69. ghostlab-0.4.0/rehearsal/scorers.py +2425 -0
  70. ghostlab-0.4.0/rehearsal/session_provenance.py +40 -0
  71. ghostlab-0.4.0/rehearsal/skills.py +124 -0
  72. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/spec.py +174 -8
  73. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/testrun.py +66 -5
  74. ghostlab-0.4.0/rehearsal/tool_capture.py +536 -0
  75. ghostlab-0.4.0/rehearsal/ui/app.py +937 -0
  76. ghostlab-0.4.0/rehearsal/workspace_export.py +703 -0
  77. ghostlab-0.2.1/runners/codex-cortex-local-aut.json → ghostlab-0.4.0/runners/codex-aut.example.json +1 -1
  78. ghostlab-0.2.1/runners/codex-cortex-local-session.json → ghostlab-0.4.0/runners/codex-session.example.json +1 -1
  79. ghostlab-0.4.0/runners/copilot-aut.example.json +30 -0
  80. ghostlab-0.4.0/runners/copilot-user.example.json +28 -0
  81. ghostlab-0.4.0/tests/openshell_fake.py +212 -0
  82. ghostlab-0.4.0/tests/test_agent_exec.py +366 -0
  83. ghostlab-0.4.0/tests/test_agents.py +83 -0
  84. ghostlab-0.4.0/tests/test_artifact_run.py +1249 -0
  85. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_cli_spec_flow.py +160 -22
  86. ghostlab-0.4.0/tests/test_codex_backend_sandbox.py +47 -0
  87. ghostlab-0.4.0/tests/test_configured_agent.py +383 -0
  88. ghostlab-0.4.0/tests/test_copilot_backend.py +608 -0
  89. ghostlab-0.4.0/tests/test_copilot_llm_backend.py +279 -0
  90. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_evaluate.py +44 -0
  91. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_generate.py +26 -0
  92. ghostlab-0.4.0/tests/test_harness_runners.py +118 -0
  93. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_hosts_runner.py +2 -2
  94. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_jobs.py +79 -2
  95. ghostlab-0.4.0/tests/test_opencode_backend.py +309 -0
  96. ghostlab-0.4.0/tests/test_prompts.py +32 -0
  97. ghostlab-0.4.0/tests/test_sandbox.py +310 -0
  98. ghostlab-0.4.0/tests/test_sandbox_stdio.py +213 -0
  99. ghostlab-0.4.0/tests/test_scorecard.py +343 -0
  100. ghostlab-0.4.0/tests/test_scorers.py +2141 -0
  101. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_session_runner.py +28 -0
  102. ghostlab-0.4.0/tests/test_skills.py +49 -0
  103. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_spec.py +12 -0
  104. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_testrun.py +36 -0
  105. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_tool_capture.py +9 -0
  106. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_widgets_and_dashboard.py +5 -0
  107. ghostlab-0.2.1/CONTRIBUTING.md +0 -56
  108. ghostlab-0.2.1/PKG-INFO +0 -557
  109. ghostlab-0.2.1/README.md +0 -517
  110. ghostlab-0.2.1/docs/cli.md +0 -354
  111. ghostlab-0.2.1/docs/concepts.md +0 -56
  112. ghostlab-0.2.1/docs/getting-started.md +0 -126
  113. ghostlab-0.2.1/docs/ghostlab-vision-gap-and-roadmap.md +0 -963
  114. ghostlab-0.2.1/docs/index.md +0 -26
  115. ghostlab-0.2.1/rehearsal/__init__.py +0 -3
  116. ghostlab-0.2.1/rehearsal/cli.py +0 -2246
  117. ghostlab-0.2.1/rehearsal/config.py +0 -208
  118. ghostlab-0.2.1/rehearsal/jobs.py +0 -245
  119. ghostlab-0.2.1/rehearsal/runner_presets.py +0 -113
  120. ghostlab-0.2.1/rehearsal/runners.py +0 -178
  121. ghostlab-0.2.1/rehearsal/scorecard.py +0 -266
  122. ghostlab-0.2.1/rehearsal/tool_capture.py +0 -183
  123. ghostlab-0.2.1/rehearsal/ui/app.py +0 -487
  124. ghostlab-0.2.1/runners/codex-cortex-aut.json +0 -20
  125. ghostlab-0.2.1/tests/test_scorecard.py +0 -112
  126. {ghostlab-0.2.1 → ghostlab-0.4.0}/.gitignore +0 -0
  127. {ghostlab-0.2.1 → ghostlab-0.4.0}/LICENSE +0 -0
  128. {ghostlab-0.2.1 → ghostlab-0.4.0}/examples/mcp-config.json +0 -0
  129. {ghostlab-0.2.1 → ghostlab-0.4.0}/examples/scenario.json +0 -0
  130. {ghostlab-0.2.1 → ghostlab-0.4.0}/examples/target.json +0 -0
  131. {ghostlab-0.2.1 → ghostlab-0.4.0}/ghostlab/__init__.py +0 -0
  132. {ghostlab-0.2.1 → ghostlab-0.4.0}/ghostlab/__main__.py +0 -0
  133. {ghostlab-0.2.1 → ghostlab-0.4.0}/ghostlab/cli.py +0 -0
  134. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/__main__.py +0 -0
  135. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/__init__.py +0 -0
  136. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/assertions.py +0 -0
  137. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/executor.py +0 -0
  138. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/live.py +0 -0
  139. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/protocol.py +0 -0
  140. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/renderer.py +0 -0
  141. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/apps_host/report.py +0 -0
  142. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/compare.py +0 -0
  143. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/contract.py +0 -0
  144. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/critique.py +0 -0
  145. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/logging.py +0 -0
  146. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/mcp_apps.py +0 -0
  147. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/mcp_client.py +0 -0
  148. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/mcp_config.py +0 -0
  149. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/mcp_targets.py +0 -0
  150. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/readiness.py +0 -0
  151. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/review.py +0 -0
  152. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/sampling.py +0 -0
  153. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/setup_runtime.py +0 -0
  154. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/__init__.py +0 -0
  155. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/db.py +0 -0
  156. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/hashing.py +0 -0
  157. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/ids.py +0 -0
  158. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/migrations/0001_initial.sql +0 -0
  159. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/redact.py +0 -0
  160. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/storage/repository.py +0 -0
  161. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/termcolor.py +0 -0
  162. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/types.py +0 -0
  163. {ghostlab-0.2.1 → ghostlab-0.4.0}/rehearsal/ui/__init__.py +0 -0
  164. {ghostlab-0.2.1 → ghostlab-0.4.0}/runners/claude-process.example.json +0 -0
  165. {ghostlab-0.2.1 → ghostlab-0.4.0}/runners/codex-process.example.json +0 -0
  166. {ghostlab-0.2.1 → ghostlab-0.4.0}/runners/codex-user-emulator.json +0 -0
  167. {ghostlab-0.2.1 → ghostlab-0.4.0}/runners/mock-aut.json +0 -0
  168. {ghostlab-0.2.1 → ghostlab-0.4.0}/runners/mock-user.json +0 -0
  169. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_apps_host.py +0 -0
  170. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_apps_live.py +0 -0
  171. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_compare.py +0 -0
  172. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_config.py +0 -0
  173. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_contract.py +0 -0
  174. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_critique.py +0 -0
  175. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_dataset.py +0 -0
  176. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_inspect_lint.py +0 -0
  177. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_mcp_apps.py +0 -0
  178. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_mcp_client.py +0 -0
  179. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_mcp_targets.py +0 -0
  180. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_orchestrator.py +0 -0
  181. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_personas.py +0 -0
  182. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_plan.py +0 -0
  183. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_plan_generate.py +0 -0
  184. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_profile.py +0 -0
  185. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_readiness.py +0 -0
  186. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_review.py +0 -0
  187. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_runner_presets.py +0 -0
  188. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_sampling.py +0 -0
  189. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_setup_runtime.py +0 -0
  190. {ghostlab-0.2.1 → ghostlab-0.4.0}/tests/test_storage.py +0 -0
@@ -0,0 +1,114 @@
1
+ # Contributing to Ghostlab
2
+
3
+ Thanks for helping improve Ghostlab! This guide is written to be friendly to both
4
+ humans and coding agents. For a machine-readable map of the project, see
5
+ [`llms.txt`](llms.txt).
6
+
7
+ ## Project shape
8
+
9
+ - Python package: `rehearsal` · installed CLI: `ghostlab` (alias `rehearsal`).
10
+ - Pipeline: **understand → generate → run → evaluate**, plus optional SQLite
11
+ persistence, a Streamlit UI, and an MCP Apps render layer.
12
+ - The MCP client uses only the standard library; coding-agent CLIs (Codex /
13
+ Claude) are the agent backends.
14
+ - NVIDIA OpenShell is the default execution backend for real runner sessions
15
+ and local stdio MCPs; `--sandbox local` is the explicit trusted-host opt-out.
16
+
17
+ ## Setup
18
+
19
+ ```bash
20
+ python3 -m venv .venv # Python 3.10+
21
+ .venv/bin/pip install -e '.[dev]' # add ',ui' and/or ',apps' for those features
22
+ .venv/bin/pytest # run the test suite
23
+ ```
24
+
25
+ Optional extras:
26
+
27
+ - `.[ui]` — the Streamlit pipeline UI (`ghostlab ui`).
28
+ - `.[apps]` — Playwright, for rendering MCP Apps `ui://` widgets
29
+ (`ghostlab apps-render`). After install: `playwright install chrome`.
30
+
31
+ OpenShell integration work also needs a supported compute driver (Docker
32
+ Desktop is the simplest local option) and a connected gateway:
33
+
34
+ ```bash
35
+ openshell status
36
+ ghostlab doctor
37
+ ```
38
+
39
+ For documentation work:
40
+
41
+ ```bash
42
+ .venv/bin/mkdocs serve # live-preview the wiki locally
43
+ .venv/bin/mkdocs build --strict # what CI enforces
44
+ ```
45
+
46
+ ## Conventions
47
+
48
+ - **Support Python 3.10–3.13.** Keep syntax and dependencies compatible with
49
+ the declared `requires-python` range and CI matrix.
50
+ - **Test your change.** Most logic is pure and unit-tested with `unittest` under
51
+ `tests/`. Browser/network-dependent paths should degrade gracefully and be
52
+ guarded so the suite passes without them.
53
+ - **Keep artifacts hybrid.** Commands write human-readable `.md` + machine
54
+ `.json`; SQLite is the system of record but never required for a run to work.
55
+ - **Keep commits focused** on one logical change, with tests or docs alongside
56
+ behavior changes. Don't commit generated output (`jobs/`, `runs/`, `datasets/`,
57
+ `dist/`, `site/`), caches, or `.venv` — they're gitignored.
58
+ - Match the surrounding style: small modules, docstrings that explain *why*, and
59
+ no new heavyweight dependencies in the core (use an optional extra instead).
60
+
61
+ ## Making a change
62
+
63
+ 1. Branch off `main` (e.g. `feat/…`, `fix/…`, `docs/…`).
64
+ 2. Make the change with tests.
65
+ 3. Open a PR against `main` with a clear description of what and why. Reference
66
+ the issue it addresses (`Closes #NN`).
67
+
68
+ When you **add or change a CLI command**, update all of:
69
+
70
+ - `rehearsal/cli.py` (the command)
71
+ - `tests/` (coverage)
72
+ - `README.md` (the command reference)
73
+ - `docs/cli.md` (the wiki page)
74
+
75
+ Use `ghostlab` (not `rehearsal`) in public examples.
76
+
77
+ ## Pull request checklist
78
+
79
+ Run the checks that match your change:
80
+
81
+ ```bash
82
+ .venv/bin/pytest # always
83
+ .venv/bin/mkdocs build --strict # if you touched docs/ or mkdocs.yml
84
+ .venv/bin/python -m build # if you touched packaging
85
+ .venv/bin/twine check dist/* # "
86
+ ```
87
+
88
+ Run the full set for release, packaging, workflow, or public-CLI changes.
89
+
90
+ ## Documentation site
91
+
92
+ The wiki lives in `docs/` and is built with MkDocs. The **Pages** workflow
93
+ (`.github/workflows/pages.yml`) deploys it to GitHub Pages on pushes to `main`,
94
+ release tags, and manual runs. Public docs: <https://sajjadgg.github.io/Ghostlab/>.
95
+
96
+ ## Releases
97
+
98
+ Publishing to PyPI is automated by `.github/workflows/publish.yml` via
99
+ [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/) (no tokens).
100
+ It runs when you **publish a GitHub Release** (or dispatch the workflow manually).
101
+ Version tags use `v*.*.*`.
102
+
103
+ To cut a release:
104
+
105
+ 1. Bump `__version__` in `rehearsal/__init__.py`.
106
+ 2. Validate locally: `.venv/bin/pytest && .venv/bin/python -m build && .venv/bin/twine check dist/*`.
107
+ 3. `gh release create v<x.y.z> --generate-notes` — this triggers `publish.yml`.
108
+
109
+ ## Where to start
110
+
111
+ Browse the [open issues](https://github.com/sajjadGG/Ghostlab/issues) — they are
112
+ labeled by pipeline stage (`pipeline:understand`, `pipeline:run`,
113
+ `pipeline:evaluate`, …). Good first contributions: a new target/scenario/runner
114
+ preset, an additional lint or assertion, or a per-widget MCP Apps assertion.