From c7b5d00f195cbb70d5a7f79ddc41cbbc8c7cacf7 Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 20 Mar 2026 20:04:49 -0400 Subject: [PATCH] Add `get_runtime_vars()` accessor to `._state` Expose a copy of the current actor's `_runtime_vars` dict via a public fn; TODO to convert to `RuntimeVars` struct. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tractor/_state.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tractor/_state.py b/tractor/_state.py index 7a4e1242..89e29d40 100644 --- a/tractor/_state.py +++ b/tractor/_state.py @@ -234,3 +234,12 @@ def current_ipc_protos() -> list[str]: ''' return _runtime_vars['_enable_tpts'] + + +# !TODO, convert this to the new `RuntimeVars` struct! +def get_runtime_vars() -> dict: + ''' + Deliver a **copy** of the current `Actor`'s "runtime variables". + + ''' + return dict(_runtime_vars)