Files
plugins/packages/window-warmup/package.json
T
YangHonghang 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.
2026-11-09 11:50:38 +08:00

70 lines
2.6 KiB
JSON

{
"name": "@magpie-community/page-window-warmup",
"version": "0.1.4",
"description": "窗口预热 Window Warmup:定时消息插件,定时给指定供应商/账号/模型发一条短消息,在额度窗口重置后、每天定时或每隔几小时自动预热保活,提前开启5小时/每周订阅额度(配额)窗口,适用 Codex、Claude、GLM 智谱、ZCode 等。Scheduled keep-alive message to warm up quota / usage / rate limit windows after reset (cron-like).",
"author": "YangHonghang (https://github.com/YangHonghang)",
"type": "module",
"license": "MIT",
"main": "dist/plugin.js",
"files": [
"dist",
"page",
"README.md",
"LICENSE"
],
"engines": {
"magpie": ">=0.1.1340",
"bun": ">=1.4.2"
},
"scripts": {
"build": "bun scripts/build.ts",
"typecheck": "tsc --noEmit",
"test": "bun test"
},
"magpie": {
"page": {
"title": "Window Warmup",
"titles": {
"zh": "窗口预热",
"zh-TW": "窗口預熱",
"ja": "ウィンドウ予熱"
},
"file": "page/index.html",
"service": {
"port": 3492,
"option": "port"
},
"icon": "page/icon.svg"
},
"options": {
"port": 3492
},
"permissions": [],
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODU4NThkIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8cmVjdCB4PSIzIiB5PSIzIiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHJ4PSI0Ii8+CiAgPHBhdGggZD0iTTMgOGgxOCIvPgogIDxjaXJjbGUgY3g9IjYuMiIgY3k9IjUuNSIgcj0iLjkiIGZpbGw9IiM4NTg1OGQiIHN0cm9rZT0ibm9uZSIvPgogIDxjaXJjbGUgY3g9IjkiIGN5PSI1LjUiIHI9Ii45IiBmaWxsPSIjODU4NThkIiBzdHJva2U9Im5vbmUiLz4KICA8cGF0aCBkPSJNOC4zIDE4LjJjLTEuMi0xIDEuMi0xLjYgMC0yLjZzMS4yLTEuNiAwLTIuNiIvPgogIDxwYXRoIGQ9Ik0xMiAxOC4zYy0xLjMtMS4yIDEuMy0yIDAtMy4yczEuMy0yIDAtMy4yIi8+CiAgPHBhdGggZD0iTTE1LjcgMTguMmMtMS4yLTEgMS4yLTEuNiAwLTIuNnMxLjItMS42IDAtMi42Ii8+Cjwvc3ZnPgo="
},
"devDependencies": {
"typescript": "5.9.3",
"@types/bun": "1.4.4"
},
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/window-warmup"
},
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/window-warmup",
"bugs": "https://github.com/magpie-community/plugins/issues",
"keywords": [
"magpie",
"magpie-page",
"magpie-plugin",
"llm",
"window-warmup",
"cron",
"quota",
"warmup",
"keep-alive",
"schedule",
"rate-limit"
]
}