A TypeScript engine for running code nobody has read — preemptible, formally verified TypeScript actors (`tts`) paired with Linux Landlock/seccomp/cgroup v2 capability boxes and a durable HTTPS/mTLS/MCP host (`tts-box`).
Modern TypeScript applications increasingly combine AI-authored logic with deep npm dependency trees exposed to supply-chain attacks. Conventional JavaScript runtimes grant every dependency ambient access to memory, CPU, disk, environment variables, and sockets.
trusted-ts splits execution across a strict capability boundary in a 4-crate Rust workspace (tts-kernel → tts-engine → tts-prove → tts):
1. tts — Strict Engine & Z3 Verifier
Compiles a deterministic, prototype-free TypeScript subset to a 41-opcode bytecode VM with zero runtime I/O, buddy-allocated memory regions, instruction-fuel preemption, transactional invariant(state) rollback, and incremental Z3 proofs with SARIF 2.1.0 & SHA-256 certificates.
Because tts compiles every RegExp literal to a bounded <= 256-state Thompson NFA executed in a fuel-metered PikeVM (O(|pattern| * |input|)), exponential backtracking (EVIL_RE = /^(a+)+$/ on "a".repeat(N) + "!") never stalls your event loop:
Evil Regex ReDoS Check (/^(a+)+$/ on 'a'.repeat(28) + '!')
End-to-end execution latency (ms)
Lower is better
tts run (Thompson NFA / PikeVM)0.157 ms · O(N) · 75,945x faster
Node V8 (backtracking engine)11,911.430 ms · Exceeds > 13 hours at N = 40