PB

proompteng/bilig

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

35 stars 18 forks 质量 82 趋势 32MIT

节点服务的公式工作簿:编辑输入、重新计算公式、读取输出、持久化WorkPaper JSON,以及暴露MCP工具。

概览

Bilig 是一个原生于 TypeScript 的无头 WorkPaper 运行时,用于Node.js服务、测试和 AI 代理。设置输入、重新计算公式、读取计算输出、持久化 WorkPaper JSON、恢复并验证结果——无需驱动 Excel 或浏览器网格。 Bilig是一个无头的活页簿运行时,不是可视化的电子表格应用,也不是声称完全兼容Excel的软件。如果你的合同是.xlsx文件,就从兼容性报告开始。 安装前请验证已发布的软件包: 评估器编辑输入!B2,重新计算摘要!B2,保存工作论文,恢复它,并比较恢复后的值: 验证:真意味着写入、公式回读、JSON 导出和恢复读回均通过。这比成功的写调用更有力。 对于普通操作,可以使用 set()、setMany()、readMany()、display()和 saveJson()。当需要提交并验证多个输入作为一次编辑时,使用 editManyAndReadback()。

概述(AI 翻译)

保留工作簿模式。在Node中运行规则。

Bilig 是一个基于 TypeScript 的无头 WorkPaper 运行时,用于Node.js服务, 测试和人工智能代理。设置输入,重新计算公式,读取计算出的输出, 持久化 WorkPaper JSON,恢复并验证结果——无需驱动 Excel 或者浏览器网格。

文档 · 快速入门 · TypeScript API · MCP · 示例· 讨论

[!注] Bilig 是一个无头的练习册运行时,而不是可视化的电子表格应用或索赔 完全兼容Excel。如果你的合同是.xlsx文件,请从以下开始 兼容性报告。

快速启动

节点运行时

安装前请验证已发布的软件包:

评估器编辑Inputs!B2,重新计算Summary!B2,保存工作论文, 恢复并比较恢复后的值:

verified: true 表示写入、公式回读、JSON 导出和恢复 所有回读都通过了。这比成功的写入调用更有力。

用TypeScript的

对于普通操作,可以使用set()、setMany()、readMany()、display(), 以及saveJson()。当多个输入必须为 作为一个编辑提交并验证。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Bilig

Keep the workbook model. Run the rule in Node.

Bilig is a TypeScript-native, headless WorkPaper runtime for Node.js services, tests, and AI agents. Set inputs, recalculate formulas, read computed outputs, persist WorkPaper JSON, restore it, and verify the result—without driving Excel or a browser grid.

Docs · Quick start · TypeScript API · MCP · Examples · Discussions

[!NOTE] Bilig is a headless workbook runtime, not a visual spreadsheet app or a claim of full Excel compatibility. If an .xlsx file is your contract, start with the compatibility report.

Quick Start

Node runtime

Prove the published package before installing it:

npm exec --yes --package @bilig/workpaper@latest -- bilig-evaluate --door workpaper-service --json

The evaluator edits Inputs!B2, recalculates Summary!B2, saves the WorkPaper, restores it, and compares the restored value:

{
  "schemaVersion": "bilig-evaluator.v1",
  "door": "workpaper-service",
  "evidence": {
    "editedCell": "Inputs!B2",
    "dependentCell": "Summary!B2",
    "before": 24000,
    "after": 38400,
    "afterRestore": 38400
  },
  "verified": true
}

verified: true means the write, formula readback, JSON export, and restored readback all passed. It is stronger evidence than a successful write call.

Use It From TypeScript

npm install @bilig/workpaper
import { buildA1WorkPaper } from '@bilig/workpaper'

const pricing = buildA1WorkPaper({
  Inputs: [
    ['Metric', 'Value'],
    ['Units', 20],
    ['Price', 1200],
  ],
  Summary: [
    ['Metric', 'Value'],
    ['Revenue', '=Inputs!B2*Inputs!B3'],
  ],
})

const proof = pricing.editAndReadback('Inputs!B2', 32, {
  readbackRange: 'Summary!B2',
})

console.log(proof.afterReadback.displayValues[0]?.[0]) // 38400
console.log(proof.verified) // true

pricing.dispose()

For ordinary operations, use set(), setMany(), readMany(), display(),

在 GitHub 查看完整 README

安装

npx --yes skills@latest add https://bilig.proompteng.ai --list
新手?先看 mcpskill.org 教程 →