feat: per-conversation project binding + action-tool consent gate

- Conversations bind to a project on creation; RAG scopes to the
  conversation's project, not the global setting.
- Action tools (web_search/fetch_url/remember) are withheld unless
  allow_action_tools is enabled (off by default). Settings toggle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jon
2026-07-23 14:29:40 -05:00
co-authored by Claude Opus 4.8
parent ba6a4ac4e4
commit 492020b547
6 changed files with 91 additions and 10 deletions
+9
View File
@@ -41,6 +41,15 @@ def test_action_tools_registered():
assert names == ["web_search", "remember"]
def test_action_tools_gated_by_consent():
allow = ["search_memory", "web_search", "remember", "fetch_url"]
on = [s["function"]["name"] for s in tools.schemas_for(allow, allow_actions=True)]
off = [s["function"]["name"] for s in tools.schemas_for(allow, allow_actions=False)]
assert set(on) == set(allow) # all pass when actions allowed
assert off == ["search_memory"] # action tools withheld when not
assert tools.is_action("remember") and not tools.is_action("search_memory")
class _FakeManager:
"""Returns a tool_call on the first chat() call, plain content after."""
def __init__(self):