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

fairroom-occupancy-tax

v0.1.0

Published

Fairroom Occupancy Tax: checks occupancy and lodging tax by jurisdiction against the rates the property confirms in its settings: under- and over-collected tax, unknown codes and jurisdictions, exemptions. Builds the worksheet; ships no rates, gives no ta

Readme

Fairroom Occupancy Tax (fairroom-occupancy-tax)

Checks occupancy and lodging tax by jurisdiction against the rates your property enters and confirms in a settings file: tax under- or over-collected on each stay, tax codes a jurisdiction does not have, stays in a jurisdiction with no rates, and exemptions with their reason. It builds a worksheet by jurisdiction and tax code (base, expected, collected) and drafts it for the person who files. It ships no tax rate, gives no tax advice and files nothing.

MIT · Node 20 or newer · local files only · built on fairroom-core

npx -y fairroom-occupancy-tax demo
npx -y fairroom-occupancy-tax mcp --root ./lodging-tax

What it finds

| Finding | Meaning | |---|---| | under_collected | Less tax posted than the confirmed rate gives (percent of room revenue or amount per night) | | over_collected | More posted than the rate gives, including tax on an exempt stay | | unknown_tax_code | A tax code the jurisdiction does not have in the settings | | unknown_jurisdiction | A stay in a jurisdiction with no rates in the settings |

Exempt stays (with a reason in the file) expect no tax; whether a stay is exempt is the authority's rule, not this agent's.

Settings file (required)

jurisdictions: for each one, taxes with code, type (percent with rate, or per_night with amount), optional name, authority, filing; tolerance (default 0.05); confirmed_by and confirmed_on. Every result says whether a named person confirmed the settings; the worksheet carries a CHECK marker when nobody has.

A demo run

npx -y fairroom-occupancy-tax demo runs the agent on the fictional files in fixtures/ in a temporary folder. Captured output:

Fairroom Occupancy Tax demo (fictional October 2026 revenue; rates are fictional settings, not real taxes), Auto mode on for the draft only

▶ Audit the fictional files
  status: executed  decision: allow
  6 taxable line(s) for 2026-10: room revenue 969 (180 exempt); 8.8 under-collected, 7.2 over-collected or on an unknown tax code, 1 line(s) in a jurisdiction with no rates. Rates from settings confirmed by STAFF-909bb891, controller (fictional).
    T1001  2026-10-03  Harbor City  revenue     200  tax     22  ok      
    T1002  2026-10-03  Harbor City  revenue     150  tax     15  review  under_collected
    T1003  2026-10-04  Harbor City  revenue     180  tax      0  exempt  
    T1004  2026-10-05  Bay County   revenue     120  tax   13.2  review  under_collected, unknown_tax_code
    T1005  2026-10-06  Harbor City  revenue     220  tax     24  review  under_collected
    T1006  2026-10-07  Lakeview     revenue      99  tax   5.94  review  unknown_jurisdiction

▶ Explain T1004
  status: executed  decision: allow
  T1004 (2026-10-05, Bay County): revenue 120, 1 night(s), tax posted 13.2, review. Reservation T1004 (2026-10-05): STATE_OCC should be 4.8 on 120; 0 was posted. Reservation T1004 (2026-10-05) carries 7.2 of CITY_OCC, which is not a tax of Bay County in the settings file.

▶ Write the worklist (CSV and HTML)
  status: executed  decision: allow
  Occupancy and lodging tax worksheet written: 6 taxable line(s) for 2026-10: room revenue 969 (180 exempt); 8.8 under-collected, 7.2 over-collected or on an unknown tax code, 1 line(s) in a jurisdiction with no rates. Rates from settings confirmed by STAFF-909bb891, controller (fictional).

▶ Write the draft (worksheet)
  status: executed  decision: allow  (auto)
  worksheet Harbor City drafted for 61 with 0 open marker(s). Nothing was sent.

▶ Auto: approving it stays one named click
  status: needs_approval  decision: ask
  reason: binding_send stays one-click, even in Auto

▶ The agent tries tax_return_file itself
  status: blocked  decision: block
  reason: Fairroom never files a tax return or remits tax; a person files it with the authority.

Tools

| Tool | What it does | Policy | |---|---|---| | occupancy_tax_check | Compare the tax posted on each stay with the tax the confirmed settings give. | runs | | occupancy_tax_explain | Show one stay: jurisdiction, revenue, nights, tax posted, exemption and findings. | runs | | occupancy_tax_write_report | Write occupancy-tax.csv and occupancy-tax.html (one row per item, with a blank decision column for the person working it) into out_dir (default fairroom-out/occupancy-tax). | runs | | occupancy_tax_draft_worksheet | Write drafts/worksheet-.md: base, expected and collected by tax code for one jurisdiction, with who confirmed the rates. | asks first (Auto can be opted in) | | occupancy_tax_request_file | After one named human click (even in Auto), record that the reviewed worksheet draft is approved in worksheet-requests.csv. | one named click, even in Auto (binding_send) | | tax_return_file | Fairroom never files a tax return or remits tax; a person files it with the authority. | refused | | pms_post_charge | Fairroom never posts a charge, fee or adjustment to a guest folio; a person posts it in the PMS. | refused | | tax_payment_send | Fairroom Occupancy Tax never pays or remits tax. | 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.

Columns it reads

Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. Columns are matched by the agent's own name, then by the English names below, then by their names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become YYYY-MM-DD; amounts are read with either decimal mark. Guest names, e-mails, phones and loyalty numbers are masked in what the AI model sees, and card numbers are cut to the last four digits. Every result lists under sources how each file was read.

Taxable room revenue (revenue)

| Column | Type | Also read as | For example, in other languages | |---|---|---|---| | business_date (required) | date | Business Date, Date, Stay Date, Night | Geschäftsdatum, Date d'exploitation, 営業日, 营业日期 | | reservation (required) | text | Reservation, Confirmation Number, Folio, Reservation Number | Reservierungsnummer, N° de réservation, 予約番号, 预订号 | | jurisdiction (required) | text | Jurisdiction, Tax Jurisdiction, Municipality, City, Property | Gemeinde, Commune, 自治体, 辖区 | | room_revenue (required) | amount | Room Revenue, Taxable Amount, Room Charge, Accommodation | Logisumsatz, CA hébergement, 客室売上, 客房收入 | | nights | number | Nights, Room Nights, Units | Nächte, Nuits, 泊数, 晚数 | | exempt_reason | text | Exempt Reason, Exemption, Tax Exempt Reason, Exemption Certificate | - |

Tax postings (taxes)

| Column | Type | Also read as | For example, in other languages | |---|---|---|---| | business_date (required) | date | Business Date, Date, Posting Date | Geschäftsdatum, Date d'exploitation, 営業日, 营业日期 | | reservation (required) | text | Reservation, Confirmation Number, Folio, Reservation Number | Reservierungsnummer, N° de réservation, 予約番号, 预订号 | | tax_code (required) | text | Tax Code, Transaction Code, Tax Type, Tax | Steuercode, Code taxe, 税コード, 税码 | | tax_amount (required) | amount | Tax Amount, Amount, Tax Collected | Steuerbetrag, Montant de la taxe, 税額, 税额 |

Files from other countries

A German export in Windows-1252 with semicolons, 1.234,56 and 03.11.2026, or a Japanese one in Shift_JIS with 2026/11/03, is read the same way as the English file. fixtures/intl/ has both versions of the demo data, and the eval cases intl-de-* and intl-ja-* require the same results as the English case. Amounts are read with either decimal mark; currencies are not converted. Columns named differently? Run npx fairroom-occupancy-tax inspect <file> (names and shapes only, never values) and name them in fairroom-sources.json:

{ "files": { "exports/journal.csv": { "columns": { "reservation": "Buchungsnr" }, "date_order": "dmy" } } }

Install

Node 20 or newer. No other dependencies.

npx -y fairroom-occupancy-tax demo
npx -y fairroom-occupancy-tax mcp --root /path/to/your/files

Claude Desktop, Cursor and other MCP hosts:

{
  "mcpServers": {
    "fairroom-occupancy-tax": {
      "command": "npx",
      "args": [
        "-y",
        "fairroom-occupancy-tax",
        "mcp",
        "--root",
        "/path/to/your/files"
      ]
    }
  }
}

Claude Code: claude mcp add fairroom-occupancy-tax -- npx -y fairroom-occupancy-tax mcp --root ., or install the fairroom-occupancy-tax plugin from this repository's marketplace.

Modes and approvals

  • Review (--mode review): reads and reports only.
  • Assist (default): the policy above. A tool that asks returns an approval_id; a person approves it once with fairroom-occupancy-tax approve <id> --as "Your Name" (or on the local approvals page, fairroom-occupancy-tax approvals), and the same call is repeated.
  • Auto (--mode auto --auto <tool,...>): opt-in per tool, with step caps and a kill switch (fairroom-occupancy-tax kill). Paying, sending, posting to a ledger or a live system and accepting a learned fact stay one named click even in Auto; an approval is tied to the sha256 of the reviewed draft, so a changed draft needs a new click.

CLI

fairroom-occupancy-tax tools                 # every tool, its policy and arguments
fairroom-occupancy-tax sources               # the columns each input is read from
fairroom-occupancy-tax inspect <file>        # how a file would be read (names and shapes, never values)
fairroom-occupancy-tax call occupancy_tax_check '{"revenue":"<revenue>","taxes":"<taxes>","settings":"<settings>"}'
fairroom-occupancy-tax eval                  # the private eval cases on the fictional fixtures
fairroom-occupancy-tax demo

Audit log and data

Every call is written to .fairroom/audit.jsonl under the root: hash-chained JSON lines, with arguments stored as a hash, signed with an Ed25519 key when you configure one. Everything runs on your machine on files you choose. No network calls, no telemetry, no credentials. The bundled fixtures are fictional.

Limits

  • No tax rate ships with this agent; the demo rates are invented.
  • Not tax advice. It never files a return or pays tax: the person filing checks every figure against the authority's form.