Lake olean cache
Restore, verify, seed and diagnose the prebuilt .lake/ artefacts for a Lean package. Always try restore first: a from-source Mathlib build is 30–60 minutes, a restore about two.
Skills it satisfies
A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.
lean-cache-restore
The Lean build loop — restore a warm cache before working, and contribute your build back when done. One command each. A restore is ~2 minutes; a cold Mathlib build is 30-60.
Source: folio-assistant-sci/skills/content/folio-paper-adapter/lean-cache-restore.md.
The skill declares no I/O contract (schemas/skills/lean-cache-restore/{input,output}.schema.json).
Inputs and outputs
Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | action | LakeCacheAction | yes | The verb. doctor tells a restore that silently missed from one that worked. | string · one of status, restore, restore-toolchain, install-toolchain, verify, seed, contribute, list, doctor · A lake-cache verb: restore prebuilt oleans, seed them, or diagnose why a restore missed. |
| in | lakeRoot | RepoPath | The package whose .lake/ is acted on. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | package | PackageName | string · pattern ^[a-z][a-z0-9-]*$ · A skill package, e.g. folio-core | ||
| out | result | Text | A real hit, a miss, or a diagnosis — never a miss that reads as a hit. | string · A short single-line human string. Not admissible as a command-line argument. |
Processes and tasks
No process step names a skill this Tool satisfies.
How it is deployed and reached
- Command line. From the repository root:
folio-assistant-sci/scripts/lake-cache.sh. - GitHub Actions. No workflow in this checkout runs its command.
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | none |
| runtime | bash, git, lake |
| network | yes |
When a host it reaches is refused:
| host / error | remedy |
|---|---|
github.com | none: The warm cache is stored on GitHub; without it, build cold with lean-build (30–60 minutes for Mathlib). |
What it is made of
| role | file | |
|---|---|---|
| definition | folio-assistant-sci/tools/lean-cache/lean-cache.ts | |
| script | folio-assistant-sci/scripts/lake-cache.sh |
Linked data
The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/folio-assistant-sci/tools/lean-cache.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.
{
"@context": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/folio-assistant-sci.context.jsonld",
"@id": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/tools/lean-cache.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/folio-assistant-sci.jsonld",
"name": "lean-cache",
"title": "Lake olean cache",
"description": "Restore, verify, seed and diagnose the prebuilt `.lake/` artefacts for a Lean package. Always try `restore` first: a from-source Mathlib build is 30–60 minutes, a restore about two.",
"install": {
"none": true
},
"invoke": {
"shell": "folio-assistant-sci/scripts/lake-cache.sh"
},
"io": {
"inputs": [
{
"name": "action",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/LakeCacheAction",
"description": "The verb. `doctor` tells a restore that silently missed from one that worked.",
"required": true,
"arg": {
"positional": 0
}
},
{
"name": "lakeRoot",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The package whose `.lake/` is acted on.",
"required": false,
"arg": {
"flag": "--lake-root"
}
},
{
"name": "package",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/PackageName",
"required": false,
"arg": {
"flag": "--package"
}
}
],
"outputs": [
{
"name": "result",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "A real hit, a miss, or a diagnosis — never a miss that reads as a hit."
}
]
},
"satisfies": [
"lean-cache-restore"
],
"requirements": {
"runtime": [
"bash",
"git",
"lake"
],
"network": true
},
"remedies": [
{
"host": "github.com",
"none": "The warm cache is stored on GitHub; without it, build cold with `lean-build` (30–60 minutes for Mathlib)."
}
]
}