Files
strata-ctl/Cargo.toml
T
adm 7dd66ea138 Render assistant Markdown and LaTeX as sanitized HTML with native MathML
Server-side rendering keeps the browser free of any Markdown/MathJax toolchain (single-binary). New src/render.rs: pulldown-cmark (tables/strikethrough/math) + pulldown-latex -> MathML Core. Safety: raw HTML events are escaped to text (pulldown-cmark 0.13 has no ENABLE_HTML opt-out) and link/image URLs pass a scheme allowlist (javascript:/data:/vbscript: stripped, control chars removed). content_html is added to get_messages (assistant only) and to the agent Final SSE event; the GUI injects it via innerHTML for assistant bubbles (history + live) while user text stays textContent. CSS styles Markdown and native MathML; block math must not override display (UA block math layout) or it collapses to vertical stacks. 10 render unit tests incl. XSS; 136 tests green, clippy/fmt clean; verified live + visually.
2026-11-25 20:58:20 +01:00

36 lines
1.2 KiB
TOML

[package]
name = "strata-ctl"
version = "0.1.0"
edition = "2021"
description = "Rust control layer for the Strata inference engine: OpenAI-compatible HTTP API over the engine's line protocol"
license = "MIT"
[dependencies]
anyhow = "1"
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread", "process", "io-util", "sync", "time", "macros", "signal", "net"] }
tracing = "0.1"
axum = "0.8"
futures = "0.3.34"
tokio-stream = "0.1.19"
tokenizers = "0.23.2"
minijinja = { version = "3.1.0", features = ["serde"] }
image = "0.25.10"
base64 = "0.23.1"
ureq = "3.5.2"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
# Embedded SQLite for the GUI's session/context store (bundled = compiled into the
# binary, no external service). Behind a `Store` trait so it can be swapped later.
rusqlite = { version = "0.32", features = ["bundled"] }
# Embeds the web/ GUI assets into the binary (single-binary, offline-capable).
rust-embed = "8"
pulldown-cmark = "0.13.6"
pulldown-latex = "0.8.0"
[dev-dependencies]
http-body-util = "0.1.5"
tokio = { version = "1", features = ["full"] }
tower = { version = "0.5", features = ["util"] }