anixcode 0.12.1__tar.gz → 0.12.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.
Files changed (59) hide show
  1. {anixcode-0.12.1 → anixcode-0.12.2}/PKG-INFO +1 -1
  2. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/__init__.py +1 -1
  3. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/agent.py +4 -2
  4. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/settings.py +3 -1
  5. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/PKG-INFO +1 -1
  6. {anixcode-0.12.1 → anixcode-0.12.2}/pyproject.toml +1 -1
  7. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_v011_features.py +16 -0
  8. {anixcode-0.12.1 → anixcode-0.12.2}/LICENSE +0 -0
  9. {anixcode-0.12.1 → anixcode-0.12.2}/README.md +0 -0
  10. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/__main__.py +0 -0
  11. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/airpc.py +0 -0
  12. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/browser.py +0 -0
  13. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/checkpoints.py +0 -0
  14. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/cli.py +0 -0
  15. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/commands.py +0 -0
  16. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/compaction.py +0 -0
  17. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/danger.py +0 -0
  18. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/i18n.py +0 -0
  19. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/i18n_en.py +0 -0
  20. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/images.py +0 -0
  21. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/llm.py +0 -0
  22. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/mcp.py +0 -0
  23. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/mentions.py +0 -0
  24. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/projects.py +0 -0
  25. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/prompts.py +0 -0
  26. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/providers.py +0 -0
  27. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/storage.py +0 -0
  28. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/__init__.py +0 -0
  29. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/base.py +0 -0
  30. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/browser.py +0 -0
  31. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/files.py +0 -0
  32. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/search.py +0 -0
  33. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/shell.py +0 -0
  34. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/todo.py +0 -0
  35. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tools/web.py +0 -0
  36. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/__init__.py +0 -0
  37. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/anim.py +0 -0
  38. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/app.py +0 -0
  39. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/app.tcss +0 -0
  40. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/screens.py +0 -0
  41. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode/tui/widgets.py +0 -0
  42. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/SOURCES.txt +0 -0
  43. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/dependency_links.txt +0 -0
  44. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/entry_points.txt +0 -0
  45. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/requires.txt +0 -0
  46. {anixcode-0.12.1 → anixcode-0.12.2}/anixcode.egg-info/top_level.txt +0 -0
  47. {anixcode-0.12.1 → anixcode-0.12.2}/setup.cfg +0 -0
  48. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_agent.py +0 -0
  49. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_commands.py +0 -0
  50. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_i18n.py +0 -0
  51. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_images.py +0 -0
  52. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_llm.py +0 -0
  53. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_mcp.py +0 -0
  54. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_projects.py +0 -0
  55. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_providers.py +0 -0
  56. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_reliability.py +0 -0
  57. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_safety_mentions.py +0 -0
  58. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_settings.py +0 -0
  59. {anixcode-0.12.1 → anixcode-0.12.2}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anixcode
3
- Version: 0.12.1
3
+ Version: 0.12.2
4
4
  Summary: AI coding agent for the terminal. Bring your own API key.
5
5
  Author: an1zy
6
6
  License-Expression: MIT
@@ -1,3 +1,3 @@
1
1
  """ANIX Code: an AI coding agent for your terminal. Bring your own API key."""
2
2
 
3
- __version__ = "0.12.1"
3
+ __version__ = "0.12.2"
@@ -169,7 +169,7 @@ class SubagentTool(Tool):
169
169
  sub_settings = Settings(
170
170
  provider=self._parent.settings.provider,
171
171
  model=self._parent.settings.model,
172
- max_steps=min(15, self._parent.settings.max_steps),
172
+ max_steps=15 if self._parent.settings.max_steps <= 0 else min(15, self._parent.settings.max_steps),
173
173
  context_window=self._parent.settings.context_window,
174
174
  protect_secrets=self._parent.settings.protect_secrets,
175
175
  full_access=self._parent.settings.full_access,
@@ -397,7 +397,9 @@ class Agent:
397
397
  system = {"role": "system", "content": system_prompt(self.ctx.root, self.mode, goal=self.active_goal)}
398
398
  overflow_retried = False
399
399
  gave_up = False # compaction could not shrink the history: don't retry every step
400
- for _step in range(self.settings.max_steps):
400
+ step = 0
401
+ while self.settings.max_steps <= 0 or step < self.settings.max_steps:
402
+ step += 1
401
403
  limit = self.window * compaction.COMPACT_AT
402
404
  try:
403
405
  gave_up, compact_events = await self._maybe_compact(session, limit, gave_up)
@@ -29,7 +29,7 @@ class Settings:
29
29
  animations: bool = True
30
30
  # "ask" | "allow" | "deny" for tools that change things. Reading is always allowed.
31
31
  permissions: dict[str, str] = field(default_factory=lambda: {"edit": "ask", "exec": "ask"})
32
- max_steps: int = 50
32
+ max_steps: int = 0 # 0 = unlimited (stop anytime with Esc)
33
33
  full_access: bool = False # the agent edits and runs commands without asking
34
34
  confirm_dangerous: bool = False # if true, dangerous shell commands still ask even in full_access
35
35
  protect_secrets: bool = True # warn/ask before reading .env, private keys, credentials
@@ -74,6 +74,8 @@ def load_settings(base: Path | None = None) -> Settings:
74
74
  raw["theme"] = "anix" # 0.1.0 saved its old default theme; switch to the new default once
75
75
  if raw.get("theme") == "opencode":
76
76
  raw["theme"] = "noir" # renamed in 0.8
77
+ if raw.get("max_steps") == 50:
78
+ raw["max_steps"] = 0 # old default cap removed; 0 = unlimited
77
79
  s = Settings(**{k: v for k, v in raw.items() if k in known})
78
80
  s.permissions = {k: v for k, v in dict(s.permissions).items() if v in PERMISSION_VALUES}
79
81
  s.custom_providers = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anixcode
3
- Version: 0.12.1
3
+ Version: 0.12.2
4
4
  Summary: AI coding agent for the terminal. Bring your own API key.
5
5
  Author: an1zy
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anixcode"
3
- version = "0.12.1"
3
+ version = "0.12.2"
4
4
  description = "AI coding agent for the terminal. Bring your own API key."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -346,5 +346,21 @@ def test_tui_boots_with_browser_pane_and_todo_bar(tmp_path):
346
346
  asyncio.run(go())
347
347
 
348
348
 
349
+ def test_unlimited_steps_by_default_and_legacy_50_migrates(tmp_path):
350
+ from anixcode.settings import load_settings
351
+
352
+ # Old settings.json with default max_steps=50 migrates to 0 (unlimited)
353
+ (tmp_path / "settings.json").write_text('{"max_steps": 50}', encoding="utf-8")
354
+ assert load_settings(tmp_path).max_steps == 0
355
+
356
+ (tmp_path / "a.txt").write_text("hi\n")
357
+ script = [Completion(tool_calls=[_call("read", f"r{i}", path="a.txt")]) for i in range(55)]
358
+ script.append(Completion(text="finished after 55 steps"))
359
+ agent = Agent(ScriptClient(script), "m", tmp_path, Settings())
360
+ events = asyncio.run(_collect(agent.run(Session("u1", str(tmp_path)), "run long")))
361
+ assert isinstance(events[-1], Done)
362
+ assert any(isinstance(e, TextDelta) and "55 steps" in e.text for e in events)
363
+
364
+
349
365
  async def _collect(aiter):
350
366
  return [ev async for ev in aiter]
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