From 71809a4090d06c740eadfa1c1c108cf8dfb1fc8d Mon Sep 17 00:00:00 2001 From: ssw Date: Sun, 13 Sep 2026 18:55:06 +0800 Subject: [PATCH] =?UTF-8?q?docs(skill):=20ipass-core-add-plugin=20?= =?UTF-8?q?=E5=A2=9E=E8=A1=A5=E5=86=85=E6=A0=B8=E5=9F=BA=E5=87=86=E7=BA=A6?= =?UTF-8?q?=E5=AE=9A=EF=BC=88=E4=B8=8A=E6=B8=B8=E5=90=8C=E6=AD=A5/?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E8=87=AA=E8=A7=A3=E6=A8=A1=E5=BC=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skills/ipass-core-add-plugin/SKILL.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.workbuddy/skills/ipass-core-add-plugin/SKILL.md b/.workbuddy/skills/ipass-core-add-plugin/SKILL.md index cef794f..055a5d3 100644 --- a/.workbuddy/skills/ipass-core-add-plugin/SKILL.md +++ b/.workbuddy/skills/ipass-core-add-plugin/SKILL.md @@ -198,6 +198,23 @@ CARGO_NET_OFFLINE=true cargo build --release ### 0. 基准约定(2026-09-13 起生效,先读这条) +**内核(ipass-core)以上游 refs/ipass 为基准,本地零业务补丁**: +- 内核源码与 `refs/ipass/rust/crates/ipass-core/src` 逐字节一致;需要内核改的 + 先提建议(`docs/upstream-core-changes.md` 模式:A 档请上游改 / B 档插件自解), + 上游采纳后 `git -C refs/ipass pull` 再同步 `src/*.rs`。 +- 插件个性代码一律放**插件 crate 本地模块**(参照 plugin-sso 的 accounts.rs/ + storex.rs/utilx.rs/audit.rs 四件套),身份扩展字段存 `User.extra`(flatten + 透传),经 `UserExt` 强类型读写;账号操作走 `store::update_users` + `users::sync_shm`。 +- 插件文件用 `store::path_in_data`(上游唯一口径);`iter_prefix_ex`/`update_extra` + 等上游已提供,不要再造。 +- gateway 装配要点:`[SsoPlugin, CorePlugin, DomainPlugin]`(sso 先认领身份端点)、 + `CoreExt::reclaim_on_delete`(删账号回收域名)、dispatch 兜底 JSON 信封、 + 指令 `ipass_state/ipass_data_dir/ipass_api/ipass_proxy` + `sso_iap`(sso 特有)。 +- Cargo.toml 元数据(crate 名 sso-gateway 等)保留我方:产物名 libsso_gateway.dylib + 是 nginx conf / 部署脚本依赖,勿改。 + +## 0. 基准约定(2026-09-13 起生效,先读这条) + **内核(ipass-core)以上游 refs/ipass 为基准,本地零业务补丁**: - 内核源码与 `refs/ipass/rust/crates/ipass-core/src` 逐字节一致;需要内核改的 先提建议(`docs/upstream-core-changes.md` 模式:A 档请上游改 / B 档插件自解),