On this page

0297. Sandboxed Hot-Reloadable Script Plugins (M22.7–M22.10 Core)

Context

ADR-0280 established the architecture for runtime script plugins ([plugin] kind = "script"), including manifest validation (slice 1) and the pure host primitives in plugins/script_host/. Three runtime pieces remained to make script plugins usable end-to-end:

  1. M22.7 (script_serve.rs): a framed-stdio interpreter serve loop (tenon script-serve) with per-call Traps domain isolation so fuel exhaustion, deadline expiry, or runtime traps never crash the host or the plugin serve loop.
  2. M22.8 (plugin_kit.rs): script conformance validation, exec_hash enforcement vs --dev-plugins live reload, and reusable host-interface extraction + ScriptPlugin dispatcher and typed proxy codegen.
  3. M22.9 (plugins/script_host/): complete host-side protocol framing, ADR-0099 exec_hash pinning, fswatch.coalesce-backed hot-reload watcher, and proc.lib-backed sandboxed session lifecycle with crash recovery and clean restart.

Decision

1. Framed-Stdio Interpreter Serve Loop (crates/tenon-compiler/src/interp/script_serve.rs)

2. Script Conformance, Dispatcher/Proxy Codegen & Hash Lock (crates/tenon/src/plugin_kit.rs)

3. Complete plugins/script_host/ Runtime Library

4. Reserved Diagnostic Codes

Consequences