Skip to content

Commit 1301784

Browse files
committed
refactor: extract bootstrap/AppBuilder from main.rs (#393)
Move 16 initialization functions from main.rs into crates/zeph-core/src/bootstrap.rs with AppBuilder struct. AppBuilder::from_env() resolves config, vault, and secrets. Build methods: build_provider(), build_memory(), build_skill_matcher(), build_registry(), build_tool_executor(), build_watchers(), build_shutdown(), build_summary_provider(). main.rs reduced from 2313 to 978 lines. Remaining: CLI parsing, channel creation, TUI wiring, A2A server, agent run loop. Add feature forwarding in zeph-core (candle, compatible, cuda, metal, openai, orchestrator, qdrant, router). Add Clone+Copy to SecurityConfig and TimeoutConfig. Resolves #393
1 parent 0cd145e commit 1301784

File tree

6 files changed

+1777
-1522
lines changed

6 files changed

+1777
-1522
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ repository.workspace = true
106106
default = ["compatible", "openai", "qdrant", "self-learning", "vault-age"]
107107
full = ["a2a", "compatible", "discord", "gateway", "index", "mcp", "openai", "orchestrator", "qdrant", "router", "self-learning", "slack", "tui", "vault-age"]
108108
a2a = ["dep:zeph-a2a", "zeph-a2a?/server"]
109-
compatible = ["zeph-llm/compatible"]
109+
compatible = ["zeph-llm/compatible", "zeph-core/compatible"]
110110
mcp = ["dep:zeph-mcp", "zeph-core/mcp"]
111-
qdrant = ["zeph-skills/qdrant", "zeph-mcp?/qdrant"]
112-
candle = ["zeph-llm/candle"]
113-
metal = ["zeph-llm/metal"]
114-
cuda = ["zeph-llm/cuda"]
115-
openai = ["zeph-llm/openai"]
116-
orchestrator = ["zeph-llm/orchestrator"]
117-
router = ["zeph-llm/router"]
111+
qdrant = ["zeph-skills/qdrant", "zeph-mcp?/qdrant", "zeph-core/qdrant"]
112+
candle = ["zeph-llm/candle", "zeph-core/candle"]
113+
metal = ["zeph-llm/metal", "zeph-core/metal"]
114+
cuda = ["zeph-llm/cuda", "zeph-core/cuda"]
115+
openai = ["zeph-llm/openai", "zeph-core/openai"]
116+
orchestrator = ["zeph-llm/orchestrator", "zeph-core/orchestrator"]
117+
router = ["zeph-llm/router", "zeph-core/router"]
118118
self-learning = ["zeph-core/self-learning"]
119119
tui = ["dep:zeph-tui"]
120120
discord = ["zeph-channels/discord"]

crates/zeph-core/Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ repository.workspace = true
88

99
[features]
1010
default = []
11+
candle = ["zeph-llm/candle"]
12+
compatible = ["zeph-llm/compatible"]
13+
cuda = ["zeph-llm/cuda"]
14+
daemon = []
1115
index = ["dep:zeph-index"]
1216
mcp = ["dep:zeph-mcp"]
13-
daemon = []
17+
metal = ["zeph-llm/metal"]
18+
openai = ["zeph-llm/openai"]
19+
orchestrator = ["zeph-llm/orchestrator"]
20+
qdrant = ["zeph-skills/qdrant", "zeph-mcp?/qdrant"]
21+
router = ["zeph-llm/router"]
1422
self-learning = ["zeph-skills/self-learning"]
1523
vault-age = ["dep:age"]
1624

0 commit comments

Comments
 (0)