chore: auto release commit (2026-09-15 01:30:18)
Some checks failed
技能自动化发布 / release (push) Failing after 4s

This commit is contained in:
2026-09-15 01:30:18 +08:00
parent ebea77b5f2
commit d3fee3f46c
4 changed files with 51 additions and 8 deletions

View File

@@ -2,6 +2,15 @@
本文件对应技能市场 **「更新日志」** Tab。
## 1.1.28
- **彻底修复「SPA 二级登录页卡顿」**:
- v1.1.27 失败根因:URL 已稳定在 `/login` 时,React SPA input 可能还没渲染(hydrate 慢),`_fill_demo_on_spa_login` 找不到 input → False → 卡 180 秒等用户输入
- 修复:步骤 4.5 先 `wait_for_selector(input, timeout=10s, state="attached")` 等 input 真正 hydrate + 0.5s React 稳定,再 fill demo/123456 + 点登录
- demo fill 后如果 URL 仍卡在 login 页(demo 失效)→ headed 模式 fallback 等用户手工登录,headless 模式抛 `LoginTimeoutError`
- 不再依赖「input 是否预填」—— sandbox SPA 二级登录页 input 默认不预填,必须强制覆盖 fill
- 合计 66/66
## 1.1.27
- **修复「到 SPA 二级登录页卡 30 秒」问题**:

View File

@@ -1,7 +1,7 @@
---
name: 合同到期智能预警与续聘辅助
description: "当用户说要扫描即将到期的合同、查 90/60/30 天预警名单、给某位教师生成续聘任务书、下发单位版续聘清单、从 SmartCampus HR 平台抓合同数据、解析续聘材料 PDF/Word、查看本月合同到期人员清单时,加载本技能。支持定时扫描(每日凌晨)+ 数据管理 + Agent 三入口,覆盖合同到期智能预警与续聘辅助全流程。"
version: 1.1.27
version: 1.1.28
author: 深圳匠厂科技有限公司
metadata:
openclaw:

View File

@@ -830,25 +830,59 @@ def collect_all(
page.url,
)
# 4.5. v1.1.24/27:URL 落在 SPA 二级登录页 → 自动填 demo/123456 再登录
# sandbox SPA 登录页 input 默认**不预填**(与根域不同),
# 所以 _try_auto_sign_in 不会自动点 —— 必须显式 fill demo/123456。
# 4.5. v1.1.28:URL 落在 SPA 二级登录页 → 主动等 input hydrate(最多 10 秒)
# → 主动 fill demo/123456(sandbox SPA 默认 mock)→ 点登录 → 等 URL 跳离
# v1.1.27 失败的根因:URL 已稳定在 /login 时,React SPA input 可能还没渲染,
# _fill_demo_on_spa_login 找不到 input → False → 卡 180 秒等用户输入。
# 修复:先等 input 真正 hydrate 出来,再 fill+click。
cur_url_after_stable = page.url.lower()
if "/login" in cur_url_after_stable or "/signin" in cur_url_after_stable:
logger.warning(
"platform_collector: 登录后落在 SPA 二级登录页(%s),"
"v1.1.27 触发 demo/123456 自动 fill",
"v1.1.28 触发 SPA 登录兜底(等 input hydrate + fill demo/123456)",
page.url,
)
# 1. 等 input 真正 hydrate 出来(最多 10 秒)
try:
page.wait_for_selector(
"#jc-user, #jc-pass, input[type='tel'], input[type='password']",
timeout=10_000,
state="attached",
)
page.wait_for_timeout(500) # 让 React 状态稳定
except Exception as e:
logger.warning(
"platform_collector: SPA 登录页 10s 内未渲染 input: %s", e,
)
# 2. fill demo/123456 + 点登录(不管当前 input 有没有值,强制覆盖)
spa_filled = _fill_demo_on_spa_login(page)
if spa_filled:
logger.info(
"platform_collector: ✅ SPA 二级登录页 demo/123456 自动填好,"
"已点登录,等 URL 跳到 /app/ 或 /select"
)
_wait_for_url_stable(page, ("/app/", "/select"), max_wait_sec=30)
# 等 URL 跳离 login(30 秒内跳到 /app/ 或 /select 都算成功)
if not _wait_for_url_stable(page, ("/app/", "/select"), max_wait_sec=30):
logger.warning(
"platform_collector: SPA 登录后 30s 内 URL 未稳定到 /app/或/select"
"(当前 URL=%s,demo 可能失效需手工登录)",
page.url,
)
# demo 失效:等用户手工登录(headless 模式直接抛错)
if not headless:
_wait_for_manual_login(page, wait_sec=human_wait_timeout)
else:
# demo fill 失败(input 不存在)→ 等用户手工输入
raise LoginTimeoutError(
f"SPA 二级登录页 demo/123456 填了但 URL 不跳离"
f"(可能 demo 失效或需人工登录,URL={page.url})"
)
else:
# fill 失败(input 仍未渲染)→ 等用户手工输入
logger.warning(
"platform_collector: SPA 登录页 _fill_demo 失败"
"(input 仍未渲染),fallback 等用户输入"
)
if not headless:
if _wait_for_login_inputs_filled(page, wait_sec=human_wait_timeout):
_wait_for_url_stable(page, ("/app/", "/select"), max_wait_sec=30)

View File

@@ -6,7 +6,7 @@
"""
SKILL_SLUG = "alert-contract-expiring-hr"
SKILL_VERSION = "1.1.27"
SKILL_VERSION = "1.1.28"
LOG_LOGGER_NAME = "openclaw.skill.alert_contract_expiring_hr"
PLATFORM_KIT_MIN_VERSION = "1.2.11"