1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Bootstrap module — first-run setup for the Spool desktop app.
//!
//! Responsible for the "install once, AI tools just work" experience:
//!
//! 1. Release embedded binaries to `~/.spool/bin/`
//! 2. Create standard data directory layout under `~/.spool/`
//! 3. Add `~/.spool/bin` to user's shell PATH
//! 4. Register MCP integration for detected AI tools (Claude Code, Cursor, etc.)
//! 5. Install Claude Code hooks (Stop, SessionStart, etc.)
//! 6. Mark first-run complete via `~/.spool/version.json`
//!
//! The Tauri desktop app calls `run_bootstrap_if_needed` on startup.
//! Subsequent launches detect the version marker and skip the heavy work.
//!
//! ## Directory layout
//!
//! ```text
//! ~/.spool/
//! ├── bin/ ← Released binaries (added to PATH)
//! │ ├── spool
//! │ ├── spool-mcp
//! │ └── spool-daemon
//! ├── data/ ← Ledger, projection cache, config
//! │ ├── memory-ledger.jsonl
//! │ ├── memory-ledger.latest-state.json
//! │ └── config.toml
//! ├── plugins/ ← Future: Pro plugins (.dylib/.so/.dll)
//! ├── version.json ← Bootstrap state + service version
//! └── license.json ← Future: Pro license (absent in OSS)
//! ```
pub use ;
pub use SpoolLayout;
pub use ;
pub use ;
pub use ;
pub use ;