server-json-gen

command
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

server-json-gen emits mache's server.json artifact byte-stably from internal/mcpregistry — the same self-maintaining MCP Registry surface pattern ley-line-open ships under bead `ley-line-open-f10abb`.

The Taskfile entries `gen:server-json` and `gen:server-json:check` regenerate and diff the committed artifact at the repo root; the CI workflow fails on drift. See bead `mache-802d2b` for rationale.

Coverage policy

Every tool returned by mcpregistry.ToolRegistry() MUST appear in exactly one group's UpstreamNames. The generator enforces this at runtime — partial coverage exits non-zero with a message naming the orphan tool(s). The matching unit test (internal/mcpregistry.TestCloisterGroupsCoverEveryRegisteredToolExactlyOnce) enforces the same invariant at `task test` time so this gate is a belt-and-braces backstop, not the only check.

Reproducibility

Two consecutive runs MUST produce byte-identical output. Field order is fixed by the struct definitions; array order matches the registry / groups declaration order; no map iteration leaks into the rendered artifact (every container is a slice or an ordered helper).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL