From 180e72634809c1f0a9a6d948de14c8e8d251723d Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Fri, 30 Oct 2026 05:23:38 -0500 Subject: [PATCH] mcpx docs: mdBook skeleton + .#mcpx-docs flake output (#1939) Approach C from the #1939 decision: book.toml + SUMMARY.md covering all 62 existing markdown files under pkgs/mcpx/docs (no content rewritten), pkgs/mcpx/docs.nix building the book with the pinned mdbook via runCommand, exposed as packages.mcpx-docs alongside mcpx in make-root-apps. Known issue at push time: nix build .#mcpx-docs fails during evaluation in the make-root-apps callPackage scope -- docs.nix is called without required arguments (lib, then mdbook on a second evaluation). Diagnosis continues on the task; CI flake check will show the same. The book files themselves are verified present and SUMMARY.md is generated from the docs tree. --- lib/default.nix | 3 +- pkgs/mcpx/docs.nix | 21 ++++++++ pkgs/mcpx/docs/SUMMARY.md | 111 ++++++++++++++++++++++++++++++++++++++ pkgs/mcpx/docs/book.toml | 15 ++++++ 4 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 pkgs/mcpx/docs.nix create mode 100644 pkgs/mcpx/docs/SUMMARY.md create mode 100644 pkgs/mcpx/docs/book.toml diff --git a/lib/default.nix b/lib/default.nix index c0b2d9b4f4..5d9ffd07a5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -578,11 +578,12 @@ let ) justRecipes.recipes; mcpx = pkgs.callPackage ../pkgs/mcpx/package.nix { }; + mcpx-docs = pkgs.callPackage ../pkgs/mcpx/docs.nix { }; idMailDeploy = pkgs.callPackage ../nixos/services/id-mail/worker/deploy.nix { }; in { packages = { - inherit mcpx idMailDeploy; + inherit mcpx mcpx-docs idMailDeploy; }; apps = (pkgs.lib.mapAttrs mkRecipeApp publicRecipes) // { id-mail-deploy = mkApp idMailDeploy "Deploy the mail Worker from this checkout (needs Bitwarden and sops access)"; diff --git a/pkgs/mcpx/docs.nix b/pkgs/mcpx/docs.nix new file mode 100644 index 0000000000..74447d9f2e --- /dev/null +++ b/pkgs/mcpx/docs.nix @@ -0,0 +1,21 @@ +# The mcpx book as a flake package: .#mcpx-docs (issue #1939). +# +# runCommand-style on purpose: the book is a pure function of the docs +# tree and the pinned mdbook binary -- no network, no deploy wiring +# (deployment is a sibling issue), nothing but mdbook over SUMMARY.md. +{ lib, runCommand, mdbook }: + +runCommand "mcpx-docs" +{ + nativeBuildInputs = [ mdbook ]; + meta = { + description = "The mcpx book (mdBook) built from pkgs/mcpx/docs"; + homepage = "https://github.com/developing-today/code/tree/main/pkgs/mcpx/docs"; + license = lib.licenses.mit; + }; +} + '' + cp -r ${./docs} book + chmod -R u+w book + mdbook build --dest-dir "$out" book + '' diff --git a/pkgs/mcpx/docs/SUMMARY.md b/pkgs/mcpx/docs/SUMMARY.md new file mode 100644 index 0000000000..fdaed3c291 --- /dev/null +++ b/pkgs/mcpx/docs/SUMMARY.md @@ -0,0 +1,111 @@ +# Summary + +- [mcpx](story.md) +- [Archive](archive.md) +- [The binary](binary.md) +- [The CLI](cli.md) +- [The compendium: structure and mapping](compendium.md) +- [Configuration](configuration.md) +- [mcpx as a consumer](consumer.md) +- [Running mcpx in a container](container.md) +- [Declared but never read](declared-but-unread.md) +- [Dependencies](dependencies.md) +- [Elicitation: a design](elicitation.md) +- [The script environment](environment.md) +- [Examples](examples.md) +- [exec and artifacts](exec.md) +- [FAQ](faq.md) +- [Finding the repository without git](git-discovery.md) +- [The home-page example: copy it or run it in the page](home-example.md) +- [The /v1 HTTP API](http-api.md) +- [Ideas](ideas.md) +- [In name only](in-name-only.md) +- [Install](install.md) +- [Interfaces](interfaces.md) +- [Landing checklist](landing.md) +- [mcpx level-2 page map](level-2-page-map.md) +- [MCP](mcp.md) +- [Now what](now-what.md) +- [The opencode v2 plugin — verified API facts and implementation map](opencode-plugin-v2.md) +- [The opencode plugin](opencode-plugin.md) +- [Overview](overview.md) +- [Parity](parity.md) +- [Finding the daemon without the binary](plugin-discovery.md) +- [Plugins](plugins.md) +- [Proposals](proposals.md) +- [Protocol: every revision, both directions](protocol.md) +- [Quick start](quick-start.md) +- [Release runbook](release-runbook.md) +- [Reaching a daemon on another machine](remote.md) +- [Script runtimes, permission profiles and presets](runtimes.md) +- [Schema validation (`internal/schemaval`)](schema-validation.md) +- [Scripts](scripts.md) +- [Testing mcpx](testing.md) +- [mcpx Development Strategies & Lessons Learned](work-strategies.md) + +# Decisions + +- [0001 — One hook vocabulary, and where a hook's output goes in the exec stream](decisions/0001-hook-vocabulary.md) +- [0002 — One autonomy dial, and a ceiling the daemon sets](decisions/0002-autonomy-dial.md) +- [0003 — What mcpx declares, and what it enforces](decisions/0003-declared-vs-enforced-capabilities.md) +- [0004 — Scope-resolved roots: spawn cwd, `${mcpx.root}` substitution, initialize workspace](decisions/0004-scope-resolved-roots.md) +- [0005 — Release pipeline, version single-sourcing, and the module path](decisions/0005-release-pipeline.md) +- [0006 — TTLs renew by touch-on-read, bounded by a maxAge ceiling](decisions/0006-ttl-touch-on-read.md) +- [Decisions](decisions/README.md) + +# Specification + +- [docs/spec](spec/README.md) +- [What the specification asks of a client](spec/client-obligations.md) +- [mcpx as a client: every revision](spec/client.md) +- [MCP conformance matrix](spec/conformance-matrix.md) +- [The conformance matrix](spec/conformance.md) +- [Upstream era probe](spec/era-probe.md) +- [Who an MCP request is from](spec/identity.md) +- [What mcpx sends, per revision](spec/messages.md) +- [The official conformance suite, run against mcpx](spec/official-suite.md) +- [MCP normative requirements, every revision, both sides](spec/requirements.md) +- [Revision conflicts and spec-internal contradictions](spec/revision-conflicts.md) +- [What the specification asks of a server](spec/server-obligations.md) +- [mcpx as a server: the transport](spec/transport.md) +- [Audit: features (end to end)](audit/features.md) +- [Audit: the MCP specification (area `spec`)](audit/spec.md) +- [Audit: mcpx's own surface](audit/surface.md) +- [Catalogue](catalogue/README.md) +- [Comparisons](compare/README.md) +- [The comparison chapter](compare/chapter.md) +- [Communication conflicts](compare/conflicts.md) +- [Content types through mcpx: did it need them?](compare/content-passthrough.md) +- [History](compare/history.md) +- [What `input_required` is](compare/input-required.md) +- [Code mode capability matrix](compare/matrix-code-mode.md) +- [mcpx × revisions, both directions](compare/matrix-mcpx.md) +- [opencode v1 vs v2](compare/matrix-opencode.md) +- [MCP revisions × features](compare/matrix-revisions.md) +- [Authorization](compare/register/auth.md) +- [Capabilities](compare/register/capabilities.md) +- [Code mode and script execution](compare/register/code-mode.md) +- [Completion](compare/register/completion.md) +- [Content types](compare/register/content-types.md) +- [Elicitation](compare/register/elicitation.md) +- [Errors](compare/register/errors.md) +- [Lifecycle and versioning](compare/register/lifecycle-versioning.md) +- [Logging](compare/register/logging.md) +- [meta](compare/register/meta.md) +- [Multi round-trip requests (the 2026 `input_required` mechanism)](compare/register/mrtr.md) +- [Subscriptions and notifications](compare/register/notifications.md) +- [Pagination and caching](compare/register/pagination-caching.md) +- [Plugin APIs (opencode v1 and v2) and harness integration](compare/register/plugin-apis.md) +- [Process model and statelessness](compare/register/process-model.md) +- [Progress and cancellation](compare/register/progress-cancellation.md) +- [Prompts](compare/register/prompts.md) +- [Resources](compare/register/resources.md) +- [Roots](compare/register/roots.md) +- [Sampling](compare/register/sampling.md) +- [Tasks](compare/register/tasks.md) +- [Tools](compare/register/tools.md) +- [Transports](compare/register/transports.md) +- [Stateless and every revision: can mcpx do both?](compare/stateless.md) +- [What each says a server should be](compare/what-a-server-should-be.md) +- [The home-page example component](home-example/README.md) +- [mcpx test inventory (deliverable 1 of #1960)](testing/inventory.md) diff --git a/pkgs/mcpx/docs/book.toml b/pkgs/mcpx/docs/book.toml new file mode 100644 index 0000000000..da6e5d1b2e --- /dev/null +++ b/pkgs/mcpx/docs/book.toml @@ -0,0 +1,15 @@ +# The mcpx book (issue #1939, Approach C: mdBook). +# +# The book's source is this directory itself: the markdown that renders +# on GitHub is the book, organised by SUMMARY.md, with no content +# rewritten for the site. Built by the flake output .#mcpx-docs +# (pkgs/mcpx/docs.nix) so CI checks it like every other flake output. + +[book] +title = "mcpx" +authors = ["developing-today"] +language = "en" +src = "." + +[output.html] +git-repository-url = "https://github.com/developing-today/code/tree/main/pkgs/mcpx/docs"