3059468526
fix(web-access): use governed external browser open tool ( #97 )
...
## 中文
### 变更
- 将 web-access 升级到 v3.4.3,并声明 `BrowserExternalOpen`
- 外部浏览器的简单打开/导航固定为 `BrowserExternalProbe` → `BrowserExternalOpen`
- 仅把点击、动态取文、提取等高级交互交给隔离 Playwright
- 同步中英文 Skill、状态表、决策树和 CDP reference
### 验证
- `python scripts/i18n/validate-i18n.py`
- `python scripts/i18n/translate.py --check skills/web-access`
- `python -m unittest scripts/i18n/test_validate_i18n.py`
- `git diff --check`
## English
### Changes
- Bump web-access to v3.4.3 and expose `BrowserExternalOpen`
- Route simple external-browser open/navigation through
`BrowserExternalProbe` → `BrowserExternalOpen`
- Reserve isolated Playwright for advanced click, dynamic-read, and
extraction workflows
- Keep the English/Chinese skill, status table, decision tree, and CDP
reference aligned
### Verification
- `python scripts/i18n/validate-i18n.py`
- `python scripts/i18n/translate.py --check skills/web-access`
- `python -m unittest scripts/i18n/test_validate_i18n.py`
- `git diff --check`
2026-08-29 07:53:59 -04:00
7026cc72ed
fix(web-access): 强制 Windows 隔离 Playwright 环境 ( #96 )
...
## 中文
- 将 web-access 升级到 v3.4.2。
- L3-external 必须先创建或选择 DesireCore 隔离 venv,再进行 import、固定版本安装、复检和 CDP
attach。
- Windows 全流程只允许 PowerShell 与 venv 的 Scripts\\python.exe;禁止 Bash、裸
python/pip、pip --user、全局安装和 playwright install。
- 修正中英文 L3 汇总表,避免后置表格覆盖前置安全规则。
验证:完整 i18n validator、translation freshness、validator unit 均通过;独立复审无
P0-P2。
## English
- Bump web-access to v3.4.2.
- Require creating or selecting the DesireCore-owned isolated venv
before import checks, pinned installation, re-check, and CDP attach.
- On Windows, require PowerShell and the venv Scripts\\python.exe
throughout; forbid Bash, bare python/pip, pip --user, global
installation, and playwright install.
- Align both localized L3 summary tables so later guidance cannot
override the safety contract.
Validation: full i18n validation, translation freshness, and validator
unit tests pass; independent review found no P0-P2 findings.
2026-08-29 06:45:37 -04:00
ceeada3625
fix(web-access): 修复 Windows CDP attach 配方 ( #95 )
...
## 中文
- 将 web-access 升级到 v3.4.1
- Windows attach 明确禁止把 POSIX heredoc/`/tmp` 交给 PowerShell
- 增加 Playwright import 预检、DesireCore 隔离 venv 和 PowerShell here-string
写脚本配方
- 保持 ready 与依赖缺失分离,禁止回落内置浏览器
## English
- Bump web-access to v3.4.1
- Forbid POSIX heredocs and `/tmp` paths in Windows PowerShell attach
flows
- Add Playwright import preflight, DesireCore-isolated venv guidance,
and a native PowerShell here-string recipe
- Keep browser readiness separate from dependency availability and never
fall back silently
## Validation
- `test_validate_i18n.py`: 9/9
- `validate-i18n.py skills/web-access`: pass
- `translate.py --check skills/web-access`: pass
- Windows live-device observation: probe reached Chrome ready, then the
old recipe attempted Bash `/tmp` and PowerShell `cat <<EOF`; this PR
fixes that deterministic cross-shell failure.
2026-08-29 16:40:38 +08:00
2ccd176dad
fix(web-access): 增加外部浏览器确定性前置探测 ( #94 )
...
## 中文
### 背景
L3-external 过去只用 curl 判断 9222,无法区分浏览器未安装、端口未开启、错误产品或伪 CDP
服务,也可能静默回落内置浏览器。
### 变更
- web-access 升级到 3.4.0,并要求先调用 BrowserExternalProbe
- 结构化处理未安装、端口关闭、多候选、产品不匹配、无效 CDP 与宿主不可用
- 显式浏览器不可自动替换;泛指 external 在多候选且无 ready 端口时先询问
- 所有 Playwright 配方使用 probe 返回端口和 DesireCore 隔离 Profile
- 纳入并修复 #93 的浏览器收尾规则与重复编号 finding
### 验证
- validate-i18n:通过
- translate --check:通过
- validate-i18n --online:通过
- source hash:sha256:1704b973e3a90e89
- 双语结构:31 个标题、20 个代码围栏
取代 #93;关联 desirecore/desirecore#2369。
## English
### Background
L3-external previously relied on curl against port 9222, which could not
distinguish a missing browser, a closed debug port, a different product,
or a fake CDP service, and could silently fall back to the built-in
browser.
### Changes
- Bump web-access to 3.4.0 and require BrowserExternalProbe before CDP
attach
- Handle missing installation, closed port, multiple candidates, product
mismatch, invalid CDP, and unavailable host as separate states
- Never replace an explicitly requested browser; ask when a generic
external request has multiple candidates and no ready endpoint
- Use the probe result port and a DesireCore-isolated profile in all
Playwright recipes
- Incorporate #93 browser wrap-up guidance and fix its duplicate
numbering review finding
### Validation
- i18n validation passed
- translation freshness check passed
- online validation passed
- source hash: sha256:1704b973e3a90e89
- bilingual structure: 31 headings and 20 code fences
Supersedes #93 ; related to desirecore/desirecore#2369 .
---------
Co-authored-by: xieyuanxiang <124608760@qq.com >
2026-08-29 14:10:46 +08:00
e58c37d74f
feat(web-access): 恢复 L3-external——两个浏览器由用户意图选,而非能力难度选 ( #87 )
...
## 背景 / Background
v3.0(#85)以「它存在的每一条技术理由(无批量取文通道、evaluate 不可用、截图必须串行
activate)都已被内置浏览器覆盖」为由,删除了 Python Playwright 那一层。
**作为「内置浏览器不够用时的兜底」,这个判断是对的。**
但删除时顺带丢掉了一个完全不同的用例:用户想用**他自己那个**浏览器——他的登录态在他自己的 Chrome
里,他想亲眼看着操作、随时接管。这跟能力够不够无关,内置浏览器替代不了。
真实案例:用户要求「请你操作我本地机器的外部浏览器来完成一个示例报关过程」。技能里已无此路径,模型自己也查出「无独立的 Browser*
外部浏览器工具」,仍用内置浏览器做完全程,并以「本地受管浏览器」「已启动本地浏览器」描述——用户拿到的和要的不是一回事,却无从分辨。
v3.0 (#85 ) removed the Python Playwright layer on the grounds that every
technical reason it existed for is now covered by the built-in browser.
**As a fallback, that judgement was right.** But the deletion also took
a different use case with it: the user wanting *their own* browser —
their login state, their window, theirs to watch and take over. That has
nothing to do with capability, and the built-in browser cannot stand in
for it.
## 改动 / Changes
把 L3-external 作为**由用户意图触发的平级选择**恢复(**不再是 fallback**):
- 恢复 `references/cdp-browser.md`(v3.0 删除,含 `connect_over_cdp` 模板与站点配方)
- 恢复 `Prerequisites: Chrome CDP Setup`,重新定位为「**仅 L3-external
需要**」,内置浏览器仍零前置条件
- 决策树的实时交互分支改为双路:用户点名外部 → L3-external;其余 → 内置(默认)
- 新增「两个浏览器,按用户意图选」对照表:是什么 / 登录态 / 用户能否看到 / 前置条件 / 是否默认
- 分层表加回 L3-external,并说明它**刻意不在默认排序里**——判据是用户点名,不是能力够不够
- 明确:CDP attach 时严禁 `browser.close()`(会关掉用户自己的 Chrome)
- 无论走哪条,措辞必须让用户能分辨实际用了哪个;禁止「本地浏览器」这类两边都像的说法
version 3.0.1 → 3.2.0
## 校验 / Validation
- `python3 scripts/i18n/validate-i18n.py` → OK: no i18n issues found
- `python3 scripts/i18n/translate.py --check` → web-access en-US
`human-locked, skipping`(无 source_hash 漂移)
- 双语同步;en-US 为 human-locked 翻译,已手工同步并按 `compute_source_hash` 重算对齐
## 公开信息边界 / Public information boundary
改动仅涉及浏览器能力边界的技术描述,无租户、客户或其他机密身份信息。
---------
Co-authored-by: Yige <a@wyr.me >
2026-08-24 11:06:54 +08:00
6538f01555
docs(web-access): sync site-pattern baselines off the retired Playwright fallback ( #86 )
...
## What / 变更内容
S31(#85)把 `web-access` 技能升到 v3.0.0,删掉了 `SKILL.md` 与
`references/browser-tools.md`
里「用户手工启动带 `--remote-debugging-port` 的 Chrome + Python Playwright」的回落路径,但
**5 个 per-site 基线文件未同步**,仍然引导 Agent 在正文抽取(以及部分站点的登录态复用)上
回落到已废弃的 Playwright / 外部 CDP:
- `references/site-patterns/zhihu.com.md`
- `references/site-patterns/weibo.com.md`
- `references/site-patterns/bilibili.com.md`
- `references/site-patterns/xiaohongshu.com.md`
- `references/site-patterns/feishu.cn.md`
本 PR 把这 5 处旧表述替换为已落地的内置浏览器能力:
- 正文抽取 → `BrowserAct(page.extract-text)`(format/maxBytes/nextCursor 分页)
- 知乎/B站的「批量回答/评论」抽取 → `BrowserAct(page.element, op: all-inner-texts,
selector: loc=css:...)`
(九 op 判别式命令的只读档,一次拿全部匹配元素文本)
- 登录态未授予 `browser.import.*` 时的处置,由「直接回落 / 回落 CDP」改为「如实告知用户无法复用
登录态,按未登录继续或放弃」,与 `references/browser-tools.md` 里 `BrowserImport` 一节已修好的
措辞对齐
- 各文件 `历史更新` 追加一条同步记录;`SKILL.md` 版本号 `3.0.0` → `3.0.1`
(只改 `references/*`,未改 `SKILL.md`/`SKILL.zh-CN.md` 正文,`source_hash` 不受影响)
`references/browser-tools.md` 现存的 2 处 "Playwright" 字样经核实均为**已移除**的历史性陈述
("…并移除 Python Playwright 回落"、"无需…Python / Playwright"),不构成误导性指令,本 PR
未改动该文件。
Refs: desirecore/desirecore#2074, #85
## Test plan / 测试计划
- [x] 通读改动后的每个 site-pattern 文件:新写法对应的能力(`page.extract-text` /
`page.element`
op: `all-inner-texts`)均已在 v3.0 落地,未引用不存在的参数
- [x] `compute_source_hash` 只 hash `SKILL.md` frontmatter 之后的 body +
i18n strings,本次只改
`references/*.md`,不触发 source_hash drift
- [ ] CI(i18n validate)
- [x] CLA
2026-08-19 20:22:27 +08:00
0d4d7b208b
feat(web-access): v3.0 内置浏览器能力面同步——删除 Python Playwright 回落(S31) ( #85 )
...
## 变更内容 / What
浏览器升级计划 S31 最终验收信号:web-access 技能与内置受管浏览器新能力面对齐,**删除「用户手工启动调试 Chrome +
Python Playwright」回落路径**。
- **删除回落路径**:Prerequisites: Chrome CDP Setup、Layer 3 CDP Browser(Python
Playwright 模板)、Installation Note(pip install
playwright)整段删除;references/cdp-browser.md 文件删除;jina-reader.md 的 CDP 引用改为
page.extract-text
- **订正陈旧断言**:
- 「没有批量取文通道」→ BrowserSnapshot mode:text /
page.extract-text(maxBytes/cursor 分页,超出截断给 nextCursor)
- 「page.evaluate 基本不可用」→ 返回真实值(expression/awaitPromise,超预算截断标
truncated);仍走人工闸门
- 「截图前必须 tab.activate / 串行截图 / BROWSER_TAB_HOST_NOT_FOUND」→ S36 订正:Agent
单标签会话免 activate;多标签后台 tab 秒级报 BROWSER_VIEWPORT_UNAVAILABLE;命令超时只 stop 不
close,标签页可重试
- 「accessibility 超限即失败」→ 尊重 depth + maxBytes 截断翻页(S8)
- 「只有整页截图」→ clip{x,y,width,height,scale≤4} + captureBeyondViewport
- **provides.tools 加 BrowserScript**(code-mode;信任级别等同 Bash)
- **新增选用规则(D4 唯一约束机制)**:反检测站点一律优先 input.*(#1808 输入拟真 +
身份一致性);page.element 写类仅用于表单批量填充等站点不检测场景;JS 直调 el.click() 为禁止回退
- **新增 fetch.browser 配方**:page.evaluate 页面上下文跑 fetch(带 origin Cookie、同
origin、受 Grant origins 约束)——登录态取站内接口的正解
- **能力速查**:page.element 九 op / page.wait 九 until / inline wait 块 / loc=
方言 / BrowserScript / 跨源 iframe 快照(S35)
- **版本** 2.2.1 → 3.0.0(删除回落层为 breaking);source_hash
重算;required_client_version 维持 10.0.98(新能力在正文标注 10.0.112+)
## Why
v2.x 时代回落路径存在的每一条理由(无批量取文、evaluate 不可用、截图必须串行 activate)均已被
S2–S14/S35/S36 覆盖;文档继续引导用户手工起调试 Chrome 会误导新 Agent 走已废弃路径。
双语同步修改(SKILL.md / SKILL.zh-CN.md heading 数一致,i18n-validate 通过)。
- [x] CLA
2026-08-17 01:25:46 -04:00
2e15720442
fix(web-access): 门槛降回 10.0.98——#77 让新装客户端整个失去浏览器能力 ( #78 )
...
真机测试发现的回归,由 #77 引入。
## 现象
全新安装的 10.0.99 客户端上,`BrowserManage` / `BrowserAct` / `BrowserSnapshot`
**完全不存在**——Agent 用 `ToolSearch` 也找不到。它们是 hidden 工具,靠 web-access
技能解锁,而该技能压根没被装上。
## 因果
`sync/builtin-skill.ts:171`:本地不存在 + 客户端版本低于 `required_client_version` →
记 `skippedIncompatible` 直接 return,**不新装**。
#77 把门槛提到 10.0.100,而 **10.0.100 尚未发布**——于是所有新装的 10.0.99 及以下客户端拿不到整个
web-access,连带失去全部内置浏览器能力。
已装 2.1.1 的老用户不受影响(`:207` 那条分支保留本地兼容旧版,不更新成用不了的新版)。
## 判断失误
#77 的理由是「不提门槛老客户端会拿到教它们用不存在能力的说明」。顾虑本身成立,但两害量级差了一个数量级:
| | 后果 |
|---|---|
| 门槛低 | 文档里几条说明超前,Agent 试一次失败、换个路子——**能力还在** |
| 门槛高 | **整个技能不存在**,Agent 连试都没得试 |
## 修法
门槛降回 10.0.98,超前的四条能力改用行内「需
10.0.100+」标注,并写明老版本上的替代做法。老客户端既拿得到技能,也不会被文档误导。`version` 2.2.0 → 2.2.1。
---
Regression from #77 found during real-machine testing: raising
`required_client_version` to an unreleased version made the whole skill
fail to install on fresh clients, taking all built-in browser tools with
it.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-08-07 23:54:22 +08:00
f104d18165
feat(web-access): 截图像素直接给、clip 元素级裁剪、artifact 用绝对路径 ( #77 )
...
跟进 desirecore/desirecore#1741 与 #1756(均已合入 dev,随 10.0.100 发布)。
## 变更 / Changes
- **截图像素直接给**:现在作为 image 块进工具结果,视觉模型当场就能看。补一节说明什么时候才需要再 `Read`
一次(结果明确写了未附带像素、或需要原始分辨率),避免同一张图在上下文里占两份。同时说明非视觉模型下会明确告知「你看不到它的内容」,此时不要凭空描述画面。
- **元素级裁剪不再需要 `cdp.raw`**:`BrowserSnapshot` 的
`options.clip={x,y,width,height,scale}` 直接支持,`scale` 最大 4(已对照
`command-params.ts:333` 核实)。
- **artifact 改用 `result.artifact.absolutePath`**:原文教的
`${DESIRECORE_ROOT}/...` 在路径展开里根本不认(只认 `~` / `$HOME` /
`$USERPROFILE`),拼出来是相对路径、`Read`
报「文件不存在」;原文给的还是目录,照抄会撞上「路径不是文件」。真机实测两条都踩过。
## 刻意未改 / Deliberately unchanged
「用户真实鼠标会抢控制权」一条**保持原样**——修它的 desirecore/desirecore#1740 尚未合并,现状描述仍然准确。
## 版本门控 / Version gating
`required_client_version` 10.0.98 → **10.0.100**(含上述两个 PR 的最早版本)。market
是运行时拉取的,不提门槛会让老客户端拿到教它们用不存在能力的说明。
---
Follows desirecore/desirecore#1741 and #1756 (both merged to dev,
shipping in 10.0.100). Screenshot pixels now arrive as an image block
directly; element-level cropping no longer needs raw CDP; artifact reads
use the absolute path from the receipt. The 'real mouse steals control'
note is intentionally left as-is because its fix (#1740 ) is not merged
yet.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-08-07 23:54:22 +08:00
b2865d501d
fix(web-access): 修正内置浏览器工具文档与客户端版本门控 ( #73 )
...
跟进 desirecore/desirecore#1718 的 Codex review,修掉 web-access v2.1.0 正文中 4 处与真实工具实现不符的地方(均对照 desirecore@origin/dev 源码核实):
- 补 market.required_client_version: 10.0.98,避免老客户端把可用的 v2.0 换成调用不存在工具的说明
- BrowserImport 动作名修正:真实枚举 discover/create_plan/dry_run/apply/rollback/list_plans,无 'plan';domains 由 create_plan 消费;planId 前缀 bimp_
- input.wheel 示例补 x/y(schema 硬要求),capabilities 示例补 browser.input.pointer.wheel 并说明显式列表是做减法
- BrowserImport 降级为需额外授权的可选路径:browser.import.* 不在 agentDefault 内且 agentElevated 在工具层零引用,登录态默认改回 L3-fallback CDP
skill 2.1.0 → 2.1.1,manifest 1.2.19 → 1.2.20,human-locked 的 en-US 已重新对齐 source_hash。
2026-08-07 23:54:03 +08:00
af4176bbd7
feat(web-access): 迁移到内置受管浏览器工具(v2.1.0) ( #72 )
...
## 变更说明 / Description
### 中文
客户端 v10.0.98(desirecore/desirecore#1596)停用了旧的 `BrowserListTabs` /
`BrowserNavigate` / `BrowserEval` / `BrowserClick` / `BrowserScreenshot`
/ `BrowserScroll` / `BrowserSetFiles` / `BrowserCloseTab` 及其 cdp-proxy
后端,调用会直接返回「该旧 BrowserXxx/cdp-proxy 入口已停用」。而 web-access v2.0.2 的
`provides.tools` 仍声明这批工具——技能激活后注入的是一组必然失败的工具。
本次把 `provides.tools` 换成统一浏览器工具,并同步正文与参考文档:
- `provides.tools`:`BrowserManage` / `BrowserSnapshot` / `BrowserAct` /
`BrowserImport` / `BrowserShare` + 保留 `SitePatternRead` /
`SitePatternWrite` / `LocalBookmarks`
- 中英文 SKILL 正文同步改写(L0 / 能力描述 / 决策树 / 四层策略表 / L3-fast 速查 / 反模式)
- `references/browser-tools.md` 整篇重写为新 API + 实测边界
- 5 份站点经验(小红书 / B站 / 微博 / 知乎 / 飞书)的流程改用新工具
- 版本 2.0.2 → 2.1.0,`updated_at` 更新,i18n `source_hash` 重算
**L3-fast 的定位相应收窄**:内置浏览器负责「到达 + 交互 + 截图 + 隔离」,抽取长正文仍回落 Jina
Reader(公开页)或 Playwright(登录态)——理由见下方实测。
### English
Client v10.0.98 retired the legacy `BrowserXxx` tools and the cdp-proxy
behind them, so web-access v2.0.2 was injecting a set of tools that
always fail. This PR migrates `provides.tools` to the unified browser
tools and rewrites the body, the browser-tools reference, and the five
site-pattern playbooks accordingly. L3-fast is re-scoped to
navigation/interaction/screenshots; bulk text extraction still falls
back to Jina Reader or Playwright.
## 测试方式 / Test Plan
在客户端 v10.0.98 + `electron-embedded` Provider 上实测:
- [x] `provides.tools` 里 8 个工具 ID 全部在 builtin registry 中存在
- [x] 把本 PR 的技能装进 dev 实例,带 `skillIds:['web-access']` 驱动智能体:真实调用
`BrowserManage(create_space)` → `BrowserManage(start_session)` →
`BrowserAct(tab.navigate)` → `BrowserManage(close_session)`,全部 success
- [x] `scripts/i18n/validate-i18n.py` 全仓库通过(中英文标题数一致、source_hash 一致)
文档中记录的边界均来自实测,而非推测:
| 边界 | 实测现象 |
|------|---------|
| 截图前必须 `tab.activate` | 标签页默认停在 `(-10000,-10000,1x1)`,直接截图卡满 30s
deadline 并触发 `browser.host.gone`,之后全部 `BROWSER_TAB_HOST_NOT_FOUND` |
| `page.evaluate` 不是取文通道 | 每次调用需人工审批;字符串/对象返回值被替换为
`[REDACTED:browser-runtime-value]`,仅 number/boolean/null 穿透 |
| `accessibility` 快照真实页面不可用 | example.com 正常返回 StaticText;维基百科条目一律
`BROWSER_RESULT_TOO_LARGE`(2 MB 上限,且 `depth` 参数被宿主忽略) |
| `semantic` 快照不含正文 | 只列 button / input / a 等可交互元素 |
## 风险与回滚 / Risk and rollback
- 纯技能内容变更,无脚本或清单结构改动
- 需要客户端 v10.0.98+;旧客户端装到本版会拿到一组不存在的工具名(旧客户端上原本那批工具也已失效,不构成回退)
- 回滚即 revert 本 PR
2026-08-07 23:53:28 +08:00
1b002e5778
强化市场校验与索引元数据
...
合并市场索引、分类、i18n 校验、skill-creator 工具和已修改 skill 版本号更新。
2026-07-07 21:14:31 +08:00
5767c8f867
fix: 为 #16 路径替换涉及的技能补 per-skill version ( #22 )
...
## 背景 / Background
#16 (4f7037a ) 将 16 个 SKILL.md 的 `~/.desirecore` 路径批量替换为
`${DESIRECORE_ROOT}`,但只升了 `manifest.json`,**未升任何 per-skill version**。
客户端按 SKILL.md frontmatter 的 per-skill `version` 做 semver 同步:version
不变即判定「无更新」而永久跳过,导致已升级用户的全局技能正文停留在替换前的旧内容(与线上不同步)。
#16 (4f7037a ) bulk-replaced `~/.desirecore` with `${DESIRECORE_ROOT}` in
16 SKILL.md files but only bumped `manifest.json`, leaving every
per-skill `version` untouched. Clients sync by per-skill semver, so an
unchanged version is treated as "no update" and skipped forever —
upgraded users' global skills stay frozen on pre-replacement content.
## 改动 / Changes
- 对 #16 触及且至今仍未升号的 **14 个在册技能** 各 patch +1
- `manifest.json` 1.2.2 → 1.2.3(沿用 #16「内容改动同步升 manifest」的约定)
- 退役技能 `minimax-image-gen` / `minimax-tts`(不在 builtin-skills.json,不下发)跳过
- diff 为纯 version 行,未触动正文
Bumps the 14 in-manifest skills changed by #16 that were never
version-bumped; manifest 1.2.2 → 1.2.3; retired skills skipped.
Version-line-only diff.
2026-06-03 17:46:13 +08:00
eab5c824a5
fix: replace hardcoded ~/.desirecore paths with ${DESIRECORE_ROOT} variable ( #16 )
...
## Summary
- 将所有技能文件中的硬编码 `~/.desirecore/` 和 `$HOME/.desirecore/` 路径替换为
`${DESIRECORE_ROOT}/` 变量
- 递增 manifest.json version 至 1.2.1
## Why
dev 模式下 `DESIRECORE_HOME=~/.desirecore-dev`,硬编码路径导致技能读取错误的端口文件和目录。主仓库的
`variable-substitutor.ts` 会在运行时将 `${DESIRECORE_ROOT}` 替换为实际根目录。
## Test plan
- [ ] `npm run dev` 启动后触发任意技能,确认端口路径解析为
`~/.desirecore-dev/agent-service.port`
- [ ] prod 模式确认路径为 `~/.desirecore/agent-service.port`
🤖 Generated with [Claude Code](https://claude.com/claude-code )
2026-05-29 15:36:19 +08:00
229bc8157f
fix: 补全 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验 ( #4 )
...
## 变更说明
修复 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验、补全英文翻译,并连带修复其他 stale
skill 的 source_hash 漂移问题。
### dashscope-image-gen / xiaomi-tts(PR 主线)
- `name` 字段从中文改为目录名(CI rule-1 要求 lowercase ASCII + hyphens)。
- 补全 `metadata.i18n` 块:`locales`、`zh-CN` (含 body 指向
SKILL.zh-CN.md)、`en-US`(含 description / body=./SKILL.md)。
- 新增 `SKILL.zh-CN.md`(zh-CN body 文件)。
- **root SKILL.md 改写为英文 body**(与 SKILL.zh-CN.md 内容对应),由本 PR
手工翻译;`default_locale=en-US`、`source_locale=zh-CN`,与 docs/I18N.md
约定一致:root SKILL.md = default_locale body (en-US)、SKILL.zh-CN.md =
source_locale body (zh-CN)。
- 两 locale 锁为 `translated_by: human` + 正确 `source_hash`。
- 内容质量修复:流程标题 "严格按此两步执行" 改为 "严格按此三步执行";强制规则 2 措辞精确化(/tmp
仅作中转);xiaomi-tts 用户意图映射表中 `response_format` 改为 `audio.format`
与请求体参数表一致;zh-CN.description 改为纯中文。
- locale header 由 shell 转义残留 `<\!--` 修正为标准 `<!-- locale: zh-CN -->`。
### 连带:6 个 main 上已 stale 的 skill(避免 translate workflow 失败)
- `manage-skills` / `minimax-music-gen` / `minimax-video-gen` /
`skill-creator` / `web-access`:`en-US.source_hash` 重新计算为当前 zh-CN source
实际 hash;`translated_by` 由 `ai:claude-opus-4-7` 改为 `human`
以锁定现有翻译不被自动重译覆盖。
- `markdown`:补正 `en-US.source_hash`(之前是占位 `sha256:0000000000000000`)。
- 这些 skill 的 `en-US` 翻译内容保持不变,仅修正元数据。
### scripts/i18n/translate.py 容错增强
- 413 Payload Too Large 时不再 retry(payload 不会变小,retry 浪费时间)。
- 主循环 catch RuntimeError,把单个 skill 的失败写入 `plan["errors"]` 后继续处理下一个
skill,避免一个大文件 fail 整个 workflow。
- `--check` 模式下 plans 含 errors 也 exit 1(之前仅看 needs_translation,broad
except 会把异常吃掉导致误报通过)。
## Test plan
- [x] `i18n-validate` 通过
- [x] `i18n-translate --check` 显示所有 skill `up-to-date` 或 `human-locked,
skipping`
- [x] CI 上 `validate` / `translate` / `wait-for-copilot-review` 全绿
- [ ] Copilot 评审 conversation 全部 resolve
- [ ] Squash merge
---------
Co-authored-by: yi-ge <a@wyr.me >
2026-05-13 12:57:25 +08:00
0100aec989
feat(web-access): v2.0 — Skill-Scoped 工具门控 + cdp-proxy 子模块 + BrowserXxx 工具家族
...
升级 web-access 技能 v1.1.2 → v2.0.0,与 desirecore/desirecore PR #536 同步。
新增内容(在 i18n 1.1 schema 下保持双语一致):
- SKILL.md / SKILL.zh-CN.md:补充 BrowserXxx 工具家族说明、L3-fast vs L3-fallback
分层策略(默认 BrowserXxx,复杂场景兜底 Python Playwright)、SKILL 激活前后的
hidden 工具门控行为、SitePattern 三层学习库语义
- frontmatter 新增 `provides.tools`:声明 11 个 hidden 工具(8 个 BrowserXxx +
SitePatternRead/Write + LocalBookmarks),客户端按 Skill 激活解锁
- references/browser-tools.md:8 个 BrowserXxx 工具的完整参数与典型用法
- references/site-patterns/ 5 个基线站点模板:xiaohongshu / bilibili / weibo /
zhihu / feishu,含 _index 总览
manifest.json:stats.lastUpdated 同步到 2026-05-06。
关联:
- 主仓库 PR:desirecore/desirecore#536
- ADR-027 Node CDP 代理子模块(desirecore-docs)
2026-05-06 12:05:39 +08:00
8bdda4afb1
feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) ( #1 )
...
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容
把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。
## 关键变更
### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
i18n.<locale>
### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)
### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)
### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude
### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落
## 验证
- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
* fix(i18n): 修复 PR #1 review 反馈的 6 项问题
- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
与 zh-CN 版本对齐
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-05 00:26:33 +08:00
8aac4a588b
fix: environment-setup 和 web-access 也改为 disable-model-invocation: true
...
- environment-setup 1.1.1→1.1.2
- web-access 1.1.1→1.1.2
2026-04-13 16:30:13 +08:00
aa6b1389fe
fix: 为 9 个 skill 补全 L0/L1/L2 分层结构,版本号 +1
...
按照 desirecore-format.md 规范,为以下 skill 添加标准分层结构:
- docx (1.0.0→1.0.1), pdf (1.0.0→1.0.1), pptx (1.0.0→1.0.1), xlsx (1.0.0→1.0.1)
- frontend-design (1.0.0→1.0.1), mail-operations (1.0.0→1.0.1)
- environment-setup (1.1.0→1.1.1), web-access (1.1.0→1.1.1)
- manage-teams (1.2.0→1.2.1)
每个文件增加 L0(一句话摘要)、L1(概述与使用场景)、L2(详细规范)三层,
原有技术内容保持不变,metadata.updated_at 更新为 2026-04-13。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-13 15:33:56 +08:00
ae78f05db3
feat: 补全 7 个技能的 market icon
...
为以下技能添加 SVG icon,遵循 3+2 色彩体系:
- manage-teams: 双人剪影 + 绿色组织节点 (Blue→Green)
- docx: 折角文档 + 标题块 + 文本行 (Blue→Purple)
- pdf: 折角文档 + 红色书签 (Red→Orange)
- pptx: 演示屏 + 橙色播放按钮 (Orange→Green)
- xlsx: 网格表格 + 绿色对勾徽标 (Green→Blue)
- frontend-design: 浏览器框架 + 交通灯 + 布局块 (Purple→Blue)
- web-access: 地球仪 + 绿色放大镜 (Blue→Green)
2026-04-08 17:57:25 +08:00
张馨元
98322aa930
feat: 新增 web-access 和 frontend-design 两个内置技能
...
根据 docs 推荐补齐 5 个内置技能中的 c) 和 e):
web-access v1.1.0:
- 三层架构:L1 WebSearch/WebFetch + L2 Jina Reader + L3 CDP Browser
- 添加 Chrome CDP 前置条件(macOS/Linux/Windows 启动命令)
- 支持登录态访问 小红书/B站/微博/知乎/飞书/Twitter/公众号
- Jina Reader 重新定位为默认 token 优化层(非兜底)
- 新增 references/cdp-browser.md(Python Playwright 详细操作手册)
- 触发词扩充:小红书、B站、微博、飞书、Twitter、推特、X、知乎、公众号
frontend-design v1.0.0:
- 从 Claude Code 官方 frontend-design 技能适配
- 保留原版 bold aesthetic 设计理念
- 新增 Project Context Override 章节:在 DesireCore 主仓库内工作时
自动遵循 3+2 色彩体系(Green/Blue/Purple + Orange/Red)
- 添加 Output Rule 要求告知用户文件路径
builtin-skills.json: 12 → 14 skills
2026-04-07 15:35:59 +08:00