feat: Reader Skill 支持版本自检与自助更新

微信机器人回复剥离引用编号、列表改用空行分隔,失败通知补失败时刻
 问问微信关键词检索在索引落后时按单会话直读原始记录兜底
 关闭窗口支持记住选择并在设置中修改
 退群监控刷新列表
This commit is contained in:
Wxw-Gu committed 2026-10-14 10:31:01 +08:00
1 parent fd7d5016a8
commit eaa25cd29e
33 files changed
+1401 -154

No files matched your search

@@ -67,4 +67,34 @@ assert.match(
/https:\/\/example\.com\/skill/
)
// source.version 曾经是死字段:传进来却被模板丢掉,于是安装指令不携带任何版本信息。
for (const target of ['codex', 'claude-code', 'openclaw', 'generic']) {
const text = buildSkillInstallInstruction({
target,
source: { ...local, version: '9.9.9' },
apiBaseUrl: { host: '127.0.0.1', port: 6131 }
})
assert.match(text, /Skill 版本是 9\.9\.9/, `${target} 指令应携带 source.version`)
assert.doesNotMatch(text, /v1\.0/, `${target} 不应残留 fixture 的旧版本号`)
assert.match(text, /覆盖/, `${target} 指令应说明用新版本覆盖旧版本`)
}
// 指令要同时提醒 Agent 做版本自检,否则更新机制又只能靠人记得。
const selfCheckText = buildSkillInstallInstruction({
target: 'codex',
source: local,
apiBaseUrl: { host: '127.0.0.1', port: 6131 }
})
assert.match(selfCheckText, /版本自检/)
assert.match(selfCheckText, /skill\.version/)
// 没有版本号时不编造:不输出版本段,其余指令保持可用。
const withoutVersion = buildSkillInstallInstruction({
target: 'codex',
source: { type: 'local', directoryPath: 'C:/skill/tracememo-reader', skillPath: 'x' },
apiBaseUrl: { host: '127.0.0.1', port: 6131 }
})
assert.doesNotMatch(withoutVersion, /Skill 版本是/)
assert.match(withoutVersion, /TRACEMEMO_API_TOKEN/)
console.log('skill install instruction tests passed')