capscorp 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.
- capscorp-0.1.0/.claude/launch.json +19 -0
- capscorp-0.1.0/.gitattributes +2 -0
- capscorp-0.1.0/.github/workflows/ci.yml +38 -0
- capscorp-0.1.0/.github/workflows/docs.yml +44 -0
- capscorp-0.1.0/.github/workflows/release.yaml +55 -0
- capscorp-0.1.0/.gitignore +228 -0
- capscorp-0.1.0/.pre-commit-config.yaml +43 -0
- capscorp-0.1.0/.prettierignore +7 -0
- capscorp-0.1.0/LICENSE +21 -0
- capscorp-0.1.0/PKG-INFO +201 -0
- capscorp-0.1.0/README.md +180 -0
- capscorp-0.1.0/docs/assets/README.md +21 -0
- capscorp-0.1.0/docs/assets/extra.css +83 -0
- capscorp-0.1.0/docs/assets/logo-dark.svg +10 -0
- capscorp-0.1.0/docs/assets/logo-mark.svg +8 -0
- capscorp-0.1.0/docs/assets/logo.svg +10 -0
- capscorp-0.1.0/docs/capsules.md +144 -0
- capscorp-0.1.0/docs/compute.md +64 -0
- capscorp-0.1.0/docs/export.md +57 -0
- capscorp-0.1.0/docs/getting-started.md +181 -0
- capscorp-0.1.0/docs/index.md +119 -0
- capscorp-0.1.0/docs/mcp.md +61 -0
- capscorp-0.1.0/docs/releasing.md +96 -0
- capscorp-0.1.0/docs/roadmap.md +71 -0
- capscorp-0.1.0/docs/verification.md +94 -0
- capscorp-0.1.0/docs_hooks.py +24 -0
- capscorp-0.1.0/install.sh +131 -0
- capscorp-0.1.0/mkdocs.yml +81 -0
- capscorp-0.1.0/pixi.lock +3464 -0
- capscorp-0.1.0/pixi.toml +72 -0
- capscorp-0.1.0/pyproject.toml +78 -0
- capscorp-0.1.0/setup.cfg +4 -0
- capscorp-0.1.0/src/capscorp.egg-info/PKG-INFO +201 -0
- capscorp-0.1.0/src/capscorp.egg-info/SOURCES.txt +89 -0
- capscorp-0.1.0/src/capscorp.egg-info/dependency_links.txt +1 -0
- capscorp-0.1.0/src/capscorp.egg-info/entry_points.txt +2 -0
- capscorp-0.1.0/src/capscorp.egg-info/requires.txt +7 -0
- capscorp-0.1.0/src/capscorp.egg-info/top_level.txt +1 -0
- capscorp-0.1.0/src/capsule_corp/__init__.py +14 -0
- capscorp-0.1.0/src/capsule_corp/checks.py +281 -0
- capscorp-0.1.0/src/capsule_corp/cli.py +698 -0
- capscorp-0.1.0/src/capsule_corp/doctor.py +134 -0
- capscorp-0.1.0/src/capsule_corp/editor.py +64 -0
- capscorp-0.1.0/src/capsule_corp/executors/__init__.py +64 -0
- capscorp-0.1.0/src/capsule_corp/executors/base.py +66 -0
- capscorp-0.1.0/src/capsule_corp/executors/local.py +105 -0
- capscorp-0.1.0/src/capsule_corp/executors/modal_exec.py +157 -0
- capscorp-0.1.0/src/capsule_corp/executors/slurm.py +185 -0
- capscorp-0.1.0/src/capsule_corp/executors/ssh_docker.py +120 -0
- capscorp-0.1.0/src/capsule_corp/executors/transport.py +97 -0
- capscorp-0.1.0/src/capsule_corp/export.py +469 -0
- capscorp-0.1.0/src/capsule_corp/index.py +117 -0
- capscorp-0.1.0/src/capsule_corp/mcp_server.py +277 -0
- capscorp-0.1.0/src/capsule_corp/models.py +230 -0
- capscorp-0.1.0/src/capsule_corp/phases/__init__.py +7 -0
- capscorp-0.1.0/src/capsule_corp/phases/design.py +129 -0
- capscorp-0.1.0/src/capsule_corp/phases/implement.py +78 -0
- capscorp-0.1.0/src/capsule_corp/phases/scaffold.py +134 -0
- capscorp-0.1.0/src/capsule_corp/phases/verify.py +210 -0
- capscorp-0.1.0/src/capsule_corp/progress.py +139 -0
- capscorp-0.1.0/src/capsule_corp/prompts.py +210 -0
- capscorp-0.1.0/src/capsule_corp/runners/__init__.py +10 -0
- capscorp-0.1.0/src/capsule_corp/runners/base.py +76 -0
- capscorp-0.1.0/src/capsule_corp/runners/pi.py +259 -0
- capscorp-0.1.0/src/capsule_corp/settings.py +169 -0
- capscorp-0.1.0/src/capsule_corp/store.py +470 -0
- capscorp-0.1.0/src/capsule_corp/tui/__init__.py +5 -0
- capscorp-0.1.0/src/capsule_corp/tui/app.py +397 -0
- capscorp-0.1.0/src/capsule_corp/tui/code.py +160 -0
- capscorp-0.1.0/src/capsule_corp/ui.py +39 -0
- capscorp-0.1.0/tests/__init__.py +0 -0
- capscorp-0.1.0/tests/conftest.py +18 -0
- capscorp-0.1.0/tests/helpers.py +72 -0
- capscorp-0.1.0/tests/test_checks.py +180 -0
- capscorp-0.1.0/tests/test_cli.py +142 -0
- capscorp-0.1.0/tests/test_doctor.py +70 -0
- capscorp-0.1.0/tests/test_editor.py +56 -0
- capscorp-0.1.0/tests/test_executors.py +263 -0
- capscorp-0.1.0/tests/test_export.py +144 -0
- capscorp-0.1.0/tests/test_index.py +45 -0
- capscorp-0.1.0/tests/test_integration.py +145 -0
- capscorp-0.1.0/tests/test_mcp_server.py +127 -0
- capscorp-0.1.0/tests/test_models.py +43 -0
- capscorp-0.1.0/tests/test_phases.py +207 -0
- capscorp-0.1.0/tests/test_progress.py +104 -0
- capscorp-0.1.0/tests/test_runner_pi.py +143 -0
- capscorp-0.1.0/tests/test_settings.py +52 -0
- capscorp-0.1.0/tests/test_store.py +182 -0
- capscorp-0.1.0/tests/test_tui.py +223 -0
- capscorp-0.1.0/tests/test_unfreeze.py +97 -0
- capscorp-0.1.0/tests/test_verify.py +209 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ci-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
check:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: prefix-dev/setup-pixi@v0.8.1
|
|
19
|
+
with:
|
|
20
|
+
environments: default
|
|
21
|
+
cache: true
|
|
22
|
+
|
|
23
|
+
- name: Install the package
|
|
24
|
+
run: pixi run postinstall
|
|
25
|
+
|
|
26
|
+
- name: Lint
|
|
27
|
+
run: pixi run pre-commit-run
|
|
28
|
+
|
|
29
|
+
- name: Typecheck
|
|
30
|
+
run: pixi run typecheck
|
|
31
|
+
|
|
32
|
+
# Integration tests are excluded by default: they call a real model and cost
|
|
33
|
+
# money. Run them locally with `pixi run test-integration`.
|
|
34
|
+
- name: Test
|
|
35
|
+
run: pixi run test
|
|
36
|
+
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: pixi run docs-build
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
# Never cancel a deploy midway; let an in-flight one finish.
|
|
14
|
+
concurrency:
|
|
15
|
+
group: pages
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- uses: prefix-dev/setup-pixi@v0.8.1
|
|
25
|
+
with:
|
|
26
|
+
environments: docs
|
|
27
|
+
cache: true
|
|
28
|
+
|
|
29
|
+
- name: Build site
|
|
30
|
+
run: pixi run -e docs docs-build
|
|
31
|
+
|
|
32
|
+
- uses: actions/upload-pages-artifact@v3
|
|
33
|
+
with:
|
|
34
|
+
path: site
|
|
35
|
+
|
|
36
|
+
deploy:
|
|
37
|
+
needs: build
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
environment:
|
|
40
|
+
name: github-pages
|
|
41
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
42
|
+
steps:
|
|
43
|
+
- id: deployment
|
|
44
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: astral-sh/setup-uv@v5
|
|
15
|
+
|
|
16
|
+
# A tag that disagrees with the packaged version would publish something
|
|
17
|
+
# nobody can correlate with the repo.
|
|
18
|
+
- name: Check the tag matches the packaged version
|
|
19
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
20
|
+
run: |
|
|
21
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
22
|
+
pkg="$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)"
|
|
23
|
+
if [ "$tag" != "$pkg" ]; then
|
|
24
|
+
echo "tag v$tag does not match pyproject version $pkg" >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
echo "releasing $pkg"
|
|
28
|
+
|
|
29
|
+
- name: Build sdist and wheel
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Check the artifacts
|
|
33
|
+
run: uvx twine check dist/*
|
|
34
|
+
|
|
35
|
+
- uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/
|
|
39
|
+
|
|
40
|
+
publish:
|
|
41
|
+
needs: build
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
environment:
|
|
44
|
+
name: pypi
|
|
45
|
+
url: https://pypi.org/p/capscorp
|
|
46
|
+
permissions:
|
|
47
|
+
# Required for PyPI trusted publishing. No API token is stored anywhere.
|
|
48
|
+
id-token: write
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# pixi
|
|
221
|
+
.pixi/
|
|
222
|
+
*.egg-info/
|
|
223
|
+
|
|
224
|
+
# capsule-corp local index (rebuildable from files)
|
|
225
|
+
.capsule-corp/index.db
|
|
226
|
+
|
|
227
|
+
# built docs site
|
|
228
|
+
site/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
exclude: ^(\.copier-answers\.yml)|.pixi$
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v4.5.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-toml
|
|
10
|
+
|
|
11
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
12
|
+
rev: v0.3.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff
|
|
15
|
+
# Block style, not [flow, style]: YAML splits flow sequences on commas, which
|
|
16
|
+
# would turn --select=C901,E501 into a flag plus a bogus filename.
|
|
17
|
+
args:
|
|
18
|
+
- --fix
|
|
19
|
+
- --select=C901,E501
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
23
|
+
rev: v1.8.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: mypy
|
|
26
|
+
# The hook runs in its own isolated env, so it needs the runtime
|
|
27
|
+
# dependencies whose decorators and models appear in our signatures.
|
|
28
|
+
additional_dependencies:
|
|
29
|
+
- types-setuptools
|
|
30
|
+
- pydantic
|
|
31
|
+
- typer
|
|
32
|
+
- pytest
|
|
33
|
+
- tomlkit
|
|
34
|
+
- platformdirs
|
|
35
|
+
- rich
|
|
36
|
+
- textual
|
|
37
|
+
- mcp
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
40
|
+
rev: v4.0.0-alpha.8
|
|
41
|
+
hooks:
|
|
42
|
+
- id: prettier
|
|
43
|
+
types_or: [yaml, json, markdown, toml]
|
capscorp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lenzpracher
|
|
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.
|
capscorp-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: capscorp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A terminal catalogue of reproducible, pre-registered research capsules
|
|
5
|
+
Author-email: Lenz Pracher <lenz.pracher@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/lenzpracher/capsule-corp
|
|
8
|
+
Project-URL: Repository, https://github.com/lenzpracher/capsule-corp
|
|
9
|
+
Keywords: research,reproducibility,pre-registration,llm,tui
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: typer>=0.12
|
|
14
|
+
Requires-Dist: textual>=0.80
|
|
15
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
16
|
+
Requires-Dist: tomlkit>=0.13
|
|
17
|
+
Requires-Dist: rich>=13
|
|
18
|
+
Requires-Dist: platformdirs>=4
|
|
19
|
+
Requires-Dist: mcp<3,>=2.2
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<picture>
|
|
24
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
|
|
25
|
+
<img src="docs/assets/logo.svg" alt="capsule" width="440">
|
|
26
|
+
</picture>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
# capsule-corp
|
|
30
|
+
|
|
31
|
+
Packaging reproducible research questions.
|
|
32
|
+
|
|
33
|
+
A terminal catalogue where each **capsule** is one empirically testable research question,
|
|
34
|
+
packaged so that it stays reproducible and honest: the question, a frozen pre-registration,
|
|
35
|
+
the code, a pinned environment, the outputs, and a verification record.
|
|
36
|
+
|
|
37
|
+
Capsules are primarily written by an LLM. Every artifact is plain text and editable by hand.
|
|
38
|
+
|
|
39
|
+
## Why pre-registration
|
|
40
|
+
|
|
41
|
+
The failure mode of LLM-generated research is not bad code — it is code that quietly gets
|
|
42
|
+
rewritten until it agrees with the conclusion. capsule-corp splits a capsule into two phases
|
|
43
|
+
with a lock in between:
|
|
44
|
+
|
|
45
|
+
1. **Design.** An agent writes the question, the hypothesis, and a set of _machine-checkable_
|
|
46
|
+
assertions that would falsify it — before any implementation exists.
|
|
47
|
+
2. **Freeze.** `prereg.toml` is hashed into `.prereg.lock` and committed. From here the
|
|
48
|
+
predictions and the checks cannot change.
|
|
49
|
+
3. **Implement, run, verify.** A second agent writes the code. The hash is re-verified before
|
|
50
|
+
and after; if the pre-registration moved, the run fails.
|
|
51
|
+
|
|
52
|
+
Verification then has two independent layers: the deterministic checks (no LLM involved, so
|
|
53
|
+
they are a real gate), and a **blinded** LLM judge that sees the question, the code, and the
|
|
54
|
+
outputs — but not the write-up or any of the author's claims.
|
|
55
|
+
|
|
56
|
+
A capsule whose hypothesis is refuted is a _successful_ capsule. That outcome is recorded,
|
|
57
|
+
not treated as a failure.
|
|
58
|
+
|
|
59
|
+
## Status
|
|
60
|
+
|
|
61
|
+
Early but complete end to end: catalogue, agent loop, pre-registered verification, TUI,
|
|
62
|
+
remote execution, and the MCP server are all implemented. The Slurm, SSH and Modal
|
|
63
|
+
backends are unit-tested but have not yet been pointed at real infrastructure — see
|
|
64
|
+
[`docs/roadmap.md`](docs/roadmap.md).
|
|
65
|
+
|
|
66
|
+
## Install
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
curl -fsSL https://lenzpracher.github.io/capsule-corp/install.sh | sh
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This puts the `capsule` command in `~/.local/bin` using [uv](https://docs.astral.sh/uv/),
|
|
73
|
+
in its own isolated environment. No sudo. As with any installer of this shape, read
|
|
74
|
+
[the script](install.sh) before piping it to a shell.
|
|
75
|
+
|
|
76
|
+
Or, equivalently:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv tool install capscorp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The command is `capsule`; the package is `capscorp` and the repository is
|
|
83
|
+
`capsule-corp`. Only the first is something you type.
|
|
84
|
+
|
|
85
|
+
To hack on capsule-corp itself, clone it and install editable so the command tracks
|
|
86
|
+
your working copy:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/lenzpracher/capsule-corp
|
|
90
|
+
cd capsule-corp
|
|
91
|
+
uv tool install --editable .
|
|
92
|
+
pixi install && pixi run postinstall # for the test and lint tasks
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Then run `capsule doctor`. Two external tools do the real work:
|
|
96
|
+
[pi](https://github.com/earendil-works/pi) writes the capsules, and
|
|
97
|
+
[pixi](https://pixi.sh) manages each capsule's environment.
|
|
98
|
+
|
|
99
|
+
## Use
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
capsule doctor # check pi, pixi and the compute backends
|
|
103
|
+
capsule init ~/research # create a catalogue
|
|
104
|
+
capsule mkdir optimization # organise it however you like
|
|
105
|
+
|
|
106
|
+
capsule new "Does LR warmup lower final loss?" --folder optimization
|
|
107
|
+
capsule design 0001 # write the pre-registration; re-run to revise it
|
|
108
|
+
capsule freeze 0001 # lock it; predictions can no longer change
|
|
109
|
+
capsule implement 0001 # write the code
|
|
110
|
+
capsule run 0001 --on slurm # local (default), slurm, ssh, or modal
|
|
111
|
+
capsule verify 0001 # checks, then the blinded judge
|
|
112
|
+
|
|
113
|
+
capsule open 0001 # read the code in VS Code
|
|
114
|
+
capsule export 0001 # a supplementary-materials bundle for a paper
|
|
115
|
+
capsule tui # browse and drive it interactively
|
|
116
|
+
capsule mcp # serve the catalogue to any MCP client
|
|
117
|
+
capsule search warmup
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Commands are listed in `capsule --help` in the order you run them, grouped by purpose,
|
|
121
|
+
because that sequence is the method rather than an implementation detail.
|
|
122
|
+
|
|
123
|
+
## Interface
|
|
124
|
+
|
|
125
|
+
`capsule tui` opens a Textual interface over the same library the CLI uses: a folder
|
|
126
|
+
tree, a detail pane showing the pre-registration and the verdict, a settings view, and
|
|
127
|
+
`r`un / `v`erify / `d`esign / `f`reeze / `i`mplement keybinds. Press `e` for a built-in
|
|
128
|
+
file browser and editor with syntax highlighting, or `o` to open the capsule in
|
|
129
|
+
VS Code. Phases run in worker threads, so the interface stays responsive while a model
|
|
130
|
+
is working.
|
|
131
|
+
|
|
132
|
+
Long phases stream their progress as they run — each file the agent writes, each
|
|
133
|
+
command it runs, a live token count — so you can tell a working agent from a hung one.
|
|
134
|
+
|
|
135
|
+
## Attaching capsules to papers
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
capsule export 0001 # supplementary-materials zip
|
|
139
|
+
capsule export 0001 --format markdown # an appendix
|
|
140
|
+
capsule export 0001 --format html # one self-contained file
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Every export carries the pre-registration hash and the provenance, and discloses any
|
|
144
|
+
revision the registration went through after being frozen. See
|
|
145
|
+
[`docs/export.md`](docs/export.md).
|
|
146
|
+
|
|
147
|
+
## Running elsewhere
|
|
148
|
+
|
|
149
|
+
Capsules run locally by default, and unchanged on Slurm, any SSH host with Docker, or
|
|
150
|
+
Modal. See [`docs/compute.md`](docs/compute.md).
|
|
151
|
+
|
|
152
|
+
## Driving it from an MCP client
|
|
153
|
+
|
|
154
|
+
`capsule mcp` serves the catalogue over the Model Context Protocol, including
|
|
155
|
+
`capsule://<id>` resources so an agent can read prior capsules as context. See
|
|
156
|
+
[`docs/mcp.md`](docs/mcp.md).
|
|
157
|
+
|
|
158
|
+
## A capsule on disk
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
capsules/optimization/0001-lr-warmup/
|
|
162
|
+
capsule.toml manifest: id, status, provenance
|
|
163
|
+
QUESTION.md the research question
|
|
164
|
+
prereg.toml hypothesis, predictions, checks
|
|
165
|
+
.prereg.lock sha256 of prereg.toml at freeze time
|
|
166
|
+
AGENTS.md instructions for the implementing agent
|
|
167
|
+
.pi/settings.json per-capsule pinned agent config
|
|
168
|
+
pixi.toml per-capsule environment
|
|
169
|
+
src/ run.py the implementation
|
|
170
|
+
results/ results.json + figures/
|
|
171
|
+
runs/<timestamp>/ transcript and provenance for each run
|
|
172
|
+
verification.json check results + judge verdict
|
|
173
|
+
REPORT.md the write-up
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Files are the source of truth. The SQLite index is a cache and can be rebuilt at any time
|
|
177
|
+
with `capsule reindex`.
|
|
178
|
+
|
|
179
|
+
## Agent independence
|
|
180
|
+
|
|
181
|
+
The coding agent is [`pi`](https://github.com/earendil-works/pi), which is open source and
|
|
182
|
+
provider-agnostic — configure it for Claude, GPT, Gemini, or a local model. capsule-corp does
|
|
183
|
+
not pin a model; it inherits whatever `pi` is configured with and records what was actually
|
|
184
|
+
used in each capsule's manifest. The runner sits behind a protocol, so other agents can be
|
|
185
|
+
plugged in.
|
|
186
|
+
|
|
187
|
+
## Documentation
|
|
188
|
+
|
|
189
|
+
<https://lenzpracher.github.io/capsule-corp>
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT
|
|
194
|
+
|
|
195
|
+
## Disclaimer
|
|
196
|
+
|
|
197
|
+
capsule-corp is an independent, unaffiliated open-source project. It is not
|
|
198
|
+
associated with, endorsed by, or sponsored by Bird Studio, Shueisha, Toei Animation,
|
|
199
|
+
or Capsule Corporation Tokyo. "Dragon Ball" and "Capsule Corporation" are trademarks
|
|
200
|
+
of their respective owners; the name and mark here are an affectionate nod, and no
|
|
201
|
+
rights-holder artwork is used.
|