Commit Graph
23 Commits
Author SHA1 Message Date
OLmatterandClaude Opus 4.7 6f00ad245f revert(userscript): 回退到 v8.19 (e07ec9e)
v8.20 / v8.21 / v8.21.x 在用户本地确认主循环失效
(不会自动购买 / 不会自动关弹窗),回退到 PR #17 之前
的 v8.19 黄金时间延长版,这是用户最后确认正常的版本。

高级模式 / ±20% 抖动 / incognito 提示全部撤销(它们是
引入 CFG undefined 死循环的根源,且不再单独发布)。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 23:43:30 +08:00
OLmatterandClaude Opus 4.7 03dd2f1e0e fix(userscript): v8.21.3 root-cause captcha loop — CFG undefined in captcha IIFE
真正根因:v8.21 在 captcha IIFE 内的 handleCaptchaDirectInPage 直接引用
CFG.CAPTCHA_CLICK_DELAY,但 captcha IIFE 是独立闭包,没有 CFG。
后端响应成功后走到 click loop 就抛 ReferenceError: CFG is not defined,
catch 块重置 captchaSent=false + lastCaptchaText='' → 50ms tick 死循环。

修复:
- captcha IIFE 顶部通过 GM_getValue('glm_coding_config_v5') 读
  CAPTCHA_CLICK_DELAY / RL_RETRY_DELAY(主 IIFE 写到同一 key),
  预计算 _clickDelay / _rlDelay 常量
- catch 块改为 30s 冷却(window.__glmCaptchaCooldownUntil),
  checkCaptchaPrompt 起手检查冷却直接 return,不再重发同一张图

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 23:27:53 +08:00
OLmatterandClaude Opus 4.7 cd64ff6bab fix(userscript): v8.21.2 inline jitter logic, kill captcha-send loop
Root cause: v8.21 added a top-level `function jitterDelay()` helper.
In some Tampermonkey/cache scenarios the helper is undefined inside
the `handleCaptchaDirectInPage` async closure, throwing
`ReferenceError: jitterDelay is not defined`. The catch block then
resets `captchaSent = false` and `lastCaptchaText = ''`, so the
`setInterval(checkCaptchaPrompt, 50)` loop resends the same captcha
to the backend every 50ms ("dead loop sending captcha").

Fix: inline the ±20% jitter math at both call sites
(line 1814 and 1117), drop the helper entirely. Also added
`Number(...) || default` guards so a stale `CFG.CAPTCHA_CLICK_DELAY`
or `CFG.RL_RETRY_DELAY` of NaN/null/undefined falls back to the
DEF value rather than making `setTimeout(NaN)` fire instantly.

Side effect that confirmed the bug: the captcha bg element lost
its layout during the storm, so `rect.width = 0` and
`nx * rect.width = 0`, but `rect.left` was ~-9992 from a stale
frame ref — hence the marker spamming `(-9992, -10029)`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 23:12:47 +08:00
OLmatterandClaude Opus 4.7 66a9ea559e feat(backend): pipeline GUI launcher + 精简启动器
新增 backend/gui.py Tk 监控窗口:
- 拉起 backend.server 子进程并接管 stdout
- 顶部状态栏(启动中/运行中、YOLO/OCR worker 数、监听地址)
- 中间识别列表(最近 20 条 prompt/pred_text/confidence/耗时)
- 底部日志框(stdout 实时滚动,高亮 worker ready / 错误)
- 关闭窗口自动 terminate 后端

后端新增 /recent?limit=20 端口(GUI 拉取最近识别结果),
/health 同步返回 n_yolo / n_ocr / port 字段。

精简根目录启动器(7 → 2):
- 删 start-backend.cmd / start-backend-pipeline.cmd /
      install-env.cmd / 启动后端.cmd / 首次安装环境.cmd
- 留 one-click-start.cmd(首次装环境)
- 留 start-backend-pipeline-gui.cmd(日常启动 + GUI)
- start-backend-pipeline.ps1 → start-backend-pipeline-gui.ps1

打包脚本 build_portable.ps1 / build_release_zips.ps1 同步
更新入口列表和错误提示。

补 .gitignore: official_models/(81M OCR 模型权重,不入库)

补 scripts/tools/evaluate_pipeline_compare.py(PR #10 评估
脚本,cherry-pick 时漏了)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:53:36 +08:00
OLmatterandClaude Opus 4.7 a1397fca40 chore: bump userscript to v8.20 after PR #17 merge
PR #17 was merged as v8.19 (matching the rush mode feature label),
but our v8.19 was already the golden-time extension. Bump to v8.20
to reflect the combined feature set: golden-time 9:30-11:00 + rush
mode + tabEl 1-index fix + findAndClickConfirm payment-button guard.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 20:40:44 +08:00
sunshineandsunshine 1b090e4bf6 feat(userscript): rush mode v8.19 (rebase from author v8.18) (#17)
- Configurable via panel: enable toggle + HH:MM:SS target time
- checkPayDialog: __glmRushConfirmed guard protects first payment dialog
- tick(): rush lock cleared only when dialog is gone (!getPayDialog)
- handleCaptchaDirectInPage: wait for target time, set rush lock on both
  before-target and already-past branches
- RUSH_CFG reads from user config, parseInt fixed (Number.isFinite guard)

- everSucceeded && PS.bizId (2 locations): prevent stale success
  from keeping sold-out dialogs open
- findAndClickConfirm: removed .pay-dialog/.el-dialog selectors
  (prevent accidental payment button clicks by captcha confirm)
- tabEl: [n] -> [n-1] for correct 1-index to 0-index mapping

- @connect localhost + @connect 127.0.0.1
- Version 8.18 -> 8.19
- Both copies synced, SHA256 identical, whitespace clean

Co-authored-by: sunshine <qt22260@gmail.com>
2026-06-15 20:40:12 +08:00
OLmatterandClaude Opus 4.7 e07ec9e181 feat: extend golden time to 11:00 (10:30+ still possible per user feedback)
isGoldenTime() now covers 9:30-11:00 (was 9:30-10:10) so late-morning
restock windows are treated as rush mode: no page refresh, no MAX_RL
cap on 555 retries. Bump userscript to v8.19 and add CHANGELOG entry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 19:33:55 +08:00
OLmatterandClaude Opus 4.7 514d0b330e docs: warn about RPM risk control and default 2 windows
- change openMultipleWindows prompt default from 3 to 2 (max stays 10)
- add prominent RPM warning box in README rush section after GLM upgraded RPM limits
- strengthen language in step 5 and 重要提醒 from "may trigger" to "has caused widespread failure"
- sync root and scripts/userscripts/ copies

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 14:00:42 +08:00
OLmatter 08afc38844 fix: allow localhost direct captcha requests 2026-06-13 23:53:31 +08:00
OLmatter a787a48ee0 feat: add MiniMax token plan referral entry 2026-06-13 19:20:53 +08:00
OLmatter 27629a1839 fix: clean userscript prompt and package cmd launchers 2026-06-13 11:23:40 +08:00
sunshine 095d1947c7 feat(userscript): fetch-first, GM_xmlhttpRequest fallback
4 network functions changed to try fetch() first, fallback to GM_xmlhttpRequest:
- fetchImageDataUrl
- postDirect
- serverRequest
- fetchCaptchaImageDirect

fetch() has no 6-connection limit per domain (unlike GM_xmlhttpRequest),
eliminating the bottleneck when multiple windows/iframes hit localhost:8888.
GM_xmlhttpRequest is kept as fallback for CORS-restricted contexts.

Both userscript copies synced, SHA256 identical, trailing whitespace cleaned.
2026-06-09 23:18:50 +08:00
OLmatter 2f8cc1bf0f Improve rush stability and discount entry 2026-05-29 20:16:22 +08:00
OLmatter d4dd03ed6c Simplify release packaging and direct captcha flow 2026-05-27 20:52:57 +08:00
OLmatter 89a7d5706a Add captcha model development journey 2026-05-26 11:04:30 +08:00
OLmatter b5285097be Improve Chinese search keywords 2026-05-26 09:38:05 +08:00
OLmatter 395e9decc4 Expose userscript at repository root 2026-05-26 08:18:22 +08:00
OLmatter 226441d0a2 Fix payment popup auto close default 2026-05-26 08:07:59 +08:00
OLmatter 79470e33c2 Disable auto closing invalid payment popups by default 2026-05-25 19:33:33 +08:00
OLmatter 89f80342fd Hide explicit invite code from public text 2026-05-25 19:27:09 +08:00
OLmatter d1f651afa6 Credit original Greasy Fork userscript author 2026-05-25 19:09:23 +08:00
OLmatter 036a34d007 Use GLM invite code and remove other platform promos 2026-05-25 19:01:02 +08:00
OLmatter 86f597cfdc Initial open-source release 2026-05-25 18:31:54 +08:00