Commit Graph

16 Commits

Author SHA1 Message Date
ywkj 93517505d4 fix: set 1920x1080 @2x viewport before capture
Wide tables (商品件重尺) were getting cut off at the right edge.
Now emulates a 1920x1080 PC viewport at 2x scale before navigating,
ensuring all columns fit in screenshots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 13:48:00 +08:00
ywkj 92a3e2eba3 fix: capture viewport-only screenshots for readable resolution
captureBeyondViewport was capturing the entire page in one giant image
(2804x20746), making text unreadable. Now captures per-viewport with
80% overlap, producing ~2400x1992 screenshots that vision can read.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:23:00 +08:00
ywkj a780041840 feat: define structured JSON output schema for API consumption
SKILL.md now specifies exact JSON structure the model must output
after reading screenshots. Weight in kg, dimensions in cm, omit nulls.
Ready for downstream API integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:18:15 +08:00
ywkj 87920a9503 refactor: replace DOM parsing with vision-based approach
Remove all CSS selectors, regex parsers, and structured extraction.
Instead, capture full-page screenshots (scrolling) and download detail
images. The model reads these directly with vision to extract logistics
data — no fragile DOM dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:11:24 +08:00
ywkj bff990628b fix: use localhost for CDP (IPv6), prevent null overwrite on dimensions
- CDP discovery uses localhost instead of 127.0.0.1 (Chrome binds IPv6)
- Only overwrite logistics fields when parsing succeeds, preventing
  later unparseable keys from nullifying valid parsed values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 12:08:41 +08:00
ywkj e48592690b feat: default CDP port 18800, add 包装信息 and 商品件重尺 extraction
register-skill-release / register (push) Successful in 14s Details
- Change default CDP port from 9222 to 18800
- Extract 包装信息 section (packaging type, box weight/dims, units per box)
- Extract 商品件重尺 table (per-piece weight/dimensions/volume)
- Backfill logistics from pieceWeightSize/packageInfo when attributes missing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 08:20:46 +08:00
ywkj 9d147242e0 fix: restore auth-cli.ts and install.sh for org CI registration
register-skill-release / register (push) Successful in 15s Details
The shared-actions/register-skill workflow requires auth-runtime
client-key integration. Restores auth-cli.ts and auth-rt auto-install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 08:00:56 +08:00
ywkj 99ce9d96d1 feat: 1688 logistics scraper — extract weight/size from product pages
register-skill-release / register (push) Failing after 24s Details
Scrapes 1688 product pages via Chrome browser to extract logistics data
(weight, dimensions, volume) from attributes, variants, and detail images.
Zero npm dependencies — uses raw CDP over WebSocket.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 07:49:58 +08:00
ywkj 8be28aab5a feat: auth-rt 改用 Go 二进制,install.sh 自动下载
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:52:02 +08:00
ywkj 68eab3d6c1 fix: auth-rt auto-install 使用永久路径 ~/.local/share/auth-runtime
修复之前 clone 到 /tmp 后删除导致 wrapper 指向不存在路径的问题。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:34:21 +08:00
ywkj dbce7ceef4 feat: install.sh 自动下载安装 auth-rt(无需手动 clone)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:36:47 +08:00
ywkj 55f4864929 chore: auth-rt 默认路径改为 ~/.local/bin/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:35:37 +08:00
ywkj 1db7786586 fix: auth-cli.ts 修复 HOME 路径解析 + shell wrapper 兼容
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:31:06 +08:00
ywkj ba6f4db716 refactor: auth-cli.ts 改用 auth-rt 二进制,更新 README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 18:26:32 +08:00
ywkj d5c9ffa542 refactor: 移除 @clawd/auth-runtime npm 依赖,改用 auth-cli.ts CLI wrapper
- 新增 src/auth-cli.ts:通过 subprocess 调用 auth-runtime CLI
- 新增 install.sh:检查 auth-runtime 目录
- 新增 README.md:文档化 auth-cli.ts 认证机制和新建 skill 检查清单
- package.json 移除 @clawd/auth-runtime 依赖
- src/index.ts 改用 createSkillClient API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 14:44:09 +08:00
ivanberry 2c2c24a310 feat: initial skill template 2026-03-14 10:35:01 +08:00