terraphim_middleware 1.16.34

Terraphim middleware for searching haystacks
Documentation
[package]
name = "terraphim_middleware"
version.workspace = true
edition = "2021"
authors = ["Terraphim Contributors"]
description = "Terraphim middleware for searching haystacks"
documentation = "https://terraphim.ai"
homepage = "https://terraphim.ai"
repository = "https://github.com/terraphim/terraphim-ai"
keywords = ["personal-assistant", "ai", "privacy", "middleware"]
license = "Apache-2.0"
readme = "../../README.md"


[dependencies]
terraphim_config = { path = "../terraphim_config", version = "1.0.0" }
terraphim_rolegraph = { path = "../terraphim_rolegraph", version = "1.0.0" }
terraphim_automata = { path = "../terraphim_automata", version = "1.0.0", features = ["tokio-runtime"] }
terraphim_types = { path = "../terraphim_types", version = "1.0.0" }
terraphim_persistence = { path = "../terraphim_persistence", version = "1.0.0" }
# NOTE: haystack_jmap not published to crates.io yet
# haystack_jmap = { path = "../haystack_jmap", version = "1.0.0", optional = true }
# NOTE: Atomic Data Server commented out for crates.io publishing (not published yet)
# terraphim_atomic_client = { path = "../terraphim_atomic_client", version = "1.0.0", features = ["native"], optional = true }
grepapp_haystack = { path = "../haystack_grepapp", version = "1.0.0", optional = true }
terraphim-session-analyzer = { path = "../terraphim-session-analyzer", version = "1.0.0", features = ["connectors"], optional = true }
jiff = { version = "0.2", optional = true }
home = { version = "0.5", optional = true }

ahash = { version = "0.8.8", features = ["serde"] }
cached = { version = "0.56.0", features = ["async", "serde", "ahash"] }
log = { workspace = true }

serde = { workspace = true, features = ["derive"] }

serde_json = { workspace = true }

thiserror = { workspace = true }

tokio = { workspace = true, features = ["full"] }

html2md = "0.2.15"
async-trait = { workspace = true }

url = "2.5"
urlencoding = "2.1"
reqwest = { workspace = true, features = ["json", "rustls-tls"] }

scraper = "0.25.0"
reqwest-eventsource = { version = "0.5", optional = true }
mcp-client = { version = "0.1", optional = true }
mcp-spec = { version = "0.1", optional = true }
rmcp = { version = "0.9", features = ["client", "transport-child-process"], optional = true }

[dev-dependencies]
terraphim_persistence = { path = "../terraphim_persistence", features = ["memory"] }
terraphim_settings = { path = "../terraphim_settings" }
terraphim_test_utils = { path = "../terraphim_test_utils" }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

futures = "0.3"
test-log = { version = "0.2.19", features = ["trace"] }
serial_test = "3.3"
uuid = { workspace = true, features = ["v4"] }

dotenvy = "0.15.7"
walkdir = "2.4.0"
env_logger = "0.11"
tempfile = { workspace = true }


[features]
default = []
# NOTE: atomic feature disabled for crates.io publishing (dependency not published yet)
# Placeholder feature - when dependency is published, change to:
# atomic = ["dep:terraphim_atomic_client"]
atomic = []
grepapp = ["dep:grepapp_haystack"]
# NOTE: jmap feature disabled - haystack_jmap not published to crates.io yet
jmap = []
# Enable AI coding assistant session haystack (Claude Code, OpenCode, Cursor, Aider, Codex)
ai-assistant = ["terraphim-session-analyzer", "jiff", "home"]
# Enable openrouter integration
openrouter = ["terraphim_config/openrouter"]
# Enable SSE-based MCP client probing
mcp-sse = ["reqwest-eventsource"]
# High-level MCP support using SSE/http-only (no rust-sdk)
mcp = ["mcp-sse"]
# Optional: use rust-sdk for full protocol clients
mcp-rust-sdk = ["mcp-sse", "mcp-client", "mcp-spec", "rmcp"]