agent-toggle 0.11.0__tar.gz → 0.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/PKG-INFO +1 -1
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/__init__.py +1 -1
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/picker.py +7 -2
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/PKG-INFO +1 -1
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_cli.py +13 -1
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_picker.py +5 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/LICENSE +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/README.md +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/__main__.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/backends/__init__.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/backends/flag_json.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/backends/mcp_json.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/backends/mcp_toml.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/backends/plugin_cli.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/cli.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/companions.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/config.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/cost.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/doctor.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/fs.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/harnesses.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/help.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/i18n.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/locales/__init__.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/locales/zh_tw_cli.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/locales/zh_tw_common.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/locales/zh_tw_config.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/locales/zh_tw_picker.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/mechanisms.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ops.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/output.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/profiles.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/settings.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/shims/claude.md.tmpl +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/shims/generic.md.tmpl +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/spinner.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/store.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/toml_check.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/__init__.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/config_menu.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/logo.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/menu.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/model.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/ui/theme.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/undo.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/update_check.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle/update_prompt.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/SOURCES.txt +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/dependency_links.txt +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/entry_points.txt +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/requires.txt +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/agent_toggle.egg-info/top_level.txt +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/pyproject.toml +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/setup.cfg +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_alias.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_all_type.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_backends.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_cli_surface.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_color.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_companions.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_completions.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_config.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_config_menu.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_conformance.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_containment.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_cost.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_crash.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_doctor.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_encoding.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_fs.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_harnesses.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_help.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_i18n.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_install.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_logo.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_mechanisms.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_menu.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_mods.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_platform.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_profiles.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_project.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_safety.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_same_name.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_secret_audit.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_settings.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_store.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_theme.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_undo.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_update_check.py +0 -0
- {agent_toggle-0.11.0 → agent_toggle-0.11.2}/tests/test_update_prompt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-toggle
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Temporarily disable / re-enable AI-agent skills, agents, commands, rules, plugins and MCP servers across harnesses (Claude Code, Codex, Grok, OpenCode, OpenClaw, Copilot, Vibe, Devin, Antigravity)
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/weskao/agent-toggle
|
|
@@ -499,8 +499,11 @@ def loop(win, rows: list[Row], color: bool = False, project: Path | None = None,
|
|
|
499
499
|
elif key in (curses.KEY_LEFT, curses.KEY_RIGHT):
|
|
500
500
|
v.tab(-1 if key == curses.KEY_LEFT else 1)
|
|
501
501
|
elif key in BACKSPACE:
|
|
502
|
+
# a trailing Space is only the term separator: the rows, and so the cursor, stay
|
|
503
|
+
if not v.query.endswith(" "):
|
|
504
|
+
v.cur = 0
|
|
502
505
|
v.query = v.query[:-1]
|
|
503
|
-
v.typing
|
|
506
|
+
v.typing = v.typing and bool(v.query)
|
|
504
507
|
elif key == "\x15": # Ctrl-U
|
|
505
508
|
v.query, v.typing, v.cur = "", False, 0
|
|
506
509
|
elif key == "\x01" or key == "a" and not v.filtering: # Ctrl-A / a
|
|
@@ -531,7 +534,9 @@ def loop(win, rows: list[Row], color: bool = False, project: Path | None = None,
|
|
|
531
534
|
v.cur = 0
|
|
532
535
|
elif isinstance(key, str) and key.isprintable():
|
|
533
536
|
v.query += key
|
|
534
|
-
v.typing
|
|
537
|
+
v.typing = True
|
|
538
|
+
if key != " ": # the separator matches the same rows
|
|
539
|
+
v.cur = 0
|
|
535
540
|
# KEY_RESIZE and anything else: just redraw at the new size
|
|
536
541
|
|
|
537
542
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-toggle
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Temporarily disable / re-enable AI-agent skills, agents, commands, rules, plugins and MCP servers across harnesses (Claude Code, Codex, Grok, OpenCode, OpenClaw, Copilot, Vibe, Devin, Antigravity)
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/weskao/agent-toggle
|
|
@@ -173,7 +173,8 @@ class UpdateCheckTest(CliCase):
|
|
|
173
173
|
self.addCleanup(env.stop)
|
|
174
174
|
os.environ.pop("AGENT_TOGGLE_UPDATE_CHECK", None)
|
|
175
175
|
for target, kw in ((update_check, {"fetch_pypi": mock.Mock(return_value=PYPI_99)}),
|
|
176
|
-
(update_prompt, {"is_interactive": mock.Mock(return_value=False)})
|
|
176
|
+
(update_prompt, {"is_interactive": mock.Mock(return_value=False)}),
|
|
177
|
+
(fs, {"WIN": False})): # the panel/upgrade flow; Windows has its own test
|
|
177
178
|
patch = mock.patch.multiple(target, **kw)
|
|
178
179
|
patch.start()
|
|
179
180
|
self.addCleanup(patch.stop)
|
|
@@ -239,6 +240,17 @@ class UpdateCheckTest(CliCase):
|
|
|
239
240
|
self.assertIn("upgrade did not finish — run it yourself: uv tool upgrade agent-toggle"
|
|
240
241
|
"\n agent-toggle install-shims", err)
|
|
241
242
|
|
|
243
|
+
def test_windows_tty_only_hints_and_never_upgrades(self) -> None:
|
|
244
|
+
update_prompt.is_interactive.return_value = True
|
|
245
|
+
with mock.patch.object(fs, "WIN", True), \
|
|
246
|
+
mock.patch.object(update_prompt, "ask") as ask, \
|
|
247
|
+
mock.patch.object(update_prompt.subprocess, "run") as run:
|
|
248
|
+
rc, _, err = self.run_cli("--version") # agent-toggle.exe cannot replace itself
|
|
249
|
+
self.assertEqual(rc, 0)
|
|
250
|
+
self.assertIn(HINT, err)
|
|
251
|
+
ask.assert_not_called()
|
|
252
|
+
run.assert_not_called()
|
|
253
|
+
|
|
242
254
|
def test_tty_skip_version_and_ctrl_c(self) -> None:
|
|
243
255
|
update_prompt.is_interactive.return_value = True
|
|
244
256
|
with mock.patch.object(update_prompt, "ask", side_effect=KeyboardInterrupt):
|
|
@@ -264,6 +264,11 @@ class KeysTest(ScreenCase):
|
|
|
264
264
|
self.assertIn("○ - alpha", line)
|
|
265
265
|
self.assertIn("● + beta", win.screen[win.find("beta")])
|
|
266
266
|
|
|
267
|
+
def test_the_search_separator_keeps_the_cursor(self) -> None:
|
|
268
|
+
# "a" matches every row; the cursor on beta stays there through Space and Backspace
|
|
269
|
+
out, _ = self.run_keys(["/", "a", picker.curses.KEY_DOWN, " ", "\x7f", " ", " ", "\n"])
|
|
270
|
+
self.assertEqual(self.names(out), [("beta", True)])
|
|
271
|
+
|
|
267
272
|
def test_toggling_twice_unstages(self) -> None:
|
|
268
273
|
out, _ = self.run_keys(["\t", "\x10", " ", "\n"]) # Tab down, Ctrl-P back up
|
|
269
274
|
self.assertEqual(out, [])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|