ghostlab 0.1.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 (96) hide show
  1. ghostlab-0.1.0/.gitignore +224 -0
  2. ghostlab-0.1.0/CONTRIBUTING.md +56 -0
  3. ghostlab-0.1.0/LICENSE +21 -0
  4. ghostlab-0.1.0/PKG-INFO +669 -0
  5. ghostlab-0.1.0/README.md +629 -0
  6. ghostlab-0.1.0/docs/cli.md +146 -0
  7. ghostlab-0.1.0/docs/concepts.md +37 -0
  8. ghostlab-0.1.0/docs/datasets-evaluation.md +108 -0
  9. ghostlab-0.1.0/docs/getting-started.md +49 -0
  10. ghostlab-0.1.0/docs/index.md +26 -0
  11. ghostlab-0.1.0/docs/publishing.md +45 -0
  12. ghostlab-0.1.0/ghostlab/__init__.py +5 -0
  13. ghostlab-0.1.0/ghostlab/__main__.py +4 -0
  14. ghostlab-0.1.0/ghostlab/cli.py +5 -0
  15. ghostlab-0.1.0/llms.txt +61 -0
  16. ghostlab-0.1.0/mkdocs.yml +18 -0
  17. ghostlab-0.1.0/personas/careful-celpip-beginner.json +21 -0
  18. ghostlab-0.1.0/personas/general-learning-edge-case.json +23 -0
  19. ghostlab-0.1.0/personas/ielts-power-user.json +23 -0
  20. ghostlab-0.1.0/personas/skeptical-toefl-retaker.json +22 -0
  21. ghostlab-0.1.0/pyproject.toml +100 -0
  22. ghostlab-0.1.0/rehearsal/__init__.py +3 -0
  23. ghostlab-0.1.0/rehearsal/__main__.py +4 -0
  24. ghostlab-0.1.0/rehearsal/apps_host/__init__.py +30 -0
  25. ghostlab-0.1.0/rehearsal/apps_host/assertions.py +102 -0
  26. ghostlab-0.1.0/rehearsal/apps_host/executor.py +112 -0
  27. ghostlab-0.1.0/rehearsal/apps_host/protocol.py +169 -0
  28. ghostlab-0.1.0/rehearsal/apps_host/renderer.py +205 -0
  29. ghostlab-0.1.0/rehearsal/apps_host/report.py +123 -0
  30. ghostlab-0.1.0/rehearsal/cli.py +1027 -0
  31. ghostlab-0.1.0/rehearsal/codex_backend.py +104 -0
  32. ghostlab-0.1.0/rehearsal/compare.py +117 -0
  33. ghostlab-0.1.0/rehearsal/config.py +193 -0
  34. ghostlab-0.1.0/rehearsal/critique.py +231 -0
  35. ghostlab-0.1.0/rehearsal/dataset.py +297 -0
  36. ghostlab-0.1.0/rehearsal/evaluate.py +478 -0
  37. ghostlab-0.1.0/rehearsal/generate.py +215 -0
  38. ghostlab-0.1.0/rehearsal/inspect.py +236 -0
  39. ghostlab-0.1.0/rehearsal/logging.py +17 -0
  40. ghostlab-0.1.0/rehearsal/mcp_apps.py +448 -0
  41. ghostlab-0.1.0/rehearsal/mcp_client.py +285 -0
  42. ghostlab-0.1.0/rehearsal/mcp_config.py +34 -0
  43. ghostlab-0.1.0/rehearsal/orchestrator.py +236 -0
  44. ghostlab-0.1.0/rehearsal/personas.py +134 -0
  45. ghostlab-0.1.0/rehearsal/profile.py +221 -0
  46. ghostlab-0.1.0/rehearsal/prompts.py +90 -0
  47. ghostlab-0.1.0/rehearsal/report.py +64 -0
  48. ghostlab-0.1.0/rehearsal/review.py +248 -0
  49. ghostlab-0.1.0/rehearsal/runner_presets.py +113 -0
  50. ghostlab-0.1.0/rehearsal/runners.py +178 -0
  51. ghostlab-0.1.0/rehearsal/scorecard.py +266 -0
  52. ghostlab-0.1.0/rehearsal/storage/__init__.py +19 -0
  53. ghostlab-0.1.0/rehearsal/storage/db.py +136 -0
  54. ghostlab-0.1.0/rehearsal/storage/hashing.py +19 -0
  55. ghostlab-0.1.0/rehearsal/storage/ids.py +44 -0
  56. ghostlab-0.1.0/rehearsal/storage/migrations/0001_initial.sql +349 -0
  57. ghostlab-0.1.0/rehearsal/storage/redact.py +46 -0
  58. ghostlab-0.1.0/rehearsal/storage/repository.py +1036 -0
  59. ghostlab-0.1.0/rehearsal/tool_capture.py +183 -0
  60. ghostlab-0.1.0/rehearsal/types.py +30 -0
  61. ghostlab-0.1.0/rehearsal/ui/__init__.py +1 -0
  62. ghostlab-0.1.0/rehearsal/ui/app.py +1095 -0
  63. ghostlab-0.1.0/runners/claude-process.example.json +7 -0
  64. ghostlab-0.1.0/runners/codex-cortex-aut.json +20 -0
  65. ghostlab-0.1.0/runners/codex-cortex-local-aut.json +20 -0
  66. ghostlab-0.1.0/runners/codex-cortex-local-session.json +20 -0
  67. ghostlab-0.1.0/runners/codex-process.example.json +7 -0
  68. ghostlab-0.1.0/runners/codex-user-emulator.json +16 -0
  69. ghostlab-0.1.0/runners/mock-aut.json +4 -0
  70. ghostlab-0.1.0/runners/mock-user.json +4 -0
  71. ghostlab-0.1.0/scenarios/basic-discovery.json +19 -0
  72. ghostlab-0.1.0/scenarios/cortex-onboarding-status.json +19 -0
  73. ghostlab-0.1.0/scenarios/cortex-practice-generation.json +19 -0
  74. ghostlab-0.1.0/scenarios/error-recovery.json +19 -0
  75. ghostlab-0.1.0/targets/cortex-local.json +14 -0
  76. ghostlab-0.1.0/targets/cortex-ngrok.json +29 -0
  77. ghostlab-0.1.0/targets/example-http.json +16 -0
  78. ghostlab-0.1.0/targets/example-stdio.json +18 -0
  79. ghostlab-0.1.0/tests/test_apps_host.py +198 -0
  80. ghostlab-0.1.0/tests/test_compare.py +53 -0
  81. ghostlab-0.1.0/tests/test_config.py +67 -0
  82. ghostlab-0.1.0/tests/test_critique.py +107 -0
  83. ghostlab-0.1.0/tests/test_dataset.py +72 -0
  84. ghostlab-0.1.0/tests/test_evaluate.py +211 -0
  85. ghostlab-0.1.0/tests/test_generate.py +50 -0
  86. ghostlab-0.1.0/tests/test_inspect_lint.py +80 -0
  87. ghostlab-0.1.0/tests/test_mcp_apps.py +231 -0
  88. ghostlab-0.1.0/tests/test_orchestrator.py +53 -0
  89. ghostlab-0.1.0/tests/test_personas.py +72 -0
  90. ghostlab-0.1.0/tests/test_profile.py +39 -0
  91. ghostlab-0.1.0/tests/test_review.py +92 -0
  92. ghostlab-0.1.0/tests/test_runner_presets.py +60 -0
  93. ghostlab-0.1.0/tests/test_scorecard.py +112 -0
  94. ghostlab-0.1.0/tests/test_session_runner.py +46 -0
  95. ghostlab-0.1.0/tests/test_storage.py +322 -0
  96. ghostlab-0.1.0/tests/test_tool_capture.py +177 -0
@@ -0,0 +1,224 @@
1
+ runs/
2
+ datasets/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[codz]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ # Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ # poetry.lock
112
+ # poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ # pdm.lock
119
+ # pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ # pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # Redis
138
+ *.rdb
139
+ *.aof
140
+ *.pid
141
+
142
+ # RabbitMQ
143
+ mnesia/
144
+ rabbitmq/
145
+ rabbitmq-data/
146
+
147
+ # ActiveMQ
148
+ activemq-data/
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ # .idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+ # Temporary file for partial code execution
207
+ tempCodeRunnerFile.py
208
+
209
+ # Ruff stuff:
210
+ .ruff_cache/
211
+
212
+ # PyPI configuration file
213
+ .pypirc
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Streamlit
221
+ .streamlit/secrets.toml
222
+
223
+ # Streamlit UI workspace (generated)
224
+ ghostlab_workspace/
@@ -0,0 +1,56 @@
1
+ # Contributing to MCP Rehearsal / 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
+
15
+ ## Setup
16
+
17
+ ```bash
18
+ python3.13 -m venv .venv
19
+ .venv/bin/pip install -e '.[dev]' # add ',ui' and/or ',apps' for those features
20
+ .venv/bin/pytest # run the test suite
21
+ ```
22
+
23
+ Optional extras:
24
+
25
+ - `.[ui]` — the Streamlit pipeline UI (`ghostlab ui`).
26
+ - `.[apps]` — Playwright, for rendering MCP Apps `ui://` widgets
27
+ (`ghostlab apps-render`). After install: `playwright install chrome`.
28
+
29
+ ## Conventions
30
+
31
+ - **Python 3.9-syntax-safe.** CI targets 3.10–3.13, but contributors run 3.9
32
+ locally — use `from __future__ import annotations` and avoid 3.10+ syntax
33
+ (e.g. `match`). Built-in generics in annotations are fine because they are
34
+ stringified.
35
+ - **Test your change.** Most logic is pure and unit-tested with `unittest` under
36
+ `tests/`. Browser/network-dependent paths should degrade gracefully and be
37
+ guarded so the suite passes without them.
38
+ - **Keep artifacts hybrid.** Commands write human-readable `.md` + machine
39
+ `.json`; SQLite is the system of record but never required for a run to work.
40
+ - Match the surrounding style: small modules, docstrings that explain *why*, and
41
+ no new heavyweight dependencies in the core (use an optional extra instead).
42
+
43
+ ## Making a change
44
+
45
+ 1. Branch off `main` (e.g. `feat/…`, `fix/…`, `docs/…`).
46
+ 2. Make the change with tests; run `.venv/bin/pytest` (and `python -m build` if
47
+ you touched packaging).
48
+ 3. Open a PR against `main` with a clear description of what and why. Reference
49
+ the issue it addresses (`Closes #NN`).
50
+
51
+ ## Where to start
52
+
53
+ Browse the [open issues](https://github.com/sajjadGG/Rehearsal/issues) — they are
54
+ labeled by pipeline stage (`pipeline:understand`, `pipeline:run`,
55
+ `pipeline:evaluate`, …). Good first contributions: a new target/scenario/runner
56
+ preset, an additional lint or assertion, or a per-widget MCP Apps assertion.
ghostlab-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sajad (sajjadGG)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.