Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 6fdb2f7282 feat(app): the user-mode anti-cheat exception in Settings and on the game page - its option, its list, its versioned disclosure, and the legal text that says it (D33)
Owner decision D33 (2026-09-26), beta.9 PR-3 of 4, on the guard (#236) and the Agent (#237).
This is the part a user sees; every state it shows is the Agent's, read from its columns,
and every grant is the Agent's to make.

- Settings > Capture: "Allow hooking in games with user-mode anti-cheat that were measured
  before" (hooking.usermode_ac_exceptions, off by default) and under it the User-mode
  exceptions list - eligible games (Make exception...), games held back only by the session
  count, games carrying an exception (Withdraw), each with its finding, its successful hooked
  sessions and its state. Off, only kept exceptions are listed, suspended. "Checking..." until
  the Agent has answered about every blocked game; Refresh re-reads.
- The disclosure: AntiCheatExceptionPrompt / AntiCheatExceptionDialogContent over the new
  Safety_Exception_* family (Shared, versioned by AntiCheatExceptionDisclosure.Version; ja
  English verbatim marked for review). Why it is offered, the risk at the same grain as FR-2.1's
  dialog (a ban possibly days later, invisible to FrameLedger), what is still refused, how it
  ends, that it turns nothing on, offline/single-player; the primary button bound to the ticked
  "I accept the risk of a ban for this game", Enter = Keep it blocked.
- AntiCheatExceptions: the handshake on HelloAck.ExceptionDisclosureVersion (no dialog against
  other text), then SetAntiCheatException; Granted / Withdrawn / Refused (TooFewSessions, the
  guard's finding, BlockNotExceptionable, could not verify) / OptionOff / VersionMismatch /
  AgentUnavailable, each said in the user's language.
- The game page: a User-mode exception card (ExceptionView over GameRow.AcException) - eligible,
  checking, not eligible and why (too few sessions; "the guard also found Kernel driver in the
  game folder (NEPKernel.sys)"; "... is not user-mode throughout"), in force, suspended, ended
  and why. An exception in force brings the Hooking card back even while anti-cheat cards are
  hidden, its switch usable through FR-2.1's dialog, the finding still under it.
- Marks: the library card says Exception; a session hooked under one is "Hooked · exception"
  in the Sessions tab (tooltip names the family) and has a line in its summary.
- Legal (owner-approved): Disclaimer 2.6 -> 2.7 (sec. 2A describes the exception and its risk;
  sec. 2's "no setting" sentence points to it), EULA 1.2 -> 1.3 (the code-injection clause
  names it), the accuracy block (all three copies, re-dated 2026-09-26), SECURITY.md (what in
  the exception is a security report), README's Hard refusal row. Privacy stays 2.4. The Legal
  Gate re-shows the two changed documents.

Tests: AntiCheatExceptionsTests (handshake, declined sends nothing, our version sent, the
Agent's answers, withdrawal needs no dialog, the button waits for the tick),
GameDetailViewModelTests (eligible offers it; in force makes the switch usable; off =
suspended; the card says Exception; why not eligible - one session, Aniimo's driver, a
kernel-level family), SettingsViewModelTests (off by default; the list follows the Agent's
columns; off lists only a kept exception).

Docs: 08_UI (the game page card, the Settings list), 09_I18N (Safety_Exception_*),
20_OPEN_QUESTIONS (the decision recorded, what stays the owner's), 19_SAFETY (status),
CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 04:28:19 +07:00
42 changed files with 1879 additions and 24 deletions

No files matched your search

+19
View File
@@ -29,6 +29,19 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
### Added
- **A user-mode anti-cheat exception you can make yourself, per game** (owner decision D33). Settings ▸ Capture ▸
*Allow hooking in games with user-mode anti-cheat that were measured before* — off by default. On, it lists the games
FrameLedger found eligible: the only anti-cheat in the game runs entirely in user mode (no driver or service, no
driver file anywhere in the game's folder), the game is on no title list, and FrameLedger has measured it hooked
successfully at least twice. **Make exception…** shows a disclosure — the ban risk, possibly days later and invisible
to FrameLedger; what is still refused; how the exception ends — and asks you to accept the risk for that game. The
exception turns nothing on: you then turn hooking on for the game on its page, through the usual consent dialog, and
the guard still runs every check and refuses anything else it finds. The game's page shows the exception's state
(eligible; not eligible and why; in force; suspended; ended and why), the library card says **Exception**, and a
session hooked under it is marked in the Sessions tab and its summary. It ends by itself on a new finding, a crash or
safety stop under it, FrameLedger stopping because another anti-cheat loaded, or a game update; turning the option
off suspends every exception. Aniimo stays blocked: it ships a kernel driver (`NEPKernel.sys`).
- **Groundwork for the user-mode anti-cheat exception** (owner decision D33, 2026-09-26; the option, the list and the
disclosure arrive later in this train). The guard can now be asked to let ONE named anti-cheat family through, and
grants it only for a family whose every signal — in the built-in floor and in the rules file — is user-mode: no
@@ -50,6 +63,12 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
game update, or when the user withdraws it; turning the option off suspends every exception without deleting any.
Schema 0014 adds the columns; the database opens in place.
### Changed
- **Legal: Disclaimer 2.7 and EULA 1.3.** Disclaimer §2A describes the user-mode exception and its risk; the EULA's
code-injection clause names it and what making one means. The accuracy block and SECURITY.md say it too. The Legal
Gate shows the two changed documents once more; the Privacy Policy is unchanged (2.4).
## [0.1.0-beta.8] - 2026-09-25
**The eighth pre-release: anti-cheat is found before you ask, a session says what the game and the driver were, and
+6 -3
View File
@@ -5,7 +5,7 @@
> No telemetry. No accounts. All data stays on your machine.
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-09-25.** The software is a beta; its latest
> ⚠ **What FrameLedger actually measures today — 2026-09-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.8`** (2026-09-25), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
@@ -68,7 +68,10 @@
> named in its process or in its folder (any kernel driver there counts), or the game on a title list by its
> store id or executable name — turns hooking off for that game, whether found by the Agent's own check of every
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable.
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
@@ -104,7 +107,7 @@ FrameLedger is built to keep that risk small and to be honest about it:
| Safeguard | |
|---|---|
| **Off by default** | Injection is disabled for every game until you enable it individually, after a consent prompt |
| **Hard refusal** | Known anti-cheat/anti-tamper components are detected before injection and every 30 s during a session. Detected ⇒ FrameLedger refuses, or stops capturing at the next scan — so up to 30 s can pass before it reacts to anti-cheat that loads mid-session. For Direct3D/OpenGL that means hooks are removed; for Vulkan it means the layer goes passthrough, because a layer cannot leave the loader chain of a running game. **There is no override — not in settings, not in a config file, not on the command line**<br><br>✅ **Both halves run since 2026-09-10.** The *pre-injection* refusal runs every documented check, and during every capture the Agent re-runs them every 30 s: the component inside the game removes its hooks within one frame of being told to, and within 65 s if it stops hearing from the scanner. *(Until 2026-09-15 this cell said the in-session re-scan did not run at all, which stopped being true when the Agent's capture loop landed.)* For a Vulkan title the stop is the layer's own: it checks the scanner's counter on every present and goes passthrough within one present of the stop flag, or after 65 s without a scan — a title that has stopped presenting is not stopped by that deadline, and presents nothing to be observed either. |
| **Hard refusal** | Known anti-cheat/anti-tamper components are detected before injection and every 30 s during a session. Detected ⇒ FrameLedger refuses, or stops capturing at the next scan — so up to 30 s can pass before it reacts to anti-cheat that loads mid-session. For Direct3D/OpenGL that means hooks are removed; for Vulkan it means the layer goes passthrough, because a layer cannot leave the loader chain of a running game. **There is no override — not in settings, not in a config file, not on the command line**<br><br>**One narrow exception since beta.9 (owner decision D33):** per game, after its own disclosure and only while a Settings option (off by default) is on, a game whose only finding is one anti-cheat that runs entirely in user mode — no driver file in its folder, on no title list — and that FrameLedger has measured successfully at least twice may be hooked under a user-mode exception. The guard still runs every check under it, refuses anything else it finds, and ends it on anything new; a ban remains possible (`legal/DISCLAIMER.md` §2A).<br><br>✅ **Both halves run since 2026-09-10.** The *pre-injection* refusal runs every documented check, and during every capture the Agent re-runs them every 30 s: the component inside the game removes its hooks within one frame of being told to, and within 65 s if it stops hearing from the scanner. *(Until 2026-09-15 this cell said the in-session re-scan did not run at all, which stopped being true when the Agent's capture loop landed.)* For a Vulkan title the stop is the layer's own: it checks the scanner's counter on every present and goes passthrough within one present of the stop flag, or after 65 s without a scan — a title that has stopped presenting is not stopped by that deadline, and presents nothing to be observed either. |
| **No evasion, ever** | FrameLedger does not hide, rename, obfuscate, or disguise itself. It keeps its real name, real exports, and version info. It is meant to be plainly visible to any security software that looks. This is an architectural rule, not a setting |
| **Read-only** | It never reads or writes game memory, never modifies game behavior, never touches saves or input, and never changes GPU clocks, fans, or power limits |
| **Always a way out** | FrameLedger refuses rather than pushes through. When the guard finds anti-cheat, or the hook fails, or you have not enabled a game, it **stops** — and records the session anyway: start, end, duration, whatever hardware sensors your machine provides, and the reason there is nothing else. Every measured value reads `N/A`; it never estimates one.<br><br>**The way out is that it does not inject, not that it measures another way.** An earlier version of this row promised a no-injection measurement mode. It was designed around Intel PresentMon, that was dropped on 2026-08-27 after measurement, and no replacement was chosen — so **frame times require hooking**. Said in this row rather than a footnote because the row is in the SAFETY table, and a reader deciding whether to enable a game needs the real alternative, not a comfortable one |
+9
View File
@@ -31,6 +31,15 @@ now turns the game's hooking off. What IS a security report: any way to reach an
setting, a crafted rules file, a pipe message, a database edit the Agent honours — or a finding about a game that
does not turn its hooking off.
Since 0.1.0-beta.9 one narrow exception exists (owner decision D33, `docs/19_SAFETY_AND_ANTICHEAT.md` §The user-mode
exception): per game, only for one anti-cheat family that is user-mode throughout, with the guard still running every
check. The grant is a record in your own database, like the consent stamp; what keeps it narrow is the guard, which
decides itself which family it may let through. So these are security reports too: the guard letting through a family
that has a driver, a service or a `.sys` in the floor or the rules; an exception applying to a game with a kernel
driver in its folder, on a title list, or with a second anti-cheat; the Agent writing a grant on a pipe message
without its own tolerant pre-scan and session count; an exception that survives a new finding, a crash or safety stop
under it, or a changed executable; and the Overlay tolerating a family the guard did not.
## A safety gap — a game with anti-cheat that FrameLedger fails to detect
This is treated with the same priority as a security report, and it takes the **public** route: open
+25
View File
@@ -224,6 +224,23 @@ All screens are `Page`s registered with the navigation page provider and navigat
> blocked row: its one action could only be refused. Tests: `GameDetailViewModelTests` (hidden, shown, the card
> pill), `BlockedReasonTextTests`, `PagesLoadTests.AnAntiCheatGamesPageRendersTheFindingInPlaceOfTheHookingCard`.
>
> **The user-mode exception (2026-09-26, beta.9, owner decision D33).** While Settings' option is on, a blocked
> game's page shows a **User-mode exception** card with the Agent's answer about it (`Services.ExceptionView` over
> `GameRow.AcException` — the App reads those columns and writes none): *Eligible — no exception made* with **Make
> exception…**; *Checking…* until the Agent has looked at this block; *Not eligible: N successful hooked session(s), two
> are needed*; *Not eligible: the guard also found {family} ({signal})* — Aniimo's *Kernel driver in the game folder
> (NEPKernel.sys)*; *Not eligible: {family} is not user-mode throughout*; and how the last exception ended. **Make
> exception…** opens the exception's disclosure (`AntiCheatExceptionPrompt`, text `Safety_Exception_*` versioned by
> `AntiCheatExceptionDisclosure.Version`, the primary button bound to the ticked *I accept the risk of a ban for this
> game*, Enter = *Keep it blocked*) and then `SetAntiCheatException`; the Agent gathers the facts and grants or
> refuses, and the page says which. An exception in force brings the Hooking card back — even while anti-cheat cards
> are hidden — with its switch usable through FR-2.1's dialog as ever, the finding still under it; **Withdraw
> exception** ends it and turns hooking off. With the option off a kept exception is shown *suspended* and the switch
> is disabled again. The library card says **Exception** for a game carrying one; a hooked session under it is
> *Hooked · exception* in the Sessions tab (the tooltip names the family) and its summary has one line saying so.
> Tests: `GameDetailViewModelTests.AnEligibleGameOffersTheExceptionAndOneInForceMakesTheSwitchUsable`,
> `…WhyAGameIsNotEligibleIsSaidOnItsPage`, `AntiCheatExceptionsTests`.
>
> **Details (2026-09-25, beta.8, schema 0011).** A `ui:CardExpander` **Details** under the two rows, expanded, says
> what the game's files and its store say (`05_DETECTION` §What the files say about themselves): *Runs as* (64-bit
> (x64) · 32-bit (x86) · ARM64 · .NET, any CPU (runs as 64-bit) · …), *File version* and *Product version* (the
@@ -449,6 +466,14 @@ Agent section: elevation state with a plain explanation of what elevation *optio
> **2026-09-25 (beta.8):** Capture gained *Hide hooking on anti-cheat games* (`ui.hide_anticheat_hooking`, on by
> default) between the kill switch and the Vulkan layer row — §Games says what it hides; the game's page reads it at
> each load. It hides a control that could only be refused, never the finding.
>
> **2026-09-26 (beta.9, D33):** Capture gained *Allow hooking in games with user-mode anti-cheat that were measured
> before* (`hooking.usermode_ac_exceptions`, off by default), below the hide switch, and under it the **User-mode
> exceptions** list — the games the Agent found eligible (**Make exception…**), held back only by the session count,
> or carrying an exception (**Withdraw**), each with its finding, its successful hooked sessions and its state; with
> the option off only kept exceptions are listed, *suspended*. *Checking…* shows until the Agent has answered about
> every blocked game, and **Refresh** re-reads the list (the Agent's sweep runs every 15 s). The option is an
> Agent-read key and takes effect at the next session start and command.
### First-run flow
1. Legal Gate (FR-11): four documents, scrollable, links to GitHub-hosted versions, single Accept.
+3
View File
@@ -62,6 +62,9 @@ Consent, refusal, and safety-unhook text (FR-2.1, `19_SAFETY`) is **reviewed lik
- No machine-drafted `ja` in this category — a mistranslated ban warning is a real harm. These keys are marked `<comment>safety: human review required</comment>` and ~~the `ja` build fails the resx audit until a human reviewer signs off; until then the `en` string is shown as fallback rather than an unreviewed translation~~ **as built (2026-09-13): the audit is red on a `Safety_*` key in `ja` that carries neither `safety: human review required` nor `safety: reviewed by <name>`, and red on one marked review-required whose value is anything but the `en` string verbatim** — the key-set rule forbids leaving it out, so "shown as `en` until signed" is true by construction (the value IS the English), not by a runtime fallback. Signing = replacing the comment with `safety: reviewed by <name>` beside the reviewed text.
- Never soften the wording per locale. "May result in a permanent ban of your account" must survive translation with the same force in all three languages.
- Key prefix `Safety_*` so they are easy to audit as a group.
- **`Safety_Exception_*` (2026-09-26, D33)** is the user-mode exception's disclosure: the same rules — `ja` ships the
English verbatim marked for review — and its own version, `AntiCheatExceptionDisclosure.Version`, bumped when any of
those strings changes meaning, exactly as `SafetyDisclosure.Version` is for `Safety_Consent_*`.
> **What is in scope, stated 2026-08-06 because a binary now exists that is not.** These rules
> govern the **shipped** application's user-visible strings — what `12_BUILD` §Publish & package
+3 -1
View File
@@ -527,7 +527,9 @@ is unchanged.
executable and the block; the session count every pass), the `SetAntiCheatException` command (the Agent gathers the
facts itself; the store applies the rule), the gate's one branch with the channel published before the request, the
re-scans naming the family, the session's mark, and every end (`UserModeExceptionLapse`) — schema 0014. PR-3: the
option and the list in Settings, the disclosure, the game page and the legal text.*
option and the list in Settings, the versioned disclosure (`Safety_Exception_*`, `AntiCheatExceptionDisclosure`), the
game page's exception card and its usable switch under an exception in force, the marks, and the legal text
(Disclaimer §2A 2.7, EULA 1.3, the accuracy block, SECURITY.md) — `08_UI` §Games.*
### The floor data cannot remove
+10
View File
@@ -40,6 +40,16 @@ Rules for this document:
> where it could inject it only exposed the user. The owner asked for the opposite: a finding turns the game's hooking
> off, wherever the guard makes it. `19_SAFETY` §What a finding does to the game is the specification; CLAUDE.md rule 2 is
> unstruck. The two open items above (kernel-level families, the ja text) are moot.
>
> **2026-09-26 — one narrow exception, by owner decision D33, with the 2026-09-22 withdrawal quoted back.** Beta.8's
> library sweep blocked a game FrameLedger had measured hooked (GIRLS' FRONTLINE 2: EXILIUM, NetEase Yidun `NEP2.dll`),
> and the owner chose an evidence-bound, per-game exception for anti-cheat that is user-mode throughout (`19_SAFETY`
> §The user-mode exception; CLAUDE.md rule 2's amendment). The two reasons D22 gave are answered: it is offered only
> where FrameLedger has already measured the game hooked, and its risk is stated in its own disclosure. **What stays
> open, and is the owner's:** the `ja` text of `Safety_Exception_*`, which ships as English until a reviewer signs;
> whether a family the rules file makes kernel-level later should end existing exceptions at once (today it does, at
> the sweep's next pass and at every session start); and a real-hardware check that NEP2.dll's load time relative to
> the injection is covered on the owner's machine (the ctest decoy covers the late load).
| # | Decision | Consequence |
|---|---|---|
+5 -2
View File
@@ -11,7 +11,7 @@
that changes what FrameLedger.Overlay or the capture host does; date the change.
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-09-25.** The software is a beta; its latest
> ⚠ **What FrameLedger actually measures today — 2026-09-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.8`** (2026-09-25), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
@@ -74,7 +74,10 @@
> named in its process or in its folder (any kernel driver there counts), or the game on a title list by its
> store id or executable name — turns hooking off for that game, whether found by the Agent's own check of every
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable.
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
+25 -7
View File
@@ -1,6 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.6 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.7 · **Effective:** {{RELEASE_DATE}}
> **How this document is kept true.** The statement of what FrameLedger measures (§4) is `legal/ACCURACY.md`,
> embedded here and in `README.md` and bound to its source by `tools/accuracy-check.ps1`, which fails the build when a
@@ -53,7 +53,7 @@ Install it somewhere only you can write to, and verify the published SHA-256 che
FrameLedger is designed to reduce that risk substantially:
- Injection is **off by default** and must be enabled by you **per game**.
- Before injecting, and every 30 seconds afterwards, FrameLedger scans for known anti-cheat and anti-tamper components. **If it finds one, it refuses to inject; if a session is already running, it stops at the next scan.** No setting turns this off, globally or per game (§2A). Because the scan runs every 30 seconds rather than continuously, anti-cheat that loads mid-session may be present for **up to 30 seconds** before FrameLedger detects it and stops.
- Before injecting, and every 30 seconds afterwards, FrameLedger scans for known anti-cheat and anti-tamper components. **If it finds one, it refuses to inject; if a session is already running, it stops at the next scan.** No setting turns this off, globally or per game; the one exception you can make yourself, per game, still runs every check and is described in §2A. Because the scan runs every 30 seconds rather than continuously, anti-cheat that loads mid-session may be present for **up to 30 seconds** before FrameLedger detects it and stops.
**And there is a second, longer window you should know about.** The part of FrameLedger running inside the game also stops on its own if it loses contact with the part doing the scanning — because a scanner that has stopped cannot protect you. It waits **65 seconds** before concluding that contact is lost, so that one delayed scan on a busy machine does not end your session. In the worst case those windows combine: if the scanner stops at the moment anti-cheat appears, the component inside the game may keep running for up to **65 seconds** afterwards. That number is 65 and not 30, and this document says so rather than leaving the 30 above to imply it.
@@ -79,13 +79,28 @@ FrameLedger is designed to reduce that risk substantially:
**FrameLedger is intended for offline and single-player play. If you enable injection for a game with any online or competitive component, you do so entirely at your own risk and are solely responsible for the consequences, including compliance with that game's terms of service.**
## 2A. There is no way past the guard
## 2A. There is no way past the guard — and one narrow exception you can make yourself
Versions 0.1.0-beta.3 and 0.1.0-beta.4 offered a per-game switch to overrule the guard. **It has been removed.** If
FrameLedger finds anti-cheat or anti-tamper software in a game — before it injects, when a session starts, or during a
session — it refuses, turns hooking off for that game, and says so on the game's page. There is no setting, per game or
global, that turns that back on for that executable. Sessions recorded under the earlier switch stay in your database,
marked as such in their notes.
global, that overrules that. Sessions recorded under the earlier switch stay in your database, marked as such in their
notes.
**Since 0.1.0-beta.9 there is one exception, and it is not a way past the guard.** A Settings option, off unless you
turn it on, lets you make an exception — one game at a time, after a disclosure you must accept — for a game whose only
finding is a single anti-cheat that works entirely in user mode (no kernel driver, no service, and no driver file
anywhere in the game's folder), that is on no list of titles FrameLedger refuses, and that FrameLedger has already
measured successfully at least twice. Under it the guard still runs every check, before injecting and every 30
seconds, and still refuses anything else it finds; the exception ends by itself when something new is found, when a
session under it crashes or is stopped for safety, or when the game is updated, and turning the option off suspends
it. Sessions recorded under it are marked with the anti-cheat they ran beside.
**It exists because users asked for it, and it carries exactly the risk this document describes.** That anti-cheat
may still detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later — and
FrameLedger cannot know whether it did. Earlier sessions that went well are no promise about the next one. **Do not
use it with a game you play online or competitively unless you accept losing that account;** the developer cannot
reverse a ban.
## 3. Stability
@@ -97,7 +112,7 @@ Software running inside another process can, in principle, destabilize it. Frame
Frame timing is derived from high-resolution timestamps taken at the moment the game presents each frame; upscaling, frame-generation and ray-tracing state are read from the parameters the game passes to those APIs. This is substantially more accurate than inferring settings from files on disk, but **no measurement is guaranteed to be exact**:
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-09-25.** The software is a beta; its latest
> ⚠ **What FrameLedger actually measures today — 2026-09-26.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.8`** (2026-09-25), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
@@ -160,7 +175,10 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> named in its process or in its folder (any kernel driver there counts), or the game on a title list by its
> store id or executable name — turns hooking off for that game, whether found by the Agent's own check of every
> game in the library, before injection, at a session's start or by the 30 s re-check; the game's page says so,
> and nothing turns it back on for that executable.
> and nothing turns it back on for that executable — except a user-mode exception you make yourself, per game,
> in Settings (off by default): only where the only finding is one anti-cheat that runs entirely in user mode, with
> no driver file in the game's folder, on a game already measured successfully at least twice. The guard still
> runs every check under it and ends it on anything new; a ban remains possible.
>
> Where a value is not measured it reads `N/A`, with two exceptions: FPS then shows Presented FPS with a
> note on what it may include, and ray-tracing flags may show a value you set yourself, labelled as
+2 -2
View File
@@ -1,6 +1,6 @@
# FrameLedger — End User License Agreement (EULA)
**Version:** 1.2 · **Effective:** {{RELEASE_DATE}}
**Version:** 1.3 · **Effective:** {{RELEASE_DATE}}
This End User License Agreement ("Agreement") applies to **FrameLedger** ("the Software"), developed and published by **poli0981** ("the Developer"), contactable at <contact@poli0981.dev> — see <https://poli0981.dev/> for other contact channels.
@@ -14,7 +14,7 @@ The Software records game performance data, hardware telemetry (temperatures, lo
## 2A. Code injection — your responsibility
To measure rendering settings accurately, the Software can load a component into a game process, **but only for games you have individually enabled**, after a consent prompt that explains the risk. The Software refuses to do so when it detects anti-cheat or anti-tamper software, turns hooking off for that game, and provides no means to override that refusal (Disclaimer §2A).
To measure rendering settings accurately, the Software can load a component into a game process, **but only for games you have individually enabled**, after a consent prompt that explains the risk. The Software refuses to do so when it detects anti-cheat or anti-tamper software, turns hooking off for that game, and provides no means to override that refusal — except a narrow, per-game exception for anti-cheat that works entirely in user mode, which you may make yourself, after a separate disclosure, for a game the Software has already measured successfully, and under which the Software still runs every check (Disclaimer §2A). By making such an exception you accept, for that game, the risk described in (b) below.
By enabling this feature for a game, you confirm that:
+4
View File
@@ -274,6 +274,10 @@ public partial class App : System.Windows.Application
// FR-2.1 (P3 PR-4): the consent dialog and the request it ends in; the toggle that opens it is the game page's (PR-5).
builder.Services.AddSingleton<IConsentPrompt, ConsentPrompt>();
builder.Services.AddSingleton<HookingConsent>();
// D33 (owner decision 2026-09-26): the user-mode exception's disclosure and the request it ends in; the list is
// Settings', the button on a blocked game's page.
builder.Services.AddSingleton<IAntiCheatExceptionPrompt, AntiCheatExceptionPrompt>();
builder.Services.AddSingleton<AntiCheatExceptions>();
AddLibrary(builder.Services);
@@ -0,0 +1,37 @@
<UserControl x:Class="FrameLedger.App.Dialogs.AntiCheatExceptionDialogContent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
d:DataContext="{d:DesignInstance Type=vm:AntiCheatExceptionDialogViewModel}"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
MaxWidth="640">
<!--
D33's disclosure (19_SAFETY §The user-mode exception), text from FrameLedger.Shared's Safety_Exception_* only,
versioned by AntiCheatExceptionDisclosure.Version. It states why the exception is offered, the risk, what is still
refused, how it ends, and that it turns nothing on; it recommends neither choice. Every colour is a theme brush.
-->
<ScrollViewer MaxHeight="520" VerticalScrollBarVisibility="Auto">
<StackPanel>
<ui:TextBlock Text="{Binding Intro}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,14,0,0" Text="{Binding Why}" TextWrapping="Wrap" />
<Border Margin="0,14,0,0" Padding="12" CornerRadius="6" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}">
<ui:TextBlock FontWeight="SemiBold" Text="{Binding Risk}" TextWrapping="Wrap" />
</Border>
<ui:TextBlock Margin="0,14,0,0" Text="{Binding Still}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,8,0,0" Text="{x:Static vm:AntiCheatExceptionDialogViewModel.Ends}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,8,0,0" Text="{x:Static vm:AntiCheatExceptionDialogViewModel.Next}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,8,0,0" FontWeight="SemiBold" Text="{x:Static vm:AntiCheatExceptionDialogViewModel.Online}" TextWrapping="Wrap" />
<CheckBox x:Name="Acceptance"
Margin="0,18,0,0"
AutomationProperties.Name="{x:Static vm:AntiCheatExceptionDialogViewModel.AcceptText}"
Content="{x:Static vm:AntiCheatExceptionDialogViewModel.AcceptText}"
IsChecked="{Binding Accepted, Mode=TwoWay}" />
</StackPanel>
</ScrollViewer>
</UserControl>
@@ -0,0 +1,18 @@
using System.Windows.Controls;
using FrameLedger.App.ViewModels;
namespace FrameLedger.App.Dialogs;
/// <summary>The body of D33's <c>ContentDialog</c>; the buttons are the dialog's own (<see cref="Services.AntiCheatExceptionPrompt"/>).</summary>
public partial class AntiCheatExceptionDialogContent : UserControl
{
public AntiCheatExceptionDialogContent(AntiCheatExceptionDialogViewModel viewModel)
{
ViewModel = viewModel ?? throw new ArgumentNullException(nameof(viewModel));
DataContext = viewModel;
InitializeComponent();
Loaded += (_, _) => Acceptance.Focus();
}
public AntiCheatExceptionDialogViewModel ViewModel { get; }
}
@@ -150,6 +150,33 @@
</ui:CardControl.Header>
</ui:CardControl>
<!-- D33 (owner decision 2026-09-26): the user-mode exception on a blocked game, its state the Agent's (19_SAFETY §The user-mode exception) -->
<ui:CardControl Margin="0,12,0,0" Icon="{ui:SymbolIcon ShieldTask24}"
Visibility="{Binding ViewModel.ExceptionCardVisible, Converter={StaticResource BoolToVis}}">
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.ExceptionHeader}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionInForceText}"
Visibility="{Binding ViewModel.ExceptionInForceText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionSuspendedText}"
Visibility="{Binding ViewModel.ExceptionSuspendedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLapseText}"
Visibility="{Binding ViewModel.ExceptionLapseText, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
</ui:CardControl.Header>
<StackPanel Orientation="Horizontal">
<ui:Button Appearance="Secondary"
Command="{Binding ViewModel.GrantExceptionCommand}"
Content="{x:Static vm:GameDetailViewModel.GrantExceptionText}"
Visibility="{Binding ViewModel.CanGrantException, Converter={StaticResource BoolToVis}}" />
<ui:Button Appearance="Secondary"
Command="{Binding ViewModel.WithdrawExceptionCommand}"
Content="{x:Static vm:GameDetailViewModel.WithdrawExceptionText}"
Visibility="{Binding ViewModel.CanWithdrawException, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</ui:CardControl>
<!-- hooking control (FR-2.1 / FR-2.2 / FR-2.5) -->
<StackPanel Visibility="{Binding ViewModel.HookingSectionVisible, Converter={StaticResource BoolToVis}}">
<ui:CardControl Margin="0,12,0,0" Header="{x:Static vm:GameDetailViewModel.HookingHeader}" Icon="{ui:SymbolIcon ShieldTask24}">
@@ -66,6 +66,68 @@
IsChecked="{Binding ViewModel.HideAntiCheatHooking, Mode=TwoWay}" />
</ui:CardControl>
<!-- D33 (owner decision 2026-09-26): the user-mode anti-cheat exception — the option, off by default, and the games it concerns. -->
<ui:CardExpander Margin="0,8,0,0" IsExpanded="{Binding ViewModel.UserModeExceptions, Mode=OneWay}" Icon="{ui:SymbolIcon ShieldTask24}">
<ui:CardExpander.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Exceptions_Label}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" TextWrapping="Wrap"
Text="{x:Static res:Strings.Settings_Exceptions_Body}" />
</StackPanel>
<ui:ToggleSwitch Grid.Column="1" Margin="12,0" AutomationProperties.Name="{x:Static res:Strings.Settings_Exceptions_Label}"
IsChecked="{Binding ViewModel.UserModeExceptions, Mode=TwoWay}" />
</Grid>
</ui:CardExpander.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Exceptions_Header}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Suspended}"
Visibility="{Binding ViewModel.ExceptionsSuspended, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Checking}"
Visibility="{Binding ViewModel.ExceptionsChecking, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_Exceptions_Empty}"
Visibility="{Binding ViewModel.ExceptionGames.Count, Converter={StaticResource ZeroToVisible}}" />
<ItemsControl ItemsSource="{Binding ViewModel.ExceptionGames}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding Name}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding FindingText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding SessionsText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding StateText}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding LapseText}"
Visibility="{Binding LapseText, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
<StackPanel Grid.Column="1" Margin="12,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
<ui:Button Appearance="Secondary"
Command="{Binding GrantCommand}"
Content="{x:Static res:Strings.Settings_Exceptions_Grant}"
Visibility="{Binding CanGrant, Converter={StaticResource BoolToVis}}" />
<ui:Button Appearance="Secondary"
Command="{Binding WithdrawCommand}"
Content="{x:Static res:Strings.Settings_Exceptions_Withdraw}"
Visibility="{Binding CanWithdraw, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ui:Button Margin="0,8,0,0"
Appearance="Secondary"
Command="{Binding ViewModel.RefreshExceptionsCommand}"
Content="{x:Static res:Strings.Settings_Exceptions_Refresh}" />
</StackPanel>
</ui:CardExpander>
<ui:CardExpander Margin="0,8,0,0" Icon="{ui:SymbolIcon Layer24}">
<ui:CardExpander.Header>
<Grid>
@@ -0,0 +1,4 @@
namespace FrameLedger.App.Services;
/// <summary>D33: what the exception's disclosure names — the game, the anti-cheat family and its signal, and the evidence.</summary>
public sealed record AntiCheatExceptionFacts(string GameName, string Family, string Signal, int Sessions);
@@ -0,0 +1,29 @@
namespace FrameLedger.App.Services;
/// <summary>D33: how a request to grant or withdraw one game's user-mode exception ended.</summary>
public enum AntiCheatExceptionOutcome
{
/// <summary>The Agent wrote the grant (<c>AntiCheatExceptionAck.granted = true</c>). Hooking is still off until FR-2.1.</summary>
Granted,
/// <summary>The exception is not in force any more (<c>granted = false</c> on a withdrawal).</summary>
Withdrawn,
/// <summary>The user closed the disclosure without accepting; nothing was sent.</summary>
Declined,
/// <summary>The Agent's own facts did not make the game eligible (<c>Refused</c>).</summary>
Refused,
/// <summary>The Agent grants against another version of the disclosure than this app shows; the dialog was not opened.</summary>
VersionMismatch,
/// <summary>The option is off in Settings (<c>Error ExceptionsOff</c>); nothing was granted.</summary>
OptionOff,
/// <summary>No connected Agent; nothing was sent.</summary>
AgentUnavailable,
/// <summary>The Agent answered and did not grant (a store outcome, an <c>Error</c>, a timeout); <c>Detail</c> says which.</summary>
Failed,
}
@@ -0,0 +1,41 @@
using System.Windows.Data;
using FrameLedger.App.Dialogs;
using FrameLedger.App.ViewModels;
using Wpf.Ui;
using Wpf.Ui.Controls;
namespace FrameLedger.App.Services;
/// <summary>
/// D33's disclosure in WPF UI, the same shape as FR-2.1's (<see cref="ConsentPrompt"/>): the primary button is bound to the
/// ticked acceptance and disabled until it is ticked; the close button keeps the game blocked and is the default, so Enter
/// never makes an exception.
/// </summary>
public sealed class AntiCheatExceptionPrompt : IAntiCheatExceptionPrompt
{
private readonly IContentDialogService _dialogs;
public AntiCheatExceptionPrompt(IContentDialogService dialogs) => _dialogs = dialogs ?? throw new ArgumentNullException(nameof(dialogs));
public async Task<bool> ShowAsync(AntiCheatExceptionFacts facts, CancellationToken ct = default)
{
var viewModel = new AntiCheatExceptionDialogViewModel(facts);
var dialog = new ContentDialog
{
Title = viewModel.Title,
Content = new AntiCheatExceptionDialogContent(viewModel),
PrimaryButtonText = AntiCheatExceptionDialogViewModel.GrantText,
CloseButtonText = AntiCheatExceptionDialogViewModel.CancelText,
// Enter keeps the game blocked; only a click on the (acceptance-gated) primary makes the exception.
DefaultButton = ContentDialogButton.Close,
IsPrimaryButtonEnabled = false,
DialogMaxWidth = 700,
};
_ = dialog.SetBinding(ContentDialog.IsPrimaryButtonEnabledProperty,
new Binding(nameof(AntiCheatExceptionDialogViewModel.Accepted)) { Source = viewModel, Mode = BindingMode.OneWay });
ContentDialogResult result = await _dialogs.ShowAsync(dialog, ct).ConfigureAwait(true);
// The binding is the gate on the button; this is the same rule read once more at the moment that matters.
return result == ContentDialogResult.Primary && viewModel.Accepted;
}
}
@@ -0,0 +1,46 @@
using System.Globalization;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Services;
/// <summary>D33: how an ask for a user-mode exception ended, and — for a refusal — what the Agent named.</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome, string? Detail = null, RefusedAck? Refusal = null)
{
public static AntiCheatExceptionResult Of(AntiCheatExceptionOutcome outcome) => new(outcome);
/// <summary>The outcome a user wanted: the exception made, or withdrawn.</summary>
public bool Succeeded => Outcome is AntiCheatExceptionOutcome.Granted or AntiCheatExceptionOutcome.Withdrawn;
/// <summary>What to tell the user about <paramref name="gameName"/>, or null when there is nothing to say (a declined disclosure).</summary>
public string? MessageFor(string gameName) => Outcome switch
{
AntiCheatExceptionOutcome.Granted => string.Format(CultureInfo.CurrentCulture, Strings.Exception_Result_Granted_Format, gameName),
AntiCheatExceptionOutcome.Withdrawn => string.Format(CultureInfo.CurrentCulture, Strings.Exception_Result_Withdrawn_Format, gameName),
AntiCheatExceptionOutcome.Refused => string.Format(CultureInfo.CurrentCulture, Strings.Exception_Result_Refused_Format, gameName,
RefusalText() ?? Detail ?? Strings.Common_NotAvailable),
AntiCheatExceptionOutcome.VersionMismatch => Shared.Strings.Safety_Exception_VersionMismatch,
AntiCheatExceptionOutcome.OptionOff => Shared.Strings.Safety_Exception_OptionOff,
AntiCheatExceptionOutcome.AgentUnavailable => Shared.Strings.Safety_Consent_AgentUnavailable,
AntiCheatExceptionOutcome.Failed => Detail ?? Strings.Common_NotAvailable,
_ => null,
};
/// <summary>Why no exception was made, in the user's language: the session count, the finding, or the block's kind.</summary>
public string? RefusalText()
{
if (Refusal is null)
{
return null;
}
return Refusal.Reason switch
{
"TooFewSessions" => string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TooFew_Format, Refusal.Signal ?? "0"),
"BlockNotExceptionable" => Strings.Exception_State_NotAsked,
"PreScanFailed" or "RulesUnreadable" or "RulesMalformed" or "RulesIncomplete" => Strings.Exception_State_CouldNotVerify,
_ => string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Refused_Format,
Refusal.Family ?? Formats.GuardReasonText(Refusal.Reason), Refusal.Signal ?? Strings.Common_NotAvailable),
};
}
}
@@ -0,0 +1,104 @@
using System.IO;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
using FrameLedger.Shared.Safety;
using Serilog;
namespace FrameLedger.App.Services;
/// <summary>
/// D33 (owner decision 2026-09-26) from the App's side: the version handshake (the dialog is not opened when the Agent
/// grants against other text), the disclosure, and the one message that may ask for a user-mode exception
/// (<c>SetAntiCheatException</c>). Like <see cref="HookingConsent"/> it asserts nothing: it sends the version it showed,
/// and the Agent re-checks the option, the block, a tolerant pre-scan of the file on disk and the session count, and
/// grants or refuses (<c>07_IPC</c> §The pipe is not a trust boundary).
/// </summary>
public sealed class AntiCheatExceptions
{
private readonly IAgentRequests _agent;
private readonly IAntiCheatExceptionPrompt _prompt;
public AntiCheatExceptions(IAgentRequests agent, IAntiCheatExceptionPrompt prompt)
{
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
_prompt = prompt ?? throw new ArgumentNullException(nameof(prompt));
}
/// <summary>Show the disclosure for the game in <paramref name="facts"/> and, on its acceptance, ask the Agent for the exception.</summary>
public async Task<AntiCheatExceptionResult> GrantAsync(long gameId, AntiCheatExceptionFacts facts, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(facts);
HelloAck? hello = _agent.Hello;
if (hello is null || !_agent.IsConnected)
{
return AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable);
}
if (!string.Equals(hello.ExceptionDisclosureVersion, AntiCheatExceptionDisclosure.Version, StringComparison.Ordinal))
{
// Showing text the Agent would not grant against is a dialog whose button cannot mean what it says.
Log.Warning("exception: the Agent grants against {Theirs}, this app shows {Ours}; the dialog was not opened",
hello.ExceptionDisclosureVersion, AntiCheatExceptionDisclosure.Version);
return new AntiCheatExceptionResult(AntiCheatExceptionOutcome.VersionMismatch, hello.ExceptionDisclosureVersion);
}
if (!await _prompt.ShowAsync(facts, ct).ConfigureAwait(true))
{
return AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.Declined);
}
return await SendAsync(new SetAntiCheatExceptionRequest(gameId, Enabled: true, AntiCheatExceptionDisclosure.Version), ct).ConfigureAwait(true);
}
/// <summary>Withdraw the game's exception; no dialog — a withdrawal only takes hooking away.</summary>
public Task<AntiCheatExceptionResult> WithdrawAsync(long gameId, CancellationToken ct = default) =>
_agent.IsConnected
? SendAsync(new SetAntiCheatExceptionRequest(gameId, Enabled: false, null), ct)
: Task.FromResult(AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable));
private async Task<AntiCheatExceptionResult> SendAsync(SetAntiCheatExceptionRequest request, CancellationToken ct)
{
try
{
IpcEnvelope ack = await _agent.RequestAsync(IpcMessageType.SetAntiCheatException, request, ct).ConfigureAwait(true);
return Interpret(ack, request.Enabled);
}
catch (Exception ex) when (ex is IpcRequestException or TimeoutException or IOException or InvalidOperationException)
{
Log.Warning(ex, "exception: SetAntiCheatException(game {GameId}, {Enabled}) did not complete", request.GameId, request.Enabled);
string? code = (ex as IpcRequestException)?.Code;
AntiCheatExceptionOutcome outcome = code switch
{
IpcErrorCode.DisclosureVersionMismatch => AntiCheatExceptionOutcome.VersionMismatch,
IpcErrorCode.ExceptionsOff => AntiCheatExceptionOutcome.OptionOff,
_ => AntiCheatExceptionOutcome.Failed,
};
return new AntiCheatExceptionResult(outcome, code ?? ex.GetType().Name);
}
}
private static AntiCheatExceptionResult Interpret(IpcEnvelope ack, bool granting)
{
if (string.Equals(ack.Type, IpcMessageType.Refused, StringComparison.Ordinal))
{
RefusedAck? refused = IpcCodec.Payload<RefusedAck>(ack);
return new AntiCheatExceptionResult(AntiCheatExceptionOutcome.Refused, refused?.Reason, refused);
}
if (!string.Equals(ack.Type, IpcMessageType.AntiCheatExceptionAck, StringComparison.Ordinal))
{
return new AntiCheatExceptionResult(AntiCheatExceptionOutcome.Failed, "UnexpectedAck:" + ack.Type);
}
AntiCheatExceptionAck? answer = IpcCodec.Payload<AntiCheatExceptionAck>(ack);
if (answer is null)
{
return new AntiCheatExceptionResult(AntiCheatExceptionOutcome.Failed, "EmptyAck");
}
// A withdrawal of an exception that was not in force is still the state the user asked for.
return granting
? answer.Granted ? new(AntiCheatExceptionOutcome.Granted, answer.Outcome) : new(AntiCheatExceptionOutcome.Failed, answer.Outcome)
: answer.Granted ? new(AntiCheatExceptionOutcome.Failed, answer.Outcome) : new(AntiCheatExceptionOutcome.Withdrawn, answer.Outcome);
}
}
@@ -0,0 +1,102 @@
using System.Globalization;
using FrameLedger.Application.AntiCheat;
using FrameLedger.Application.Persistence;
using FrameLedger.Domain.AntiCheat;
namespace FrameLedger.App.Services;
/// <summary>
/// D33 (owner decision 2026-09-26): a blocked game's user-mode exception as the App shows it — in force, eligible, being
/// checked, or why not — read from the Agent's columns (<see cref="GameRow.AcException"/>). The App decides nothing here:
/// every state is a reading of what the Agent wrote, and the grant itself is the Agent's to make.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed record ExceptionView(ExceptionViewKind Kind, string Text, string? Family, string? Signal, int Sessions, string? LapseText)
{
/// <summary>An exception may be asked for now.</summary>
public bool CanGrant => Kind == ExceptionViewKind.Eligible;
/// <summary>An exception is on the row and may be withdrawn.</summary>
public bool CanWithdraw => Kind == ExceptionViewKind.Granted;
/// <summary>
/// The row's exception, or null for a row it says nothing about (not blocked). Granted first — a grant stays until the
/// Agent or the user ends it — then the block's kind, then the sweep's answer about THIS block.
/// </summary>
public static ExceptionView? Of(GameRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (!row.BlockedByGuard)
{
return null;
}
AntiCheatExceptionState x = row.AcException;
StoredBlock? block = StoredBlock.Parse(row.HookBlockedReason);
string? lapse = x.LapsedReason is { } reason && x.LapsedAt is { } at
? string.Format(CultureInfo.CurrentCulture, Strings.Exception_Lapsed_Format, Formats.Date(at), LapseWords(reason))
: null;
if (x.IsGranted)
{
return new(ExceptionViewKind.Granted, string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Granted_Format, Formats.Date(x.GrantedAt!.Value)),
x.Family, block?.Signal, x.Sessions, lapse);
}
if (block is not { IsExceptionable: true } b)
{
return new(ExceptionViewKind.NotEligible, Strings.Exception_State_NotAsked, block?.Family, block?.Signal, x.Sessions, lapse);
}
if (!string.Equals(x.CheckedBlock, row.HookBlockedReason, StringComparison.Ordinal))
{
return new(ExceptionViewKind.Checking, Strings.Exception_State_Checking, b.Family, b.Signal, x.Sessions, lapse);
}
return x.Eligible
? new(ExceptionViewKind.Eligible, Strings.Exception_State_Eligible, b.Family, b.Signal, x.Sessions, lapse)
: new(NotEligibleKind(x), WhyNot(b, x), b.Family, b.Signal, x.Sessions, lapse);
}
/// <summary>Why the last grant ended, in words.</summary>
public static string LapseWords(string reason) => reason switch
{
UserModeExceptionLapse.Withdrawn => Strings.Exception_Lapse_Withdrawn,
UserModeExceptionLapse.ExecutableChanged => Strings.Exception_Lapse_ExecutableChanged,
UserModeExceptionLapse.NoLongerEligible => Strings.Exception_Lapse_NoLongerEligible,
UserModeExceptionLapse.NewFinding => Strings.Exception_Lapse_NewFinding,
UserModeExceptionLapse.SafetyUnhook => Strings.Exception_Lapse_SafetyUnhook,
UserModeExceptionLapse.OverlayStopped => Strings.Exception_Lapse_OverlayStopped,
UserModeExceptionLapse.SessionCrashed => Strings.Exception_Lapse_SessionCrashed,
_ => reason,
};
/// <summary>The guard let the family through and only the evidence is short — the one "not yet" the Settings list shows.</summary>
private static ExceptionViewKind NotEligibleKind(AntiCheatExceptionState x) =>
StoredBlock.Parse(x.Verdict) is { Reason: AntiCheatRefusalReason.AllowedUnderUserModeException }
? ExceptionViewKind.TooFewSessions
: ExceptionViewKind.NotEligible;
private static string WhyNot(StoredBlock block, AntiCheatExceptionState x)
{
StoredBlock? verdict = StoredBlock.Parse(x.Verdict);
if (verdict is null)
{
return Strings.Exception_State_NotAsked;
}
if (verdict.Value.Reason == AntiCheatRefusalReason.AllowedUnderUserModeException)
{
return string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_TooFew_Format, x.Sessions);
}
if (!verdict.Value.IsExceptionable && verdict.Value.Family.Length == 0)
{
return Strings.Exception_State_CouldNotVerify;
}
// The same finding back means the guard does not honour this family: it is not user-mode throughout.
return string.Equals(verdict.Value.Family, block.Family, StringComparison.Ordinal)
? string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_NotUserMode_Format, block.Family)
: string.Format(CultureInfo.CurrentCulture, Strings.Exception_State_Refused_Format, verdict.Value.Family, verdict.Value.Signal);
}
}
@@ -0,0 +1,20 @@
namespace FrameLedger.App.Services;
/// <summary>D33: the states a blocked game's user-mode exception is shown in (<see cref="ExceptionView"/>).</summary>
public enum ExceptionViewKind
{
/// <summary>An exception is on the row.</summary>
Granted,
/// <summary>The Agent found the game eligible; no exception has been made.</summary>
Eligible,
/// <summary>The guard would let the family through, and the game has fewer than two successful hooked sessions.</summary>
TooFewSessions,
/// <summary>The Agent has not answered about this block yet (the option was just turned on, or the block changed).</summary>
Checking,
/// <summary>Not eligible, for the reason in the text.</summary>
NotEligible,
}
@@ -0,0 +1,11 @@
namespace FrameLedger.App.Services;
/// <summary>
/// D33's disclosure as a question: shows the versioned text for one game and answers whether the user accepted the risk
/// and chose to make the exception. The WPF implementation is <see cref="AntiCheatExceptionPrompt"/>; a test substitutes an
/// answer.
/// </summary>
public interface IAntiCheatExceptionPrompt
{
Task<bool> ShowAsync(AntiCheatExceptionFacts facts, CancellationToken ct = default);
}
+114
View File
@@ -213,6 +213,27 @@ public static class Strings
nameof(End_WriterNeverInstalledHooks),
nameof(End_WriterSelfDisabled),
nameof(End_WriterStoppedBlocklisted),
nameof(Exception_Finding_Format),
nameof(Exception_Lapse_ExecutableChanged),
nameof(Exception_Lapse_NewFinding),
nameof(Exception_Lapse_NoLongerEligible),
nameof(Exception_Lapse_OverlayStopped),
nameof(Exception_Lapse_SafetyUnhook),
nameof(Exception_Lapse_SessionCrashed),
nameof(Exception_Lapse_Withdrawn),
nameof(Exception_Lapsed_Format),
nameof(Exception_Result_Granted_Format),
nameof(Exception_Result_Refused_Format),
nameof(Exception_Result_Withdrawn_Format),
nameof(Exception_Sessions_Format),
nameof(Exception_State_Checking),
nameof(Exception_State_CouldNotVerify),
nameof(Exception_State_Eligible),
nameof(Exception_State_Granted_Format),
nameof(Exception_State_NotAsked),
nameof(Exception_State_NotUserMode_Format),
nameof(Exception_State_Refused_Format),
nameof(Exception_State_TooFew_Format),
nameof(Exe_DriveMissing_Format),
nameof(Exe_FileMissing_Format),
nameof(Exit_Code_Format),
@@ -331,6 +352,11 @@ public static class Strings
nameof(GameDetail_Details_Store),
nameof(GameDetail_Details_Version),
nameof(GameDetail_Edit),
nameof(GameDetail_Exception_Grant),
nameof(GameDetail_Exception_Granted_Format),
nameof(GameDetail_Exception_Header),
nameof(GameDetail_Exception_Suspended),
nameof(GameDetail_Exception_Withdraw),
nameof(GameDetail_ExeMissing),
nameof(GameDetail_Hooking_Body),
nameof(GameDetail_Hooking_Busy),
@@ -363,6 +389,7 @@ public static class Strings
nameof(GameDetail_Tab_Trend),
nameof(Games_Add),
nameof(Games_Card_AntiCheat),
nameof(Games_Card_Exception),
nameof(Games_Card_HookOff),
nameof(Games_Card_HookOn),
nameof(Games_Card_LastPlayed_Format),
@@ -565,6 +592,7 @@ public static class Strings
nameof(Sensors_Series_VramProcess),
nameof(Sensors_Temps_Header),
nameof(Sensors_Vram_Header),
nameof(Session_UnderException_Format),
nameof(Sessions_Col_Api),
nameof(Sessions_Col_Date),
nameof(Sessions_Col_Displayed),
@@ -600,6 +628,15 @@ public static class Strings
nameof(Settings_Capture_Header),
nameof(Settings_Channel_Beta),
nameof(Settings_Channel_Stable),
nameof(Settings_Exceptions_Body),
nameof(Settings_Exceptions_Checking),
nameof(Settings_Exceptions_Empty),
nameof(Settings_Exceptions_Grant),
nameof(Settings_Exceptions_Header),
nameof(Settings_Exceptions_Label),
nameof(Settings_Exceptions_Refresh),
nameof(Settings_Exceptions_Suspended),
nameof(Settings_Exceptions_Withdraw),
nameof(Settings_FpsDecimals_Body),
nameof(Settings_FpsDecimals_Label),
nameof(Settings_Header),
@@ -723,6 +760,7 @@ public static class Strings
nameof(Tier_Dash_Tooltip),
nameof(Tier_Hooked),
nameof(Tier_Hooked_Tooltip),
nameof(Tier_HookedException),
nameof(Tier_NA_Tooltip),
nameof(Tier_NotHooked),
nameof(Tier_NotHooked_Tooltip),
@@ -1172,6 +1210,48 @@ public static class Strings
public static string End_WriterStoppedBlocklisted => ResourceManager.GetString(nameof(End_WriterStoppedBlocklisted), Culture) ?? nameof(End_WriterStoppedBlocklisted);
public static string Exception_Finding_Format => ResourceManager.GetString(nameof(Exception_Finding_Format), Culture) ?? nameof(Exception_Finding_Format);
public static string Exception_Lapse_ExecutableChanged => ResourceManager.GetString(nameof(Exception_Lapse_ExecutableChanged), Culture) ?? nameof(Exception_Lapse_ExecutableChanged);
public static string Exception_Lapse_NewFinding => ResourceManager.GetString(nameof(Exception_Lapse_NewFinding), Culture) ?? nameof(Exception_Lapse_NewFinding);
public static string Exception_Lapse_NoLongerEligible => ResourceManager.GetString(nameof(Exception_Lapse_NoLongerEligible), Culture) ?? nameof(Exception_Lapse_NoLongerEligible);
public static string Exception_Lapse_OverlayStopped => ResourceManager.GetString(nameof(Exception_Lapse_OverlayStopped), Culture) ?? nameof(Exception_Lapse_OverlayStopped);
public static string Exception_Lapse_SafetyUnhook => ResourceManager.GetString(nameof(Exception_Lapse_SafetyUnhook), Culture) ?? nameof(Exception_Lapse_SafetyUnhook);
public static string Exception_Lapse_SessionCrashed => ResourceManager.GetString(nameof(Exception_Lapse_SessionCrashed), Culture) ?? nameof(Exception_Lapse_SessionCrashed);
public static string Exception_Lapse_Withdrawn => ResourceManager.GetString(nameof(Exception_Lapse_Withdrawn), Culture) ?? nameof(Exception_Lapse_Withdrawn);
public static string Exception_Lapsed_Format => ResourceManager.GetString(nameof(Exception_Lapsed_Format), Culture) ?? nameof(Exception_Lapsed_Format);
public static string Exception_Result_Granted_Format => ResourceManager.GetString(nameof(Exception_Result_Granted_Format), Culture) ?? nameof(Exception_Result_Granted_Format);
public static string Exception_Result_Refused_Format => ResourceManager.GetString(nameof(Exception_Result_Refused_Format), Culture) ?? nameof(Exception_Result_Refused_Format);
public static string Exception_Result_Withdrawn_Format => ResourceManager.GetString(nameof(Exception_Result_Withdrawn_Format), Culture) ?? nameof(Exception_Result_Withdrawn_Format);
public static string Exception_Sessions_Format => ResourceManager.GetString(nameof(Exception_Sessions_Format), Culture) ?? nameof(Exception_Sessions_Format);
public static string Exception_State_Checking => ResourceManager.GetString(nameof(Exception_State_Checking), Culture) ?? nameof(Exception_State_Checking);
public static string Exception_State_CouldNotVerify => ResourceManager.GetString(nameof(Exception_State_CouldNotVerify), Culture) ?? nameof(Exception_State_CouldNotVerify);
public static string Exception_State_Eligible => ResourceManager.GetString(nameof(Exception_State_Eligible), Culture) ?? nameof(Exception_State_Eligible);
public static string Exception_State_Granted_Format => ResourceManager.GetString(nameof(Exception_State_Granted_Format), Culture) ?? nameof(Exception_State_Granted_Format);
public static string Exception_State_NotAsked => ResourceManager.GetString(nameof(Exception_State_NotAsked), Culture) ?? nameof(Exception_State_NotAsked);
public static string Exception_State_NotUserMode_Format => ResourceManager.GetString(nameof(Exception_State_NotUserMode_Format), Culture) ?? nameof(Exception_State_NotUserMode_Format);
public static string Exception_State_Refused_Format => ResourceManager.GetString(nameof(Exception_State_Refused_Format), Culture) ?? nameof(Exception_State_Refused_Format);
public static string Exception_State_TooFew_Format => ResourceManager.GetString(nameof(Exception_State_TooFew_Format), Culture) ?? nameof(Exception_State_TooFew_Format);
public static string Exe_DriveMissing_Format => ResourceManager.GetString(nameof(Exe_DriveMissing_Format), Culture) ?? nameof(Exe_DriveMissing_Format);
public static string Exe_FileMissing_Format => ResourceManager.GetString(nameof(Exe_FileMissing_Format), Culture) ?? nameof(Exe_FileMissing_Format);
@@ -1408,6 +1488,16 @@ public static class Strings
public static string GameDetail_Edit => ResourceManager.GetString(nameof(GameDetail_Edit), Culture) ?? nameof(GameDetail_Edit);
public static string GameDetail_Exception_Grant => ResourceManager.GetString(nameof(GameDetail_Exception_Grant), Culture) ?? nameof(GameDetail_Exception_Grant);
public static string GameDetail_Exception_Granted_Format => ResourceManager.GetString(nameof(GameDetail_Exception_Granted_Format), Culture) ?? nameof(GameDetail_Exception_Granted_Format);
public static string GameDetail_Exception_Header => ResourceManager.GetString(nameof(GameDetail_Exception_Header), Culture) ?? nameof(GameDetail_Exception_Header);
public static string GameDetail_Exception_Suspended => ResourceManager.GetString(nameof(GameDetail_Exception_Suspended), Culture) ?? nameof(GameDetail_Exception_Suspended);
public static string GameDetail_Exception_Withdraw => ResourceManager.GetString(nameof(GameDetail_Exception_Withdraw), Culture) ?? nameof(GameDetail_Exception_Withdraw);
public static string GameDetail_ExeMissing => ResourceManager.GetString(nameof(GameDetail_ExeMissing), Culture) ?? nameof(GameDetail_ExeMissing);
public static string GameDetail_Hooking_Body => ResourceManager.GetString(nameof(GameDetail_Hooking_Body), Culture) ?? nameof(GameDetail_Hooking_Body);
@@ -1472,6 +1562,8 @@ public static class Strings
public static string Games_Card_AntiCheat => ResourceManager.GetString(nameof(Games_Card_AntiCheat), Culture) ?? nameof(Games_Card_AntiCheat);
public static string Games_Card_Exception => ResourceManager.GetString(nameof(Games_Card_Exception), Culture) ?? nameof(Games_Card_Exception);
public static string Games_Card_HookOff => ResourceManager.GetString(nameof(Games_Card_HookOff), Culture) ?? nameof(Games_Card_HookOff);
public static string Games_Card_HookOn => ResourceManager.GetString(nameof(Games_Card_HookOn), Culture) ?? nameof(Games_Card_HookOn);
@@ -1876,6 +1968,8 @@ public static class Strings
public static string Sensors_Vram_Header => ResourceManager.GetString(nameof(Sensors_Vram_Header), Culture) ?? nameof(Sensors_Vram_Header);
public static string Session_UnderException_Format => ResourceManager.GetString(nameof(Session_UnderException_Format), Culture) ?? nameof(Session_UnderException_Format);
public static string Sessions_Col_Api => ResourceManager.GetString(nameof(Sessions_Col_Api), Culture) ?? nameof(Sessions_Col_Api);
public static string Sessions_Col_Date => ResourceManager.GetString(nameof(Sessions_Col_Date), Culture) ?? nameof(Sessions_Col_Date);
@@ -1946,6 +2040,24 @@ public static class Strings
public static string Settings_Channel_Stable => ResourceManager.GetString(nameof(Settings_Channel_Stable), Culture) ?? nameof(Settings_Channel_Stable);
public static string Settings_Exceptions_Body => ResourceManager.GetString(nameof(Settings_Exceptions_Body), Culture) ?? nameof(Settings_Exceptions_Body);
public static string Settings_Exceptions_Checking => ResourceManager.GetString(nameof(Settings_Exceptions_Checking), Culture) ?? nameof(Settings_Exceptions_Checking);
public static string Settings_Exceptions_Empty => ResourceManager.GetString(nameof(Settings_Exceptions_Empty), Culture) ?? nameof(Settings_Exceptions_Empty);
public static string Settings_Exceptions_Grant => ResourceManager.GetString(nameof(Settings_Exceptions_Grant), Culture) ?? nameof(Settings_Exceptions_Grant);
public static string Settings_Exceptions_Header => ResourceManager.GetString(nameof(Settings_Exceptions_Header), Culture) ?? nameof(Settings_Exceptions_Header);
public static string Settings_Exceptions_Label => ResourceManager.GetString(nameof(Settings_Exceptions_Label), Culture) ?? nameof(Settings_Exceptions_Label);
public static string Settings_Exceptions_Refresh => ResourceManager.GetString(nameof(Settings_Exceptions_Refresh), Culture) ?? nameof(Settings_Exceptions_Refresh);
public static string Settings_Exceptions_Suspended => ResourceManager.GetString(nameof(Settings_Exceptions_Suspended), Culture) ?? nameof(Settings_Exceptions_Suspended);
public static string Settings_Exceptions_Withdraw => ResourceManager.GetString(nameof(Settings_Exceptions_Withdraw), Culture) ?? nameof(Settings_Exceptions_Withdraw);
public static string Settings_FpsDecimals_Body => ResourceManager.GetString(nameof(Settings_FpsDecimals_Body), Culture) ?? nameof(Settings_FpsDecimals_Body);
public static string Settings_FpsDecimals_Label => ResourceManager.GetString(nameof(Settings_FpsDecimals_Label), Culture) ?? nameof(Settings_FpsDecimals_Label);
@@ -2192,6 +2304,8 @@ public static class Strings
public static string Tier_Hooked_Tooltip => ResourceManager.GetString(nameof(Tier_Hooked_Tooltip), Culture) ?? nameof(Tier_Hooked_Tooltip);
public static string Tier_HookedException => ResourceManager.GetString(nameof(Tier_HookedException), Culture) ?? nameof(Tier_HookedException);
public static string Tier_NA_Tooltip => ResourceManager.GetString(nameof(Tier_NA_Tooltip), Culture) ?? nameof(Tier_NA_Tooltip);
public static string Tier_NotHooked => ResourceManager.GetString(nameof(Tier_NotHooked), Culture) ?? nameof(Tier_NotHooked);
+153 -1
View File
@@ -2530,7 +2530,7 @@
<comment>review</comment>
</data>
<data name="Settings_HideAntiCheatHooking_Body" xml:space="preserve">
<value>アンチチートが検出されたゲームはフックできません。オンにするとゲームのページには検出内容だけが表示され、オフにすると無効化されたフックのスイッチも表示されます。どちらの場合も、フックなしで記録は続きます。</value>
<value>アンチチートが検出されたゲームは、ユーザーモード例外(下記)を作成しない限りフックできません。オンにするとゲームのページには検出内容だけが表示され、オフにすると無効化されたフックのスイッチも表示されます。どちらの場合も、フックなしで記録は続きます。</value>
<comment>review</comment>
</data>
<data name="Notice_HookingOff_Title_Format" xml:space="preserve">
@@ -3113,4 +3113,156 @@
<value>W</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>以前に計測できたユーザーモードのアンチチート搭載ゲームでフックを許可する</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>既定ではオフです。オンにすると、アンチチートがユーザーモードのみで動作し(カーネルドライバーがなく、ほかに何も検出されない)、フックで2回以上計測できたゲームに、開示を確認したうえでゲームごとに例外を与えられます。ガードはすべてのチェックを続け、アカウント停止の可能性は残ります。</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
<value>ユーザーモード例外</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Empty" xml:space="preserve">
<value>ライブラリに対象のゲームはありません。</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Suspended" xml:space="preserve">
<value>オプションがオフです。下の例外は保持されますが適用されません。</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Grant" xml:space="preserve">
<value>例外を作成…</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Withdraw" xml:space="preserve">
<value>取り消す</value>
<comment>review</comment>
</data>
<data name="Exception_Finding_Format" xml:space="preserve">
<value>{0} — {1}</value>
<comment>review</comment>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>フック計測の成功 {0} 回</value>
<comment>review</comment>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>{0} から例外が有効</value>
<comment>review</comment>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>対象 — 例外は未作成</value>
<comment>review</comment>
</data>
<data name="Exception_State_Checking" xml:space="preserve">
<value>確認中…</value>
<comment>review</comment>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>対象外: フック計測の成功は {0} 回で、2 回必要です</value>
<comment>review</comment>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>対象外: ガードは {0}({1})も検出しました</value>
<comment>review</comment>
</data>
<data name="Exception_State_NotUserMode_Format" xml:space="preserve">
<value>対象外: {0} は完全なユーザーモードではない(ドライバーまたはサービスがある)ため、FrameLedger は例外にしません</value>
<comment>review</comment>
</data>
<data name="Exception_State_NotAsked" xml:space="preserve">
<value>対象外: この検出は単一のアンチチートのモジュール・ファイル・フォルダーではありません</value>
<comment>review</comment>
</data>
<data name="Exception_State_CouldNotVerify" xml:space="preserve">
<value>現在は対象外: 確認を完了できませんでした。自動で再実行されます</value>
<comment>review</comment>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>直近の例外は {0} に終了しました: {1}</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_Withdrawn" xml:space="preserve">
<value>取り消されました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_ExecutableChanged" xml:space="preserve">
<value>ゲームが更新されました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_NoLongerEligible" xml:space="preserve">
<value>ゲームが条件を満たさなくなりました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_NewFinding" xml:space="preserve">
<value>ゲームで新たなアンチチートが検出されました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_SafetyUnhook" xml:space="preserve">
<value>例外下のセッションが安全のため停止されました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_OverlayStopped" xml:space="preserve">
<value>別のアンチチートが読み込まれたため FrameLedger が観測を停止しました</value>
<comment>review</comment>
</data>
<data name="Exception_Lapse_SessionCrashed" xml:space="preserve">
<value>例外下のセッションがクラッシュしました</value>
<comment>review</comment>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>{0} の例外を作成しました。計測するときは、ゲームのページでフックをオンにしてください。</value>
<comment>review</comment>
</data>
<data name="Exception_Result_Withdrawn_Format" xml:space="preserve">
<value>{0} の例外を取り消しました。フックはオフです。</value>
<comment>review</comment>
</data>
<data name="Exception_Result_Refused_Format" xml:space="preserve">
<value>{0} の例外は作成されませんでした: {1}</value>
<comment>review</comment>
</data>
<data name="GameDetail_Exception_Header" xml:space="preserve">
<value>ユーザーモード例外</value>
<comment>review</comment>
</data>
<data name="GameDetail_Exception_Granted_Format" xml:space="preserve">
<value>{0} に対するユーザーモード例外のもとでフックできます。ガードはすべてのチェックを続け、アカウント停止の可能性は残ります。</value>
<comment>review</comment>
</data>
<data name="GameDetail_Exception_Suspended" xml:space="preserve">
<value>このゲームの例外は保持されていますが、設定でオプションがオフのため適用されません。</value>
<comment>review</comment>
</data>
<data name="GameDetail_Exception_Grant" xml:space="preserve">
<value>例外を作成…</value>
<comment>review</comment>
</data>
<data name="GameDetail_Exception_Withdraw" xml:space="preserve">
<value>例外を取り消す</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Refresh" xml:space="preserve">
<value>更新</value>
<comment>review</comment>
</data>
<data name="Settings_Exceptions_Checking" xml:space="preserve">
<value>キャプチャエージェントがライブラリを確認しています。対象のゲームは1分以内にここに表示されます。更新して確認してください。</value>
<comment>review</comment>
</data>
<data name="Tier_HookedException" xml:space="preserve">
<value>フック・例外</value>
<comment>review</comment>
</data>
<data name="Games_Card_Exception" xml:space="preserve">
<value>例外</value>
<comment>review</comment>
</data>
<data name="Session_UnderException_Format" xml:space="preserve">
<value>{0} のユーザーモード例外のもとでフック</value>
<comment>review</comment>
</data>
</root>
+115 -1
View File
@@ -1908,7 +1908,7 @@ The documents below are the full terms; this summary does not replace them.</val
<value>Hide hooking on anti-cheat games</value>
</data>
<data name="Settings_HideAntiCheatHooking_Body" xml:space="preserve">
<value>A game in which anti-cheat was found can never be hooked. On, its page shows only what was found; off, it also shows the disabled Hooking switch. Either way it is still recorded without hooking.</value>
<value>A game in which anti-cheat was found cannot be hooked, unless you make a user-mode exception for it (below). On, its page shows only what was found; off, it also shows the disabled Hooking switch. Either way it is still recorded without hooking.</value>
</data>
<data name="Notice_HookingOff_Title_Format" xml:space="preserve">
<value>{0}: hooking turned off</value>
@@ -2345,4 +2345,118 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Sensors_Axis_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>Allow hooking in games with user-mode anti-cheat that were measured before</value>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>Off by default. On, a game whose only anti-cheat runs in user mode — no kernel driver, nothing else found — and that was measured hooked at least twice can be given an exception below, one game at a time, after a disclosure. The guard still runs every check, and a ban remains possible.</value>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
<value>User-mode exceptions</value>
</data>
<data name="Settings_Exceptions_Empty" xml:space="preserve">
<value>No game in your library qualifies.</value>
</data>
<data name="Settings_Exceptions_Suspended" xml:space="preserve">
<value>The option is off: the exceptions below are kept but do not apply.</value>
</data>
<data name="Settings_Exceptions_Grant" xml:space="preserve">
<value>Make exception…</value>
</data>
<data name="Settings_Exceptions_Withdraw" xml:space="preserve">
<value>Withdraw</value>
</data>
<data name="Exception_Finding_Format" xml:space="preserve">
<value>{0} — {1}</value>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>{0} successful hooked sessions</value>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>Exception in force since {0}</value>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>Eligible — no exception made</value>
</data>
<data name="Exception_State_Checking" xml:space="preserve">
<value>Checking…</value>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>Not eligible: {0} successful hooked session(s), two are needed</value>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>Not eligible: the guard also found {0} ({1})</value>
</data>
<data name="Exception_State_NotUserMode_Format" xml:space="preserve">
<value>Not eligible: {0} is not user-mode throughout (it has a driver or a service), so FrameLedger never excepts it</value>
</data>
<data name="Exception_State_NotAsked" xml:space="preserve">
<value>Not eligible: this finding is not a module, file or folder of one anti-cheat</value>
</data>
<data name="Exception_State_CouldNotVerify" xml:space="preserve">
<value>Not eligible now: the check could not finish; it runs again by itself</value>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>The last exception ended on {0}: {1}</value>
</data>
<data name="Exception_Lapse_Withdrawn" xml:space="preserve">
<value>you withdrew it</value>
</data>
<data name="Exception_Lapse_ExecutableChanged" xml:space="preserve">
<value>the game was updated</value>
</data>
<data name="Exception_Lapse_NoLongerEligible" xml:space="preserve">
<value>the game no longer qualifies</value>
</data>
<data name="Exception_Lapse_NewFinding" xml:space="preserve">
<value>new anti-cheat was found in the game</value>
</data>
<data name="Exception_Lapse_SafetyUnhook" xml:space="preserve">
<value>a session under it was stopped for safety</value>
</data>
<data name="Exception_Lapse_OverlayStopped" xml:space="preserve">
<value>FrameLedger stopped observing because another anti-cheat loaded</value>
</data>
<data name="Exception_Lapse_SessionCrashed" xml:space="preserve">
<value>a session under it crashed</value>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>Exception made for {0}. Turn hooking on for the game on its page when you want to measure it.</value>
</data>
<data name="Exception_Result_Withdrawn_Format" xml:space="preserve">
<value>Exception withdrawn for {0}; its hooking is off.</value>
</data>
<data name="Exception_Result_Refused_Format" xml:space="preserve">
<value>No exception was made for {0}: {1}</value>
</data>
<data name="GameDetail_Exception_Header" xml:space="preserve">
<value>User-mode exception</value>
</data>
<data name="GameDetail_Exception_Granted_Format" xml:space="preserve">
<value>Hooking may run under a user-mode exception for {0}. The guard still runs every check; a ban remains possible.</value>
</data>
<data name="GameDetail_Exception_Suspended" xml:space="preserve">
<value>An exception is kept for this game, but the option is off in Settings, so it does not apply.</value>
</data>
<data name="GameDetail_Exception_Grant" xml:space="preserve">
<value>Make exception…</value>
</data>
<data name="GameDetail_Exception_Withdraw" xml:space="preserve">
<value>Withdraw exception</value>
</data>
<data name="Settings_Exceptions_Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Settings_Exceptions_Checking" xml:space="preserve">
<value>The capture agent is checking your library; the games that qualify appear here within a minute. Refresh to see them.</value>
</data>
<data name="Tier_HookedException" xml:space="preserve">
<value>Hooked · exception</value>
</data>
<data name="Games_Card_Exception" xml:space="preserve">
<value>Exception</value>
</data>
<data name="Session_UnderException_Format" xml:space="preserve">
<value>Hooked under the user-mode exception for {0}</value>
</data>
</root>
+115 -1
View File
@@ -1903,7 +1903,7 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<value>Ẩn phần hooking ở game có anti-cheat</value>
</data>
<data name="Settings_HideAntiCheatHooking_Body" xml:space="preserve">
<value>Game được phát hiện có anti-cheat sẽ không bao giờ được hook. Bật: trang game chỉ hiện điều đã phát hiện; tắt: hiện thêm công tắc Hooking bị vô hiệu hoá. Dù bật hay tắt, game vẫn được ghi mà không hook.</value>
<value>Game được phát hiện có anti-cheat sẽ không được hook, trừ khi bạn tạo ngoại lệ user-mode cho nó (bên dưới). Bật: trang game chỉ hiện điều đã phát hiện; tắt: hiện thêm công tắc Hooking bị vô hiệu hoá. Dù bật hay tắt, game vẫn được ghi mà không hook.</value>
</data>
<data name="Notice_HookingOff_Title_Format" xml:space="preserve">
<value>{0}: đã tắt hooking</value>
@@ -2340,4 +2340,118 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="Sensors_Axis_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Settings_Exceptions_Label" xml:space="preserve">
<value>Cho phép hooking ở game có anti-cheat user-mode đã từng đo thành công</value>
</data>
<data name="Settings_Exceptions_Body" xml:space="preserve">
<value>Mặc định tắt. Khi bật, game có anti-cheat duy nhất chạy ở user mode — không có kernel driver, không phát hiện gì khác — và đã được đo ở chế độ hook ít nhất hai lần có thể được cấp ngoại lệ bên dưới, từng game một, sau một bản công bố rủi ro. Bộ bảo vệ vẫn chạy mọi bước kiểm tra, và vẫn có thể bị khoá tài khoản.</value>
</data>
<data name="Settings_Exceptions_Header" xml:space="preserve">
<value>Ngoại lệ user-mode</value>
</data>
<data name="Settings_Exceptions_Empty" xml:space="preserve">
<value>Không có game nào trong thư viện đủ điều kiện.</value>
</data>
<data name="Settings_Exceptions_Suspended" xml:space="preserve">
<value>Tuỳ chọn đang tắt: các ngoại lệ bên dưới được giữ lại nhưng không có hiệu lực.</value>
</data>
<data name="Settings_Exceptions_Grant" xml:space="preserve">
<value>Tạo ngoại lệ…</value>
</data>
<data name="Settings_Exceptions_Withdraw" xml:space="preserve">
<value>Rút lại</value>
</data>
<data name="Exception_Finding_Format" xml:space="preserve">
<value>{0} — {1}</value>
</data>
<data name="Exception_Sessions_Format" xml:space="preserve">
<value>{0} phiên hook thành công</value>
</data>
<data name="Exception_State_Granted_Format" xml:space="preserve">
<value>Ngoại lệ có hiệu lực từ {0}</value>
</data>
<data name="Exception_State_Eligible" xml:space="preserve">
<value>Đủ điều kiện — chưa tạo ngoại lệ</value>
</data>
<data name="Exception_State_Checking" xml:space="preserve">
<value>Đang kiểm tra…</value>
</data>
<data name="Exception_State_TooFew_Format" xml:space="preserve">
<value>Chưa đủ điều kiện: {0} phiên hook thành công, cần hai</value>
</data>
<data name="Exception_State_Refused_Format" xml:space="preserve">
<value>Không đủ điều kiện: bộ bảo vệ còn phát hiện {0} ({1})</value>
</data>
<data name="Exception_State_NotUserMode_Format" xml:space="preserve">
<value>Không đủ điều kiện: {0} không chạy hoàn toàn ở user mode (có driver hoặc service), nên FrameLedger không bao giờ cấp ngoại lệ</value>
</data>
<data name="Exception_State_NotAsked" xml:space="preserve">
<value>Không đủ điều kiện: phát hiện này không phải module, tệp hay thư mục của một anti-cheat</value>
</data>
<data name="Exception_State_CouldNotVerify" xml:space="preserve">
<value>Hiện chưa đủ điều kiện: lần kiểm tra không hoàn tất; nó sẽ tự chạy lại</value>
</data>
<data name="Exception_Lapsed_Format" xml:space="preserve">
<value>Ngoại lệ gần nhất đã kết thúc ngày {0}: {1}</value>
</data>
<data name="Exception_Lapse_Withdrawn" xml:space="preserve">
<value>bạn đã rút lại</value>
</data>
<data name="Exception_Lapse_ExecutableChanged" xml:space="preserve">
<value>game đã được cập nhật</value>
</data>
<data name="Exception_Lapse_NoLongerEligible" xml:space="preserve">
<value>game không còn đủ điều kiện</value>
</data>
<data name="Exception_Lapse_NewFinding" xml:space="preserve">
<value>phát hiện anti-cheat mới trong game</value>
</data>
<data name="Exception_Lapse_SafetyUnhook" xml:space="preserve">
<value>một phiên dưới ngoại lệ bị dừng vì an toàn</value>
</data>
<data name="Exception_Lapse_OverlayStopped" xml:space="preserve">
<value>FrameLedger ngừng quan sát vì một anti-cheat khác được nạp</value>
</data>
<data name="Exception_Lapse_SessionCrashed" xml:space="preserve">
<value>một phiên dưới ngoại lệ bị crash</value>
</data>
<data name="Exception_Result_Granted_Format" xml:space="preserve">
<value>Đã tạo ngoại lệ cho {0}. Khi muốn đo, hãy bật hooking cho game trên trang của nó.</value>
</data>
<data name="Exception_Result_Withdrawn_Format" xml:space="preserve">
<value>Đã rút ngoại lệ cho {0}; hooking của nó đã tắt.</value>
</data>
<data name="Exception_Result_Refused_Format" xml:space="preserve">
<value>Không tạo ngoại lệ cho {0}: {1}</value>
</data>
<data name="GameDetail_Exception_Header" xml:space="preserve">
<value>Ngoại lệ user-mode</value>
</data>
<data name="GameDetail_Exception_Granted_Format" xml:space="preserve">
<value>Hooking có thể chạy dưới ngoại lệ user-mode cho {0}. Bộ bảo vệ vẫn chạy mọi bước kiểm tra; vẫn có thể bị khoá tài khoản.</value>
</data>
<data name="GameDetail_Exception_Suspended" xml:space="preserve">
<value>Game này có ngoại lệ được giữ lại, nhưng tuỳ chọn đang tắt trong Cài đặt nên nó không có hiệu lực.</value>
</data>
<data name="GameDetail_Exception_Grant" xml:space="preserve">
<value>Tạo ngoại lệ…</value>
</data>
<data name="GameDetail_Exception_Withdraw" xml:space="preserve">
<value>Rút ngoại lệ</value>
</data>
<data name="Settings_Exceptions_Refresh" xml:space="preserve">
<value>Làm mới</value>
</data>
<data name="Settings_Exceptions_Checking" xml:space="preserve">
<value>Capture agent đang kiểm tra thư viện; các game đủ điều kiện sẽ hiện ở đây trong vòng một phút. Bấm Làm mới để xem.</value>
</data>
<data name="Tier_HookedException" xml:space="preserve">
<value>Hook · ngoại lệ</value>
</data>
<data name="Games_Card_Exception" xml:space="preserve">
<value>Ngoại lệ</value>
</data>
<data name="Session_UnderException_Format" xml:space="preserve">
<value>Được hook dưới ngoại lệ user-mode cho {0}</value>
</data>
</root>
@@ -0,0 +1,53 @@
using System.Globalization;
using CommunityToolkit.Mvvm.ComponentModel;
using FrameLedger.App.Services;
using SafetyStrings = FrameLedger.Shared.Strings;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// D33's disclosure content (<c>19_SAFETY</c> §The user-mode exception): why the exception is offered, the risk at the same
/// grain as FR-2.1's dialog, what is still refused, how it ends, and that it turns nothing on. <see cref="Accepted"/> — the
/// user ticking "I accept the risk of a ban for this game" — is the one thing that enables the dialog's primary button.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime; a cached CompositeFormat would pin the first culture")]
public sealed partial class AntiCheatExceptionDialogViewModel : ObservableObject
{
[ObservableProperty]
private bool _accepted;
public AntiCheatExceptionDialogViewModel(AntiCheatExceptionFacts facts)
{
ArgumentNullException.ThrowIfNull(facts);
Facts = facts;
Title = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Title_Format, facts.GameName);
Intro = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Intro_Format, facts.Family, facts.Signal);
Why = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Why_Format, facts.Family, facts.Sessions);
Risk = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Risk_Format, facts.Family);
Still = string.Format(CultureInfo.CurrentCulture, SafetyStrings.Safety_Exception_Still_Format, facts.Family);
}
public AntiCheatExceptionFacts Facts { get; }
public string Title { get; }
public string Intro { get; }
public string Why { get; }
public string Risk { get; }
public string Still { get; }
public static string Ends => SafetyStrings.Safety_Exception_Ends;
public static string Next => SafetyStrings.Safety_Exception_Next;
public static string Online => SafetyStrings.Safety_Exception_Online;
public static string AcceptText => SafetyStrings.Safety_Exception_Accept;
public static string GrantText => SafetyStrings.Safety_Exception_Grant;
public static string CancelText => SafetyStrings.Safety_Exception_Cancel;
}
@@ -0,0 +1,52 @@
using System.Globalization;
using CommunityToolkit.Mvvm.Input;
using FrameLedger.App.Services;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One row of Settings ▸ Capture's user-mode exception list (D33): the game, what was found, the evidence, the state — and
/// the one action the state allows, making the exception (through its disclosure) or withdrawing it.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed partial class ExceptionGameViewModel
{
private readonly Func<ExceptionGameViewModel, Task> _grant;
private readonly Func<ExceptionGameViewModel, Task> _withdraw;
public ExceptionGameViewModel(long gameId, string name, ExceptionView view, Func<ExceptionGameViewModel, Task> grant, Func<ExceptionGameViewModel, Task> withdraw)
{
ArgumentNullException.ThrowIfNull(view);
GameId = gameId;
Name = name ?? throw new ArgumentNullException(nameof(name));
View = view;
_grant = grant ?? throw new ArgumentNullException(nameof(grant));
_withdraw = withdraw ?? throw new ArgumentNullException(nameof(withdraw));
FindingText = string.Format(CultureInfo.CurrentCulture, Strings.Exception_Finding_Format, view.Family ?? Strings.Common_NotAvailable, view.Signal ?? Strings.Common_NotAvailable);
SessionsText = string.Format(CultureInfo.CurrentCulture, Strings.Exception_Sessions_Format, view.Sessions);
}
public long GameId { get; }
public string Name { get; }
public ExceptionView View { get; }
public string FindingText { get; }
public string SessionsText { get; }
public string StateText => View.Text;
public string? LapseText => View.LapseText;
public bool CanGrant => View.CanGrant;
public bool CanWithdraw => View.CanWithdraw;
[RelayCommand]
private Task GrantAsync() => _grant(this);
[RelayCommand]
private Task WithdrawAsync() => _withdraw(this);
}
@@ -25,7 +25,11 @@ public sealed class GameCardViewModel
// An entry the guard found anti-cheat in says so (beta.8): its hooking is off for good, and "Hooking off" read as
// a switch the user could still flip. Not recorded still comes first — nothing runs for it at all.
AntiCheat = Recorded && card.Row.BlockedByGuard;
// D33: a blocked game with a user-mode exception on its row says so; whether Settings' option lets it apply is the
// game page's to say.
Excepted = AntiCheat && card.Row.AcException.IsGranted;
HookText = !Recorded ? Strings.Games_Card_NotRecorded
: Excepted ? Strings.Games_Card_Exception
: AntiCheat ? Strings.Games_Card_AntiCheat
: HookOn ? Strings.Games_Card_HookOn : Strings.Games_Card_HookOff;
SessionCount = card.Summary?.SessionCount ?? 0;
@@ -63,6 +67,9 @@ public sealed class GameCardViewModel
/// </summary>
public bool AntiCheat { get; }
/// <summary>D33: the anti-cheat game carries a user-mode exception (<c>games.ac_exception_at</c>); the pill says "Exception".</summary>
public bool Excepted { get; }
public string HookText { get; }
public long SessionCount { get; }
@@ -42,10 +42,14 @@ public sealed partial class GameDetailViewModel : ObservableObject
private readonly IHardwareSnapshotRepository _hardware;
private readonly SessionSelection _selection;
private readonly RegisteredSettings? _settings;
private readonly AntiCheatExceptions? _exceptions;
private readonly long? _gameId;
// ui.hide_anticheat_hooking (2026-09-25), read at each load; on until the settings say otherwise, as its default is.
private bool _hideAntiCheatHooking = true;
// hooking.usermode_ac_exceptions (D33, 2026-09-26), read at each load; off until the settings say otherwise.
private bool _exceptionsOn;
private GameDetail? _detail;
[ObservableProperty]
@@ -107,6 +111,32 @@ public sealed partial class GameDetailViewModel : ObservableObject
[ObservableProperty]
private bool _hookingSectionVisible = true;
/// <summary>
/// D33: the user-mode exception's card on a blocked game — shown while the option is on, and for an exception kept while
/// it is off; its state is the Agent's (<see cref="ExceptionView"/>).
/// </summary>
[ObservableProperty]
private bool _exceptionCardVisible;
[ObservableProperty]
private string? _exceptionText;
/// <summary>D33: what an exception in force means, on the page it applies to; null otherwise.</summary>
[ObservableProperty]
private string? _exceptionInForceText;
[ObservableProperty]
private string? _exceptionSuspendedText;
[ObservableProperty]
private string? _exceptionLapseText;
[ObservableProperty]
private bool _canGrantException;
[ObservableProperty]
private bool _canWithdrawException;
/// <summary>
/// Why the switch cannot be turned on when the executable cannot run as x64 (beta.8, <c>exe_machine</c>); null otherwise.
/// A switch that is on for such a game can still be turned off.
@@ -172,8 +202,9 @@ public sealed partial class GameDetailViewModel : ObservableObject
public GameDetailViewModel(GameLibrary library, GameSelection selection, HookingConsent consent, IPageNavigator navigator,
IConfirmations confirmations, IEditGamePrompt edit, IMessageStrip strip, ISessionSummaryOpener summaries,
SessionSeriesLoader loader, IHardwareSnapshotRepository hardware, SessionSelection sessionSelection, IGamePicker picker,
RegisteredSettings? settings = null, IAgentLink? agent = null)
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null)
{
_exceptions = exceptions;
_settings = settings;
_agent = agent;
_picker = picker ?? throw new ArgumentNullException(nameof(picker));
@@ -194,6 +225,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
public static string BackText => Strings.GameDetail_Back;
public static string ExceptionHeader => Strings.GameDetail_Exception_Header;
public static string GrantExceptionText => Strings.GameDetail_Exception_Grant;
public static string WithdrawExceptionText => Strings.GameDetail_Exception_Withdraw;
public static string EditText => Strings.GameDetail_Edit;
public static string RemoveText => Strings.GameDetail_Remove;
@@ -346,6 +383,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
if (_settings is not null)
{
_hideAntiCheatHooking = await _settings.GetBooleanAsync(SettingsRegistry.UiHideAntiCheatHooking, ct).ConfigureAwait(true);
_exceptionsOn = await _settings.GetBooleanAsync(SettingsRegistry.HookingUserModeExceptions, ct).ConfigureAwait(true);
}
Present(detail);
@@ -510,6 +548,13 @@ public sealed partial class GameDetailViewModel : ObservableObject
[RelayCommand]
private Task ToggleRecordingAsync() => RunAsync(ToggleRecordingCoreAsync);
/// <summary>D33: the exception's disclosure, then the request; the Agent gathers the facts and grants or refuses.</summary>
[RelayCommand]
private Task GrantExceptionAsync() => RunAsync(GrantExceptionCoreAsync);
[RelayCommand]
private Task WithdrawExceptionAsync() => RunAsync(WithdrawExceptionCoreAsync);
[RelayCommand]
private Task ReEnableHookingAsync() => RunAsync(EnableAsync);
@@ -671,6 +716,61 @@ public sealed partial class GameDetailViewModel : ObservableObject
_navigator.Navigate<GamesPage>();
}
private async Task GrantExceptionCoreAsync()
{
if (Game is null || ExceptionView.Of(Game) is not { CanGrant: true } view)
{
return;
}
Busy = true;
try
{
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.GrantAsync(Game.Id, new AntiCheatExceptionFacts(Game.Name, view.Family ?? string.Empty, view.Signal ?? string.Empty,
view.Sessions)).ConfigureAwait(true);
Notice(result, Game.Name);
}
finally
{
Busy = false;
}
await LoadAsync().ConfigureAwait(true);
}
private async Task WithdrawExceptionCoreAsync()
{
if (Game is null)
{
return;
}
Busy = true;
try
{
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.WithdrawAsync(Game.Id).ConfigureAwait(true);
Notice(result, Game.Name);
}
finally
{
Busy = false;
}
await LoadAsync().ConfigureAwait(true);
}
/// <summary>D33: an exception's outcome as this page's notice — a success is said, not only shown by the card changing.</summary>
private void Notice(AntiCheatExceptionResult result, string gameName)
{
NoticeText = result.MessageFor(gameName);
NoticeSeverity = result.Succeeded ? InfoBarSeverity.Success : InfoBarSeverity.Warning;
OnPropertyChanged(nameof(NoticeVisible));
}
/// <summary>A refusal, a mismatch or a failure is a persistent notice on the page; a success clears it.</summary>
private void Notice(HookingConsentResult result)
{
@@ -826,7 +926,11 @@ public sealed partial class GameDetailViewModel : ObservableObject
// An executable that cannot run as x64 (beta.8): turning hooking ON could only be refused; a switch that is on
// (enabled before this build read the file) can still be turned off.
bool notX64 = ExecutableArchitecture.IsKnownNotHookable(row.ExeMachine);
HookToggleEnabled = !blocked && !Busy && (row.HookEnabled || !notX64);
// D33: a blocked game whose user-mode exception is in force (the option on, a grant on the row) may be switched on —
// through FR-2.1's dialog as ever, and the Agent's pre-scan names the family; the finding stays on the page.
ExceptionView? exception = ExceptionView.Of(row);
bool exceptionInForce = _exceptionsOn && exception is { Kind: ExceptionViewKind.Granted };
HookToggleEnabled = (!blocked || exceptionInForce) && !Busy && (row.HookEnabled || !notX64);
NotX64Text = notX64 && !blocked
? string.Format(CultureInfo.CurrentCulture, Strings.Hooking_NotX64_Format, Formats.Architecture(row.ExeMachine))
: null;
@@ -838,7 +942,8 @@ public sealed partial class GameDetailViewModel : ObservableObject
// beta.8 (owner request 2026-09-25): for an anti-cheat game the card is a switch that can never be turned on, so
// by default it gives way to the finding alone. The setting off keeps the card, with the finding under it.
HookingSectionVisible = !(blocked && _hideAntiCheatHooking);
HookingSectionVisible = !(blocked && _hideAntiCheatHooking) || exceptionInForce;
PresentException(exception, exceptionInForce);
AntiCheatText = found is not null && !HookingSectionVisible
? string.Format(CultureInfo.CurrentCulture, Strings.GameDetail_AntiCheat_Format, found)
: null;
@@ -850,6 +955,20 @@ public sealed partial class GameDetailViewModel : ObservableObject
UnverifiedText = string.Equals(row.HookPrescanState, "unverified", StringComparison.Ordinal) ? Strings.GameDetail_Hooking_Unverified : null;
}
/// <summary>D33: the exception card — its state from the Agent's columns, and the one action that state allows.</summary>
private void PresentException(ExceptionView? view, bool inForce)
{
ExceptionCardVisible = view is not null && (_exceptionsOn || view.Kind == ExceptionViewKind.Granted);
ExceptionText = view?.Text;
ExceptionLapseText = view?.LapseText;
ExceptionInForceText = inForce && view?.Family is { } family
? string.Format(CultureInfo.CurrentCulture, Strings.GameDetail_Exception_Granted_Format, family)
: null;
ExceptionSuspendedText = view is { Kind: ExceptionViewKind.Granted } && !_exceptionsOn ? Strings.GameDetail_Exception_Suspended : null;
CanGrantException = _exceptionsOn && view is { CanGrant: true } && !Busy;
CanWithdrawException = view is { CanWithdraw: true } && !Busy;
}
private void PresentSessions(GameDetail detail)
{
Sessions.Clear();
@@ -1,3 +1,4 @@
using System.Globalization;
using FrameLedger.App.Services;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.TriState;
@@ -10,6 +11,7 @@ namespace FrameLedger.App.ViewModels;
/// <see cref="FpsPresentation"/> (<c>—</c> for a measured none, <c>N/A</c> for not measured, never blank, never
/// zero — FR-4.9), the lows, resolution · upscaler, the chips resolved with the annotation and the game default.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed class SessionItemViewModel
{
public SessionItemViewModel(SessionRow row, SessionAnnotation? annotation, GameRow game)
@@ -21,8 +23,12 @@ public sealed class SessionItemViewModel
DateText = Formats.Date(row.StartedAt);
DurationText = Formats.Duration(row.DurationSeconds);
IsHooked = row.Tier == CaptureTier.Hooked;
TierText = IsHooked ? Strings.Tier_Hooked : Strings.Tier_NotHooked;
TierTooltip = IsHooked ? Strings.Tier_Hooked_Tooltip : Strings.Tier_NotHooked_Tooltip;
// D33: a hooked session under the game's user-mode exception is marked with it wherever its tier is said.
TierText = !IsHooked ? Strings.Tier_NotHooked : row.AcExceptionFamily is null ? Strings.Tier_Hooked : Strings.Tier_HookedException;
TierTooltip = !IsHooked ? Strings.Tier_NotHooked_Tooltip
: row.AcExceptionFamily is { } family
? Strings.Tier_Hooked_Tooltip + Environment.NewLine + string.Format(CultureInfo.CurrentCulture, Strings.Session_UnderException_Format, family)
: Strings.Tier_Hooked_Tooltip;
NativeText = FpsPresentation.NativeColumn(row);
DisplayedText = FpsPresentation.DisplayedColumn(row);
FgText = FpsPresentation.FactorColumn(row);
@@ -78,6 +78,10 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
[ObservableProperty]
private string _exitLine = string.Empty;
/// <summary>D33: the session was hooked under the game's user-mode exception, and for which anti-cheat; null otherwise.</summary>
[ObservableProperty]
private string? _exceptionLine;
/// <summary>Tier 2's payload (2026-09-22): why this session measured nothing, from the row's notes; empty for a hooked row.</summary>
[ObservableProperty]
private string _tier2Reason = string.Empty;
@@ -321,6 +325,9 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
Tier2Reason = IsHooked ? string.Empty : Formats.Tier2Reason(row.CaptureNotes);
ExitLine = string.Format(CultureInfo.CurrentCulture, Strings.Exit_Line_Format,
Formats.ExitText(row.ExitStatus, Application.Recording.CaptureNotes.Parse(row.CaptureNotes)));
ExceptionLine = row.AcExceptionFamily is { } family
? string.Format(CultureInfo.CurrentCulture, Strings.Session_UnderException_Format, family)
: null;
Readout = FpsPresentation.FromRow(row);
Line = string.Format(CultureInfo.CurrentCulture, Strings.Summary_Line_Format,
IsHooked ? Formats.Api(row.Api) : Strings.Tier_NotHooked, row.PresentMode ?? Strings.Common_NotAvailable,
@@ -39,6 +39,7 @@ public sealed partial class SettingsViewModel : ObservableObject
private readonly IAgentTool _tool;
private readonly WindowClosePolicy _closePolicy;
private readonly IFirstRunFlow _firstRun;
private readonly AntiCheatExceptions? _exceptions;
private bool _loading = true;
[ObservableProperty]
@@ -73,6 +74,18 @@ public sealed partial class SettingsViewModel : ObservableObject
[ObservableProperty]
private bool _hideAntiCheatHooking = true;
/// <summary>
/// <c>hooking.usermode_ac_exceptions</c> (D33, owner decision 2026-09-26): whether a game's user-mode anti-cheat exception
/// may apply at all. Off by default; off suspends every exception below without deleting any.
/// </summary>
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(ExceptionsSuspended))]
private bool _userModeExceptions;
/// <summary>D33: the Agent has not answered about every blocked game yet (the option was just turned on).</summary>
[ObservableProperty]
private bool _exceptionsChecking;
/// <summary><c>ui.fps_decimals</c> (beta.8): every FPS figure with two decimals ("62.40") instead of a whole number.</summary>
[ObservableProperty]
private bool _fpsTwoDecimals;
@@ -120,8 +133,11 @@ public sealed partial class SettingsViewModel : ObservableObject
IMaintenanceState maintenance,
IAgentTool tool,
WindowClosePolicy closePolicy,
IFirstRunFlow firstRun)
IFirstRunFlow firstRun,
AntiCheatExceptions? exceptions = null)
{
// D33: the user-mode exception's requests; a composition without it (a test) answers that the Agent is unavailable.
_exceptions = exceptions;
_firstRun = firstRun ?? throw new ArgumentNullException(nameof(firstRun));
_maintenance = maintenance ?? throw new ArgumentNullException(nameof(maintenance));
_tool = tool ?? throw new ArgumentNullException(nameof(tool));
@@ -182,6 +198,15 @@ public sealed partial class SettingsViewModel : ObservableObject
public ObservableCollection<HookedGameViewModel> HookedGames { get; } = [];
/// <summary>
/// D33: the games the user-mode exception concerns — in force, eligible, or held back only by the session count. The rest
/// of the blocked games say why not on their own pages.
/// </summary>
public ObservableCollection<ExceptionGameViewModel> ExceptionGames { get; } = [];
/// <summary>D33: the option is off and exceptions are kept below that do not apply.</summary>
public bool ExceptionsSuspended => !UserModeExceptions && ExceptionGames.Any(static g => g.CanWithdraw);
public string KillSwitchState => KillSwitch ? Strings.Settings_KillSwitch_On : Strings.Settings_KillSwitch_Off;
/// <summary>12_BUILD: the registration exists only while a hook-enabled game references the Vulkan loader (P4 PR-2) — the button follows the same rule as the Agent's reconciler.</summary>
@@ -234,6 +259,21 @@ public sealed partial class SettingsViewModel : ObservableObject
partial void OnHideAntiCheatHookingChanged(bool value) => Persist(SettingsRegistry.UiHideAntiCheatHooking, value);
/// <summary>D33: the option is one settings row the Agent reads at every session start and command; the list follows it.</summary>
partial void OnUserModeExceptionsChanged(bool value)
{
if (!_loading)
{
Pending = WriteThenRefreshAsync(SettingsRegistry.HookingUserModeExceptions, value ? "1" : "0");
}
}
private async Task WriteThenRefreshAsync(SettingDefinition definition, string value)
{
await WriteAsync(definition, value).ConfigureAwait(true);
await RefreshCoreAsync().ConfigureAwait(true);
}
partial void OnFpsTwoDecimalsChanged(bool value)
{
if (_loading)
@@ -356,6 +396,7 @@ public sealed partial class SettingsViewModel : ObservableObject
BackgroundCapture = await _settings.GetBooleanAsync(SettingsRegistry.CaptureBackground).ConfigureAwait(true);
MinimizeToTray = await _settings.GetBooleanAsync(SettingsRegistry.UiMinimizeToTray).ConfigureAwait(true);
HideAntiCheatHooking = await _settings.GetBooleanAsync(SettingsRegistry.UiHideAntiCheatHooking).ConfigureAwait(true);
UserModeExceptions = await _settings.GetBooleanAsync(SettingsRegistry.HookingUserModeExceptions).ConfigureAwait(true);
FpsTwoDecimals = await _settings.GetBooleanAsync(SettingsRegistry.UiFpsDecimals).ConfigureAwait(true);
OnlineMetadata = await _settings.GetBooleanAsync(SettingsRegistry.PrivacyOnlineMetadata).ConfigureAwait(true);
UpdateChannel = await _settings.GetAsync(SettingsRegistry.UpdateChannel).ConfigureAwait(true);
@@ -381,6 +422,8 @@ public sealed partial class SettingsViewModel : ObservableObject
HookedGames.Add(new HookedGameViewModel(card.Row.Id, card.Row.Name, RevokeAsync, CapabilityFlags.Contains(card.Row.CapabilityFlagsJson, "vulkan")));
}
PresentExceptions(cards);
Shared.Ipc.HelloAck? hello = _agent.Hello;
ElevationText = hello is null ? Strings.Settings_VkLayer_Unknown : hello.Elevated ? Strings.Settings_Agent_Elevated : Strings.Settings_Agent_NotElevated;
MaintenanceSnapshot = await _maintenance.ReadAsync().ConfigureAwait(true);
@@ -410,6 +453,71 @@ public sealed partial class SettingsViewModel : ObservableObject
}
}
/// <summary>D33: the exception list from the Agent's columns — the App reads them and never writes one.</summary>
private void PresentExceptions(IReadOnlyList<GameCard> cards)
{
ExceptionGames.Clear();
bool checking = false;
foreach (GameCard card in cards.Where(static c => c.Row.InLibrary).OrderBy(static c => c.Row.Name, StringComparer.CurrentCultureIgnoreCase))
{
if (ExceptionView.Of(card.Row) is not { } view)
{
continue;
}
checking |= view.Kind == ExceptionViewKind.Checking;
// With the option off only a kept grant is listed (suspended): nothing may be made while it is off.
bool listed = UserModeExceptions
? view.Kind is ExceptionViewKind.Granted or ExceptionViewKind.Eligible or ExceptionViewKind.TooFewSessions
: view.Kind == ExceptionViewKind.Granted;
if (listed)
{
ExceptionGames.Add(new ExceptionGameViewModel(card.Row.Id, card.Row.Name, view, GrantExceptionAsync, WithdrawExceptionAsync));
}
}
ExceptionsChecking = UserModeExceptions && checking;
OnPropertyChanged(nameof(ExceptionsSuspended));
}
/// <summary>D33: the disclosure, then the request; the Agent gathers the facts and grants or refuses.</summary>
private async Task GrantExceptionAsync(ExceptionGameViewModel game)
{
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.GrantAsync(game.GameId, new AntiCheatExceptionFacts(game.Name, game.View.Family ?? string.Empty,
game.View.Signal ?? string.Empty, game.View.Sessions)).ConfigureAwait(true);
await ReportExceptionAsync(game.Name, result).ConfigureAwait(true);
}
private async Task WithdrawExceptionAsync(ExceptionGameViewModel game)
{
AntiCheatExceptionResult result = _exceptions is null
? AntiCheatExceptionResult.Of(AntiCheatExceptionOutcome.AgentUnavailable)
: await _exceptions.WithdrawAsync(game.GameId).ConfigureAwait(true);
await ReportExceptionAsync(game.Name, result).ConfigureAwait(true);
}
private async Task ReportExceptionAsync(string name, AntiCheatExceptionResult result)
{
if (result.MessageFor(name) is { } message)
{
if (result.Succeeded)
{
_strip.Success(name, message);
}
else
{
_strip.Warn(name, message);
}
}
await RefreshCoreAsync().ConfigureAwait(true);
}
[RelayCommand]
private Task RefreshExceptionsAsync() => RefreshAsync();
private async Task RevokeAsync(HookedGameViewModel game)
{
HookingConsentResult result = await _consent.DisableAsync(game.GameId).ConfigureAwait(true);
@@ -38,6 +38,8 @@
<!-- header line + chips -->
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Line}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExitLine}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLine}"
Visibility="{Binding ViewModel.ExceptionLine, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
Visibility="{Binding ViewModel.LibrariesLine, Converter={StaticResource NullToCollapsed}}" />
+39
View File
@@ -41,6 +41,19 @@ public static class Strings
nameof(Safety_Consent_Title_Format),
nameof(Safety_Consent_TypeToConfirm_Format),
nameof(Safety_Consent_VersionMismatch),
nameof(Safety_Exception_Accept),
nameof(Safety_Exception_Cancel),
nameof(Safety_Exception_Ends),
nameof(Safety_Exception_Grant),
nameof(Safety_Exception_Intro_Format),
nameof(Safety_Exception_Next),
nameof(Safety_Exception_Online),
nameof(Safety_Exception_OptionOff),
nameof(Safety_Exception_Risk_Format),
nameof(Safety_Exception_Still_Format),
nameof(Safety_Exception_Title_Format),
nameof(Safety_Exception_VersionMismatch),
nameof(Safety_Exception_Why_Format),
nameof(Safety_HookingTurnedOff),
nameof(Safety_RecordWithoutMeasuring),
nameof(Safety_Refused_CouldNotVerify),
@@ -80,6 +93,32 @@ public static class Strings
public static string Safety_Consent_VersionMismatch => ResourceManager.GetString(nameof(Safety_Consent_VersionMismatch), Culture) ?? nameof(Safety_Consent_VersionMismatch);
public static string Safety_Exception_Accept => ResourceManager.GetString(nameof(Safety_Exception_Accept), Culture) ?? nameof(Safety_Exception_Accept);
public static string Safety_Exception_Cancel => ResourceManager.GetString(nameof(Safety_Exception_Cancel), Culture) ?? nameof(Safety_Exception_Cancel);
public static string Safety_Exception_Ends => ResourceManager.GetString(nameof(Safety_Exception_Ends), Culture) ?? nameof(Safety_Exception_Ends);
public static string Safety_Exception_Grant => ResourceManager.GetString(nameof(Safety_Exception_Grant), Culture) ?? nameof(Safety_Exception_Grant);
public static string Safety_Exception_Intro_Format => ResourceManager.GetString(nameof(Safety_Exception_Intro_Format), Culture) ?? nameof(Safety_Exception_Intro_Format);
public static string Safety_Exception_Next => ResourceManager.GetString(nameof(Safety_Exception_Next), Culture) ?? nameof(Safety_Exception_Next);
public static string Safety_Exception_Online => ResourceManager.GetString(nameof(Safety_Exception_Online), Culture) ?? nameof(Safety_Exception_Online);
public static string Safety_Exception_OptionOff => ResourceManager.GetString(nameof(Safety_Exception_OptionOff), Culture) ?? nameof(Safety_Exception_OptionOff);
public static string Safety_Exception_Risk_Format => ResourceManager.GetString(nameof(Safety_Exception_Risk_Format), Culture) ?? nameof(Safety_Exception_Risk_Format);
public static string Safety_Exception_Still_Format => ResourceManager.GetString(nameof(Safety_Exception_Still_Format), Culture) ?? nameof(Safety_Exception_Still_Format);
public static string Safety_Exception_Title_Format => ResourceManager.GetString(nameof(Safety_Exception_Title_Format), Culture) ?? nameof(Safety_Exception_Title_Format);
public static string Safety_Exception_VersionMismatch => ResourceManager.GetString(nameof(Safety_Exception_VersionMismatch), Culture) ?? nameof(Safety_Exception_VersionMismatch);
public static string Safety_Exception_Why_Format => ResourceManager.GetString(nameof(Safety_Exception_Why_Format), Culture) ?? nameof(Safety_Exception_Why_Format);
public static string Safety_HookingTurnedOff => ResourceManager.GetString(nameof(Safety_HookingTurnedOff), Culture) ?? nameof(Safety_HookingTurnedOff);
public static string Safety_RecordWithoutMeasuring => ResourceManager.GetString(nameof(Safety_RecordWithoutMeasuring), Culture) ?? nameof(Safety_RecordWithoutMeasuring);
+13
View File
@@ -32,4 +32,17 @@
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value><comment>safety: human review required</comment></data>
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running. FrameLedger unhooked and will not inject into this game again until you enable it again.</value><comment>safety: human review required</comment></data>
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder — and FrameLedger has already measured this game hooked, successfully, {1} times.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>The risk is the same as before, and it is yours. {0} is anti-cheat. It may detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later, and FrameLedger cannot know whether it did. Sessions that went well before are no promise about the next one, or about the next update of the anti-cheat.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Under the exception the guard still runs every check, and still refuses a kernel driver in the game's folder, any other anti-cheat, an anti-cheat driver or service on this machine, a scan it cannot finish, and a title it refuses by name. The exception covers {0} and nothing else.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>The exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated. Turning the option off in Settings suspends it. You can withdraw it at any time.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Making the exception does not turn hooking on. You turn hooking on for this game afterwards, through the usual consent dialog.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger is intended for offline and single-player play. Do not use this exception with a game you play online or competitively unless you accept losing that account.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>I accept the risk of a ban for this game</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Grant" xml:space="preserve"><value>Make the exception</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_Cancel" xml:space="preserve"><value>Keep it blocked</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_VersionMismatch" xml:space="preserve"><value>This app and the capture agent carry different versions of this text. Nothing was granted. Restart both, then try again.</value><comment>safety: human review required</comment></data>
<data name="Safety_Exception_OptionOff" xml:space="preserve"><value>The user-mode exception option is off in Settings, so nothing was granted.</value><comment>safety: human review required</comment></data>
</root>
+15
View File
@@ -7,6 +7,8 @@
recommends neither; "limited", "reduced", "degraded" never describe Tier 2; no sentence names what the
user loses by declining. SafetyDisclosure.Version (Safety/SafetyDisclosure.cs) changes when any
Safety_Consent_* string changes meaning, and the Agent refuses to stamp against any other version.
AntiCheatExceptionDisclosure.Version (Safety/AntiCheatExceptionDisclosure.cs) is the same rule for the Safety_Exception_*
family, the user-mode exception's disclosure (D33, 2026-09-26): it states the risk at the same grain and recommends neither.
Strings.Designer.cs is generated by tools/resx-gen.ps1 and committed; tools/resx-audit.ps1 gates it.
-->
<resheader name="resmimetype"><value>text/microsoft-resx</value></resheader>
@@ -35,4 +37,17 @@
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value></data>
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running. FrameLedger unhooked and will not inject into this game again until you enable it again.</value></data>
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection.</value></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>The exception is offered because {0} runs entirely in user mode — no kernel driver, no service and no driver file in the game's folder — and FrameLedger has already measured this game hooked, successfully, {1} times.</value></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>The risk is the same as before, and it is yours. {0} is anti-cheat. It may detect FrameLedger in the game and warn, block or permanently ban your account — possibly days later, and FrameLedger cannot know whether it did. Sessions that went well before are no promise about the next one, or about the next update of the anti-cheat.</value></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Under the exception the guard still runs every check, and still refuses a kernel driver in the game's folder, any other anti-cheat, an anti-cheat driver or service on this machine, a scan it cannot finish, and a title it refuses by name. The exception covers {0} and nothing else.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>The exception ends by itself when something new is found, when a session under it crashes or is stopped for safety, when FrameLedger stops observing because another anti-cheat loaded, or when the game is updated. Turning the option off in Settings suspends it. You can withdraw it at any time.</value></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Making the exception does not turn hooking on. You turn hooking on for this game afterwards, through the usual consent dialog.</value></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger is intended for offline and single-player play. Do not use this exception with a game you play online or competitively unless you accept losing that account.</value></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>I accept the risk of a ban for this game</value></data>
<data name="Safety_Exception_Grant" xml:space="preserve"><value>Make the exception</value></data>
<data name="Safety_Exception_Cancel" xml:space="preserve"><value>Keep it blocked</value></data>
<data name="Safety_Exception_VersionMismatch" xml:space="preserve"><value>This app and the capture agent carry different versions of this text. Nothing was granted. Restart both, then try again.</value></data>
<data name="Safety_Exception_OptionOff" xml:space="preserve"><value>The user-mode exception option is off in Settings, so nothing was granted.</value></data>
</root>
+13
View File
@@ -31,4 +31,17 @@
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking đã được tắt cho game này; trang của game ghi rõ đã phát hiện gì.</value></data>
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Đã dừng thu thập: phát hiện {0} khi game đang chạy. FrameLedger đã gỡ hook và sẽ không inject vào game này nữa cho đến khi bạn bật lại.</value></data>
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>Game đang chạy, nhưng Windows không cho FrameLedger mở tiến trình của nó: tiến trình được driver anti-cheat bảo vệ, hoặc game chạy với quyền quản trị còn FrameLedger thì không. Không có gì được inject và lần chạy này không được đo. FrameLedger sẽ không tìm cách vượt qua cơ chế bảo vệ của sản phẩm khác.</value></data>
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Tạo ngoại lệ user-mode cho {0}?</value></data>
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger đã phát hiện {0} trong game này ({1}) và đã tắt hooking cho nó. Hộp thoại này hỏi bạn có muốn tạo ngoại lệ cho riêng game này không. Nó không khuyến nghị lựa chọn nào.</value></data>
<data name="Safety_Exception_Why_Format" xml:space="preserve"><value>Ngoại lệ được đề xuất vì {0} chạy hoàn toàn ở user mode — không có kernel driver, không có service và không có tệp driver nào trong thư mục game — và FrameLedger đã đo game này ở chế độ hook thành công {1} lần.</value></data>
<data name="Safety_Exception_Risk_Format" xml:space="preserve"><value>Rủi ro vẫn như trước, và bạn là người chịu. {0} là anti-cheat. Nó có thể phát hiện FrameLedger trong game và cảnh báo, chặn hoặc khoá vĩnh viễn tài khoản của bạn — có thể sau nhiều ngày, và FrameLedger không thể biết điều đó có xảy ra hay không. Các phiên đã chạy ổn trước đây không bảo đảm gì cho phiên tiếp theo, hay cho bản cập nhật tiếp theo của anti-cheat.</value></data>
<data name="Safety_Exception_Still_Format" xml:space="preserve"><value>Dưới ngoại lệ, bộ bảo vệ vẫn chạy mọi bước kiểm tra, và vẫn từ chối khi có kernel driver trong thư mục game, bất kỳ anti-cheat nào khác, driver hay service anti-cheat trên máy này, một lần quét không hoàn tất, và các tựa game bị từ chối theo tên. Ngoại lệ chỉ áp dụng cho {0}, không gì khác.</value></data>
<data name="Safety_Exception_Ends" xml:space="preserve"><value>Ngoại lệ tự kết thúc khi phát hiện điều gì mới, khi một phiên dưới ngoại lệ bị crash hoặc bị dừng vì an toàn, khi FrameLedger ngừng quan sát vì một anti-cheat khác được nạp, hoặc khi game được cập nhật. Tắt tuỳ chọn trong Cài đặt sẽ tạm ngưng nó. Bạn có thể rút lại bất cứ lúc nào.</value></data>
<data name="Safety_Exception_Next" xml:space="preserve"><value>Tạo ngoại lệ không bật hooking. Sau đó bạn tự bật hooking cho game này qua hộp thoại đồng ý thông thường.</value></data>
<data name="Safety_Exception_Online" xml:space="preserve"><value>FrameLedger dành cho chơi offline và chơi đơn. Đừng dùng ngoại lệ này với game bạn chơi online hoặc thi đấu, trừ khi bạn chấp nhận mất tài khoản đó.</value></data>
<data name="Safety_Exception_Accept" xml:space="preserve"><value>Tôi chấp nhận rủi ro bị khoá tài khoản cho game này</value></data>
<data name="Safety_Exception_Grant" xml:space="preserve"><value>Tạo ngoại lệ</value></data>
<data name="Safety_Exception_Cancel" xml:space="preserve"><value>Giữ chặn</value></data>
<data name="Safety_Exception_VersionMismatch" xml:space="preserve"><value>Ứng dụng và capture agent đang mang hai phiên bản khác nhau của văn bản này. Không có gì được cấp. Hãy khởi động lại cả hai rồi thử lại.</value></data>
<data name="Safety_Exception_OptionOff" xml:space="preserve"><value>Tuỳ chọn ngoại lệ user-mode đang tắt trong Cài đặt, nên không có gì được cấp.</value></data>
</root>
@@ -0,0 +1,148 @@
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Shared.Ipc;
using FrameLedger.Shared.Safety;
namespace FrameLedger.App.Tests;
/// <summary>
/// D33 (owner decision 2026-09-26) from the App's side: the version handshake gates the disclosure, a declined disclosure
/// sends nothing, an accepted one sends exactly <c>SetAntiCheatException { enabled: true, disclosureVersion: ours }</c>, and the
/// Agent's answers — granted, refused, option off, version mismatch — come back as what they are.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class AntiCheatExceptionsTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
private static readonly AntiCheatExceptionFacts _gf2 = new("GIRLS' FRONTLINE 2: EXILIUM", "NetEase Yidun", "NEP2.dll", 3);
private static HelloAck Hello(string? exceptionDisclosure) =>
new("agent", IpcProtocol.Version, 1, false, "b", false, "l1", false, SafetyDisclosure.Version, exceptionDisclosure);
private sealed class FakeAgent : IAgentRequests
{
public HelloAck? Hello { get; set; }
public bool IsConnected { get; set; } = true;
public List<(string Type, object Payload)> Sent { get; } = [];
public Func<object, IpcEnvelope> Answer { get; set; } = static _ => throw new InvalidOperationException("no answer scripted");
public Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class
{
Sent.Add((type, payload));
return Task.FromResult(Answer(payload));
}
}
private sealed class FakePrompt : IAntiCheatExceptionPrompt
{
public bool Accepts { get; set; }
public List<AntiCheatExceptionFacts> Shown { get; } = [];
public Task<bool> ShowAsync(AntiCheatExceptionFacts facts, CancellationToken ct = default)
{
Shown.Add(facts);
return Task.FromResult(Accepts);
}
}
private static IpcEnvelope Ack<T>(string type, T payload) where T : class => IpcCodec.Decode(IpcCodec.Encode(type, "1", payload));
[Fact]
public async Task AnAgentThatGrantsAgainstOtherTextGetsNoDialogAndNoRequest()
{
var agent = new FakeAgent { Hello = Hello("ac-exception-dialog/0") };
var prompt = new FakePrompt { Accepts = true };
AntiCheatExceptionResult result = await new AntiCheatExceptions(agent, prompt).GrantAsync(56, _gf2, Ct);
result.Outcome.Should().Be(AntiCheatExceptionOutcome.VersionMismatch);
prompt.Shown.Should().BeEmpty();
agent.Sent.Should().BeEmpty();
}
[Fact]
public async Task ADeclinedDisclosureSendsNothing()
{
var agent = new FakeAgent { Hello = Hello(AntiCheatExceptionDisclosure.Version) };
var prompt = new FakePrompt { Accepts = false };
(await new AntiCheatExceptions(agent, prompt).GrantAsync(56, _gf2, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.Declined);
prompt.Shown.Should().Equal(_gf2);
agent.Sent.Should().BeEmpty();
}
[Fact]
public async Task AnAcceptedDisclosureSendsOurVersionAndAGrantIsAGrant()
{
var agent = new FakeAgent
{
Hello = Hello(AntiCheatExceptionDisclosure.Version),
Answer = static _ => Ack(IpcMessageType.AntiCheatExceptionAck, new AntiCheatExceptionAck(56, true, "Written", "NetEase Yidun")),
};
AntiCheatExceptionResult result = await new AntiCheatExceptions(agent, new FakePrompt { Accepts = true }).GrantAsync(56, _gf2, Ct);
result.Outcome.Should().Be(AntiCheatExceptionOutcome.Granted);
agent.Sent.Should().ContainSingle().Which.Should().Be((IpcMessageType.SetAntiCheatException,
(object)new SetAntiCheatExceptionRequest(56, true, AntiCheatExceptionDisclosure.Version)));
}
[Fact]
public async Task TheAgentsRefusalsComeBackAsWhatTheyAre()
{
var agent = new FakeAgent
{
Hello = Hello(AntiCheatExceptionDisclosure.Version),
Answer = static _ => Ack(IpcMessageType.Refused, new RefusedAck(56, "TooFewSessions", "NetEase Yidun", "1")),
};
var exceptions = new AntiCheatExceptions(agent, new FakePrompt { Accepts = true });
AntiCheatExceptionResult few = await exceptions.GrantAsync(56, _gf2, Ct);
few.Outcome.Should().Be(AntiCheatExceptionOutcome.Refused);
few.RefusalText().Should().Contain("1");
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.ExceptionsOff, "off");
(await exceptions.GrantAsync(56, _gf2, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.OptionOff);
agent.Answer = static _ => throw new IpcRequestException(IpcErrorCode.DisclosureVersionMismatch, "restart");
(await exceptions.GrantAsync(56, _gf2, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.VersionMismatch);
}
[Fact]
public async Task AWithdrawalNeedsNoDialog()
{
var agent = new FakeAgent
{
Hello = Hello(AntiCheatExceptionDisclosure.Version),
Answer = static _ => Ack(IpcMessageType.AntiCheatExceptionAck, new AntiCheatExceptionAck(56, false, "Written", "NetEase Yidun")),
};
var prompt = new FakePrompt();
(await new AntiCheatExceptions(agent, prompt).WithdrawAsync(56, Ct)).Outcome.Should().Be(AntiCheatExceptionOutcome.Withdrawn);
prompt.Shown.Should().BeEmpty();
agent.Sent.Should().ContainSingle().Which.Payload.Should().Be(new SetAntiCheatExceptionRequest(56, false, null));
}
[Fact]
public void TheDisclosuresButtonWaitsForTheTick()
{
var viewModel = new AntiCheatExceptionDialogViewModel(_gf2);
viewModel.Accepted.Should().BeFalse("the dialog opens with the risk unaccepted");
viewModel.Intro.Should().Contain("NetEase Yidun").And.Contain("NEP2.dll");
viewModel.Why.Should().Contain("3");
viewModel.Risk.Should().Contain("NetEase Yidun");
viewModel.Accepted = true;
viewModel.Accepted.Should().BeTrue();
}
}
@@ -378,6 +378,121 @@ public sealed class GameDetailViewModelTests
}
}
/// <summary>
/// D33 (owner decision 2026-09-26): with the option on, a blocked game the Agent found eligible offers the exception;
/// one in force brings the Hooking card back with its switch usable, the finding still under it; with the option off
/// the kept exception says it is suspended and the switch is disabled again.
/// </summary>
[Fact]
public async Task AnEligibleGameOffersTheExceptionAndOneInForceMakesTheSwitchUsable()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("GF2");
const string block = "AntiCheatFile|NetEase Yidun|NEP2.dll";
await s.Db.WriteAsync((c, tx, ct) => Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(
"UPDATE games SET hook_enabled = 0, hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_eligible = 1, "
+ "ac_exception_verdict = 'AllowedUnderUserModeException|NetEase Yidun|NEP2.dll', ac_exception_sessions = 3, "
+ "ac_exception_checked_block = @block WHERE id = @id", new { id = game.Id, block }, tx, cancellationToken: ct)), Ct);
var settings = new RegisteredSettings(new MemorySettings());
(GameDetailViewModel off, _, _, _, _) = await BuildAsync(s, game.Id, settings: settings);
off.ExceptionCardVisible.Should().BeFalse("off by default: nothing about exceptions shows");
off.CanGrantException.Should().BeFalse();
await settings.SetAsync(SettingsRegistry.HookingUserModeExceptions, true, Ct);
await off.LoadAsync(Ct);
off.ExceptionCardVisible.Should().BeTrue();
off.ExceptionText.Should().Be(Strings.Exception_State_Eligible);
off.CanGrantException.Should().BeTrue();
off.HookToggleEnabled.Should().BeFalse("eligible is not granted: the block still decides");
await s.Db.WriteAsync((c, tx, ct) => Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(
"UPDATE games SET ac_exception_at = 1000, ac_exception_family = 'NetEase Yidun', ac_exception_disclosure_version = 'ac-exception-dialog/1', "
+ "ac_exception_exe_size_bytes = exe_size_bytes, ac_exception_exe_mtime_ms = exe_mtime_ms WHERE id = @id", new { id = game.Id }, tx, cancellationToken: ct)), Ct);
await off.LoadAsync(Ct);
off.CanWithdrawException.Should().BeTrue();
off.CanGrantException.Should().BeFalse();
off.ExceptionInForceText.Should().Contain("NetEase Yidun");
off.HookingSectionVisible.Should().BeTrue("an exception in force brings the Hooking card back even while such cards are hidden");
off.HookToggleEnabled.Should().BeTrue("hooking is turned on through FR-2.1's dialog, as ever");
off.BlockedText.Should().Contain("NetEase Yidun", "the finding is always on the page (FR-2.2)");
await settings.SetAsync(SettingsRegistry.HookingUserModeExceptions, false, Ct);
await off.LoadAsync(Ct);
off.ExceptionCardVisible.Should().BeTrue("a kept exception is shown, suspended");
off.ExceptionSuspendedText.Should().Be(Strings.GameDetail_Exception_Suspended);
off.HookToggleEnabled.Should().BeFalse();
off.HookingSectionVisible.Should().BeFalse();
new GameCardViewModel(new GameCard(off.Game!, null)).HookText.Should().Be(Strings.Games_Card_Exception);
}
finally
{
Strings.Culture = previous;
}
}
/// <summary>D33: a game the guard would let through but with one hooked session says so; a kernel-level family says why not.</summary>
[Fact]
public async Task WhyAGameIsNotEligibleIsSaidOnItsPage()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow few = await s.GameAsync("Few");
GameRow aniimo = await s.GameAsync("Aniimo");
GameRow eac = await s.GameAsync("Eac");
await s.Db.WriteAsync(async (c, tx, ct) =>
{
const string sql = "UPDATE games SET hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_verdict = @verdict, "
+ "ac_exception_sessions = @sessions, ac_exception_checked_block = @block WHERE id = @id";
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = few.Id,
block = "AntiCheatFile|NetEase Yidun|NEP2.dll",
verdict = "AllowedUnderUserModeException|NetEase Yidun|NEP2.dll",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = aniimo.Id,
block = "AntiCheatFile|NetEase Yidun|NEP2.dll",
verdict = "AntiCheatFile|Kernel driver in the game folder|NEPKernel.sys",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = eac.Id,
block = "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat",
verdict = "AntiCheatDirectory|Easy Anti-Cheat|EasyAntiCheat",
sessions = 4
}, tx, cancellationToken: ct)).ConfigureAwait(false);
return 0;
}, Ct);
var settings = new RegisteredSettings(new MemorySettings());
await settings.SetAsync(SettingsRegistry.HookingUserModeExceptions, true, Ct);
(GameDetailViewModel vm, _, _, _, _) = await BuildAsync(s, few.Id, settings: settings);
vm.ExceptionText.Should().Contain("1").And.Contain("two");
vm.CanGrantException.Should().BeFalse();
(vm, _, _, _, _) = await BuildAsync(s, aniimo.Id, settings: settings);
vm.ExceptionText.Should().Contain("Kernel driver in the game folder").And.Contain("NEPKernel.sys");
(vm, _, _, _, _) = await BuildAsync(s, eac.Id, settings: settings);
vm.ExceptionText.Should().Contain("Easy Anti-Cheat").And.Contain("not user-mode");
}
finally
{
Strings.Culture = previous;
}
}
/// <summary>The library card says "Anti-cheat" for such a game (beta.8) — after "Not recorded", which says more.</summary>
[Fact]
public async Task TheLibraryCardSaysAntiCheatForAGameTheGuardFoundItIn()
@@ -155,6 +155,73 @@ public sealed class SettingsViewModelTests
(await new SqliteSettingsStore(s.Db).GetAsync(SettingsRegistry.HookingKillSwitch.Key, Ct)).Should().BeNull("nothing was written by the load");
}
/// <summary>
/// D33 (owner decision 2026-09-26): the option is one Agent-read settings row, off by default; on, the list names the
/// games the exception concerns — eligible, held back only by the session count, in force — and off, only a kept
/// exception, said to be suspended. The App reads the Agent's columns and writes none.
/// </summary>
[Fact]
public async Task TheExceptionOptionIsOffByDefaultAndItsListFollowsTheAgentsColumns()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow eligible = await s.GameAsync("GF2");
GameRow few = await s.GameAsync("Few");
GameRow kernel = await s.GameAsync("Aniimo");
await s.Db.WriteAsync(async (c, tx, ct) =>
{
const string sql = "UPDATE games SET hook_blocked_reason = @block, hook_prescan_state = 'blocked', ac_exception_eligible = @eligible, "
+ "ac_exception_verdict = @verdict, ac_exception_sessions = @sessions, ac_exception_checked_block = @block WHERE id = @id";
const string yidun = "AntiCheatFile|NetEase Yidun|NEP2.dll";
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = eligible.Id,
block = yidun,
eligible = 1,
verdict = "AllowedUnderUserModeException|NetEase Yidun|NEP2.dll",
sessions = 3
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = few.Id,
block = yidun,
eligible = 0,
verdict = "AllowedUnderUserModeException|NetEase Yidun|NEP2.dll",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
await Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(sql, new
{
id = kernel.Id,
block = yidun,
eligible = 0,
verdict = "AntiCheatFile|Kernel driver in the game folder|NEPKernel.sys",
sessions = 1
}, tx, cancellationToken: ct)).ConfigureAwait(false);
return 0;
}, Ct);
Harness h = await OpenAsync(s);
h.Vm.UserModeExceptions.Should().BeFalse("off by default");
h.Vm.ExceptionGames.Should().BeEmpty("with the option off only a kept exception is listed");
h.Vm.UserModeExceptions = true;
Task pending = h.Vm.Pending;
await pending;
(await h.Settings.GetBooleanAsync(SettingsRegistry.HookingUserModeExceptions, Ct)).Should().BeTrue();
h.Vm.ExceptionGames.Select(static g => g.Name).Should().Equal("Few", "GF2");
h.Vm.ExceptionGames.Single(static g => string.Equals(g.Name, "GF2", StringComparison.Ordinal)).CanGrant.Should().BeTrue();
h.Vm.ExceptionGames.Single(static g => string.Equals(g.Name, "Few", StringComparison.Ordinal)).CanGrant.Should().BeFalse("one session is not the owner's two");
h.Vm.ExceptionsChecking.Should().BeFalse("the Agent answered about every blocked game");
await s.Db.WriteAsync((c, tx, ct) => Dapper.SqlMapper.ExecuteAsync(c, new Dapper.CommandDefinition(
"UPDATE games SET ac_exception_at = 1000, ac_exception_family = 'NetEase Yidun' WHERE id = @id", new { id = eligible.Id }, tx, cancellationToken: ct)), Ct);
h.Vm.UserModeExceptions = false;
pending = h.Vm.Pending;
await pending;
h.Vm.ExceptionGames.Should().ContainSingle().Which.CanWithdraw.Should().BeTrue();
h.Vm.ExceptionsSuspended.Should().BeTrue();
}
[Fact]
public async Task TheKillSwitchIsOneSettingsRowAndTheAgentIsToldWhenItReadsIt()
{