Skip to content

tts-box Host & Sandboxes (Contract v22)

tts-box wraps strict tts gatekeeper actors around unmodified npm packages (such as Hono or Express bridges) and durable HTTP/MCP endpoints.

  • tts-box add & tts-box audit: Enforces a default 7-day release-age cooldown on npm resolutions and audits lockfiles against OSV advisories (MAL-*, GHSA-*, CVE-*, --osv-file, or --offline).
  • tts-box install: Installs with --ignore-scripts, supports multi-dependency boxes (1..=64 deps with adapter.mjs), copies <source>/app/** safely (rejecting symlinks, traversal, dotfiles, and node_modules), and binds a canonical SHA-256 .stamp.
  • Runtime confinement: Landlock v6+ filesystem/TCP/IPC scopes, 64-bit x86_64/aarch64 seccomp-BPF allow-lists, open-descriptor caps, OOMScoreAdj=1000, and per-box systemd cgroup v2 limits (MemoryMax, MemorySwapMax=0, TasksMax, CPUWeight).
  • HTTP/1.1, TLS 1.2/1.3 & Mutual TLS: listen[].tls / clientCa with O_NOFOLLOW non-symlink & permission checks, TLS-only hsts, longest-segment listen[].routes with per-route auth & rateLimit overrides, parse: "json" or "base64", bodyBase64, spoof-proof trustedProxies, header-stage allowCidrs, and zero-downtime fail-closed SIGHUP reload of TLS PEMs + CIDRs.
  • Edge Security & Resilience: Constant-time dual-secret bearer and hmac-sha256 auth (env/prevEnv stripped at the host edge), listen[].cors, maxBodyBytes (413), shared/per-IP rateLimit (429), post-DNS SSRF/IMDS blocking, http[].keepAlive, idempotent http[].retry, and http[].circuitBreaker.
  • Streamable HTTP MCP (2025-03-26) & Admin Telemetry: Stateful Mcp-Session-Id + loopback Origin guards, /healthz, /readyz, 23-family Prometheus /metrics, W3C traceparent + X-Request-Id, and secret-redacted --log-format=json.
  • Write-Before-Effect SQLite WAL: Atomic synchronous = FULL WAL commits + schedule[] tick watermarks before outbound effects, non-blocking limits.compactEvery, wal status/backup/verify/compact, and deterministic tts-box replay.