Files
ruflo/plugins/ruflo-cost-tracker/scripts
ruv 147145c8b8 fix(cost-tracker): add Windows shim ruflo-hook.cjs (#1902/#1903/#1904, #2132)
The Plugin package install-safety smoke (#1902/#1903/#1904) checks that
every plugin marked _platform=posix in its hooks.json has a corresponding
plugins/<name>/scripts/ruflo-hook.cjs sibling for Windows users.

plugins/ruflo-cost-tracker/hooks/hooks.json declares "_platform": "posix"
(its Stop hook is a /bin/bash one-liner) but had no Node shim. The
audit-plugin-hooks-cross-platform.mjs gate fails with:

  plugins/ruflo-cost-tracker/hooks/hooks.json:0  POSIX-exempt but Windows shim missing
  cmd: Expected plugins/ruflo-cost-tracker/scripts/ruflo-hook.cjs

This shim is the Windows-portable equivalent of the existing POSIX hook:
spawns scripts/track.mjs with TRACK_QUIET=1, swallows output, times out
at 30s, always exits 0 (telemetry is best-effort). When ruflo init runs
on Windows, it writes a .claude/settings.json that points Stop at this
file instead of bash — same behaviour, no /bin/bash dependency.

Local audit:
  $ node scripts/audit-plugin-hooks-cross-platform.mjs
  ok: all POSIX-exempt files have a corresponding Windows Node shim

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-17 10:04:20 -04:00
..