qianwen-update-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Qwen Update Checker

Qwen 更新检查器

Automatic version checker for the QianWen-AI/qianwen-ai skill pack. Compares the locally installed version against the latest release on GitHub and notifies the user when an update is available.
This skill is referenced by all other QianWen-AI/qianwen-ai. When any skill runs, it checks if this skill is installed and delegates version checking here.
QianWen-AI/qianwen-ai技能包的自动版本检查工具。将本地安装版本与GitHub上的最新版本进行对比,当有更新可用时通知用户。
所有其他QianWen-AI/qianwen-ai技能都会引用该技能。当任何技能运行时,它会检查该技能是否已安装,并将版本检查任务委托给此处。

How It Works

工作原理

  1. Reads the installed version from
    version.json
    (the
    version
    field bundled with this skill).
  2. Fetches the latest version from the remote repository (GitHub raw content).
  3. Compares versions using semver. Returns
    {"has_update": true}
    if a newer version exists.
  4. Records the check timestamp (
    last_interaction
    ) in
    <repo_root>/.agents/state.json
    to rate-limit network requests to once every 24 hours.
  1. version.json
    (该技能附带的
    version
    字段)读取已安装版本。
  2. 从远程仓库(GitHub原始内容)获取最新版本。
  3. 使用semver对比版本。如果存在新版本,则返回
    {"has_update": true}
  4. 将检查时间戳(
    last_interaction
    )记录在
    <repo_root>/.agents/state.json
    中,以限制网络请求频率为每24小时一次。

Usage

使用方法

Other skills invoke this script automatically. You can also run it manually:
bash
python3 <path-to-this-skill>/scripts/check_update.py --print-response
其他技能会自动调用此脚本。你也可以手动运行:
bash
python3 <path-to-this-skill>/scripts/check_update.py --print-response

CLI Arguments

CLI参数

ArgumentDescription
--print-response
Print result as formatted JSON to stdout
--force
Bypass 24-hour rate limit and check immediately
参数描述
--print-response
将结果以格式化JSON输出到标准输出
--force
绕过24小时频率限制,立即检查

Output Format

输出格式

json
{
  "has_update": true
}
json
{
  "has_update": true
}

Configuration

配置

Environment VariableDefaultDescription
QWEN_SKILLS_REPO
QianWen-AI/qianwen-ai
GitHub repo for remote version check
环境变量默认值描述
QWEN_SKILLS_REPO
QianWen-AI/qianwen-ai
用于远程版本检查的GitHub仓库

State File

状态文件

The
last_interaction
timestamp is stored at
<repo_root>/.agents/state.json
for rate-limiting. Check results are not cached in the state file. This file persists across sessions and is shared with
gossamer.py
for fatigue control.
last_interaction
时间戳存储在
<repo_root>/.agents/state.json
中用于频率限制。检查结果不会缓存到状态文件中。该文件会跨会话保留,并与
gossamer.py
共享以进行疲劳控制。