Files
DevFlow/src-tauri/Cargo.toml
绝尘 ed8e2fc155 新增: Phase3 src-tauri 集成 df-tunnel(跨端闭环)
Cargo.toml(df-tunnel+uuid workspace) + state.rs(tunnel 字段 Arc<WsTunnelClient>) + lib.rs spawn tunnel task:device_id(KV/UUID 持久) + relay_url(KV/默认 localhost:8080) + token 固定常量 + subscriber(ai_event_bus→send_raw_event) + on_command(remote_bridge 下行路由) + connect(失败非阻断)。打通桌面↔relay↔miniapp 全双工闭环。cargo EXIT=0。
2026-06-22 03:31:59 +08:00

72 lines
3.2 KiB
TOML

[package]
name = "devflow"
version = "0.1.0"
description = "DevFlow Desktop App"
authors = [""]
edition = "2021"
[lib]
name = "devflow_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-dialog = "2"
tauri-plugin-opener = "2"
tauri-plugin-window-state = "2"
serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
anyhow.workspace = true
tracing.workspace = true
chrono.workspace = true
# augmentation::MentionResolver async trait(Input Augmentation 层核心设计2)
async-trait = { workspace = true }
# 后端 crate
df-types = { path = "../crates/df-types" }
df-storage = { path = "../crates/df-storage" }
df-workflow = { path = "../crates/df-workflow" }
df-nodes = { path = "../crates/df-nodes" }
df-execute = { path = "../crates/df-execute" }
df-ai = { path = "../crates/df-ai" }
df-ideas = { path = "../crates/df-ideas" }
df-project = { path = "../crates/df-project" }
df-mcp = { path = "../crates/df-mcp" }
# Phase3 跨端隧道:桌面端主动出站连 df-relay(/ws/device),透传 ai_event_bus → miniapp
# + 转发 miniapp 下行指令 → remote_bridge 路由 Tauri command。穿 NAT 无需端口映射。
df-tunnel = { path = "../crates/df-tunnel" }
futures = "0.3"
# Phase3 tunnel device_id:首次启动生成 UUID v4 落 settings KV 持久化(relay 按 device_id 路由配对)
uuid = { workspace = true }
# write_file base64 编码:写二进制/非 UTF-8 文件(图片/PDF/Excel 等)
base64 = "0.22"
# validate_path URL 解码:防 %2e%2e 等 URL 编码绕过路径遍历检查(BUG-260617-03)
percent-encoding = "2"
# grep AI 工具:跨文件内容搜索(grep -rn 模式),pattern 支持正则。
# workspace regex 已存在(df-ideas 用),此处引用 workspace 版本避免双后端。
regex = { workspace = true }
# keyring:密钥解析下沉到 df-storage(workspace 统一声明平台 feature),
# src-tauri 经 workspace 引用(转发壳 build_provider_for 不直接碰 keyring,但旧路径/兼容保留)。
# 根因见 docs/09-问题排查/aichat-apikey-401排查-2026-06-15.md
keyring = { workspace = true }
# http_request AI 工具:结构化 HTTP(GET/POST/...)。
# 复用 df-ai 同款 reqwest 0.12(同版本锁定,避免双 TLS 后端)。默认 native-tls(与 df-ai 一致),
# 启用 json(响应解析)/gzip/brotli(透明解压,常见 API 必备)。重定向手动接管(见 http.rs SSRF)。
reqwest = { version = "0.12", features = ["json", "gzip", "brotli"] }
# 阶段3a/3b 统一审批模型开关(path_auth 审批链扎实重构 plan 阶段3)。
# 3a 后端合并(单 HashMap + kind 字段)为编译期结构性变更,本 flag 用于文档标记 +
# 后续 3b 前端切换开关;3a 本身是单编译路径(合并是原子操作,回退走 git revert)。
#
# 阶段4 容错/恢复开关(path_auth 审批链扎实重构 plan 阶段4):
# retry_count 同 tc_id 重试断路(防 LLM 死循环重试同卡死工具)+ 跨盘预检提示 +
# rename_file/delete_file 跨卷统一降级 helper + ai_pending_tool_calls 返 kind。
# 兜底:flag 关 → retry_count 恒 0(等价单次审批执行),其余 helper 行为不变(纯增强)。
[features]
df-ai-unified-approval = []
df-ai-approval-retry = []