diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 7d1dabc..bd00652 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,7 +6,7 @@ }, "metadata": { "description": "Skills shared by Baoyu for improving daily work efficiency", - "version": "0.10.0" + "version": "0.11.0" }, "plugins": [ { diff --git a/CHANGELOG.md b/CHANGELOG.md index d02ff91..e80de0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ English | [中文](./CHANGELOG.zh.md) +## 0.11.0 - 2026-01-18 + +### Features +- `baoyu-gemini-web`: adds disclaimer consent check flow—requires user acceptance before first use, with persistent consent storage per platform. + ## 0.10.0 - 2026-01-18 ### Features diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 7477fda..47ea6c1 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -2,6 +2,11 @@ [English](./CHANGELOG.md) | 中文 +## 0.11.0 - 2026-01-18 + +### 新功能 +- `baoyu-gemini-web`:新增 Disclaimer 同意检查流程——首次使用前需用户确认接受,同意状态按平台持久化存储。 + ## 0.10.0 - 2026-01-18 ### 新功能 diff --git a/skills/baoyu-gemini-web/SKILL.md b/skills/baoyu-gemini-web/SKILL.md index f29cf3f..9431d81 100644 --- a/skills/baoyu-gemini-web/SKILL.md +++ b/skills/baoyu-gemini-web/SKILL.md @@ -26,6 +26,86 @@ Supports: | `scripts/main.ts` | CLI entry point for text/image generation | | `scripts/gemini-webapi/*` | TypeScript port of `gemini_webapi` (GeminiClient, types, utils) | +## ⚠️ Disclaimer (REQUIRED) + +**Before using this skill**, the consent check MUST be performed. + +### Consent Check Flow + +**Step 1**: Check consent file + +```bash +# macOS +cat ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json 2>/dev/null + +# Linux +cat ~/.local/share/baoyu-skills/gemini-web/consent.json 2>/dev/null + +# Windows (PowerShell) +Get-Content "$env:APPDATA\baoyu-skills\gemini-web\consent.json" 2>$null +``` + +**Step 2**: If consent exists and `accepted: true` with matching `disclaimerVersion: "1.0"`: + +Print warning and proceed: +``` +⚠️ Warning: Using reverse-engineered Gemini Web API (not official). Accepted on: +``` + +**Step 3**: If consent file doesn't exist or `disclaimerVersion` mismatch: + +Display disclaimer and ask user: + +``` +⚠️ DISCLAIMER + +This tool uses a reverse-engineered Gemini Web API, NOT an official Google API. + +Risks: +- May break without notice if Google changes their API +- No official support or guarantees +- Use at your own risk + +Do you accept these terms and wish to continue? +``` + +Use `AskUserQuestion` tool with options: +- **Yes, I accept** - Continue and save consent +- **No, I decline** - Exit immediately + +**Step 4**: On acceptance, create consent file: + +```bash +# macOS +mkdir -p ~/Library/Application\ Support/baoyu-skills/gemini-web +cat > ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json << 'EOF' +{ + "version": 1, + "accepted": true, + "acceptedAt": "", + "disclaimerVersion": "1.0" +} +EOF + +# Linux +mkdir -p ~/.local/share/baoyu-skills/gemini-web +cat > ~/.local/share/baoyu-skills/gemini-web/consent.json << 'EOF' +{ + "version": 1, + "accepted": true, + "acceptedAt": "", + "disclaimerVersion": "1.0" +} +EOF +``` + +**Step 5**: On decline, output message and stop: +``` +User declined the disclaimer. Exiting. +``` + +--- + ## Quick start ```bash