@@ -191,8 +191,8 @@ def test_cli_first_use_auto_installs_global_agent_enforcement(self, tmp_path, mo
191191 assert "sage run -- <command>" in content
192192 assert "npx -y psycgod-sage run -- <command>" in content
193193 assert "start through SAGE automatically" in content
194- assert "mcp__sage__sage_read_file " in content
195- assert "mcp__sage__sage_tree " in content
194+ assert "Use native file/search/edit tools normally " in content
195+ assert "SAGE MCP tools are unavailable " in content
196196 assert "Please help me with my general book in this folder" in content
197197 assert "ð" not in content
198198 assert "â" not in content
@@ -201,8 +201,8 @@ def test_cli_first_use_auto_installs_global_agent_enforcement(self, tmp_path, mo
201201 assert "PreToolUse" in settings
202202 assert "Bash(sage run -- *)" in settings
203203 assert "Bash(npx -y psycgod-sage run -- *)" in settings
204- assert "Read(*)" in settings
205- assert "mcpServers" in settings
204+ assert "Read(*)" not in settings
205+ assert "mcpServers" not in settings
206206 parsed_settings = json .loads (settings )
207207 hook_config = parsed_settings ["hooks" ]["PreToolUse" ][0 ]["hooks" ][0 ]
208208 assert hook_config ["type" ] == "command"
@@ -229,17 +229,21 @@ def test_project_install_adds_local_claude_and_agents_files(self, tmp_path):
229229
230230 claude = (tmp_path / "CLAUDE.md" ).read_text (encoding = "utf-8" )
231231 assert "SAGE Integration - MANDATORY" in claude
232- assert "mcp__sage__sage_edit_file " in claude
232+ assert "Use native file/search/edit tools normally " in claude
233233 assert "start through SAGE automatically" in claude
234234
235235 def test_cli_install_command_runs_system_enforcement (self , tmp_path , monkeypatch ):
236- from sage import install
237- from sage .cli import install_command
236+ from sage import cli
238237
239- monkeypatch .setattr (install .Path , "home" , staticmethod (lambda : tmp_path ))
240- assert install_command () == 0
241- assert (tmp_path / ".claude" / "CLAUDE.md" ).exists ()
242- assert (tmp_path / ".codex" / "AGENTS.md" ).exists ()
238+ calls : list [tuple [bool , bool ]] = []
239+
240+ def fake_activate_command (* , force : bool = False , project : bool = True ) -> int :
241+ calls .append ((force , project ))
242+ return 0
243+
244+ monkeypatch .setattr (cli , "activate_command" , fake_activate_command )
245+ assert cli .install_command (force = True , project = False , wait = False ) == 0
246+ assert calls == [(True , False )]
243247
244248 def test_auto_enforcement_warning_does_not_block_commands (self , monkeypatch ):
245249 from sage import install
0 commit comments