npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fairstay-payables-review

v0.1.0

Published

Accounts payable review for nursing homes: duplicate invoices, vendors not on the approved list, invoices over the purchase order, missing purchase orders, past-due bills and goods received but not invoiced for the month-end accrual.

Readme

Fairstay Payables Review (fairstay-payables-review)

Accounts payable review for nursing homes: vendor bank account changes, duplicate invoices, vendors not on the approved list, invoices over the purchase order, missing purchase orders, past-due bills and goods received but not invoiced for the month-end accrual. Bank account numbers are masked before results reach the model.

Fairstay Payables Review never releases payments or changes vendor bank details.

Fairstay ver 1 · Financial services · MIT · Node 20 or newer · local files only · resident and staff identifiers masked before results reach the model · built on fairstay-core

npx -y fairstay-payables-review demo
npx -y fairstay-payables-review mcp --root ./facility-files

What the sample data shows

A fictional Cedar Hollow AP register reviewed on 31 March 2026. Planted:

  • Lone Star Linen invoice LL-2201 entered twice.
  • Prairie Medical Supply invoice PM-8810: 6380 on a 5500 PO and 19 days past due.
  • Gulf Coast Pharmacy asks for payment to a bank account that is not the one on file.
  • City Power and Light has no PO, but it is PO exempt.
  • Hilltop Floor Care is not an approved vendor and has no PO.
  • Bluebonnet Food Service has no PO for 4200.
  • PO-904 was received on 28 March with no invoice yet, so it is accrued.

Bank account numbers are listed in phi-canaries.json; they must never reach the model. rules-typo.json misspells a setting, so the check refuses it.

A demo run

npx -y fairstay-payables-review demo runs the agent on the fictional files in fixtures/ in a temporary folder. Captured output:

Fairstay Payables Review demo (fictional home, residents, staff and vendors)

▶ Review payables before the check run
  status: executed  decision: allow
  7 invoice(s) totalling 44900. Hold 24450; past due 6380; accrue 3200 for goods received not invoiced. bank_account_changed 1, duplicate_invoice 1, vendor_not_approved 1, over_po 1, missing_po 2, past_due 1, received_not_invoiced 1.
    bank_account_changed       18900  Gulf Coast Pharmacy Services (fictional): The invoice asks for payment to a different bank account than Gulf Coast Pharmacy Services (fictional)'s vendor file.
    duplicate_invoice           2450  Lone Star Linen (fictional): Looks like a duplicate of line 1 (LL-2201).
    vendor_not_approved         3100  Hilltop Floor Care (fictional): Hilltop Floor Care (fictional) is not on the approved vendor list.
    over_po                      880  Prairie Medical Supply (fictional): Invoices on PO PO-902 total 6380; the PO is 5500.
    missing_po                  4200  Bluebonnet Food Service (fictional): No purchase order for 4200.
    missing_po                  3100  Hilltop Floor Care (fictional): No purchase order for 3100.
    past_due                    6380  Prairie Medical Supply (fictional): Unpaid 19 days past the due date.
    received_not_invoiced       3200  Prairie Medical Supply (fictional): Goods received on PO PO-904 (3200) exceed invoices so far (0).

▶ Write the review
  status: executed  decision: allow
  Payables review before the check run written: 7 invoice(s) totalling 44900. Hold 24450; past due 6380; accrue 3200 for goods received not invoiced. bank_account_changed 1, duplicate_invoice 1, vendor_not_approved 1, over_po 1, missing_po 2, past_due 1, received_not_invoiced 1. Files: evergreen-out/payables/payables.csv, evergreen-out/payables/payables.html.

▶ Agent tries to release a payment itself
  status: blocked  decision: block
  reason: Fairstay Payables Review never releases payments or changes vendor bank details.

Tools

| Tool | What it does | Policy | |---|---|---| | payables_check | Review the AP register before the check run: holds first, then past due and accruals. | runs | | payables_write_report | Write payables.csv (one row per item, with blank owner and decision columns) and payables.html into out_dir (default evergreen-out/payables). | runs | | payables_recall | Search this agent's own memory of the customer's setup: accepted facts (in use) and facts waiting for a person. | runs | | payables_learn | Propose one fact about the customer's setup for this agent to remember. | runs | | payables_accept_learning | A named person accepts or rejects a fact waiting in this agent's memory. | one named click, even in Auto (accept_learning) | | payables_retire_memory | A named person stops an accepted fact from applying. | one named click, even in Auto (accept_learning) | | payment_release | Fairstay Payables Review never releases payments or changes vendor bank details. | refused |

Any tool name not in this table is blocked, including names a model invents. Refused tools are listed so a model can see they exist and are refused.

payables_check arguments

| Argument | What it is | |---|---| | invoices (required) | AP invoice register under --root: vendor, invoice number, dates, amount, PO, paid date, remit bank account | | vendors (required) | Vendor master under --root: vendor, approved, bank account on file, PO exempt | | pos | Optional purchase orders under --root: PO number, vendor, amount, received amount and date | | rules | Optional rules JSON: po_required_over, po_tolerance_pct | | as_of | Review date (YYYY-MM-DD, default today) | | status | Only items with this status | | limit | Most items to return to the model (the report file always has all of them) |

Columns it reads

Tables can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. Columns are matched by the names below (any case and punctuation), and by their usual names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become YYYY-MM-DD. Columns marked masked hold resident or staff identifiers.

The PointClickCare, MatrixCare and American HealthTech style names were written from public help pages and general knowledge, not checked against real exports. Run npx fairstay-payables-review inspect <file> (column names and shapes only, never values) and name any column it misses in remedy-sources.json.

AP invoices (invoices)

| Column | Type | Read from | |---|---|---| | vendor (required) | text | Vendor, Vendor Name, Supplier, Payee, Remit To | | invoice_no | text | Invoice, Invoice #, Invoice Number, Inv No | | invoice_date | date | Invoice Date, Inv Date, Date | | due_date | date | Due Date, Due, Pay By | | amount (required) | amount | Amount, Amt, Total, Balance, Net Amount, Payment Amount, Paid, Paid Amount | | po_number | text | PO, PO #, PO Number, Purchase Order | | paid_on | date | Paid On, Paid Date, Check Date, Payment Date | | bank_account | text (masked) | Bank Account, Account Number, Remit Account, ACH Account, Bank Acct |

Vendor master (vendors)

| Column | Type | Read from | |---|---|---| | vendor (required) | text | Vendor, Vendor Name, Supplier, Payee, Remit To | | approved | text | Approved, Active, Status, Approved Vendor | | bank_account | text (masked) | Bank Account, Account Number, Remit Account, ACH Account, Bank Acct | | no_po | text | No PO, PO Exempt, Recurring, Utility |

Purchase orders (pos)

| Column | Type | Read from | |---|---|---| | po_number (required) | text | PO, PO #, PO Number, Purchase Order | | vendor | text | Vendor, Vendor Name, Supplier, Payee, Remit To | | amount | amount | Amount, PO Amount, Total, Approved Amount | | received_amount | amount | Received, Received Amount, Received Value | | received_on | date | Received On, Receipt Date, Received Date |

Settings file (payables_rules)

A small JSON file you pass by path. A misspelled setting is refused by name rather than ignored, so a typo never silently changes a check.

| Setting | What it does | |---|---| | po_required_over | Invoices at or above this amount need a PO unless the vendor is PO exempt (default 1000) | | po_tolerance_pct | Allowed overage on a PO, percent (default 5) |

Memory

payables_learn only proposes a fact; nothing changes until a named person accepts it with payables_accept_learning, which is one click even in Auto. Facts live in a hash-chained file under .remedy/memory/; if the chain does not verify, no fact is used. Credentials, personal identifiers and text that reads like instructions to an AI are refused.

| Kind | What an accepted fact does | |---|---| | vendor_note | is shown with results. It never changes a check. |

Install

Node 20 or newer. No other runtime dependencies besides fairstay-core and fairclaim-core.

{
  "mcpServers": {
    "fairstay-payables-review": {
      "command": "npx",
      "args": [
        "-y",
        "fairstay-payables-review",
        "mcp",
        "--root",
        "/path/to/facility-files"
      ]
    }
  }
}

Claude Code: claude mcp add fairstay-payables-review -- npx -y fairstay-payables-review mcp --root ., or use the plugin files in this folder.

CLI

fairstay-payables-review tools                 # every tool, its policy and arguments
fairstay-payables-review sources               # the columns each input is read from
fairstay-payables-review inspect <file>        # how a file would be read (names and shapes, never values)
fairstay-payables-review call payables_check '{"invoices":"<invoices>","vendors":"<vendors>"}'
fairstay-payables-review eval                  # the private eval cases on the fictional fixtures
fairstay-payables-review demo

Resident and staff data

Results go to an AI model, so identifiers are masked before they leave the agent: resident and staff names become stable pseudonyms such as PT-3f9a1c2e, record and account numbers become MRN-… or ACCT-…, and e-mails and phone numbers are removed, also inside free text. Report files written to disk keep real names because staff work from them: keep them in a folder only your staff can open. The shared tests check that no fictional identifier from the fixtures reaches any eval result, and the hostile-input check plants spreadsheet formulas, HTML and AI-aimed instructions in the data. This keeps PHI away from the model; it is not a HIPAA compliance determination. Your business associate agreements, access controls and policies still apply.

Limits

  • Reads only the files you give it. It does not log in to PointClickCare, MatrixCare, a payer portal, a bank, a state Medicaid portal or a payroll system.
  • Medicare, Medicaid and payroll rules are summarised from public material as of 2026 and the numbers are settings you supply; a billing, payroll or legal professional checks them before you rely on them.
  • Not legal, tax, accounting, clinical, reimbursement or HIPAA advice. A person decides what to bill, pay, appeal, file or send.
  • Every call is written to a hash-chained audit log under .remedy/ in the root. No network calls, no telemetry, no credentials. The bundled data is fictional.