Repository navigation
feat(xiaoqi-pet): 新增小栖桌宠插件 - #137
Open
white-source wants to merge 1 commit into
Open
white-source wants to merge 1 commit into
white-source wants to merge 1 commit into
Conversation
桌面宠物:通过 7 个 plugin hooks 把 ZCode 会话状态(阶段、工具、等待确认、完成) 投递为本地事件文件,由 macOS 原生 / Windows·Linux Electron 桌宠渲染,提供多会话 看板、彩色抽屉卡、桌面通知与今日用量/套餐余量胶囊,并提供让小栖说话的 skill 与 /pet-say 命令。桌宠本体不随插件分发,从项目 GitHub Releases 安装。
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin type (required) / 插件类型(必填)
ui.surfaces,无_meta.ui.resourceUri)Affected plugin name(s) / 涉及的插件名称:
xiaoqi-petWhat / 改动内容
新增社区插件 小栖桌宠 / Xiaoqi Desk Pet(
external_plugins/xiaoqi-pet,v0.3.1,categoryutilities)。解决的问题:ZCode 一次只能看一个会话,长任务跑起来后切到别的窗口就不知道它在做什么、什么时候需要你确认。小栖把会话状态搬到桌面上常驻展示。
能力
SessionStart/UserPromptSubmit/PreToolUse/PermissionRequest/PostToolUse/PostToolUseFailure/Stop),把 stdin JSON 原子写成一个事件文件,桌宠每秒消费并折叠成每会话状态机。balance.json指向用户自己的额度接口。xiaoqi-pet+/pet-say命令让小栖说话。桌宠本体不随插件分发:插件只负责投递状态,桌宠是独立程序(macOS 原生 SwiftUI / Windows·Linux Electron),用户从 https://github.com/white-source/zcode-xiaoqi-pet/releases 自行安装。没装桌宠时插件不产生可见行为、不报错,事件文件超过一天会被清掉。这一点是刻意设计:ZCode 插件无法承载原生窗口程序,因此插件的价值在装好桌宠后体现。
依赖、网络、权限与副作用(README 中英文均已写明)
~/Library/Application Support/XiaoqiPet/、Linux${XDG_CONFIG_HOME:-~/.config}/xiaoxi-pet/、Windows%APPDATA%\XiaoqiPet\。~/.zcode/cli/db/db.sqlite。测试方式(可复现)
/pet-say 你好→ 桌宠弹出说话气泡。同一批模拟 hook 事件在 Swift 与 Electron 两套状态机上已验证输出一致;
macOS包为本地构建,Windows/Linux包已交叉构建但未在真机运行(README 中已注明)。Self-check / 自查清单
external_plugins/<name>/—xiaoqi-petcategoryis set independently of publisher ownership —utilitiesversionbumped in BOTHplugin.jsonandmarketplace.json— 0.3.1README.md(EN) andREADME_CN.md(中文) both updated and equivalentdescription_i18nhas bothenandzh-CN(清单与市场条目完全一致)python3 scripts/validate.py通过(OK: 53 plugin(s) validated)python3 scripts/build_dist.py— 见下方说明关于
build_dist.py在本机(无 pnpm)直接运行会在既有的
excalidraw上失败:UnsafeTree: excalidraw: incomplete build; run pnpm build first,与本次新增无关。为验证本插件的打包,我把市场条目隔离到只剩
xiaoqi-pet后运行同一脚本,通过:目录为纯源码/文档(33 个文件,约 376 KB),无构建产物、无 node_modules、无符号链接,插件根没有 package.json,因此不需要构建步骤。