
LeaveSheet: WH-347 payroll and PTO accrual
io.github.tresor4k由 GitHub 账号 tresor4k 发布v0.1.0更新于 Oct 24, 2026
WH-347 certified payroll columns 5-9, fringe 6B reconciliation and PTO accrual balances.
概览
在本地计算美国 WH-347 认证工资单明细和 PTO 休假累积余额,不联网、不存储数据。
- 可以做什么
- 提供三个本地计算工具:wh347_payroll_lines 返回每位工人的正常/加班工时、6A 费率、6B 福利抵扣、6C 现金替代、7A/7B 毛额、扣款和净薪,以及班组汇总和合理性标记;wh347_fringe_reconcile 将 6B 列与四个计划的福利支出比对;pto_accrual 返回已累积、结转、已用、待批和剩余天数,并列出每个申请的计薪工作日。输出在 28 个黄金用例上与开源 Go 引擎逐字节一致。
- 适用场景
- 适合需要为某一项目周编制或核对 WH-347 认证工资单数据、核对各计划福利金额,或按月度/年度政策(含工龄档位和结转上限)估算员工 PTO 余额的场景。
- 运行要求
- 需要 Node.js 22 或更高版本;以本地 stdio 进程运行,通常通过 npx leavesheet-mcp 启动。未声明任何账号、API 密钥、环境变量或请求头,README 说明不访问网络、不存储数据。
安装
在 SourceWeft 中
- 打开 控制台中的 LeaveSheet: WH-347 payroll and PTO accrual,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
leavesheet-mcp
MCP server (stdio) for two payroll calculations used by LeaveSheet / TableTemplates:
- U.S. DOL WH-347 certified payroll form, revised version (Rev. January 2025): columns 2 and 5-9 for a crew week, fringe paid to each plan, column 6B reconciliation.
- PTO accrual: leave balance at a date, with hire date, annual cap, tenure tiers, carryover cap, approved and pending requests, holidays and half days.
The calculations are a line-by-line JavaScript port of the open-source Go packages
codeberg.org/tresor2k/tabletemplates-go/wh347, .../pto and the wh347 command
(.../cmd/wh347). The test suite checks the output byte for byte against those Go
engines on 28 golden cases. No network access, no data stored.
Install
Requires Node.js 22 or later.
Tools
Inputs
wh347_payroll_lines and wh347_fringe_reconcile take { "workers": [...] }, one entry
per worker-week on one project. Field names follow the CSV columns of the wh347
command: worker, type (J, RA or empty), base_rate, fringe_health_welfare,
fringe_pension, fringe_vacation, fringe_training, st_hours and ot_hours
(arrays of up to 7 daily values), cash_in_lieu_rate, gross_all_work (column 7B;
omit it to use 7A), fica, federal_tax, state_tax, other_deductions. Omitted
numbers are 0; negative numbers are rejected. csv_line in the output is the line
the worker would have in the equivalent CSV (header = line 1).
pto_accrual takes policy (period: monthly or annual, rate, annual_cap,
carryover_max, optional tier1_years/tier1_bonus, tier2_years/tier2_bonus),
hire_date, as_of, carryover, requests (start, end, start_half,
end_half, status: pending, approved, denied or cancelled), holidays
(dates) and us_federal_holidays_years (adds the 11 U.S. federal holidays, observed
dates, of the listed years). Dates are YYYY-MM-DD.
Example
wh347_payroll_lines input:
Output:
pto_accrual with a monthly policy of 1.25 days (+0.25 after 2 years, cap 15,
carryover cap 5), hired 2023-04-03, 9 days carried over, one approved request from
2026-06-29 to 2026-07-07 and the 2026 federal holidays, as of 2026-07-31:
(July 3, 2026 is the observed Independence Day, so the 7 weekdays of the request count as 6.)
Limits
- Not an official DOL tool, not legal or payroll advice. The WH-347 tool does not look up prevailing wage rates, classify work, or compute taxes: rates and deductions are entered. The ST/OT split is entered, not computed.
- WH-347 amounts are rounded to cents in the output only (halves toward +infinity), never inside the calculation. PTO values are not rounded.
- PTO: month-granular accrual (the hire month counts in full), years of service = days / 365, accrual restarts on January 1; the carryover is the value you enter, capped by the policy. State paid-leave laws are not encoded; the only built-in holidays are the U.S. federal ones.
Development
License: MIT.
来源:README.md,提交 0486eac
工具
0版本历史
1- v0.1.0最新Oct 13, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分