Commit Graph
113 Commits
Author SHA1 Message Date
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 v2026.06.23-0016 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 v2026.06.22-0508 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 v2026.06.21-0643 2026-06-21 06:42:05 +08:00
OLmatter 6dd7e969ae Show backend connection status on startup v2026.06.21-0640 2026-06-21 06:39:16 +08:00
OLmatter 469fd205a7 Show opt-in ready state for auto-click v2026.06.21-0629 2026-06-21 06:28:18 +08:00
OLmatter c2bffcf428 Make auto-click subscription opt-in v2026.06.21-0623 2026-06-21 06:22:22 +08:00
OLmatter bb5690292e Merge branch 'pr-25-macos'
# Conflicts:
#	README.md
v2026.06.21-0537
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
Kang 6c39344c60 fix(backend): prevent macOS worker crashes on shutdown 2026-06-20 18:00:06 +08:00
Kang 3186d5b8de feat(macos): add backend setup and launch support 2026-06-20 14:27:31 +08:00
OLmatter 9c1587e459 docs(launcher): warn about Windows long paths v2026.06.19-0121 2026-06-19 01:21:22 +08:00
OLmatter 421c2a7a54 fix(launcher): harden one-click and gui startup v2026.06.19-0025 2026-06-19 00:26:40 +08:00
OLmatter ec5c56b67f Refine README window guidance 2026-06-16 14:29:13 +08:00
IQ-Director 26db4f5870 feat: 添加 safetensors 依赖并支持 .venv_paddle_gpu 虚拟环境 2026-06-16 12:21:21 +08:00
OLmatter 15313a9ab6 Refine rush and captcha timing flow v2026.06.16-0409 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>
v2026.06.15-2345
2026-06-15 23:43:30 +08:00