mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-01 18:50:04 +08:00
docs(agents): define Rust backend architecture boundaries
Document which layer owns Rust capabilities, fallible inputs, background work, and crate validation.
This commit is contained in:
+10
-3
@@ -1,10 +1,17 @@
|
||||
# Backend Architecture Guardrails
|
||||
|
||||
Use [Workspace Crate Architecture](../crates/AGENTS.md) when extracting backend
|
||||
capabilities or changing background task ownership.
|
||||
Follow [Workspace Crate Architecture](../crates/AGENTS.md) when changing
|
||||
backend capability boundaries, reusable orchestration, or background task
|
||||
ownership.
|
||||
|
||||
- **Tauri adapter.** Commands validate transport input, delegate to application
|
||||
use cases, and map results and errors to IPC. Tauri wires dependencies and
|
||||
owns desktop lifecycle, window and tray integration, and event delivery.
|
||||
Keep domain validation and reusable orchestration independent of command
|
||||
handlers and framework state.
|
||||
- **Configuration and effects.** `config` owns source configuration, drafts, and
|
||||
persistence. The effects layer classifies every Verge patch field, including
|
||||
persistence coordination. Persistence adapters perform storage and recovery.
|
||||
The effects layer classifies every Verge patch field, including
|
||||
fields without effects and platform-specific fields, and reconciles requested
|
||||
state in dependency order. Publish rollbackable state after persistence and
|
||||
commit. On failure, preserve already applied runtime effects, independently
|
||||
|
||||
Reference in New Issue
Block a user