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.

porttyperequireddescriptionconstraint
inactionLakeCacheActionyesThe 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.
inlakeRootRepoPathThe 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.
inpackagePackageNamestring · pattern ^[a-z][a-z0-9-]*$ · A skill package, e.g. folio-core
outresultTextA 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.

installnone
runtimebash, git, lake
networkyes

When a host it reaches is refused:

host / errorremedy
github.comnone: The warm cache is stored on GitHub; without it, build cold with lean-build (30–60 minutes for Mathlib).

What it is made of

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)."
    }
  ]
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev