Documentation
The guides tell how to build, run and release the packages. The program format tells how a JSON program runs. Each package has its README. A JSON program in a page opens in the Composer, and a small one runs on the page.
Guides
- OnboardingThis guide tells you how to build the monorepo, start procedures, and add a package or a procedure. The July 2026 version is history. For the design, read…
- The program formatThis document specifies the procedure-as-data format. It is the JSON that client.exec(), the control-flow procedures, procedure.define and the Composer of the…12 programs
- ArchitectureThis document describes the client ecosystem as it is in the monorepo, after the deep dive of October 2026. The July 2026 version is history. The roadmap and…
- ReleaseThis document tells how the packages of the monorepo go to npm. The first release needs a one-time bootstrap. Each later release starts from GitHub Actions.
Client library
- Client APIThe Universal Client provides protocol-agnostic RPC communication with type-safe middleware composition.
- Server APIThe Universal Server provides protocol-agnostic RPC handling with middleware support.
- Transport AdaptersAdapters provide protocol-specific implementations of the Transport interface.
- Middleware SystemThe library provides a middleware system for client requests. Each middleware wraps a call.
- Call policy and interceptorsThis document tells how a host controls which procedures a caller can reach, and how code runs around each invocation. The code is in src/pr…
- CapabilitiesEach call of a procedure operates with a capability. A capability has three parts: a clearance (the data that the call can see), the permitted side effects,…
Packages
clientProcedures as data for TypeScript: define typed procedures once and call them in process, over HTTP, WebSocket, the CLI or MCP. Streaming, middleware, retries, caching and a JSON program format.accessThe rights of a principal on a scope: access lists, owners, implied rights and conditions over a document, with the rules of the app as a policy, and the output filter of a host.algebraThe functions of @mark1russell7/algebra as procedures, made from its types: state machines, timers, failure detection and replay as typed calls, MCP tools and CLI commands.archiveArchives as procedures: make, list and extract tar.gz and zip, with a check of each path against zip slip and links out of the target.better-authBetter Auth for a procedures server: the sign-in with GitHub, Google and passkeys over MongoDB, and a request hook that gives the principal of a session or of an agent token.browserFind a Chromium browser that is already installed (Edge, Chrome or Chromium), and render a page with it: a PDF file or a screenshot, with no browser download. Find and read the bookmarks files of the profiles of Chrome, Edge and Chromium.bundle-assistantThe opt-in tools of the personal assistant for an MCP host: calendar files, mail parsing, places, routes, weather and photo metadata, without the procedures that can carry data out.bundle-devOne import that registers the development procedures of the client ecosystem: shell, file system, git, pnpm, workspace, DAG and procedure scaffolding.bundle-mcpThe curated tool surface for Claude: registers the docker, mongo, sqlite, cue, vitest and workspace procedures and selects which ones an MCP server exposes.claude-cliOne turn of the Claude Code CLI as a detached process that writes stream-json to a file: start, follow, normalised events and cancel.cli-kitA command line for any procedure registry: flags from the input schemas, help, --json, questions for missing arguments, @file input, short flags and a format hook for each procedure.client-cliRun any mark CLI command as a procedure (cli.run) with a safe argv mapping: no shell, typed flags and captured output.client-collectionsCollections for TypeScript: ArrayList, LinkedList, ArrayDeque, HashMap, LinkedHashMap, TreeMap (red-black), PriorityQueue, LRU and TTL maps, async queues, channels and collectors, tested with fast-check.client-cuecue-config as procedures: generate package.json, tsconfig.json and .gitignore from CUE feature presets, add and remove features, and validate projects.client-dagDependency graph algorithms for TypeScript: build a DAG, detect cycles, compute topological levels and traverse in parallel with a concurrency limit. The procedure dag.traverse visits workspace packages in dependency order. It also has a procedure for each function of @mark1russell7/collections/dag with JSON inputs.client-dockerDocker and Docker Compose as typed procedures: ps, run, exec, logs (streaming), build, pull, push, tag, images, inspect, volumes, networks, prune, stop, rm, compose up, down, ps, logs, build and restart, run with argv and no shell injection.client-fsFile system procedures: read, write, copy, move, glob, exists, mkdir and JSON read and write, callable in process, over RPC or from Claude through MCP.client-gitGit as 45 typed procedures: status, diff, log, show, blame, commit, push, pull, branch, tag, merge, rebase, worktree, stash and more, run with argv, async and abortable.client-libWorkspace procedures for pnpm monorepos: scan the packages, graph their dependencies, scaffold a new package, audit packages against a template, and rename across the workspace.client-mcpModel Context Protocol server transport: serve typed procedures as MCP tools to Claude and other MCP clients, with streaming progress, list_changed and an expose policy.client-mongoMongoDB as typed procedures: documents, bulk writes, distinct, explain, collections, indexes, aggregation, change streams and database info, with safe update and delete targets.client-nodeNode.js process procedures: run scripts, spawn and manage long-running processes and read their logs, with output caps and process-tree cleanup.client-playgroundA typed fluent API to write procedure programs in TypeScript (proc, ref, run) with autocomplete, then run them with the client.client-pnpmpnpm commands as typed procedures: install, add, remove, run, exec, list, why, outdated, update, pack and link, with --filter and -r, run with argv and option-injection guards.client-procedureProcedure scaffolding and management: procedure.new writes typed procedure files, plus get, list, define and the procedure store.client-s3AWS S3 as typed procedures: upload, download with safe part files, list, head, copy, presigned URLs, delete and multipart uploads.client-serverServe procedures: createProcedureHost() gives the parts of a service, with HTTP, WebSocket and MCP faces on one listener. Also peers, server.create, server.call and server.connections, and manifests.client-shellSafe command execution for TypeScript: shell.run with argv and no shell, shell.stream line streaming with backpressure, process-tree kill, timeouts and output caps.client-snapshotSnapshot and restore development environments with S3: git state, packages and files, with streamed archives and a safe restore.client-splayRender procedure results with splay: a bridge between the client procedures and the splay recursive renderer, with stream helpers.client-sqliteSQLite procedures on node:sqlite through @mark1russell7/sqlite: queries, tables and schemas, transactions, migrations, backups, structured logs, generated procedures on database handles, and SqliteStorage, a durable collection storage with a change log.client-storeA program store for procedure-as-data: save the programs that procedure.define makes, load them back after a restart, in memory, a JSON file, IndexedDB or a remote collection storage.client-viteVite as procedures: dev server, build, preview and stop, with no shell and managed processes.client-vitestVitest as procedures: run the tests with results and coverage, watch, and stop the managed watch processes.compilerThe compiler of procedure programs: it checks a JSON program before the first call (scopes, effects, schemas, capability) and writes it as a plain async function.4 programsdocumentationThis folder holds the documents of the client monorepo. The table tells what each document is for. The README of each package describes that package.envEnvironment variables as procedures: one variable, the names, and the check of the required ones, with the secrets masked.exifWhen and where a JPEG photo was taken, from its EXIF block (time, offset, GPS), without a dependency.generatorsThe functions of @mark1russell7/rigor-generators as procedures, made from its types: seeds, hashes, canonical JSON, draws and designs as typed calls, MCP tools and CLI commands.geoMap procedures: the coordinates of an address (OpenStreetMap Nominatim), the time and distance of a drive (OSRM), and the map data of a box as GeoJSON (OpenStreetMap through Overpass, ArcGIS layers). It also has a procedure for each function of @mark1russell7/geo.ghThe GitHub CLI as procedures: pull requests, workflow runs and artifacts, releases, issues and the GitHub API, with an argument list and no shell. Also a REST client with conditional requests and the limits of the rate.httpHTTP as procedures: request, JSON, NDJSON and server-sent events, with a host allowlist that refuses private addresses, size limits and the deadline of the call.icsAn iCalendar (RFC 5545) reader and writer without dependencies: the events of a calendar, their occurrences in a time window with the recurrences, and a calendar from events.impl-mcp-devA ready-to-use MCP server for Claude Code and Claude Desktop: 103 developer tools (docker, mongo, sqlite, cue, vitest, workspace) with a strict call policy.ios-backupRead an iPhone backup (MobileSync): find the newest backup, find a file in Manifest.db, read the messages of sms.db. No native dependency.jsonPure JSON, YAML and CSV procedures: a query with JSON Pointer or a path, JSON Patch, a diff, a merge patch, a JSON Schema check, YAML to JSON and back, and CSV (RFC 4180) to rows and back.llmA language model as procedures: a completion with tools, a stream of the answer and a structured answer, through the Anthropic Messages API, with the key from the environment.mailEmail procedures: the headers, addresses and text of a raw MIME message, and the headers of recent IMAP messages, read only.markmark: one CLI for every procedure package. It finds the procedures, parses flags by their Zod types, runs local or through a fast warm server, and asks for missing arguments.mcpMap typed procedures to MCP tools: JSON Schema from Zod, tool names, and input and result conversion for Model Context Protocol servers.mediaMedia documents: a JSON record with a table of its files, and the plan of each transfer in chunks that resume after a cutnotifyPush notifications through ntfy (the public server or your own) and Pushover, with emergency messages that repeat until acknowledged, and Twilio texts and voice calls.npmThe npm registry as typed procedures: view, dist-tags, whoami, pack (a dry run by default) and deprecate, run with argv, and a confirmation for each write to the registry. The entry ./measures reads the use of a package: npm downloads, deps.dev dependents and jsDelivr hits.ocrThe text of a PDF page or an image, with the text, the confidence and the box of each line and word: the text layer of the page first (pdftotext), then OCR with a local engine (tesseract).optionalThe functions of @mark1russell7/optional as procedures, made from its types: optional values and results as typed calls, MCP tools and CLI commands.pdfHTML to PDF with a headless Chromium browser that is already installed (Edge, Chrome or Chromium), as the procedure pdf.render. The render is in @procedures/browser.predicatesThe functions of @mark1russell7/predicates as procedures, made from its types: robust orientation, in-circle and segment tests as typed calls, MCP tools and CLI commands.privacy-scanFind private data in text before it goes public: email addresses, phone numbers, coordinates and the terms of your list.quantityThe functions of @mark1russell7/quantity as procedures, made from its types: amounts in typed units, conversions and formats as typed calls, MCP tools and CLI commands.rationalThe functions of @mark1russell7/rational as procedures, made from its types: exact fractions over bigint, their sums, products and roundings as typed calls, MCP tools and CLI commands.resticThe restic backup program as one procedure: backup, snapshots, restore and forget, with JSON output and no secret as input.scheduleA cron for stored programs: schedules as procedures, and a scheduler that a host starts, with an injectable clock and no overlapping runs.serverA standalone procedure server: load procedure packages and serve them over HTTP and WebSocket with a token and an expose list. Its procedures server.start, server.stop and server.status manage the background server of the mark CLI.signaldbSignalDbStorage: a CollectionStorage over the SignalDB collection of an app, so the collection is the local copy of a HybridStorage and the app keeps its reactive queries.statisticsThe functions of @mark1russell7/rigor-statistics as procedures, made from its types: medians, intervals, tests and fits as typed calls, MCP tools and CLI commands.systemsThe timer law of systems for the client: it binds the times of the middleware, the transports and the server to the symbols of the law, and examines the rules of the client.tailscaleThe tailscale CLI as one procedure: status, ip, serve, up and down, with JSON output.weatherA weather forecast for a point from Open-Meteo, without a key: each day and each hour, metric or imperial.