diff --git a/AGENTS.md b/AGENTS.md index 15e3996..1124b4c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,11 +7,16 @@ or the release pipeline. Frost is an Electron tray app (an AWS SSO credentials refresher) for macOS, Windows and Linux. There is no bundler; almost every `src/*.ts` runs in the -main process. Two exceptions: - -- `src/login-overlay.ts` is browser code injected into the login page. It has - its own compile (`tsconfig.overlay.json`); the main `tsconfig.json` excludes - it. +main process. Three exceptions: + +- `src/login-overlay.ts` is browser code injected into the login page (the + WebAuthn toast). It has its own compile (`tsconfig.overlay.json`); the main + `tsconfig.json` excludes it. +- `src/approve-overlay.ts` is the same kind of thing under the same compile — + the driver that clicks the AWS approval steps. Neither may import anything: + an import makes the output a module, which is not injectable as a classic + script, and is why each signal constant is duplicated in its main-process + counterpart rather than shared. - `src/dashboard.html` is copied verbatim by `build:html` and is neither type-checked nor linted. @@ -40,6 +45,13 @@ missing one fails at runtime only. failure *after* the token was renewed keeps the expiry schedule rather than an error retry, which would reopen the login page for an unrelated failure. No electron imports. +- **`src/page-script.ts`** — `loadPageScript()` / `injectIntoEveryFrame()`, + used by both injected scripts. Injection follows sub-frames because + `executeJavaScript` on a `WebContents` reaches the top frame only, and a + sign-in page routinely puts the interesting part in a cross-origin `