Bilig WorkPaper
WorkPaper MCP server for editing formula workbooks, recalculating cells, and persisting JSON-backed workbook state.
Documentation
bilig
Run workbook-shaped business rules inside Node.
Bilig gives services, queue workers, tests, MCP servers, and tool integrations a typed WorkPaper object: write inputs, recalculate formulas, read outputs, persist JSON, restore, and verify. It fits pricing models, quote approval, payout checks, import validation, forecasts, and formula-backed workflow steps.
Run the no-project service check from any Node project:
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door workpaper-service --json
Expected WorkPaper service result:
{
"schemaVersion": "bilig-evaluator.v1",
"door": "workpaper-service",
"verified": true,
"evidence": {
"editedCell": "Inputs!B2",
"dependentCell": "Summary!B2",
"before": 24000,
"after": 38400,
"afterRestore": 38400,
"persistedDocumentBytes": 999
}
}
For TypeScript services that should own the workbook model:
npm create @bilig/workpaper@latest pricing-workpaper
cd pricing-workpaper
npm install
npm run smoke
For MCP clients or other tool integrations, run the same proof loop through the MCP evaluator before adding host-specific config:
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json
Evaluator examples live in
examples/bilig-evaluator-proof. Integration
matrix docs and host-specific config files are available when a team needs
them, but the public proof starts with WorkPaper service readback. File
compatibility diagnostics are a separate path for import/export boundaries, not
the default runtime story.
Project site: https://proompteng.github.io/bilig/
Start Here
Pick the path that matches the job:
| You have... | Start with | You should see |
|---|---|---|
| A Node service, route, queue, test, or tool needs workbook logic | Node service WorkPaper evaluator | input edit, recalculated output, serialized JSON, restore check, and verified: true. |
| An MCP client or tool integration needs workbook commands | MCP tool evaluator | tool discovery, cell edit, formula readback, export, restart check, and verified: true. |
| You want a starter project with the runtime installed | 90-second Node quickstart | a local package smoke test that edits one input, recalculates, saves JSON, and restores the WorkPaper. |
| An imported file is the integration boundary | Workbook Compatibility Report | unsupported functions, external links, macros, pivots, volatile formulas, and import/export risks. |
If you are not sure which one fits, start with the thing that owns state. Use WorkPaper when your service or tool should own the workbook model. Use file diagnostics only when import/export compatibility is the actual contract.
Good fits: pricing, quote approval, payout checks, import validation, forecasts, CI fixtures, formula-backed workflow steps, and tool integrations that need exact cell addresses plus readback. Bad fits: manual spreadsheet editing, Office macros, desktop Excel automation, or one-off arithmetic where a workbook would be ceremony.
If You Only Try One Thing
Run the WorkPaper service proof at the top of this README first. It is the shortest proof that Bilig gives backend code a workbook object it can change, recalculate, read back, save, and restore without driving Excel, LibreOffice, Google Sheets, or a browser grid.
If an MCP client or tool integration owns the workflow, run the MCP door:
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json
Trust boundaries:
- Runs locally in Node or in your GitHub Actions runner; no hosted workbook upload is required.
- Does not claim Excel parity. Start with where Bilig is not Excel-compatible yet before using it for irreversible workflows.
- File import/export diagnostics are available when an imported file is the contract, but they are a separate path from service-owned WorkPaper state.
Which Path Should I Install?
| Problem you have right now | Install or use | First proof |
|---|---|---|
| Formula workbook state belongs inside a Node service, route, queue, test, or tool | npm install @bilig/workpaper | Node service WorkPaper evaluator |
| An MCP client or tool integration needs workbook tools with computed readback | npm install @bilig/workpaper | MCP tool evaluator |
| Import/export compatibility is the integration boundary | compatibility diagnostics | Workbook Compatibility Report |
Advanced adapters are still available when the boundary is already specific:
SheetJS,
ExcelJS,
external workbooks,
MCP/tool integrations,
@bilig/workbook when a runtime needs
transport-neutral plan data and command receipts, and
runtime provenance.
MCP And Tool Integrations
Use the WorkPaper host handoff when a tool host needs workbook reads, writes, recalculation, JSON export, and restore proof. The first check is always the no-key MCP evaluator:
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json
That evaluator starts the published WorkPaper tool server, discovers tools,
edits an input, reads the dependent formula, exports JSON, restarts, restores,
and returns verified: true. Use
llms-install.md when a host wants one install file, and use
the tool-host proof matrix when the host matters
more than the package boundary.
The published package also carries AGENTS.md and SKILL.md so hosts
inspecting node_modules/@bilig/workpaper can find the same proof locally.
Cloned checkouts keep host-specific config indexed in
agent rule chooser: CLAUDE.md,
.claude/skills/bilig-workpaper/SKILL.md,
.claude/commands/bilig-workpaper-proof.md,
.cursor/rules/bilig-workpaper.mdc, .devin/rules/bilig-workpaper.md,
.windsurf/rules/bilig-workpaper.md, .clinerules/bilig-workpaper.md,
.continue/rules/bilig-workpaper.md, .zed/settings.json, opencode.jsonc,
and .opencode/agents/bilig-workpaper.md. The public manifest is
docs/.well-known/agent.json.
npx --yes skills@latest add https://bilig.proompteng.ai --list
npx --yes skills@latest add proompteng/bilig --skill bilig-workpaper --list
Integration Recipes After The Proof
Run one evaluator first. Then use the recipe that matches the platform boundary:
- Open WebUI WorkPaper MCP: https://proompteng.github.io/bilig/open-webui-workpaper-mcp.html.
- OpenAI Agents SDK with direct tools, stdio MCP, or
MCPServerStreamableHttp: https://proompteng.github.io/bilig/openai-agents-sdk-workpaper-tool.html. - ChatGPT Apps WorkPaper MCP: https://proompteng.github.io/bilig/chatgpt-apps-workpaper-mcp.html.
- Hugging Face Gradio MCP Space: https://proompteng.github.io/bilig/huggingface-workpaper-space.html.
- n8n self-hosted workflows can use
@bilig/n8n-nodes-workpaper; Pipedream formula readback is documented at https://proompteng.github.io/bilig/pipedream-workpaper-formula-readback.html and sourced fromdocs/pipedream-workpaper-formula-readback.md. - Directus Persisted Calculated Fields: https://proompteng.github.io/bilig/directus-workpaper-flow-operation.html.
- Trigger.dev Durable Formula Tasks and Dagster Formula Assets are covered in the workflow recipe docs.
- ELT validation recipes:
airbyte-workpaper-validationandmeltano-workpaper-utility.
Choose An Evaluation Path
| If you are evaluating... | Start here | What should be true before you adopt |
|---|---|---|
| Node service formulas | Node service WorkPaper evaluator | A starter writes one input, recalculates, persists JSON, restores, and prints verified: true. |
| MCP tool contract | MCP workbook evaluator | MCP tool discovery, input edit, formula readback, persistence, and restart proof all pass. |
| Integration proof chooser | Tool-host proof matrix, MCP spreadsheet tool server, and Vercel AI SDK formula readback | The integration path starts with the smallest verified proof and avoids write-only or UI-only claims. |
| Runtime intent adapters | Workbook runtime intent API and runtime intent example | A model prepares transport-neutral plan data, strict runtime proof, command receipts, and check evidence. |
| Basic fit | Why use Bilig? | The problem is workbook-shaped business logic that needs API readback and persistence. |
| Published npm package | 90-second Node quickstart | @bilig/workpaper edits one input, recalculates, persists JSON, restores, and prints verified: true. |
| Backend service shape | Quote approval WorkPaper API | A realistic route-style workflow returns formula readback and restoredMatchesAfter: true. |
| MCP clients and host integrations | WorkPaper host handbook, MCP spreadsheet tool server, Gemini CLI extension, and Claude Desktop MCPB bundle | The host installs a tool path, follows the handoff guide, then proves write/readback/persist. |
| Technical WorkPaper review | WorkPaper maintainer proof note | One compact page has the npm check, benchmark caveat, known limits, and open questions. |
| Trust and performance | npm provenance and benchmark evidence | npm shows SLSA provenance, and benchmark claims match the checked artifact. |
| Imported files | Workbook Compatibility Report, file formula recalculation, and ExcelJS formula recalculation | The file boundary is inspected before a service, CI job, or workflow trusts imported formulas. |
| Almost a fit | implementation gap discussion | Name the formula, import/export, persistence, framework, MCP, package, or benchmark gap. |
| Formula or import bug | formula bug clinic and submit a workbook fixture | Share one reduced public case that can become a fixture. |
Reduced workbook already in hand? If the blocker is an import, formula, or persistence gap, generate the fixture report:
npm exec --package @bilig/workpaper@latest -- bilig-formula-clinic ./reduced.xlsx --cells "Summary!B7,Inputs!B2"
Handing a workbook task to an MCP client or host integration? Start with the host handoff guide before opening Excel, LibreOffice, Google Sheets, or a screenshot UI. That section keeps the host handoff prompt for clients that require copy-paste instructions. To prove the package-owned MCP loop without cloning the repo:
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door workpaper-service --json
npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door agent-mcp --json
npm exec --package @bilig/workpaper@latest -- bilig-mcp-challenge --json
Tool hosts that support skill manifests can start from
skill.md or the well-known index at
docs/.well-known/agent-skills/index.json.
Claude Desktop users can install the released MCPB bundle directly:
https://github.com/proompteng/bilig/releases/latest/download/bilig-workpaper.mcpb.
For host-specific project files, use the
agent rule chooser.
Try It In 90 Seconds
This uses the published npm package. It builds a workbook, changes one input, reads the calculated value, saves JSON, restores the workbook, and prints the same value again.
npm create @bilig/workpaper@latest pricing-workpaper
cd pricing-workpaper
npm install
npm run smoke
Expected output includes these fields:
{
"before": {
"summary": {
"decision": "review"
},
"inputCells": {
"units": "Inputs!B2",
"listPrice": "Inputs!B3"
}
},
"edit": {
"before": {
"decision": "review"
},
"after": {
"decision": "approved"
},
"restored": {
"decision": "approved"
},
"checks": {
"decisionChanged": true,
"formulasPersisted": true,
"restoredMatchesAfter": true,
"serializedBytes": 1242
}
},
"verified": true
}
The generated starter uses the same WorkPaper fields as the
public mirror at https://proompteng.github.io/bilig/npm-eval.ts and
examples/headless-workpaper/npm-eval.ts.
The exact byte count can change between package versions; verified: true,
decisionChanged, formulasPersisted, and restoredMatchesAfter are the
checks.
For a route-shaped quote approval API today, run the maintained example:
git clone --depth 1 https://github.com/proompteng/bilig.git
cd bilig
pnpm --dir examples/serverless-workpaper-api install --ignore-workspace
pnpm --dir examples/serverless-workpaper-api run smoke
For a generated project from a blank directory, run
npm create @bilig/workpaper@latest pricing-workpaper through the
@bilig/create-workpaper package. The package source lives in
packages/create-workpaper, and the publish gate
is documented in create a Bilig WorkPaper starter.
For an MCP-enabled project with host integration files, MCP client configs, and
an agent:verify script, run
npm create @bilig/workpaper@latest pricing-agent -- --agent.
Representative host files include AGENTS.md, CLAUDE.md, GEMINI.md,
.claude/skills/bilig-workpaper/SKILL.md, .cursor/rules/bilig-workpaper.mdc,
.trae/mcp.json, and .zed/settings.json.
For an existing repo, run
npm create @bilig/workpaper@latest . -- --add-agent; it adds Bilig MCP and
host instructions without replacing your app template or editing
package.json. If a host policy already exists, it writes
BILIG_WORKPAPER_INSTALL.md with the skipped paths and a short handoff block.
If that proof almost matches a service or integration workflow you maintain, the useful next step is a concrete gap report in Discussions: formula coverage, service persistence, MCP setup, agent writeback, import/export boundary, or benchmark coverage.
TypeScript API Shape
Most integrations are just this: build a workbook, write an input, read the
calculated value, and save the workbook state. When a workflow writes more than
one input, use editManyAndReadback() so the edits are applied atomically and
the proof compares typed readback values, persisted restore output, and formula
diagnostics.
import { buildA1WorkPaper } from '@bilig/workpaper'
const book = buildA1WorkPaper({
Inputs: [
['Metric', 'Value'],
['Customers', 20],
['Average revenue', 1200],
],
Summary: [
['Metric', 'Value'],
['Revenue', '=Inputs!B2*Inputs!B3'],
],
})
const proof = book.editAndReadback('Inputs!B2', 32, {
readbackRange: 'Summary!B2',
})
console.log({
editedCell: proof.editedCell,
revenue: proof.afterReadback.displayValues[0]?.[0],
persistedDocumentBytes: proof.persistedDocumentBytes,
verified: proof.verified,
})
book.dispose()
The lower-level WorkPaper runtime is still exported for engine integrations,
but the A1 facade is the default service and agent path. Use
book.set(), book.setMany(), book.readMany(), book.display(), and
book.saveJson() when a full readback proof is not needed. Use
book.editManyAndReadback() when several inputs should be committed and proven
as one atomic workbook edit.
When To Reach For It
Use @bilig/workpaper when:
- a Node service owns a workbook-shaped calculation;
- an agent needs tools such as
readRangeandsetInputCell, with computed before/after values instead of screenshots; - tests need deterministic spreadsheet state and formula readback;
- a workflow needs to save the edited workbook as JSON and restore it later.
Use something else when you need a visual spreadsheet grid, Office macros, desktop Excel automation, or a one-off arithmetic helper. Do not treat embedded XLSX stored formula results as truth; use the Excel oracle workflow when accuracy matters.
Package Boundary
Current checked npm metadata for @bilig/workpaper@latest:
- Published package:
57.7 kBunpacked,49package entries. - Boundary: the public package owns WorkPaper starters, evaluators, MCP command wrappers, formula clinic reports, JSON persistence, and restored readback.
- Runtime: Node
>=22.0.0; Node 22 compatibility is covered by the runtime package workflow.
Published Package Trust
@bilig/workpaper is published with npm registry signatures and SLSA provenance
attestations. Verify the package version you are about to adopt:
npm view @bilig/workpaper version dist.attestations dist.signatures --json
After installing, npm can verify the current dependency tree:
npm audit signatures
The current package trust path is documented in
npm provenance and package trust.
Repository security posture is tracked by
OpenSSF Scorecard
and uploaded to GitHub code scanning on every main update.
Deeper Evaluation Paths
After the first proof in Start Here, use the deeper guide that matches the next job.
- Run the 90-second npm eval in a blank project.
- Run the flagship
serverless WorkPaper API example:
npm run quote-approval-api. - If the workflow starts with a saved workbook file, run the
XLSX formula recalculation in Node:
npm start. - If a tool host needs workbook tools, start with the headless WorkPaper host handbook, then use the MCP server guide when the caller is an MCP client.
- If a real workbook almost works, start with the formula bug clinic. Include the exact cell, expected value, actual value, and command output. If the fixture is already reduced, submit the structured fixture form so the blocker can become a test, example, or corpus case instead of private feedback. https://github.com/proompteng/bilig/issues/new?template=workbook_fixture.yml. If you are still reducing the case, discuss the shape first: https://github.com/proompteng/bilig/discussions/414.
The rest of the docs are an index, not a prerequisite.
For comparison and integration details, use the plain-language fit guide, screenshot automation boundary, Google Sheets API boundary, Google Sheets QUERY/SORTN in Node, workbook automation examples, the formula workbooks proof page, the Node spreadsheet formula engine guide, server-side spreadsheet automation, framework adapters, formula bug clinic, workbook fixture submissions, OpenAI Agents SDK tools, Browser Use formula tool, Google ADK MCP tools, OpenHands MCP setup, OpenCode MCP setup, Microsoft Agent Framework MCP tools, Goose MCP recipe, tool-host proof matrix, MCP spreadsheet formula server for tool hosts, Vercel AI SDK formula readback, AI SDK and LangChain tools, CrewAI adapter, the WorkPaper host handbook, the MCP server guide, spreadsheet MCP server comparison, MCP directory status, MCP client setup, Gemini CLI extension, FastMCP Python client, Claude Desktop MCPB bundle, npm provenance and package trust, JavaScript library comparison, Node spreadsheet formula engine guide, server-side spreadsheet automation, saved-workbook formula recalculation, XLSX formula support answers, SheetJS/ExcelJS boundary, ExcelJS formula result boundary, Microsoft Graph Excel boundary, and engine comparison.
Useful deeper examples: invoice totals,
budget variance alerts,
fulfillment capacity plan,
quote approval threshold,
subscription MRR forecast,
agent framework adapters,
MCP tool server shape,
XLSX formula recalculation in Node,
and serverless quote approval. Run
npm run quote-approval-api, npm run agent:openai-agents-sdk,
npm run agent:framework-adapters,
npm run agent:mcp-tools, npm run agent:mcp-transcript,
npm run agent:mcp-file-transcript, npm run agent:mcp-stdio, or
npm exec --package @bilig/workpaper -- bilig-workpaper-mcp when that is the
path you are evaluating.
Saved workbook diagnostics stay available when a file is the integration boundary:
npm exec --yes --package @bilig/xlsx-formula-recalc@latest -- bilig-evaluate --door workbook-compatibility --json
npm exec --yes --package @bilig/xlsx-formula-recalc@latest -- workbook-compatibility-report workbook.xlsx --json
npm exec --package @bilig/xlsx-formula-recalc@latest -- xlsx-recalc --demo --json
npm exec --package @bilig/sheetjs-formula-recalc@latest -- sheetjs-recalc --demo --json
The serverless example also includes npm run next-route-handler,
npm run next-server-action, npm run next-server-action-formdata,
npm run hono-route, npm run framework-adapters, and
npm run persistence-adapters for
framework-specific boundary checks.
The MCP server is also listed in the official registry:
https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.proompteng%2Fbilig-workpaper.
Clients that support Streamable HTTP MCP can also smoke-test the stateless
hosted endpoint at https://bilig.proompteng.ai/mcp; use the local stdio server
when the agent needs to persist a project WorkPaper JSON file.
Examples You Can Run
The runnable examples are TypeScript files. Some source imports end in .js
because Node ESM resolves compiled package output that way; the files you edit
and run are still .ts.
From a cloned checkout:
pnpm --dir examples/headless-workpaper install --ignore-workspace
pnpm --dir examples/headless-workpaper run start
pnpm --dir examples/headless-workpaper run json-records
pnpm --dir examples/headless-workpaper run csv-shaped
pnpm --dir examples/headless-workpaper run invoice-totals
pnpm --dir examples/headless-workpaper run budget-variance
pnpm --dir examples/headless-workpaper run fulfillment-capacity
pnpm --dir examples/headless-workpaper run quote-approval
pnpm --dir examples/headless-workpaper run subscription-mrr
pnpm --dir examples/headless-workpaper run persistence
The most useful entry points:
- JSON records input
- CSV shaped input
- invoice totals
- budget variance alerts
- fulfillment capacity plan
- quote approval threshold
- subscription MRR forecast
- SheetJS, xlsx-populate, and ExcelJS recalculation bridge
For tool integrations:
pnpm --dir examples/headless-workpaper run agent:verify
pnpm --dir examples/headless-workpaper run agent:tool-call
pnpm --dir examples/headless-workpaper run agent:openai-agents-sdk
pnpm --dir examples/headless-workpaper run agent:openai-agents-sdk-mcp
pnpm --dir examples/headless-workpaper run agent:openai-agents-sdk-hosted-mcp
pnpm --dir examples/headless-workpaper run agent:openai-responses
pnpm --dir examples/headless-workpaper run agent:ai-sdk-generate-text
pnpm --dir examples/headless-workpaper run agent:ai-sdk-stream-text
pnpm --dir examples/headless-workpaper run agent:framework-adapters
pnpm --dir examples/serverless-workpaper-api run hono-route
pnpm --dir examples/mastra-workpaper-tool run smoke
pnpm --dir examples/langgraph-workpaper-tool-state run smoke
pnpm --dir examples/langchain-mcp-workpaper-toolnode run smoke
pnpm --dir examples/headless-workpaper run agent:mcp-tools
pnpm --dir examples/headless-workpaper run agent:mcp-file-transcript
pnpm --dir examples/headless-workpaper run agent:mcp-xlsx-risk-preflight
pnpm --dir examples/headless-workpaper run agent:mcp-stdio
The AI SDK example uses
ai-sdk-generate-text-tool-smoke.ts.
The OpenAI Agents SDK guide is
docs/openai-agents-sdk-workpaper-tool.md.
It includes direct tool() wrapping, private MCPServerStdio discovery, and
hosted stateless MCPServerStreamableHttp discovery through the WorkPaper MCP
tool loop.
The ChatGPT Apps Developer Mode setup is
docs/chatgpt-apps-workpaper-mcp.md.
It shows the public /mcp endpoint as a data/tool-only remote MCP app and keeps
custom Apps SDK component UI as future scope.
The OpenAI Responses guide is
docs/openai-responses-workpaper-tool-call.md.
The agent framework guide is
docs/vercel-ai-sdk-langchain-spreadsheet-tool.md.
The Mastra guide includes a real @mastra/core createTool() smoke:
docs/mastra-workpaper-spreadsheet-tool.md.
The LangGraph.js ToolNode proof is
docs/langgraph-workpaper-toolnode-spreadsheet.md.
It includes a no-key @langchain/mcp-adapters smoke that discovers the
published WorkPaper MCP stdio tools and executes them through ToolNode.
The package also ships the MCP stdio binary:
npm exec --package @bilig/workpaper@latest -- bilig-agent-challenge --json
npm exec --package @bilig/workpaper@latest -- bilig-formula-clinic ./reduced.xlsx --cells "Summary!B7,Inputs!B2"
npm exec --package @bilig/workpaper@latest -- bilig-mcp-challenge --json
npm exec --package @bilig/workpaper@latest -- bilig-workpaper-mcp
npm exec --package @bilig/workpaper@latest -- bilig-workpaper-mcp --workpaper ./pricing.workpaper.json --init-demo-workpaper --writable
npm exec --package @bilig/workpaper@latest -- bilig-workpaper-mcp --from-xlsx ./pricing.xlsx
npm exec --package @bilig/workpaper@latest -- bilig-workpaper-mcp --from-xlsx ./pricing.xlsx --workpaper ./.bilig/pricing.workpaper.json --writable
pnpm --dir examples/headless-workpaper run agent:mcp-xlsx-risk-preflight
docker build --target bilig-workpaper-mcp -t bilig-workpaper-mcp:local .
bilig-agent-challenge prints the same edit, formula readback, WorkPaper JSON
export, restore, and verified: true proof object used by the agent workbook
challenge page.
bilig-mcp-challenge proves the file-backed MCP path end to end: initialize
JSON-RPC, list tools/resources/prompts, edit Inputs!B3, read recalculated
Summary!B3, export the WorkPaper JSON, restart from disk, and return
verified: true.
bilig-formula-clinic imports a reduced XLSX locally, samples formulas, reads
requested cells through WorkPaper, and prints a Markdown issue body. It does not
upload workbook contents.
Without --workpaper, the binary starts the built-in demo workbook. With
--workpaper, it loads your persisted WorkPaper JSON and exposes
list_sheets, read_range, read_cell, set_cell_contents,
set_cell_contents_and_readback, get_cell_display_value,
export_workpaper_document, and validate_formula; --writable persists
set_cell_contents or set_cell_contents_and_readback edits back to the same
file. If you already have an XLSX, --from-xlsx ./pricing.xlsx imports it into
an in-memory WorkPaper server for readback, throwaway edits, and
analyze_workbook_risk without writing a sidecar. Add --workpaper ... --writable
only when the agent needs persisted file state. It also
exposes MCP resources and prompts for bilig://workpaper/agent-handoff,
bilig://workpaper/current-document, edit_and_verify_workpaper, and
debug_workpaper_formula, so capable clients can discover the workflow before
calling tools.
For a maintained real-XLSX transcript, run
pnpm --dir examples/headless-workpaper run agent:mcp-xlsx-risk-preflight.
It calls analyze_workbook_risk, edits Inputs!B3, verifies Summary!B3
changes from 60000 to 96000, exports WorkPaper JSON, and keeps
excelParity: "not_proven".
The Docker target is for MCP directory scanners: it seeds a demo WorkPaper JSON
inside the image and starts the file-backed --writable tool surface so
tools/list, resources/list, and prompts/list return the general WorkPaper
agent surface without cloning this monorepo. For remote MCP clients, the app
runtime exposes https://bilig.proompteng.ai/mcp as a stateless JSON-only
Streamable HTTP endpoint for tool discovery and write/readback smoke tests.
It is published in the official MCP Registry as
io.github.proompteng/bilig-workpaper:
https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.proompteng%2Fbilig-workpaper.
It is also live on Glama with Try in Browser, A-grade tool pages, and the
file-backed WorkPaper tools:
https://glama.ai/mcp/servers/proompteng/bilig.
Proof You Can Reproduce
- The 90-second TypeScript check above edits one input, restores the saved JSON document, and verifies the dependent formula result.
- For a service evaluator path, run the quote approval WorkPaper API proof. It starts from an empty Node directory, downloads one maintained TypeScript route smoke, writes quote inputs, recalculates an approval decision, persists JSON, and verifies restored readback.
- For a shorter evaluation page, read formula workbooks for Node services and tool integrations. It compresses the WorkPaper boundary, MCP file-backed mode, benchmark caveat, and alternative-tool guidance into one evaluation path.
- For a compact review note, use the
WorkPaper maintainer proof note.
It keeps the empty npm-project command,
verified: trueoutput, benchmark caveat, known limits, and open questions together. - For saved-file integration, run the XLSX formula recalculation example:
examples/xlsx-recalculation-node. It imports a generated XLSX pricing workbook, edits input cells, reads the recalculated approval decision, exports XLSX, reimports it, and verifies the formulas survived the round trip. The public decision page is XLSX formula recalculation in Node.js. - Run
pnpm workpaper:bench:competitive:check. The checked-in artifact shows100/100comparable WorkPaper mean wins and100/100mean+p95 wins; the current worst p95 row issheet-rename-dependenciesat0.792x. - The benchmark card is generated from that artifact:
docs/assets/workpaper-benchmark-card.png. - Read the compatibility limits before importing real Excel workbooks.
- Use the production adoption checklist before promoting a WorkPaper-backed workflow beyond evaluation.
- For XLSX accuracy audits, use the Excel oracle harness. It separates import success, timeouts, cached workbook values, and fresh Microsoft Excel recalculation results.
- The WorkPaper MCP server is listed in the official MCP Registry and on Glama. The directory status page keeps the npm command, remote endpoint, static MCP server card, and directory evidence in one place.
- Public feedback threads: workflow questions, service examples, persistence adapters, JavaScript spreadsheet library guide, OpenAI Responses tool calls, and benchmark critique.
If you are evaluating Bilig runtime packages for production and want release notifications, watch releases: https://github.com/proompteng/bilig/subscription.
XLSX Accuracy Policy
Cached formula values embedded in .xlsx files are cache diagnostics, not an
accuracy verdict. A Bilig correctness bug should only be claimed when the
expected value came from a fresh Excel recalculation oracle.
OUT=.cache/excel-oracle-evaluation
pnpm workpaper:xlsx-oracle -- prepare-oracle /path/to/xlsx-corpus "$OUT"
pnpm workpaper:xlsx-oracle -- evaluate-cache /path/to/xlsx-corpus "$OUT"
pnpm workpaper:xlsx-oracle -- evaluate-oracle /path/to/xlsx-corpus "$OUT/recalculated" "$OUT"
pnpm workpaper:xlsx-oracle -- summarize "$OUT"
evaluate-cache writes cache-diagnostic.json and stays non-authoritative.
evaluate-oracle writes excel-oracle-report.json, and summarize writes
summary.md. If Excel automation is unavailable, cells are classified as
missing_excel_oracle instead of being promoted to bugs.
What Is In This Repo
packages/workpaper: public WorkPaper package, starters, evaluator binaries, and MCP wrappers.packages/headless: lower-level WorkPaper runtime that backs the public package.packages/excel-import: saved-workbook import/export boundary.packages/formula: formula parser, binder, compiler, and evaluator.packages/core: workbook engine, snapshots, mutation flow, and scheduler.packages/gridandapps/web: browser spreadsheet shell.apps/bilig: fullstack monolith runtime, API surface, and static asset server.packages/renderer: React workbook renderer.packages/protocol,packages/binary-protocol,packages/agent-api, andpackages/worker-transport: protocol and integration boundaries.packages/wasm-kernel: AssemblyScript/WASM numeric fast path.packages/benchmarks: benchmark harness and performance contracts.
For XLSX import/export from TypeScript:
import { WorkPaper } from '@bilig/workpaper'
import { exportXlsx, importXlsx } from '@bilig/workpaper/xlsx'
Use WorkPaper.buildFromSnapshot(imported.snapshot) after import and
workbook.exportSnapshot() before exportXlsx().
Local Development
Use Node 24+, Bun, and [email protected].
pnpm install
pnpm dev:web
pnpm dev:web-local
pnpm dev:sync
For a full local preflight:
pnpm lint
pnpm typecheck
pnpm test
pnpm test:browser
pnpm run ci
Generated sources and public evidence are checked:
pnpm protocol:check
pnpm formula-inventory:check
pnpm workspace-resolution:check
pnpm workpaper:bench:competitive:check
pnpm docs:discovery:check
For Coding Agents
Start with the public package boundary unless the task is explicitly engine work.
- Read
packages/workpaper/README.mdbefore touching public WorkPaper behavior. - Read
docs/AGENTS.md,docs/skill.md, ordocs/llms-full.txtwhen building an agent-facing integration from outside the repo. - Use public exports from
@bilig/workpaper; do not reach intosrc/ordist/when writing consumer examples. - Keep examples TypeScript-first.
- Do not call embedded XLSX stored formula results an accuracy oracle.
- Add focused tests before changing formulas, persistence, range bounds, config rebuilds, events, row/column moves, or sheet lifecycle.
- Run the focused package tests first, then broaden to
pnpm run ci.
Contributing
Read CONTRIBUTING.md before opening a PR. If this is your first patch, start with the new contributor guide and then claim a scoped starter issue.
Good first patches usually fit one of these shapes:
- formula fixtures with clear expected behavior;
- small WorkPaper examples that prove a real service or agent workflow;
- focused correctness fixes with regression tests;
- grid accessibility and keyboard-behavior improvements;
- docs that turn an existing architecture note into a runnable command.
The shortest public on-ramp is the
starter issues queue. It keeps code/test picks,
example tasks, adapters, and focused docs work in one current list, with small
acceptance commands for first patches.
If this is your first contribution to bilig, use the
first-timers-only
filter.
Security And Support
Read SECURITY.md before sharing vulnerability details, private workbook data, tokens, credentials, or exploit reproductions. Security reports should use GitHub private vulnerability reporting when available, or [email protected] when the private flow is not visible.
Use SUPPORT.md for the fastest public support path. Good reports include the package version, Node version, OS, exact formula or workbook input, expected value, actual value, and the smallest command or script that reproduces the issue.
CI
Forgejo Actions is the primary CI surface via
.forgejo/workflows/forgejo-ci.yml. GitHub Actions mirrors the verification
contract in .github/workflows/ci.yml.
The strict gate includes frozen lockfile install, full pnpm run ci, artifact
budget checks, browser smoke, and tracked-file cleanliness checks.
License
MIT.