File size: 6,491 Bytes
1b5c6c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# SPF Smart Gateway - MCP Command Gateway
# Copyright 2026 Joseph Stone - All Rights Reserved
#
# All tool calls route through this gateway.
# Enforces SPF complexity formula, validates rules,
# gates all file/bash operations. Pure Rust, LMDB state,
# MCP stdio JSON-RPC 2.0.

[package]
name = "spf-smart-gate"
version = "3.0.0"
edition = "2021"
authors = ["Joseph Stone <joepcstone@gmail.com>"]
description = "SPF Smart GATE - MCP command gateway with complexity enforcement"
license-file = "LICENSE.md"
repository = "https://github.com/STONE-CELL-SPF-JOSEPH-STONE/SPFsmartGATE"
readme = "README.md"

[[bin]]
name = "spf-smart-gate"
path = "src/main.rs"

[[bin]]
name = "prune_memories"
path = "src/bin/prune_memories.rs"

[[bin]]
name = "jsonl_to_tlog"
path = "src/bin/jsonl_to_tlog.rs"

[[bin]]
name = "brain_index_training"
path = "src/bin/brain_index_training.rs"

[lib]
name = "spf_smart_gate"
path = "src/lib.rs"

[dependencies]
# ============================================================================
# LOCAL BRAIN — In-process Candle RAG (stoneshell-brain)
# MiniLM-L6-v2 embeddings + LMDB vector store — zero API tokens, zero subprocesses
# Model: LIVE/TMP/stoneshell-brain/models/all-MiniLM-L6-v2/
# Storage: LIVE/TMP/stoneshell-brain/storage/
# ============================================================================
stoneshell-brain = { path = "LIVE/TMP/stoneshell-brain", features = ["cpu"] }

# ============================================================================
# STATE STORAGE - LMDB
# ============================================================================
heed = "0.20"

# ============================================================================
# SERIALIZATION
# ============================================================================
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# ============================================================================
# CLI
# ============================================================================
clap = { version = "4.5", features = ["derive"] }

# ============================================================================
# ERROR HANDLING
# ============================================================================
thiserror = "1.0"
anyhow = "1.0"

# ============================================================================
# LOGGING
# ============================================================================
log = "0.4"
env_logger = "0.11"

# ============================================================================
# TIME
# ============================================================================
chrono = { version = "0.4", features = ["serde"] }

# ============================================================================
# WEB BROWSER — AI-friendly HTTP client
# ============================================================================
reqwest = { version = "0.12", default-features = false, features = ["blocking", "rustls-tls", "json"] }
html2text = "0.6"

# ============================================================================
# FILESYSTEM — SHA256 checksums + hex encoding (NEW for fs.rs)
# ============================================================================
sha2 = "0.10"
hex = "0.4"

# ============================================================================
# CRYPTOGRAPHIC IDENTITY — Ed25519 key pairs for mesh authentication
# ============================================================================
ed25519-dalek = { version = "3.0.0-pre.1", features = ["rand_core"] }
rand = "0.9"

# ============================================================================
# HTTP API — Axum async HTTP framework with TLS (replaces tiny_http)
# ============================================================================
axum = { version = "0.8", features = ["ws"] }
axum-server = { version = "0.8", features = ["tls-rustls"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["trace", "cors", "timeout", "limit", "catch-panic", "sensitive-headers", "request-id", "compression-gzip"] }
rcgen = { version = "0.13", features = ["pem", "ring"] }

# ============================================================================
# (CDP BROWSER removed — WB-2a. Reverse proxy uses axum ws instead)
# ============================================================================

# ============================================================================
# CHANNEL HUB — WebSocket client for agent→hub connections (CH-4)
# ============================================================================
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] }
futures-util = "0.3"
http = "1"

# ============================================================================
# MESH NETWORKING — P2P QUIC with NAT traversal
# ============================================================================
iroh = { version = "0.96", features = ["address-lookup-mdns", "address-lookup-pkarr-dht"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync"] }

# ============================================================================
# VOICE PIPELINE — hardware deps removed WB-3 for cross-platform build.
# Re-integrate via OS audio layer. Voice tools stubbed in voice.rs.
# ============================================================================
# ============================================================================
# FEATURES — Voice hardware deps removed (WB-3). Re-integrate via OS audio
# layer when terminal/OS is ready. All 3 voice tools remain as stubs.
# ============================================================================
[features]
default = []
# Feature names declared for cfg() compatibility — no deps enabled (WB-3: voice handled by inline stub)
voice-stt = []
voice-tts = []

# ============================================================================
# PROFILES
# ============================================================================
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true

[profile.dev]
opt-level = 1

# ============================================================================
# DEV DEPENDENCIES — for tests only
# ============================================================================
[dev-dependencies]
tempfile = "3"