P-NP is the static patch pipeline that powers Play Origin (the browser-extension mod loader, formerly "Prodigy Origin"). It's maintained by ProdigyPXP. The repo name P-NP is kept as-is — the rebrand is to the extension/loader, not this patcher.
The repository no longer runs an HTTP server. Instead, a GitHub Action fetches current Prodigy assets, applies the patcher logic, and pushes the patched files to a dedicated patched branch so they can be served from raw.githubusercontent.com.
.github/workflows/patch.ymlruns every 2 hours (cron) and on manual dispatch.- The workflow builds this project with
pnpm+esbuild. src/patch.tsfetches:- loader HTML from
https://math.prodigygame.com/load game.min.jsfromhttps://code.prodigygame.com- the matching
public-game.min.js
- loader HTML from
- The patcher writes static output files:
game.min.jspublic-game.min.jsmetadata.json(includespatchDegradedflag if patches failed)
- The workflow commits those files to the
patchedbranch. - If the workflow fails, a GitHub issue is automatically created.
- 30-second fetch timeout on all network requests
- JavaScript validation before patching to catch unexpected responses
- Degraded patch detection - if core regex patterns fail,
patchDegraded: trueis set in metadata.json - Error handling throughout the build and patch pipeline
Requirements:
- Node.js 20+
- pnpm
Install and build:
pnpm install
pnpm buildRun patch locally:
pnpm run patchOptional custom output directory:
node dist/patch.js ./patched-outputAfter the Action publishes to the patched branch, files are available at:
https://raw.githubusercontent.com/ProdigyPXP/P-NP/patched/game.min.jshttps://raw.githubusercontent.com/ProdigyPXP/P-NP/patched/public-game.min.jshttps://raw.githubusercontent.com/ProdigyPXP/P-NP/patched/metadata.json
MPL-2.0