Skip to content

feat(respire): 新增 respire 本地加密记忆插件(hooks+skill) - #118

Open
ShiningRay wants to merge 1 commit into
zai-org:mainfrom
ShiningRay:feat/respire-plugin
Open

ShiningRay wants to merge 1 commit into
zai-org:mainfrom
ShiningRay:feat/respire-plugin

Conversation

@ShiningRay

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

Select exactly one before requesting review. / 发起评审前必须且只能勾选一项。

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps interactive pages
  • Standard plugin / 普通插件(非 UI) — respire only registers command hooks and a skill; no MCP Apps pages / respire 只注册命令钩子与一个 skill,不提供 MCP Apps 交互页面
  • Not applicable / 不适用 — repository-only changes / 仅仓库级改动

Affected plugin name(s) / 涉及的插件名称:respire

What / 改动内容

新增社区插件 external_plugins/respire/,并在根 marketplace.json 注册(category: productivity)。

respire(CLI 名 rsrs)把本地加密记忆引擎挂进 ZCode agent 循环:

  • SessionStart 注入记忆简则,一次探测三态(未登录/空库/缺模型各附一次性引导,常态零打扰);
  • UserPromptSubmit 每轮标题档召回(rsrs recall --titles,只注分数+短 id+标题,正文 rsrs show 按需取);
  • prompt 以「记:」「存:」「remember:」开头即落库并回执(判重候选转述给模型决断);
  • Stop 存储检查:{"decision":"block","reason":…} 续跑一轮催存新事实;stop_hook_active=true 放行、节流与近 10 分钟已落库即静默,不会循环。

协议适配对照 ZCode runtime 源码核实:hook 输出走严格 JSON(顶层 additionalContext),Stop 决策用 approve|block 枚举,数据目录 ZCODE_PLUGIN_DATA。姊妹宿主版本:respire-dimcode / respire-qoder / respire-workbuddy;本插件独立源仓 https://github.com/risense-ai/respire-zcode(已发布 0.1.0 release,可作为评审参考与安装来源)。

依赖、网络与副作用(README 双语「依赖、网络与副作用」节已写明):依赖 rsrs 引擎(npm @rsrsai/cli,MIT,同厂商 risense-ai;缺失时会在会话内注入装法由 agent 代装);网络仅 npm 安装与 rsrs 云同步(端侧加密,账号可选);无 MCP server、无遥测、不调用外部 LLM API;文件写入仅插件数据目录的 hook.log 与 .nudge_counter。

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/<name>/ / 插件名唯一且 kebab-case,外部新增插件位于 external_plugins/<name>/

  • Usage category is set (productivity) / 分类已填写

  • Plugin type and affected names are declared above / 已声明插件类型与涉及名称

  • version 0.1.0 is identical in plugin.json and marketplace.json (first release; future content changes will bump both) / 两处版本一致(首版,后续改动同步升版)

  • README.md (EN) and README_CN.md (中文) both provided and equivalent / 中英文 README 齐备且语义一致

  • description_i18n has both en and zh-CN; plugin.json copy matches the marketplace entry exactly / 双语描述齐备,清单与条目完全一致

  • No secrets, machine-specific paths, or private dependencies / 无密钥、机器专属路径或私有依赖

  • Model/API/network dependencies documented / 模型、API、网络依赖已写明

  • python3 scripts/validate.py and python3 scripts/build_dist.py pass locally / 本地校验与构建均通过

    部分通过,如实说明:validate.py 全绿(OK: 51 plugin(s) validated,含本插件)。build_dist.py 在全新 clone 上无法跑完——UI 插件(excalidraw/photocraft 等)须先 pnpm build(photocraft 还需 Rust 1.95 wasm 工具链,其上游快照 git fetch 在本环境挂起);该失败在未含本 PR 改动的 pristine main 上同样复现,与本插件无关。本插件的产物用 build_dist 的同一打包边界直接构建成功:build_zip(external_plugins/respire) → dist/plugins/respire/0.1.0/plugin.zip(确定性 zip,10 个文件,manifest 在 respire/.zcode-plugin/plugin.json)。git diff --check 干净。

@panda920

Copy link
Copy Markdown
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants