Skip to content

Model the protocol core in LexLean language 1.2 #5

Open

Description

@afflom

Problem

The protocol core has no model. Under AGENTS.md R1 the model is the single source of every claim and of all generated behavior.

Work

Add language-1.2 notation modules for:

  • the JSON-RPC 2.0 envelope and the MCP 2026-07-28 server message types, with schema/2026-07-28/schema.ts as their authority;
  • request validation: the _meta keys io.modelcontextprotocol/protocolVersion and io.modelcontextprotocol/clientCapabilities, and the HTTP headers MCP-Protocol-Version, Mcp-Method and Mcp-Name;
  • the result envelope: resultType, and io.modelcontextprotocol/serverInfo in _meta;
  • the dispatch entry root and its effect requests (Host effect protocol for server applications prismpm#216);
  • the extension point through which a tool layer registers its tools, resources, resource templates and prompts.

Definition of done

The core's model checks, builds and verifies on the bound SDK, and its message types correspond to the 2026-07-28 schema.

Acceptance criteria

  • Every server-side method and result type of 2026-07-28 has a model declaration.
  • lexlean verify passes with an exact axiom policy on every declaration.
  • Messages the model encodes validate under mcp-schema-2026-07-28 once Lock the MCP authorities and oracles #6 is done.

Depends on #4, UOR-Foundation/prismpm#216 and UOR-Foundation/prismpm#203 (language 1.2 in the SDK).


Generated by Claude Code

Activity

  1. added this to the MCP v0.1.0 milestone on Oct 21, 2026
  2. afflom commented on Oct 22, 2026

    @afflom
    MemberAuthor

    The protocol core model is merged in #19 (181ca0e): 15 language-1.2 modules verified with LexLean release/v0.4 at 9796067, attestation cf56bc3af858b01cf1e90b3b47fbd98cee9f57af0746e205089f2707be0932ce. Requests are validated in the order the 2026-07-28 Streamable HTTP transport requires (_meta → headers → version → route and capability → params), and theorems pin that order.

    This issue stays open for what #19 could not meet: the check against the 2026-07-28 schema oracle (#6), the SDK binding (#4), the host effect protocol (UOR-Foundation/prismpm#216), and the JSON text codec (#18, in progress).


    Generated by Claude Code

  3. humuhumu33 commented on Nov 12, 2026

    @humuhumu33
    Contributor

    Heads-up before I push: I'm moving .github/lexlean.rev from 0b0c95d96 (LexLean PR #292 on #284) to the head of LexLean release/v0.4 at 5dccf9e5b (version 0.4.0). That head carries SM-37 (nested_induction) and DF-19, which JsonWriteLaws needs; the v0.4.0 tag does not, so this remains a development pin until a LexLean release includes them.

    The change relocks both lexlean.lock and lexlean.conformance.lock (same compiler-semantics), re-exports both generated/request.json with cargo xtask export, and updates the docs that named the old pin. Locally lexlean check, fmt --check, lock --check and verify pass, and the workspace tests pass except CF-06, because conformance/core-identity.json still records the old compiler; I'll take its new record from check_core_identity in CI.

    The goal is to let lexlean-mcp's gateway move its PrismPM pin off the backport (lexlean-mcp#7). It opens as a draft PR; say if you'd rather sequence it differently.

  4. humuhumu33 commented on Nov 13, 2026

    @humuhumu33
    Contributor

    Update on #49: the CI conformance build failed against PrismPM main with PP2013. PrismPM's SPEC (server application, build step 4) makes the consumer's Cargo workspace root the Prism project root, and this repository's project root is the repo root, whose manifest holds the crates/* glob; the conformance workspace is conformance/Cargo.toml. No PrismPM 0.4 commit predates that rule (it landed 2026-10-24, 0.4.0 on 2026-10-27), and PrismPM#339 (0.3.0) cannot take LexLean 0.4.0.

    Plan, unless you object: make conformance/ the Prism project root, which means prismpm.toml, lexlean.conformance.toml/.lock and the committed prism.arch copy move under it. LexLean refuses parent-relative paths (LLC0101), so the shared src/ and language/mcp.core that the conformance project compiles are copied into git-ignored conformance/shared/ at build time by one script, and CI and the tests use that script. Nothing under src/ or the main lexlean.toml changes. The alternative is a PrismPM setting naming the consumer workspace directory, which would be a SPEC change; I'd take that to PrismPM separately if you prefer it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions