feat(approvals): add profile-local per-tool policies

This commit is contained in:
Teknium 2026-07-12 20:50:20 -07:00
parent e589b739ca
commit 5bff2c28ee
No known key found for this signature in database
13 changed files with 1307 additions and 39 deletions

View file

@ -1906,6 +1906,8 @@ def init_agent(
# would still leak lcm_* tools into the tool surface and incur the
# same local-model latency penalty.
agent._context_engine_tool_names: set = set()
if not hasattr(agent, "_dynamic_tool_entries"):
agent._dynamic_tool_entries = {}
if (
hasattr(agent, "context_compressor")
and agent.context_compressor
@ -1940,6 +1942,10 @@ def init_agent(
agent.tools.append(_wrapped)
agent.valid_tool_names.add(_tname)
agent._context_engine_tool_names.add(_tname)
from tools.registry import DynamicToolEntry as _DynamicToolEntry
agent._dynamic_tool_entries[_tname] = _DynamicToolEntry(
_tname, "context_engine"
)
_existing_tool_names.add(_tname)
# Notify context engine of session start