100 Commits
Author SHA1 Message Date
OLmatter 4105dad405 Update README with community links and configuration panel 2026-06-28 03:56:41 +08:00
OLmatter ffabb8f4e8 Modify group chat information in README
Updated group chat link and added official group image.
2026-06-28 03:55:54 +08:00
OLmatter 33238d65fe fix: 清理升级v6时漏改的PP-OCRv5残留默认值 (#42)
setup_backend.py 的GPU冒烟测试还用PP-OCRv5_server_rec(升级v6时漏改),
导致GPU环境装完冒烟测试下载v5而非v6_tiny。另外3个worker文件的环境变量
兜底默认值也是v5(虽运行时被backend_config覆盖成v6,但是隐患):

- setup_backend.py:89 GPU冒烟 PP-OCRv5_server_rec → PP-OCRv6_tiny_rec
- captcha_worker.py:70 OCR_ENGINE_NAME兜底 v5_server → v6_tiny
- ppocr_cpu_pool_worker.py:20-21 fast/fallback v5 → v6_tiny/v6_medium
- ppocr_gpu_worker.py:25 MODEL_NAME兜底 v5_server → v6_tiny

现在所有默认值和backend_config.py的配置一致(都是v6)。fix #42
2026-06-27 21:13:01 +08:00
OLmatter 787299b7a6 fix(backend): 预热没预热到OCR - 白图0boxes提前return致首验证码撞JIT丢点
预热本意把yolo+ocr整条链路打热。但白图兜底时YOLO检测0字框就return,
OCR子进程根本没被调用→第一个真验证码仍撞OCR JIT(实测5795ms),
期间客户端等不及、点字没点上(用户报告首图没被点)。

修复:
- captcha_worker.py: YOLO非3boxes时若force_ocr_warmup,强制把图横切3块
  喂OCR跑一次,确保OCR子进程完成JIT预热
- captcha_server.py: 预热调用传force_ocr_warmup=True

实测预热日志现出现 [ppocr-cpu-pool] workers=3 loaded + OCR warmup done,
证明OCR已在预热阶段加载完毕。
2026-06-26 02:05:21 +08:00
OLmatter cf4e594d49 fix(userscript): #40 无效支付页不自动关闭 - 加无金额1.7s兜底 (v23.9)
根因: checkPayDialog 只看接口(busy/sold_out才关),接口success时一律keep,
导致金额为空的无效支付页留着不关——即使开了AUTO_CLOSE_INVALID也没用(该开关
只在verdict=close时生效)。#40用户已开开关仍不关。

修复: 接口非busy/sold_out时读弹窗实际金额:
- 有金额(真支付页)→keep并清计时
- 无金额不立刻关——GLM有时先显示无金额/没抢到、约1s后才弹出真金额订单(#16/#40
  反馈的时序),持续无金额超1.7s宽限期才判无效页close

关键: 不误关真支付页。10个单测覆盖真支付页keep/无金额1s后金额出现keep/
无金额1.7s关/busy直接关/弹窗消失重置计时。

fix #40
2026-06-26 01:42:01 +08:00
OLmatter 1e01fad01e fix(userscript): 误把说明文字当点选目标导致后端 0 boxes (v23.8)
后端日志反复 FAIL: detected 0 boxes, need 3。截图显示"识别:验证码"
——根因是 isPointClickPrompt 兜底分支"3-8汉字即合法"太宽,把验证码容器的
说明文字(aria-label=验证码/安全验证/请点击图中文字/点击进行验证等)当成目标
字传给后端,YOLO 在点选图里找不到这些字 → 0 boxes,每分钟轮询反复刷屏。

修复:
- isPointClickPrompt/findPromptText 加说明性文字黑名单(验证码/安全验证/图形验证/
  请点击/完成验证/进行验证/点击图中/点击进行)
- 收紧 in-page [aria-label] 兜底选择器,限定在腾讯验证码容器内
- 真目标字(山水木/请依次点击)不受影响,11个用例全过
2026-06-26 01:31:07 +08:00
OLmatter 55ea973095 fix(backend): 启动时清空上次调试图 - 重启即放弃旧图
配合运行时滚动清理(保留最近N个)形成两层:
- 启动 purge_debug_dirs_on_startup(): 清空三目录上次的所有图
  (debug_captcha_direct/auto_captured/ppocr_live_crops),保留_warmup.png
- 运行时 prune_dir(): 连挂几天不重启时滚动保留最近N个

实测本地 logs/ppocr_live_crops 已积累1470个文件,启动清理删1631个归零。
重启即放弃上次调试图(留着占盘没用),连挂几天的用户靠滚动兜底。
2026-06-26 01:23:06 +08:00
OLmatter 0213c2ff90 fix(backend): 调试图片无限增长占盘 - 三目录滚动清理
用户反馈长时间挂着抢磁盘被占满。三个调试目录无任何清理:
- dataset/debug_captcha_direct/: 每次 /captcha_direct 都存原图
- dataset/auto_captured/: 截屏图
- logs/ppocr_live_crops/: 每个字裁剪图

现滚动保留最近 N 个(debug 60 / auto_captured 120 / crops 200),
每次写入后清理更老的并打日志。纯调试用途,对识别无影响。
单元测试验证: 按mtime保留最新N个、删老的、杂物不动、二次幂等。
2026-06-26 01:18:15 +08:00
OLmatter 2b7de85397 docs: greasyfork 说明加 v23.7 rush 确定修复公告 + 澄清确定按钮行为 2026-06-26 01:11:56 +08:00
OLmatter 85ec6cf7fc fix(userscript): rush 模式 10:00 到点不点确定 - 熔断焊死修复 (v23.7)
根因: PR#36 验证码熔断(防自激振荡)两个缺陷:
1. captchaSession.stopped 置 true 后无任何重置路径(resetCaptchaSession/
   noteCaptchaSuccess 漏清),10:00 前累积 3 次失败即永久焊死,到点不识别
2. 失败计数跨所有图累计,但自激振荡只在同一张图反复开火时发生

修复:
- noteCaptchaFailure 绑定 bgUrl,换图(腾讯SDK重置/新挑战)即重置 failCount/stopped
- rush 黄金窗口(到点后 holdWindowMs 内)失败只冷却不 hard-stop
- resetCaptchaSession + noteCaptchaSuccess 补齐清 stopped/failCount/failBgUrl

保留 PR#36 对同一张图自激振荡的熔断保护,只消除两个副作用。
15 个单元测试覆盖: 同图熔断/换图重置/rush窗口不焊死/窗口外可恢复。
2026-06-26 01:08:29 +08:00
OLmatter f24104d322 docs: CHANGELOG 补 PR#36 + PR#37 条目 2026-06-26 00:54:21 +08:00
OLmatter c19198b893 fix: map_prompt_to_boxes crash on mismatch - candidate-score fallback instead
When OCR misreads a character (e.g. 钡→部 lookalike) or multi-window requests
cross, prompt chars don't match box chars exactly -> indices_for_prompt raised
RuntimeError -> worker crashed -> captcha failed. Now map_prompt_to_boxes
catches the mismatch and falls back to candidate_scores: each prompt char
picks the box with highest candidate score for that char. Only warns to stderr,
never crashes. Worst case the click order is wrong but the worker stays alive
for the next captcha.
2026-06-24 22:30:25 +08:00
OLmatter 67b23f4883 perf: speed up main-page captcha detection 1200ms -> 200ms
User reported captcha visible but takes very long to reach backend (OCR itself
only 24ms). The main-page captcha IIFE polled every 1200ms, adding up to 1.2s
delay before processing starts. Reduce to 200ms so detection is near-instant.
The iframe IIFE already runs at 50ms; this brings the main-page path in line.
2026-06-24 22:23:03 +08:00
OLmatter 98d5ad09ad fix(gpu): check torch CUDA before setting yolo_device=0, auto-fallback to CPU
paddle GPU available != torch GPU available. User may have GPU paddlepaddle
but CPU-only torch in .venv_paddle_gpu. YOLO/Ultralytics needs torch CUDA,
so device=0 crashes with 'Invalid CUDA device=0 requested, torch.cuda False'.

Now backend_config probes torch.cuda.is_available() separately; if torch has
no CUDA, YOLO silently falls back to CPU (OCR still uses GPU) + prints install
hint. Prevents the hard crash reported by users.
2026-06-24 22:14:38 +08:00
OLmatter f0694ddc37 fix: stop auto-refresh on '抢购人数过多' - manual refresh only to avoid heavier risk control
When all packages show '抢购人数过多,请刷新再试', the script used to
auto-refresh via location.replace - too aggressive, triggers heavier risk
control. Now it stops and tells the user to manually refresh (F5) until they
see the '特惠订阅' button. State set to DONE so the script pauses cleanly;
page reload on manual refresh restarts the scan fresh.
2026-06-24 21:51:36 +08:00
OLmatter 6dd67536d9 docs(faq): add RTX 50 series, GPU troubleshooting, CPU speed FAQ
- RTX 50 (Blackwell) needs CUDA 12.8+ but project uses cu11; use CPU mode
- GPU debugging checklist: paddlepaddle-gpu vs CPU, torch GPU build, driver
- CPU slow? check for old release (v5 server 1189ms vs v6 tiny 110ms)
2026-06-24 21:46:17 +08:00
OLmatter 94886c4ad5 v23.6: recognize '抢购人数过多/刷新再试' as not-buyable (#32); macos tkinter docs (#33)
#32: canBuy/isSoldOut regex was only catching 售罄/补货/暂时; buttons showing
'抢购人数过多,请刷新再试' still passed canBuy -> wasted clicks. Add those +
'请稍后' to the block regex so the script skips and waits instead of clicking
a button that won't go through.

#33: macos-setup.md already had python-tk but framed as optional; Tk is actually
required (one-click-start.command launches a Tk GUI). Reword to make it clear
Tk is required, mention python.org installer bundles tkinter, list the error
messages users see when it's missing.

Also: CRLF fix from earlier, Linux support (PR #34), version bump 23.5 -> 23.6.
2026-06-24 21:20:19 +08:00
OLmatter 0891d18fb6 fix(packaging): force LF for .sh/.command to fix macOS/Linux /bin/bash^M
Root cause (per Dixon): repo had no .gitattributes, so on Windows git checkout
converted shell scripts to CRLF; release zips built on Windows then carried
CRLF -> macOS/Linux users hit /bin/bash^M: bad interpreter.

Fix (two layers):
- Add .gitattributes: *.sh/*.command = eol=lf (force LF on checkout/commit),
  *.ps1/*.cmd = eol=crlf (PS/cmd friendly), JS/py/md = lf, binaries = binary.
- build_release_zips.ps1 / build_portable.ps1: when writing .sh/.command into
  the zip, replace CRLF with LF (defense-in-depth even if autocrlf slipped).
Also normalize scripts/setup_backend_macos.sh (was CRLF in working tree).
Verified: new zips have ALL .sh/.command as LF.
2026-06-24 21:09:07 +08:00
OLmatter 7a5b7a67a4 docs(readme): drop start-backend-pipeline-gui.cmd from file table (not in Win packages)
The file table still listed start-backend-pipeline-gui.cmd but we removed it
from Windows packages to avoid confusion with one-click-start.cmd. Repository
keeps the file for macOS/manual use, but it shouldn't be in the user-facing
file table. Linux entry from PR #34 already present.
2026-06-24 21:00:46 +08:00
OLmatter 2d3440cd4a docs(greasyfork): add 2026-06-23 risk-control advisory to important reminders
Greasy Fork script page description (docs/greasyfork-description.html) is what
users see on the script listing. Add the click-block risk control as the first
item in 重要提醒: blocked -> wait 10s or manually click 特惠订阅, OCR still auto.
One-liner: 订阅入口点不动就手动点特惠订阅,验证码自动打.
2026-06-23 22:28:44 +08:00
OLmatter ee890ff803 docs(userscripts/README): add risk-control advisory + config panel guide
The standalone userscript README had no mention of the 2026-06-23 click-block
risk control or the config panel options. Add:
- Risk control section: blocked click -> wait 10s or manually click 特惠订阅,
  OCR still auto. One-liner: 入口点不动就手动点特惠订阅,验证码自动打.
- Config panel guide: click delay, first-click delay, auto-close, auto-click.
- F8/F9 hotkeys that were missing.
2026-06-23 22:25:23 +08:00
OLmatter 611d66a8dc docs(userscript): mention OCR v6 + risk-control workaround in @description
The @description shows on Greasy Fork/Tampermonkey list and update notices -
first thing users see. Add: (1) PP-OCRv6 in parens, (2) the risk-control
workaround one-liner '订阅入口被风控拦截时手动点特惠订阅即可,验证码自动打'.
2026-06-23 22:23:23 +08:00
OLmatter 7cd1b7be9c docs(readme): add 2026-06-23 click-block risk control advisory
Zhipu upgraded risk control this morning: auto-click subscribe sometimes
blocked/rejected (manual click too), shows block_message. Advisory:
- wait ~10s and retry when blocked
- if auto-click keeps failing, manually click the '特惠订阅' entry
- OCR/captcha solving still fully automatic regardless of how the entry was
  triggered (auto-click and OCR are decoupled)
One-liner: 入口点不动就手动点特惠订阅,验证码自动打。
2026-06-23 22:09:25 +08:00
OLmatter 9de06c1890 v23.5: add configurable first-click delay (random range) before clicking captcha
OCR is now so fast (v6 tens of ms) that the first character click can land
before the captcha DOM finishes rendering/animating -> first click misses.
Previously the inter-click delay only applied between characters; the first
click had zero wait. Add a configurable pre-first-click random delay (default
150-300ms): new CAPTCHA_FIRST_CLICK_DELAY_MIN_MS/MAX_MS config, exposed in the
config panel under '验证码点字延时策略' as '首击前延时', passed through
getCaptchaDirectDelayConfig + normalize, slept at the start of
clickCaptchaDirectCoords. Set to 0 to disable.
2026-06-23 21:30:09 +08:00
OLmatter d0f14e8d29 fix(install): in-process & script.ps1 @args mangled -Target as value, back to & powershell -File
Previous fix (run bootstrap in-process to avoid pipe buffering) broke
parameter binding: '& script.ps1 @argsList' splatting treated '-Target'
as the value of a positional param, not the param name -> ValidateSet
rejected it. Revert to external '& powershell -File bootstrap.ps1 @argsList'
(param binding reliable), drop the | Tee pipe (was the buffer root cause),
let child stdout inherit console directly for real-time pip progress.
2026-06-23 05:54:56 +08:00
OLmatter 9d32baf263 fix(release): drop start-backend-pipeline-gui.cmd/.ps1 from Windows packages
Windows users seeing two .cmd files (one-click-start.cmd and
start-backend-pipeline-gui.cmd) get confused which to click. pipeline-gui
runs the optional backend/ FastAPI pipeline, not the main path. Remove its
.cmd/.ps1 from both portable and online package Include lists; keep the
.command for macOS. one-click-start.cmd is now the only Windows entry.
2026-06-23 05:49:01 +08:00
OLmatter 750adeffda docs(readme): fix '启动后端' section - one-click-start.cmd is the main entry, not pipeline-gui
The quick-start step 4 and the rush steps both told users to double-click
start-backend-pipeline-gui.cmd, but that runs the optional backend/ FastAPI
pipeline, not what one-click-start runs (captcha_server.py). Windows users
should double-click one-click-start.cmd for both first-time install and daily
launch. pipeline-gui.cmd now only mentioned as optional alternative.
2026-06-23 05:45:44 +08:00
OLmatter 520bd7f7b3 docs(readme): rewrite backend section to reflect actual one-click-start path
The '验证码识别说明' section described backend/ FastAPI pipeline as the main
backend and recommended start-backend-pipeline-gui.cmd, but one-click-start
actually runs scripts/tools/captcha_server.py (different Tk GUI, different
model display). Rewrote to:
- Describe captcha_server.py as the main backend one-click-start runs
- Document the Tk GUI fields (status/model/prompt/result/log with timing)
- Clarify backend/ is an optional alternative pipeline, not the default
- Update file table: one-click-start.cmd is the main entry, mention
  captcha_server.py explicitly
- Mention v6 tiny+medium and the config/env override for ocr_model
2026-06-23 05:40:49 +08:00
OLmatter 72adabf070 fix(install): show pip progress in real-time during install
The & powershell -File | Tee-Object pipeline buffered bootstrap output, so
during the ~1min pip install users saw nothing between 'Installing cpu
environment...' and 'Starting backend on 8888' - looked frozen. Run bootstrap
in-process (no child powershell, no pipe) so pip progress streams to console;
use Start-Transcript for the log file instead of Tee pipe (no buffering).
2026-06-23 05:36:52 +08:00
OLmatter 420c362add docs(readme): update benchmarks to PP-OCRv6, add v6 tiny/medium data
- Small hidden set: add row 10 PP-OCRv6 tiny + constrained (~30ms/img)
- Stress test 379: add PP-OCRv6 tiny row (100%, ~110ms/img, ~11x faster than
  v5 server), keep v5 server as comparison, note test conditions
- Strict click radius table: add v6 tiny column (100% at all radii)
- Update conclusion: v6 tiny now best on accuracy/speed/stability
- Update model journey line to mention v6
2026-06-23 05:29:38 +08:00
OLmatter 5023168f46 fix(pause): F8 resume after manual popup close was stuck waiting 30s
Repro: auto-mode -> F8 pause -> manually close invalid popup -> F8 resume
-> stuck in WAITING for full timeout. Root cause: tick returns immediately
while paused, so taskClickTime stays frozen at the pre-pause click; on resume
elapsed includes pause duration. Worse, the manually-closed popup is gone,
so findRLModal/isPayDialog return null and WAITING has no branch to detect
'the popup I was waiting for is gone' -> falls through to the timeout tail.

Fix in setRuntimePaused(resume): if currently WAITING, reset taskClickTime to
now (re-count elapsed from resume); if no popup present anymore (closed during
pause), drop straight to IDLE to retry instead of waiting out the timeout.
Explains why not-closing-the-popup was fine (popup still detectable on resume).
2026-06-23 05:11:36 +08:00
OLmatter cfa8306c62 v23.4: cap WAITING timeout at 10s, remove unreliable captcha-state checks
The 30s wait (rare but should never happen) came from layered captcha-state
guessing (captchaSeen/GM counter/PS.inProgress branches) that misjudged some
edge cases as 'captcha in progress, wait patiently'. Strip all of it: after
click, just wait for a result (preview response / dialog), hard cap 10s. Normal
recognition (even on slow CPU) finishes in 5-8s; over 10s = stuck = retry.
2026-06-23 05:07:19 +08:00
OLmatter 4810ce289b fix(gui): /captcha_direct path still used old [direct] print without timing
The [direct] 识别成功 log line (captcha_server.py line 492) was the one users
actually saw - it had no timing. My earlier [captcha] print landed on the
[CAPTURE] path (auto-capture), a DIFFERENT code path. Replace the [direct]
success/fail logs with the same [captcha] summary including end-to-end + yolo
+ ocr timing. Now both paths print timing consistently.
2026-06-23 04:41:37 +08:00
OLmatter 9af3e1e5a8 fix(gui): print recognition summary with timing in captcha_server CAPTURE path
The [CAPTURE] got result line truncated JSON at 200 chars, cutting off
elapsed_ms - user saw no timing. Replace with a concise [captcha] summary:
  [captcha] 城匙称 -> 称匙城 | conf=1.00 end-to-end=312ms (worker total=285ms yolo=120ms ocr=165ms) | engine=yolo+hybrid_cpu_parallel
This is the code path one-click-start actually runs (scripts/tools/), not
backend/server.py where I added a similar line earlier.
2026-06-23 04:22:33 +08:00
OLmatter 0771cfa86b feat(gui): show active OCR model in captcha_server GUI
Add a '识别模型' row below status showing the resolved model: for hybrid mode
'hybrid | 主 PP-OCRv6_tiny_rec → 兜底 PP-OCRv6_medium_rec', for GPU the gpu
model, otherwise the cpu model. Updated every tick so it reflects config even
if resolved after GUI start.
2026-06-23 04:10:48 +08:00
OLmatter 0a108e9523 fix(ocr): v6 default was only in backend/ - one-click actually runs scripts/tools/
User log showed PP-OCRv5_mobile_rec still loading despite v6 'upgrade'. Root
cause: one-click-start -> start_backend.ps1 -> scripts/tools/start_backend.py
-> captcha_server.py (the EARLY pipeline), NOT backend/server.py (PR#10). The
v6 default I set in backend/ was never reached.

Set v6 defaults in the code path users actually run:
- backend_config.py: cpu_fast_model v5_mobile -> v6_tiny, cpu_fallback_model
  v5_server -> v6_medium, gpu_model v5_server -> v6_tiny (hybrid fast path).
- ppocr_cpu_pool_worker.py: MODEL_NAME v5_server -> v6_tiny (non-hybrid path).
- backend_config.py line 134 gpu probe default also v6_tiny.
2026-06-23 04:08:50 +08:00
OLmatter 35ef7f87b3 fix(gui): print recognition summary (prompt/pred/conf/timing) to stdout
The pipeline refactor dropped the per-recognition log line, so the GUI log
box (which tails backend stdout) showed nothing useful - no prompt, no result,
no timing. Add a concise [captcha] line after each result is assembled:
  [captcha] 畅倍标 -> 畅倍标 | conf=0.99 total=162ms yolo=103ms ocr=59ms | req=1
Also bump _http_get_json timeout 1s -> 3s for safety under load.
2026-06-23 04:06:18 +08:00
OLmatter 9579981d22 feat(install): auto-select PyPI mirror with multi-source fallback
Instead of hardcoding a single mirror (if it's down, install fails), probe a
list of mirrors at install time and pick the first reachable one:
1. Tsinghua  2. Aliyun  3. USTC  4. Tencent  5. pypi.org (official fallback)
HEAD probe with 3s timeout per mirror (~seconds total). Users can still override
via -PipArg. Verified: probe correctly selects Tsinghua when reachable.
2026-06-23 03:50:05 +08:00
OLmatter 866d502cfd fix(install): PowerShell ate -i as param name -> pass pip args as ;-joined string
Real root cause of 100% failure (finally visible via tee log):
'bootstrap_windows.ps1 : Missing an argument for parameter PipArg'
one_click_start Invoke-Bootstrap passed '-PipArg -i -PipArg https://...'
but PowerShell splatting treats the dash-prefixed '-i' as the NEXT parameter
name, not the PipArg value -> bootstrap aborts before pip even runs.

Same class of bug as the argparse one, one layer up. Fix:
- Invoke-Bootstrap: join PipArg into a single ;-delimited string, pass one
  -PipArg value (no dash ambiguity at the PS param layer).
- bootstrap_windows.ps1: PipArg is now [string]; split on ';' to recover the
  array, then emit '--pip-arg=VALUE' to setup_backend as before.
- Verified: bootstrap_windows.ps1 -PipArg '-i;https://...' runs cleanly,
  setup_backend receives --pip-arg=-i --pip-arg=https://... correctly.
2026-06-23 03:38:36 +08:00
OLmatter 6c79d672db diag(install): tee bootstrap output to logs/backend-install.log for diagnosis
Users hitting [FAIL] with no visible pip error - the nested powershell +
setup_backend errors were getting buried. Tee the full bootstrap output to
logs/backend-install.log and tell the user to share that file when reporting.
2026-06-23 03:28:55 +08:00
OLmatter f40eb564ee fix(install): mirror never reached pip - argparse ate -i as a flag
Root cause of 100% install failure: setup_backend.py --pip-arg used action=append,
so '--pip-arg -i' made argparse treat '-i' (a dash-prefixed value) as the next
option and abort with 'error: argument --pip-arg: expected one argument'.
The mirror set by one_click_start.ps1 never reached pip -> mainland users hit
PyPI timeout -> 'Backend environment repair failed'.

Fix:
- bootstrap_windows.ps1: emit '--pip-arg=VALUE' (= form) so dash-prefixed values
  like -i / --index-url are not misparsed as options.
- setup_backend.py: also pass mirror to the 'pip install --upgrade pip setuptools
  wheel' step (line 137 previously had none, would time out before requirements).
- Verified end-to-end: fresh venv, full CPU install via Tsinghua mirror,
  paddleocr-3.7.0 + paddlepaddle-3.3.1 installed, smoke test passed.
2026-06-23 03:21:50 +08:00
OLmatter 299779bf24 docs: changelog entries for BOM/mirror/portable-zip fixes 2026-06-23 03:08:36 +08:00
OLmatter d06c69f132 fix(ps1): add UTF-8 BOM to all .ps1 to fix PS 5.1 ParserError on CN Windows
PS 5.1 on Chinese Windows reads non-BOM files as the system ANSI codepage
(GBK), so UTF-8 Chinese bytes corrupt parsing and surface as
'Missing expression after comma' at param blocks. Adding EF BB BF BOM forces
PS 5.1 to interpret as UTF-8. Affects one_click_start.ps1 (the .cmd entry),
bootstrap_windows.ps1, start_backend.ps1, setup_backend.ps1,
start-backend-pipeline-gui.ps1, and the release scripts.
2026-06-23 03:07:52 +08:00
OLmatter 7176d7376c fix(install): default pip to Tsinghua mirror to avoid PyPI timeout in CN
Users in mainland China hitting ReadTimeoutError / RemoteDisconnected when
one-click-start.cmd installs backend deps from files.pythonhosted.org.
one_click_start.ps1 -PipArg now defaults to -i https://pypi.tuna.tsinghua.edu.cn/simple;
users can override by passing -PipArg explicitly. Chain already supports it:
one_click_start.ps1 -> bootstrap_windows.ps1 -> setup_backend.py --pip-arg.
2026-06-23 03:00:53 +08:00
OLmatter b9239895e1 fix(release): use python zipfile instead of broken tar -a; include gpu requirements in portable
- build_release_zips.ps1 / build_portable.ps1: Windows bsdtar -a misidentifies
  .zip extension and produces corrupt archives; Compress-Archive fails on long/
  non-ASCII paths. Fall back to python zipfile (no MAX_PATH limit, standard zip).
- build_portable.ps1: add requirements-backend-gpu.txt to Include list. The
  one_click_start.ps1 Assert-RequiredFiles check requires BOTH requirements
  files in every package; portable-cpu was missing gpu one, causing
  '[FAIL] Release package is incomplete' on first run.
2026-06-23 02:48:14 +08:00
OLmatter 8160b7664a requirements(gpu): bump paddleocr/paddlex to >=3.7.0 for PP-OCRv6 support 2026-06-23 00:12:46 +08:00
OLmatter 905b6e6651 v23.3: upgrade OCR to PP-OCRv6_tiny + fix click-no-captcha 15s wait
Backend:
- Default OCR model PP-OCRv5_server_rec -> PP-OCRv6_tiny_rec (~14x faster,
  83ms/img vs 1189ms on 379 real captchas, accuracy still 100%)
- Configurable via config.json ocr_model or env CNCAPTCHA_CPU_OCR_MODEL/GLM_OCR_MODEL
- GUI OCR model choices updated to v6 (tiny/medium) + v5 server fallback
- worker.py: split 3 crops into independent OCR tasks for parallel recognition
- ppocr_worker.py: batch forward (predict_batch_*) + single-crop path
- server.py: partial results aggregation + OCR_MODEL env passthrough
- requirements: paddleocr>=3.7.0 / paddlex>=3.7.0 (v6 requires)

Userscript v23.3:
- Fix: auto-click subscribe then wait 15s when click didn't trigger captcha.
  Synthetic click sometimes gets swallowed by Zhipu frontend (button DOM ready
  but component state machine not ready), no captcha pops up, main loop stuck in
  WAITING until MODAL_WAIT=15000 timeout.
- Fix: use 'iframe got new prompt+bg image' as the signal. iframe increments GM
  counter glm_captcha_seen_seq each time it sees a new captcha (prompt or bg
  changed); main loop records baseline at click time, compares in WAITING -
  counter increased = captcha popped, wait patiently; no increase after 1.5s =
  click didn't trigger captcha, immediately retry subscribe. Counter is
  monotonic, no residue, no timestamp race.
2026-06-23 00:07:51 +08:00
OLmatter 16a7194197 Handle captcha image changes 2026-06-22 04:30:38 +08:00
OLmatter 9f44060541 Shorten auto-click rationale 2026-06-21 06:53:12 +08:00
OLmatter 83b28a959b Explain opt-in auto-click rationale in README 2026-06-21 06:52:10 +08:00
OLmatter 8d3125972e Fix ready state payment alarm 2026-06-21 06:42:05 +08:00
OLmatter 6dd7e969ae Show backend connection status on startup 2026-06-21 06:39:16 +08:00
OLmatter 469fd205a7 Show opt-in ready state for auto-click 2026-06-21 06:28:18 +08:00
OLmatter c2bffcf428 Make auto-click subscription opt-in 2026-06-21 06:22:22 +08:00
OLmatter bb5690292e Merge branch 'pr-25-macos'
# Conflicts:
#	README.md
2026-06-21 05:29:55 +08:00
OLmatter e5a1990cb4 Make hotkeys configurable 2026-06-21 05:19:31 +08:00
OLmatter df42a5b170 Add rush control hotkeys 2026-06-21 05:16:28 +08:00
OLmatter c4410fec71 Make rush release conservative 2026-06-21 05:07:48 +08:00
OLmatter 2d0834e4ae Tune rush release timing 2026-06-21 03:48:35 +08:00
OLmatter 7e228a6889 Fix rush mode early request guard 2026-06-21 03:20:21 +08:00
OLmatter 0c0ff27be2 Fix portable venv rebuild 2026-06-21 02:58:56 +08:00
OLmatter 9c1587e459 docs(launcher): warn about Windows long paths 2026-06-19 01:21:22 +08:00
OLmatter 421c2a7a54 fix(launcher): harden one-click and gui startup 2026-06-19 00:26:40 +08:00
OLmatter ec5c56b67f Refine README window guidance 2026-06-16 14:29:13 +08:00
OLmatter 15313a9ab6 Refine rush and captcha timing flow 2026-06-16 04:08:15 +08:00
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 9410388eff feat(userscript): v8.21 高级模式 + 经典模式自带 ±20% 抖动
高级模式(默认关闭)开启后露出两个数字输入框:
- 验证码点击间隔(默认 220ms)
- 限流重试间隔(默认 1000ms)

经典模式(v8.20 行为)也自动加 ±20% 随机抖动,防止
RPM 风控识别。jitterDelay() helper 统一处理。

v8.21.1:黄金时间(9:30-11:00)首次进入时弹紫色条提示
用户试试无痕窗口(Ctrl+Shift+N),消除隐形风控标记。
sessionStorage 去重,当天只弹一次。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:12:08 +08:00
OLmatterandClaude Opus 4.7 bdfbf4f1d4 docs: changelog entry for PR #11 BOM fix
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:16:05 +08:00
OLmatterandClaude Opus 4.7 a5394f32d1 fix: add UTF-8 BOM to start-backend-pipeline.ps1
Windows PowerShell 5.1 (the default on most Windows installs) reads
.ps1 files using the system ANSI codepage (GBK on Chinese Windows)
when no BOM is present. UTF-8 Chinese strings like [信息] are then
parsed as invalid characters, causing ParserError at startup.

Symptoms (before fix):
  表达式中缺少字串  (missing string terminator)
  表达式中包含意外的标记 'else'

Adding the EF BB BF BOM tells PowerShell 5.1 to interpret the file
as UTF-8, fixing the parser errors. PowerShell 7+ (pwsh) doesn't
need this, but 5.1 does.

Verified end-to-end: backend starts, /health returns 200 OK,
4 workers (1 YOLO + 3 OCR on 6-core) all ready.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:15:37 +08:00
OLmatterandClaude Opus 4.7 9d6cf6b61d docs: document PR #11 start-backend-pipeline.cmd launcher
Update the pipeline backend section and 常用文件 table to surface
the new double-click launcher, alongside the existing
python backend/server.py invocation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:06:53 +08:00
OLmatterandClaude Opus 4.7 8fb3299a95 docs: changelog entry for PR #11 pipeline launcher
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 21:04:23 +08:00
OLmatterandClaude Opus 4.7 bc7f8d7ff8 docs: changelog entry for PR #10 pipeline backend
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 20:58:35 +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
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 97e2847f87 Add discussion group link to README
Added a link to the discussion group in the README.
2026-06-14 11:08:05 +08:00
OLmatter 08afc38844 fix: allow localhost direct captcha requests 2026-06-13 23:53:31 +08:00
OLmatter 4e5474405c fix: fallback from broken GPU OCR in auto mode 2026-06-13 19:33:37 +08:00
OLmatter a787a48ee0 feat: add MiniMax token plan referral entry 2026-06-13 19:20:53 +08:00
OLmatter 61b8a91cbe docs: warn about excessive concurrency risk 2026-06-13 13:06:54 +08:00
OLmatter 3bed2c842d fix: harden portable packaging and public docs 2026-06-13 11:30:49 +08:00
OLmatter 27629a1839 fix: clean userscript prompt and package cmd launchers 2026-06-13 11:23:40 +08:00
OLmatter 152eeb5eca fix: avoid false backend env repair on Windows 2026-06-12 22:32:22 +08:00
OLmatter f14b4717f4 fix: keep backend python aligned with selected mode 2026-06-11 21:30:39 +08:00
OLmatter 70d2b65a70 docs: record backend environment repair release 2026-06-06 20:07:32 +08:00
OLmatter db275068bf fix: repair incomplete backend environment on start 2026-06-06 17:40:45 +08:00
OLmatter 2f8cc1bf0f Improve rush stability and discount entry 2026-05-29 20:16:22 +08:00
OLmatter ed291db4a5 docs: add OCR comparison appendix 2026-05-28 06:30:56 +08:00
OLmatter a034c2d6c7 Restore userscript install options in README 2026-05-27 21:06:46 +08:00
OLmatter 614cfab2cf Update README for release package workflow 2026-05-27 21:02:39 +08:00
OLmatter d4dd03ed6c Simplify release packaging and direct captcha flow 2026-05-27 20:52:57 +08:00
OLmatter 83e3c12afc fix: detect left aligned captcha modal 2026-05-27 13:27:40 +08:00
OLmatter ac4b7175df Revise README for clarity and include discount link
Updated README.md to improve clarity and add discount link.
2026-05-27 12:01:34 +08:00
OLmatter 7644c062a5 docs: clarify GPU torch setup and captcha QA 2026-05-27 11:52:23 +08:00
OLmatter e8ec05387e Keep config endpoint backward compatible 2026-05-26 22:44:54 +08:00
OLmatter 2015102f0f Update README to streamline captcha model documentation
Removed outdated captcha model journey documentation and added a reference to it later in the README.
2026-05-26 22:39:00 +08:00
OLmatter 42b2702c79 Revise README for clarity and browser compatibility
Updated project description and installation instructions for clarity.
2026-05-26 22:37:50 +08:00