summaryrefslogtreecommitdiff
path: root/src/lua_runtime.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua_runtime.zig')
-rw-r--r--src/lua_runtime.zig13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lua_runtime.zig b/src/lua_runtime.zig
index e2b7ec8..7363281 100644
--- a/src/lua_runtime.zig
+++ b/src/lua_runtime.zig
@@ -1,11 +1,14 @@
-//! Long-lived Lua runtime, registered with libpanto as a single
+//! Session-lived Lua runtime, registered with libpanto as a single
//! `ToolSource`.
//!
//! This replaces the per-call `lua_State` model of phase 3 (LuaTool +
-//! LuaStatePool). The CLI maintains exactly one `lua_State` for its
-//! entire lifetime. Every extension is loaded into it once; extension
-//! top-level code runs exactly once at startup. Tool handlers are
-//! stored in the Lua registry and looked up by tool name on each call.
+//! LuaStatePool). The CLI maintains exactly one `lua_State` per SESSION:
+//! the runtime's lifetime IS the session's, and `/new`//`/resume` tear it
+//! down and boot a fresh one through the startup path (see the lifetime
+//! contract in `extension_loader.zig`). Every extension is loaded into it
+//! once; extension top-level code runs exactly once at session start. Tool
+//! handlers are stored in the Lua registry and looked up by tool name on
+//! each call.
//!
//! libpanto delivers all tool calls targeting Lua-defined tools in one
//! `invoke_batch` per turn, on a single thread (see