7b42e404f5f656d7bfb4aa5c7ddbcd1031264a86
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b4916d4143 |
window-warmup tests: put XDG_CONFIG_HOME and XDG_CACHE_HOME back after each file (#996, #1001)
window-warmup's tests no longer leave XDG_CONFIG_HOME and XDG_CACHE_HOME set for every later file of the root `bun test` (#996). What changed (test files only; no runtime code, no version bump, no dist rebuild): - tests/fake-gateway.ts no longer sets the two XDG variables on import. Its `--serve` demo calls the new pinMagpieDirs() first, so the demo still runs with the temporary dirs. - tests/test-env.ts: pinMagpieDirsForTest() records the inherited values, pins both to $TMPDIR/window-warmup-test-magpie-{config,cache}, and returns a restore that puts back each inherited value, or deletes one that wasn't set. - browser, diagnostics, gateway, scheduler and server tests pin at load and restore in afterAll (in a finally after their own cleanup). diagnostics' own override is put back before the file's pin is. - Every test file that imports fake-gateway.ts, or reaches magpieDirs()' defaults through startService/Scheduler, pins its own; magpie-files and store tests pass env explicitly. Run at the reviewed head c13d2844 (its parent is origin/main |
||
|
|
d54df279c0 |
window-warmup 0.1.4: Antigravity windows are warmed right after they reset, the service token survives restarts, and a new task opens at the bottom (YangHonghang, #878)
Antigravity-style idle cards (a resetsAt that rolls with each read, or the old reset + 5h once a window has lapsed) are now read as idle and warmed right after the reset; the service token is kept in the plugin's data folder so an open page survives a host restart; a page whose token is refused reloads once (an ww-reauth=1 marker in its URL stops a reload loop and is removed after the next good request); a new task opens at the bottom of the list. Reviewed at 108d4752539b12e18f52aec7e320cf069b159792, run on macOS (mote, Bun 1.4.2, HOME and TMPDIR in the run's own folder, Playwright 1.62.0): - packages/window-warmup `bun test`: 285 pass, 0 fail, 0 skip (browser.test.ts ran in Chromium and WebKit). - `tsc --noEmit`: exit 0. `bun scripts/check.mjs window-warmup`: registry.json and window-warmup ok. dist matches a fresh build (tests/dist.test.ts). - Broken by hand, each red in scheduler/server/app tests: the 60s gap guard, the revoke branch's `resetRolls = false`, the probe wake-up's minDelay, the per-resetsAt probe cap (probedFor), the alreadyReloaded guard, and reauthURL's marker. - A review-only browser test (not committed): a sandbox="allow-scripts" frame reached through a guide page that location.replace()s to the service, then the token rotated twice. In both engines the frame reloads with ww-reauth=1, the marker is removed by replaceState after the next good request, and the second rotation reloads exactly once more. The first rotation reloaded twice (two in-flight 401s each call location.replace); it settles and does not loop. Not tried: a real Antigravity account (the author ran it 2+ days in Docker), Windows and Linux. |
||
|
|
ba4b7b0545 |
window-warmup 0.1.3: a task's editor opens under its own row, and the footer link no longer restyles the editor's buttons (#752)
renderList used to append the task editor after every row, so opening a task that wasn't the last one, or starting a new task while saved ones were listed, put the editor at the bottom of the list. Now the editor follows the row it opened: under the clicked task, or under the new row at the top. The footer's 反馈问题 button had reused the `.link` class, so its 11.5px faint rule restyled the editor's 立即发送一次 and 重试 buttons. The footer now has its own `.foot-link`. window-warmup goes 0.1.2 -> 0.1.3.
The browser smoke test (Chromium and WebKit) checks three things. Opening the first of two saved tasks puts the editor right under that row and not last in the list. Clicking 新建任务 then puts it right under the new top row, with one editor and not last. 立即发送一次 computes to 12px while the footer computes to 11.5px.
Run at the reviewed head b5787fee (on mote, macOS, Bun 1.4.2, Playwright 1.62.0 Chromium + WebKit):
- package `bun test`: 265 pass, 0 fail, browser smoke included in both engines. The browser file ran again on its own: 6 pass, 0 fail.
- `tsc --noEmit` (typescript 5.9.3, @types/bun 1.4.4): exit 0.
- `bun scripts/build.ts` rebuilds `dist/` byte for byte.
- `bun scripts/check.mjs`: window-warmup passes.
- repo root `HOME=$(mktemp -d) bun test`: 5926 tests, 0 fail. Browser tests skip at the root because bun test doesn't read NODE_PATH.
- merges cleanly onto main
|
||
|
|
0bd00f0c72 |
window-warmup 0.1.2: effort-variant caches keep their public models, and Report a problem carries anonymized diagnostics (YangHonghang, #726)
window-warmup 0.1.2 (@magpie-community/page-window-warmup).
- Candidates are now the model cache, /v1/models and the chosen list together
(deduplicated by full id), so a cache that stores effort variants
(antigravity's gemini-3.8-flash-high/-low/-tiered) no longer leaves an
account with no models; layer 3 still keeps only public ids.
- A "Report a problem" link at the foot of the page: GET /api/diagnostics
(read-only, no model request, works for fatal and read-only instances)
builds an anonymized report (accounts and keys as acct-N / key-N, task and
card names left out, free text scrubbed of emails, key-shaped strings,
Bearer tokens, URL secrets and home user names, saveError included), and a
two-step copy puts an issue link and the report on the clipboard inside
magpie's sandboxed frame.
Reviewed at head bf66c2b7302c66395833bb3e93054a55901d77c1, with main
|
||
|
|
1ab8238ade |
window-warmup 0.1.0: a page that sends a short message after a quota window resets, daily or every few hours (#661)
Adds packages/window-warmup (@magpie-community/page-window-warmup 0.1.0), by YangHonghang: a page plugin whose host part runs a service on 127.0.0.1:3492 and, on a schedule (after a quota window resets, daily at a set time, or every N hours), sends "hi" with max_tokens 16 through magpie's gateway to a provider/account/model the user picks. The registry entry moves from the author's own npm package magpie-window-warmup to this one. The package README opens with the zh/en warning that sends spend real quota and that some vendors (Claude subscriptions especially) may treat scheduled requests as unusual use. Reviewed at 07a0b217adb2a111f839c984cbc955c5bb45b68d: - Outside packages/window-warmup only README.md and registry.json change; no workflow and no other package. - The service binds 127.0.0.1, checks Host (DNS rebinding) and Origin (null or itself), needs a per-process 32-byte token on /api/*, and serves the index with a nonce CSP. - It reaches only MAGPIE_ADDR (default 127.0.0.1:3425). providers.json is read for sha256 key fingerprints only; no spawn, eval or outside hosts. - A window task sends at most once per resetsAt (or once per hour when idle); daily/every tasks catch up only the latest missed point, once. Run on mote (bun 1.4.2): - HOME=$(mktemp -d) bun test at the repo root: 5142 pass, 15 skip, 0 fail. - scripts/check.mjs ok. - packages/window-warmup bun test: 242 pass (dist.test rebuilds dist byte for byte). - browser.test.ts with Playwright 1.62.0: chromium and webkit pass. Bun ignores NODE_PATH, so it needs node_modules/playwright linked and PLAYWRIGHT_BROWSERS_PATH set under a temp HOME; without them it skips. Not tried: a real send through a live magpie gateway, and tsc --noEmit (no typescript on mote). |