Files
ruflo/plugins/ruflo-cost-tracker/scripts
ttxenonmarketing-ux f615ea9476 fix(cost-tracker): spawnSync npx ENOENT on Windows
On Windows + Node >=21, spawnSync('npx', [...]) returns ENOENT because
Node cannot resolve the npx.cmd shim without shell:true (CVE-2024-27980
batBadButLong mitigation). The 7 cost-tracker scripts all failed
silently:

- cost track: Persisted: FAILED (exit null)
- cost summary/report/conversation/budget/export/federation/optimize:
  return empty arrays from memory list+retrieve

Add shell: process.platform === 'win32' to every spawnSync options
object. POSIX behavior unchanged.

Affected files (15 lines changed):
- scripts/track.mjs
- scripts/budget.mjs
- scripts/summary.mjs
- scripts/conversation.mjs
- scripts/export.mjs
- scripts/federation.mjs
- scripts/outcome.mjs

Verified on Win10 + Node 24.15.0: cost track now persists records to
cost-tracking namespace successfully.

Related: #2073 (CLI memory retrieve corrupts nested JSON — separate
upstream blocker for the read pipeline).
2026-05-20 13:40:59 +07:00
..