lean-runtime 2.5.0__tar.gz → 2.6.1__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.
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/CHANGELOG.md +32 -0
- {lean_runtime-2.5.0/lean_runtime.egg-info → lean_runtime-2.6.1}/PKG-INFO +23 -14
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/README.md +22 -13
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/cli.md +24 -9
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/getting-started.md +47 -13
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/local-projects.md +44 -7
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/__init__.py +6 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/cli.py +180 -17
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/models.py +1 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/project_sharing.py +100 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/projects.py +46 -1
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/runtime.py +666 -131
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/shared_projects.py +146 -1
- {lean_runtime-2.5.0 → lean_runtime-2.6.1/lean_runtime.egg-info}/PKG-INFO +23 -14
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/pyproject.toml +1 -1
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_cli.py +36 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_programs.py +1 -1
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_projects.py +384 -11
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/LICENSE +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/MANIFEST.in +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/environments.toml +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/core-v4.32.2.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/leancert-v4.30.0.5.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/leancert-v4.31.0.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/leancert-v4.32.2.4.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/leancert-v4.33.0.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/mathlib-v4.30.0.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/mathlib-v4.31.0.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/mathlib-v4.32.2.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/catalog/locks/mathlib-v4.33.0.lock.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/compatibility/README.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/compatibility/mathlib-4.32.2.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/compatibility/mathlib-4.32.2.toml +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/compatibility/mathlib-4.33.0.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/compatibility/mathlib-4.33.0.toml +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/architecture.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/captures.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/case-study-v1.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/development.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/environments.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/index.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/portable-copies.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/project-publishing.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/python-api.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/ready-programs.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/standalone-files.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/trust-and-limitations.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/docs/v1-precision.md +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/examples/mathlib.toml +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/__main__.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/_git.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/_paths.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/backends.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/bundles.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/capsules.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/comparison.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/console.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/decisions.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/diagnostics.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/__init__.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/analyzer.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/api.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/candidate.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/catalog.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/catalog_build.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/catalog_cli.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/catalog_manifest.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/data/catalog.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/defaults.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/engine.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/errors.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/module_inventory.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/planner.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/policy.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/probe.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/py.typed +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/result.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/schema_resources.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/schemas/catalog-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/schemas/plan-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/discovery/schemas/result-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/environments.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/errors.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/events.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/facade.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/frontmatter.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/health.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/lake.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/lockfiles.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/locking.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/matrix.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/oci.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/packs.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/policies.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/profiling.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/programs.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/publisher_verification.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/py.typed +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/references.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/resolver.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/run_cli.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/schema_resources.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/serialization.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/specs.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/store.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/timings.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/toolchain_oci.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/toolchain_slim.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/toolchains.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/verification.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime/wire.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime.egg-info/SOURCES.txt +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime.egg-info/dependency_links.txt +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime.egg-info/entry_points.txt +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime.egg-info/requires.txt +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/lean_runtime.egg-info/top_level.txt +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/mkdocs.yml +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/cleanup-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/comparison-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/execution-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/inspect-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/matrix-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/profile-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/schemas/verify-v1.schema.json +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/scripts/announcement_gate.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/scripts/registry_preflight.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/scripts/run_compatibility.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/scripts/run_v1_case_study.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/scripts/smoke_wheel.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/setup.cfg +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/conftest.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/e2e/test_real_discovery.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_analyzer.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_catalog.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_catalog_build.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_discovery_schema_resources.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_engine.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_planner.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/discovery/test_policy.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_backend.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_bundles.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_capsules.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_console.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_diagnostics.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_environment_integration.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_events_health.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_facade.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_frontmatter.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_git.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_interactive.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_lockfiles.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_models.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_multifile.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_packs.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_paths.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_prebuilt_policy.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_project_publish.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_references.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_run_cli.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_runtime.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_schema_resources.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_schemas.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_signatures.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_specs.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_store.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_toolchain_oci.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_toolchain_slim.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_toolchains.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_v1_precision.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_verification_inventory.py +0 -0
- {lean_runtime-2.5.0 → lean_runtime-2.6.1}/tests/test_verification_probe.py +0 -0
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.6.1 - 2026-08-14
|
|
6
|
+
|
|
7
|
+
- Allow `lean-runtime init .` at an otherwise empty Git repository root while
|
|
8
|
+
preserving its original `.git` directory or worktree file, HEAD, and index.
|
|
9
|
+
Planning and execution now share target validation, so `init --plan` rejects
|
|
10
|
+
unsupported existing contents before reporting an acquisition-ready plan.
|
|
11
|
+
- Add `init --name NAME` for repository directories whose filesystem spelling
|
|
12
|
+
should not determine the Lake package and Lean root module name. Repeating
|
|
13
|
+
the same named initialization is idempotent; a conflicting name is rejected.
|
|
14
|
+
- Make `init --plan --offline` and `update --plan --offline` genuinely
|
|
15
|
+
network-free. Plans now report explicit blockers and return a failing status
|
|
16
|
+
when an exact local graph or required full toolchain is unavailable.
|
|
17
|
+
|
|
18
|
+
## 2.6.0 - 2026-08-14
|
|
19
|
+
|
|
20
|
+
- Make the local-project path a four-command workflow: `init`, `check`,
|
|
21
|
+
`build`, and `update`. New projects use the newest stable cataloged Mathlib
|
|
22
|
+
by default; `--core` opts out, while `--mathlib VERSION` selects a release.
|
|
23
|
+
- Make `init` adopt an existing pinned Lake project without changing its graph,
|
|
24
|
+
or create a new project transactionally after its exact dependencies are
|
|
25
|
+
ready. `--plan`, `--offline`, `--max-download`, and `--seed-from` expose its
|
|
26
|
+
acquisition policy, and failed initialization leaves no partial project.
|
|
27
|
+
- Add persistent discovery of exact local Lake graphs. `scan` registers existing
|
|
28
|
+
projects as zero-download seeds for future initialization and updates.
|
|
29
|
+
- Preserve verified sparse-capsule build artifacts when materializing exact Git
|
|
30
|
+
sources for a mutable project, instead of throwing them away and forcing a
|
|
31
|
+
dependency rebuild.
|
|
32
|
+
- Add explicit, transactional `update` to the newest cataloged Mathlib, with an
|
|
33
|
+
old/new revision and toolchain preview and rollback after failed adoption.
|
|
34
|
+
- Include exact package revisions, Git tree hashes, and the shared workspace ID
|
|
35
|
+
in mutable-project check and build provenance.
|
|
36
|
+
|
|
5
37
|
## 2.5.0 - 2026-08-14
|
|
6
38
|
|
|
7
39
|
- Make `lean-runtime init` create a concise `AGENTS.md` with build, checking,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lean-runtime
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.1
|
|
4
4
|
Summary: Run Lean 4 proofs from Python or standalone files
|
|
5
5
|
Author: Alejandro Radisic
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -181,31 +181,40 @@ project = lean.setup(project="./my-project")
|
|
|
181
181
|
result = project.check_file("./my-project/MyProject/Main.lean")
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Create a normal Lake project
|
|
184
|
+
Create a normal Lake project. The newest stable cataloged Mathlib is the
|
|
185
|
+
default, and exact dependencies are shared automatically:
|
|
185
186
|
|
|
186
187
|
```bash
|
|
187
|
-
lean-runtime init MyProof
|
|
188
|
+
lean-runtime init MyProof
|
|
188
189
|
cd MyProof
|
|
189
|
-
lean-runtime
|
|
190
|
+
lean-runtime check MyProof/Basic.lean
|
|
191
|
+
lean-runtime build
|
|
190
192
|
```
|
|
191
193
|
|
|
192
194
|
`init` also writes an `AGENTS.md` with the project build, checking, dependency,
|
|
193
195
|
and shared-package rules for coding agents. Pass `--no-agents` to omit it; an
|
|
194
|
-
existing `AGENTS.md` is never overwritten.
|
|
196
|
+
existing `AGENTS.md` is never overwritten. Use `--core` for no Mathlib, or
|
|
197
|
+
`--mathlib 4.33.0` to select a cataloged release. `lean-runtime update`
|
|
198
|
+
explicitly moves a project to the newest cataloged Mathlib after a preview.
|
|
195
199
|
|
|
196
|
-
|
|
197
|
-
|
|
200
|
+
Running `lean-runtime init .` in an existing pinned Lake project adopts its
|
|
201
|
+
current exact graph without running `lake update`. If you already have many
|
|
202
|
+
Lake checkouts, register them once as local dependency seeds:
|
|
198
203
|
|
|
199
204
|
```bash
|
|
200
|
-
lean-runtime
|
|
201
|
-
lean-runtime
|
|
205
|
+
lean-runtime scan ~/research
|
|
206
|
+
lean-runtime init .
|
|
202
207
|
```
|
|
203
208
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
the
|
|
208
|
-
|
|
209
|
+
`init --plan` is side-effect free; `--max-download 500MiB` and `--offline`
|
|
210
|
+
enforce cold-start policy. Advanced bulk migration remains available through
|
|
211
|
+
`attach`, and `detach --execute` materializes an independent project again.
|
|
212
|
+
For a new project, the target may be absent, empty, or an otherwise empty Git
|
|
213
|
+
repository root; existing Git identity and index state are preserved. A custom
|
|
214
|
+
`AGENTS.md` is also allowed and retained. Other existing contents are rejected
|
|
215
|
+
before acquisition rather than overwritten.
|
|
216
|
+
When the directory spelling is not the intended Lean module capitalization,
|
|
217
|
+
set it explicitly, for example `lean-runtime init . --name IntegralFramework`.
|
|
209
218
|
|
|
210
219
|
One-shot helpers are available when setup reuse is unnecessary:
|
|
211
220
|
|
|
@@ -145,31 +145,40 @@ project = lean.setup(project="./my-project")
|
|
|
145
145
|
result = project.check_file("./my-project/MyProject/Main.lean")
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
Create a normal Lake project
|
|
148
|
+
Create a normal Lake project. The newest stable cataloged Mathlib is the
|
|
149
|
+
default, and exact dependencies are shared automatically:
|
|
149
150
|
|
|
150
151
|
```bash
|
|
151
|
-
lean-runtime init MyProof
|
|
152
|
+
lean-runtime init MyProof
|
|
152
153
|
cd MyProof
|
|
153
|
-
lean-runtime
|
|
154
|
+
lean-runtime check MyProof/Basic.lean
|
|
155
|
+
lean-runtime build
|
|
154
156
|
```
|
|
155
157
|
|
|
156
158
|
`init` also writes an `AGENTS.md` with the project build, checking, dependency,
|
|
157
159
|
and shared-package rules for coding agents. Pass `--no-agents` to omit it; an
|
|
158
|
-
existing `AGENTS.md` is never overwritten.
|
|
160
|
+
existing `AGENTS.md` is never overwritten. Use `--core` for no Mathlib, or
|
|
161
|
+
`--mathlib 4.33.0` to select a cataloged release. `lean-runtime update`
|
|
162
|
+
explicitly moves a project to the newest cataloged Mathlib after a preview.
|
|
159
163
|
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
Running `lean-runtime init .` in an existing pinned Lake project adopts its
|
|
165
|
+
current exact graph without running `lake update`. If you already have many
|
|
166
|
+
Lake checkouts, register them once as local dependency seeds:
|
|
162
167
|
|
|
163
168
|
```bash
|
|
164
|
-
lean-runtime
|
|
165
|
-
lean-runtime
|
|
169
|
+
lean-runtime scan ~/research
|
|
170
|
+
lean-runtime init .
|
|
166
171
|
```
|
|
167
172
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
the
|
|
172
|
-
|
|
173
|
+
`init --plan` is side-effect free; `--max-download 500MiB` and `--offline`
|
|
174
|
+
enforce cold-start policy. Advanced bulk migration remains available through
|
|
175
|
+
`attach`, and `detach --execute` materializes an independent project again.
|
|
176
|
+
For a new project, the target may be absent, empty, or an otherwise empty Git
|
|
177
|
+
repository root; existing Git identity and index state are preserved. A custom
|
|
178
|
+
`AGENTS.md` is also allowed and retained. Other existing contents are rejected
|
|
179
|
+
before acquisition rather than overwritten.
|
|
180
|
+
When the directory spelling is not the intended Lean module capitalization,
|
|
181
|
+
set it explicitly, for example `lean-runtime init . --name IntegralFramework`.
|
|
173
182
|
|
|
174
183
|
One-shot helpers are available when setup reuse is unnecessary:
|
|
175
184
|
|
|
@@ -146,30 +146,45 @@ environment can replay offline.
|
|
|
146
146
|
## Existing projects and core Lean
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
lean-runtime check
|
|
150
|
-
lean-runtime check
|
|
151
|
-
lean-runtime build
|
|
152
|
-
lean-runtime init MyProof
|
|
153
|
-
lean-runtime init MyProof --
|
|
149
|
+
lean-runtime check Main.lean --toolchain 4.32.2
|
|
150
|
+
lean-runtime check ./existing-project/MyProject/Main.lean
|
|
151
|
+
lean-runtime build
|
|
152
|
+
lean-runtime init MyProof
|
|
153
|
+
lean-runtime init MyProof --core
|
|
154
|
+
lean-runtime init --plan --max-download 500MiB
|
|
155
|
+
lean-runtime update --plan
|
|
156
|
+
lean-runtime scan ~/research
|
|
154
157
|
lean-runtime attach ~/research --recursive
|
|
155
158
|
lean-runtime attach ~/research --recursive --execute
|
|
156
159
|
lean-runtime detach ./existing-project --execute
|
|
157
160
|
lean-runtime install 4.32.2
|
|
158
161
|
```
|
|
159
162
|
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
`check FILE` is the direct standalone/local-project route; the legacy
|
|
164
|
+
`check ENVIRONMENT FILE` spelling remains accepted. When no
|
|
162
165
|
`--project` or `--toolchain` is supplied, it discovers the nearest directory
|
|
163
166
|
containing a Lake configuration and `lean-toolchain`, then passes the actual
|
|
164
167
|
project-relative file to `lake env lean`.
|
|
165
168
|
|
|
166
|
-
`init`
|
|
167
|
-
|
|
169
|
+
`init` defaults to the newest stable cataloged Mathlib, or adopts an existing
|
|
170
|
+
pinned Lake project without changing its graph. `--core` opts out of Mathlib.
|
|
171
|
+
It prepares dependencies before atomically publishing a new project. `update`
|
|
172
|
+
is the explicit transactional move to the newest cataloged Mathlib; `scan`
|
|
173
|
+
records exact existing graphs as future local seeds. `attach` is read-only
|
|
174
|
+
unless `--execute` is present;
|
|
168
175
|
recursive mode inventories a project tree, reports blockers and estimated disk
|
|
169
176
|
recovery, and adopts each valid project transactionally. `detach` is likewise a
|
|
170
177
|
preview unless `--execute` is present. Attached projects use shared mode by
|
|
171
178
|
default in `lean-runtime build`; detach before requesting `--local`.
|
|
172
179
|
|
|
180
|
+
A new `init` target may be absent, empty, or an otherwise empty Git root, with
|
|
181
|
+
an optional existing `AGENTS.md`. Git metadata and the custom guide are
|
|
182
|
+
preserved. Planning rejects any other existing contents using the same
|
|
183
|
+
validation as execution.
|
|
184
|
+
`--name NAME` overrides the inferred Lake package/root module name for a new
|
|
185
|
+
project, which is useful when a lowercase repository name needs internal
|
|
186
|
+
capitalization such as `IntegralFramework`.
|
|
187
|
+
|
|
173
188
|
Add supporting source files with repeatable `--include` options:
|
|
174
189
|
|
|
175
190
|
```bash
|
|
@@ -18,33 +18,67 @@ Create a standard Lake library with the newest cataloged Mathlib release and
|
|
|
18
18
|
shared exact dependencies:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
lean-runtime init MyProof
|
|
21
|
+
lean-runtime init MyProof
|
|
22
22
|
cd MyProof
|
|
23
|
-
lean-runtime
|
|
23
|
+
lean-runtime check MyProof/Basic.lean
|
|
24
|
+
lean-runtime build
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
By default, `init` writes an `AGENTS.md` explaining the project workflow and
|
|
27
28
|
shared-dependency safety rules to coding agents. Pass `--no-agents` to omit it.
|
|
28
29
|
An existing file is preserved.
|
|
29
30
|
|
|
30
|
-
Use `--mathlib 4.33.0` to select that release explicitly
|
|
31
|
-
|
|
31
|
+
Use `--mathlib 4.33.0` to select that release explicitly, or `--core` for a
|
|
32
|
+
core-only library. The root project remains an ordinary mutable Lake project;
|
|
32
33
|
its dependency sources and build artifacts are reused by other projects with
|
|
33
34
|
the same exact graph.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
Before doing any work, `init --plan` reports the exact release, local reuse, and
|
|
37
|
+
known download size. `--max-download 500MiB` refuses a larger transfer and
|
|
38
|
+
`--offline` requires a matching local graph. Initialization is transactional:
|
|
39
|
+
the target appears only after Lake and the shared dependency graph both verify.
|
|
40
|
+
Offline plans perform no registry lookup; they return a blocked plan and a
|
|
41
|
+
nonzero status when the required exact local graph is absent.
|
|
42
|
+
Project development requires one full Lake-capable Lean toolchain per Lean
|
|
43
|
+
version. When it is absent, the plan says its Elan download size is unknown;
|
|
44
|
+
`--offline` and `--max-download` fail closed instead of silently installing it.
|
|
45
|
+
|
|
46
|
+
The target may be a missing directory, an empty directory, or an otherwise
|
|
47
|
+
empty Git repository root. In the Git case, `init` preserves the existing HEAD,
|
|
48
|
+
index, remotes, and worktree metadata. It also preserves an existing
|
|
49
|
+
`AGENTS.md`; any other non-project contents are rejected by both `--plan` and
|
|
50
|
+
execution rather than overwritten.
|
|
51
|
+
The directory name normally supplies the Lake package/root module name. Override
|
|
52
|
+
it when capitalization matters, for example:
|
|
37
53
|
|
|
38
54
|
```bash
|
|
39
|
-
lean-runtime
|
|
40
|
-
lean-runtime attach ~/research --recursive
|
|
41
|
-
lean-runtime attach ~/research --recursive --execute
|
|
55
|
+
lean-runtime init . --name IntegralFramework
|
|
42
56
|
```
|
|
43
57
|
|
|
44
|
-
The
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
The same command can be rerun safely after initialization; a different name is
|
|
59
|
+
rejected rather than silently renaming an existing project.
|
|
60
|
+
|
|
61
|
+
Dependency upgrades are explicit:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
lean-runtime update --plan
|
|
65
|
+
lean-runtime update
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The update preview names both exact Mathlib revisions and toolchains. In a
|
|
69
|
+
terminal, the second command asks for confirmation; use `--yes` in automation.
|
|
70
|
+
|
|
71
|
+
For one existing pinned Lake project, preserve and adopt its current exact graph:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
lean-runtime init .
|
|
75
|
+
lean-runtime scan ~/research
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`scan` only records exact local graphs as possible future zero-download seeds.
|
|
79
|
+
Advanced bulk migration remains available through `attach`. See [Local Lake
|
|
80
|
+
projects](local-projects.md) for detachment, storage estimates, and the complete
|
|
81
|
+
safety model.
|
|
48
82
|
|
|
49
83
|
## Run a file
|
|
50
84
|
|
|
@@ -22,10 +22,10 @@ managed environment, dependency list, or explicit toolchain is supplied:
|
|
|
22
22
|
result = Runtime().check_file("./my-project/MyProject/Main.lean")
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
The CLI equivalent is:
|
|
25
|
+
The primary CLI equivalent is:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
lean-runtime check
|
|
28
|
+
lean-runtime check ./my-project/MyProject/Main.lean
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The actual project-relative file is passed to `lake env lean`, so imports of
|
|
@@ -43,19 +43,56 @@ Ordinary Lake workspaces put remote dependencies and their build artifacts in
|
|
|
43
43
|
each repository's `.lake/packages`. New projects can start in shared mode:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
lean-runtime init MyProof
|
|
46
|
+
lean-runtime init MyProof
|
|
47
47
|
cd MyProof
|
|
48
|
-
lean-runtime
|
|
48
|
+
lean-runtime check MyProof/Basic.lean
|
|
49
|
+
lean-runtime build
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
The generated files are a standard Lake project plus a small
|
|
52
53
|
`lean-runtime.toml`. Root build outputs stay local; exact dependencies are
|
|
53
|
-
shared.
|
|
54
|
-
|
|
54
|
+
shared. The newest stable cataloged Mathlib is selected by default. Select a
|
|
55
|
+
release with `--mathlib 4.33.0`, or use `--core` for a core-only library.
|
|
56
|
+
`init` also creates an `AGENTS.md` describing the safe
|
|
55
57
|
build and dependency workflow unless `--no-agents` is passed; it never
|
|
56
58
|
overwrites an existing guide.
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
Initialization acquires and verifies the exact graph before publishing the
|
|
61
|
+
target directory. Use `--plan` for a side-effect-free cost report, `--offline`
|
|
62
|
+
to require local data, `--max-download SIZE` to enforce a transfer ceiling, or
|
|
63
|
+
`--seed-from PROJECT` to name an exact local donor.
|
|
64
|
+
Offline planning never queries configured registries. A missing exact local
|
|
65
|
+
graph appears as a blocker and makes the planning command fail.
|
|
66
|
+
The plan separately reports whether the full Lake-capable toolchain is already
|
|
67
|
+
installed. Because Elan does not publish a preflight byte count, a missing full
|
|
68
|
+
toolchain is rejected under `--offline` or `--max-download` rather than silently
|
|
69
|
+
bypassing the policy.
|
|
70
|
+
|
|
71
|
+
An otherwise empty Git root is a valid new-project target. The original `.git`
|
|
72
|
+
directory—or `.git` worktree file—is transferred through the atomic publication
|
|
73
|
+
without changing HEAD, the index, or remotes. A pre-existing `AGENTS.md` is also
|
|
74
|
+
preserved. Other contents must be moved first or represented by an existing
|
|
75
|
+
pinned Lake project; the read-only plan enforces the same rule as execution.
|
|
76
|
+
Use `--name NAME` when creating inside a lowercase or otherwise differently
|
|
77
|
+
named repository and the Lean root module needs an explicit spelling.
|
|
78
|
+
|
|
79
|
+
For an existing pinned project, `lean-runtime init .` adopts its current
|
|
80
|
+
manifest without changing versions. Register a collection once with
|
|
81
|
+
`lean-runtime scan ~/research`; future exact matches are preferred over
|
|
82
|
+
downloads automatically.
|
|
83
|
+
|
|
84
|
+
Move an adopted TOML project to the newest cataloged Mathlib explicitly:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
lean-runtime update --plan
|
|
88
|
+
lean-runtime update
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The plan reports old and new release, commit, toolchain, local donor, and known
|
|
92
|
+
download bytes. Acquisition happens before metadata changes, and failures
|
|
93
|
+
restore the prior Lake files and attachment metadata.
|
|
94
|
+
|
|
95
|
+
For advanced bulk onboarding, preview before changing anything:
|
|
59
96
|
|
|
60
97
|
```bash
|
|
61
98
|
lean-runtime attach .
|
|
@@ -59,6 +59,9 @@ from .project_sharing import (
|
|
|
59
59
|
AdoptionResult,
|
|
60
60
|
DetachmentPlan,
|
|
61
61
|
ProjectAdoption,
|
|
62
|
+
ProjectInitPlan,
|
|
63
|
+
ProjectScanResult,
|
|
64
|
+
ProjectUpdatePlan,
|
|
62
65
|
)
|
|
63
66
|
from .projects import (
|
|
64
67
|
ProjectContext,
|
|
@@ -85,6 +88,9 @@ __all__ = [
|
|
|
85
88
|
"AdoptionPlan",
|
|
86
89
|
"AdoptionResult",
|
|
87
90
|
"DetachmentPlan",
|
|
91
|
+
"ProjectInitPlan",
|
|
92
|
+
"ProjectScanResult",
|
|
93
|
+
"ProjectUpdatePlan",
|
|
88
94
|
"EnvironmentComparison",
|
|
89
95
|
"ComparisonEntry",
|
|
90
96
|
"PortableCopyInfo",
|