docs(skill): ipass-core-add-plugin 增补内核基准约定(上游同步/插件自解模式)

This commit is contained in:
ssw committed 2026-09-13 18:55:06 +08:00
1 parent 6120939e3c
commit 71809a4090
1 file changed
+17
@@ -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 档插件自解),