diff options
| author | t <t@tjp.lol> | 2026-07-04 09:50:12 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-07-05 16:23:49 -0600 |
| commit | f759f149377942c4e04802c45162cda1c9bfb2b3 (patch) | |
| tree | 397dd2fc35839d8fcbf6a5c237bee363c6ed3c07 /src/lua_runtime.zig | |
| parent | 1ed07e2e4473b91c669c062bbfef6bb499f7d2b7 (diff) | |
big cli/tui gaps project
Diffstat (limited to 'src/lua_runtime.zig')
| -rw-r--r-- | src/lua_runtime.zig | 13 |
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 |
