Repository navigation
v4.4.0-client: emit manifest.json + defaultMenuUrl field (4.4.1) - #2
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Undo the named-callback extraction (_pnpLoadGUI / _pnpPollTick) from buildSuffix and restore the original inline IIFE forms that match patch.ts byte-for-byte. Loosen the two timer regex tests to tolerate nested parens in the timer callbacks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Refactors src/patch.ts to delegate to patches.ts (RULES + applyRules), wrappers.ts (buildPrefix + buildSuffix), and manifest.ts (buildManifest). Now emits dist/manifest.json, dist/game.min.js (verification copy), and dist/metadata.json with manifestHash + perRuleCounts. Switches from throw-on-degraded to graceful degradation (patchDegraded flag). All 6 rules matched live bundle; patchDegraded=false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The mod-bundle URL is now supplied at runtime by the extension via window.__ORIGIN_MENU_URL__. This unblocks per-user override from the extension popup without rebuilding the manifest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
defaultMenuUrl is the URL the patched bundle fetches for the mod (cheatGUI) loader at runtime. It is included in the manifest hash so that changes invalidate extension caches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
manifest.json now ships defaultMenuUrl=GUI_LINK and the suffix no longer bakes in the URL. dist artifacts regenerated against current game version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR implements the patcher-side half of the client-side patching flow by emitting a dist/manifest.json artifact (rules + wrappers + hash) and refactoring patch logic into dedicated modules, including support for a defaultMenuUrl that the extension can override at runtime.
Changes:
- Add manifest generation (
schemaVersion,patcherVersion,hash,rules,prefix,suffix,defaultMenuUrl) and writedist/manifest.jsonalongside a verificationdist/game.min.js. - Refactor patching into
src/patches.ts(rules/apply/hash),src/wrappers.ts(prefix/suffix), andsrc/manifest.ts(manifest build/hash), wired bysrc/patch.ts. - Add a Node test suite covering rules/wrappers/manifest and an integration pipeline test; update workflow to commit the new manifest.
Reviewed changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/wrappers.test.ts | Adds unit tests for buildPrefix/buildSuffix, including __ORIGIN_MENU_URL__ behavior. |
| tests/smoke.test.ts | Adds a minimal harness smoke test. |
| tests/patches.test.ts | Adds unit tests for rule shapes, substitutions, and rule hashing. |
| tests/manifest.test.ts | Adds tests for manifest construction and hashing including defaultMenuUrl. |
| tests/integration.test.ts | Adds an end-to-end synthetic bundle test for rules → wrappers → manifest. |
| src/wrappers.ts | Introduces prefix/suffix builders; suffix now reads menu URL from window.__ORIGIN_MENU_URL__. |
| src/patches.ts | Defines PatchRule, the RULES list, applyRules, and hashRules. |
| src/patch.ts | Refactors orchestrator to verify/apply rules, build manifest, and write artifacts/metadata. |
| src/manifest.ts | Adds manifest type + buildManifest/hashManifest. |
| src/constants.ts | Bumps patcher VERSION to 4.4.1. |
| README.md | Documents the manifest-based architecture (needs an update to match current schema/hash). |
| package.json | Bumps version and adds test/typecheck scripts. |
| dist/metadata.json | Updates generated metadata to include manifestHash and perRuleCounts. |
| dist/manifest.json | Adds generated manifest artifact containing rules + wrappers + defaultMenuUrl. |
| CLAUDE.md | Updates architecture notes (contains a stale buildSuffix signature). |
| .github/workflows/patch.yml | Ensures dist/manifest.json is committed by the patch workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alexey Fedorov <alexey.max.fedorov@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alexey Fedorov <alexey.max.fedorov@gmail.com>
|
@copilot
This should fix it. |
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Ships the patcher-side half of the client-side patching architecture. Companion PR on ProdigyOrigin consumes the new manifest format.
What changed
Artifacts
Test plan
🤖 Generated with Claude Code