Files
ssw-platform/Cargo.toml
T
admin df63306b24 feat(mcp): 授权闭环 + 流程模板 + 基线适配器(P1 主体完成)
- 授权闭环 4 工具:authorize.grant / revoke / effective(四源并集 + 应用过滤两组数)+ user.create
  —— effective 是「授权了但看不见」的唯一诊断入口;user.create 建非管理员账号让闭环可自证
- prompts 3 模板:new_business_module / diagnose_menu_not_visible / verify_all
  —— 测试核对模板里引用的工具 id 是否存在(防腐烂)
- 新 crate sspf-adapter-baseline:PlatformAdapter 第二实现,5 个只读 op + 形状归一化
  —— 用 hyper::client::conn::http1,只支持 http://,口令传密文
- 新增 AR6 与 baseline-smoke.sh(10 条);mcp-smoke 23 → 32 条
- 影响:测试 282 → 306;十一闸全绿;工具 15 → 19;内存仍 7 MB
2026-10-31 11:23:16 +08:00

64 lines
2.5 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ssw-platform —— cargo workspace 根
#
# 🔴 **本文件是脚手架的一部分,复制到项目根时必须一起带上**
#
# 为什么必须有它:`src/backend/Cargo.toml` 里的
# `version.workspace = true` / `edition.workspace = true` / `xxx = { workspace = true }`
# 都要求**上层有一个 workspace 根**。缺了它,cargo 直接报
# `error: could not find Cargo.toml in ... or any parent directory`,
# 脚手架**根本编译不起来**。
#
# 这里只放「跨成员共享」的配置:成员列表、依赖版本、release profile。
# 成员 crate(src/backend)不得再写 [profile.*],否则 cargo 直接报错。
[workspace]
# src/backend = 内核;crates/* = 平台侧 crate;packs/* = 业务包(只依赖 sspf-sdk)
members = [
"src/backend", "crates/*", "packs/*"]
resolver = "2"
[workspace.package]
version = "0.1.0"
edition = "2021"
# 🔴 全仓工具链锁定在 rust-toolchain.toml 的 1.99.1。
# 这里的 MSRV 是「语法最低要求」,比锁定版本宽松;两者不要混。
# L3 动态库(cdylib)强依赖锁定版本:插件与内核必须同一 rustc,
# 否则 Rust 无稳定 ABI 的问题会以段错误的形式在运行期爆出来。
rust-version = "1.85"
# 依赖版本集中在此,成员 crate 一律用 `xxx = { workspace = true }` 继承。
#
# ⚠️ 版本锁死说明(不要随意升级):
# - aes 0.8 + ecb 0.1 属于 cipher **0.4** 家族;aes 0.9 / ecb 0.2 是 cipher 0.5,
# 泛型不通用,混用编译不过。
# - md-5 0.10 的 crate 名是 `md5`(`use md5::{Digest, Md5};`)。
# - pglite-rs 0.2 的 **lib 名是 `pglite`**(`use pglite::PGlite;`),
# 且 0.2.7 没有 `memory://` 模式,`PGlite::open()` 只接受路径。
[workspace.dependencies]
axum = "0.8"
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_urlencoded = "0.7"
aes = "0.8"
ecb = "0.1"
md-5 = "0.10"
rand = "0.8"
uuid = { version = "1", features = ["v4"] }
hex = "0.4"
pglite-rs = "0.2"
chrono = "0.4"
http = "1"
async-trait = "0.1"
# 只用于「MCP 模式下把 fd 1 让给 stderr」这一个系统调用(见 main.rs 的注释)。
libc = "0.2"
[profile.release]
opt-level = 2
lto = "thin"
strip = "symbols"
# 🔴 不要设 `panic = "abort"`:契约 §6.5 要求 panic ⇒ HTTP 200 + code=400,
# 而 abort 下 `catch_unwind` 抓不到 panic(进程直接死 ⇒ 客户端连接重置)。
# catch-all 中间件依赖默认的 `panic = "unwind"`(Ruling P19)。
codegen-units = 16