python-agent-harness 1.5.6.8__tar.gz → 1.5.6.9__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 (86) hide show
  1. {python_agent_harness-1.5.6.8/python_agent_harness.egg-info → python_agent_harness-1.5.6.9}/PKG-INFO +1 -1
  2. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/pyproject.toml +1 -1
  3. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/__init__.py +1 -1
  4. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/restore.py +6 -2
  5. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/io/persistence.py +9 -1
  6. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9/python_agent_harness.egg-info}/PKG-INFO +1 -1
  7. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/LICENSE +0 -0
  8. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/README.md +0 -0
  9. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/__main__.py +0 -0
  10. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/__init__.py +0 -0
  11. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/agent.py +0 -0
  12. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/context_manager.py +0 -0
  13. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/models.py +0 -0
  14. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/planmode.py +0 -0
  15. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/subagent.py +0 -0
  16. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/token_estimator.py +0 -0
  17. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/core/tool_runner.py +0 -0
  18. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/__init__.py +0 -0
  19. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/cli.py +0 -0
  20. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/controller.py +0 -0
  21. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/headless.py +0 -0
  22. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/server.py +0 -0
  23. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/entry/view.py +0 -0
  24. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/hooks.py +0 -0
  25. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/io/__init__.py +0 -0
  26. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/io/attachments.py +0 -0
  27. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/io/diffrender.py +0 -0
  28. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/io/text_filter.py +0 -0
  29. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/llm/__init__.py +0 -0
  30. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/llm/client.py +0 -0
  31. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/mcp/__init__.py +0 -0
  32. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/mcp/client.py +0 -0
  33. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/mcp/config.py +0 -0
  34. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/mcp/manager.py +0 -0
  35. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/__init__.py +0 -0
  36. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/agent.md +0 -0
  37. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/agents/reviewer.md +0 -0
  38. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/build-switch.md +0 -0
  39. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/commands/explain.md +0 -0
  40. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/compact.md +0 -0
  41. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/core.py +0 -0
  42. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/initialize.md +0 -0
  43. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/plan-mode.md +0 -0
  44. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/plan.md +0 -0
  45. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/review.md +0 -0
  46. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/subagent.md +0 -0
  47. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/summary.md +0 -0
  48. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/task-completion-rules.md +0 -0
  49. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/prompts/title.md +0 -0
  50. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/session/__init__.py +0 -0
  51. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/session/commands.py +0 -0
  52. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/session/config.py +0 -0
  53. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/session/session.py +0 -0
  54. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/__init__.py +0 -0
  55. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/agent_tool.py +0 -0
  56. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/base.py +0 -0
  57. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/bash.py +0 -0
  58. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/diffapply.py +0 -0
  59. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/edit.py +0 -0
  60. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/edit_mac.py +0 -0
  61. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/filesystem.py +0 -0
  62. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/glob.py +0 -0
  63. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/glob_mac.py +0 -0
  64. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/grep.py +0 -0
  65. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/grep_mac.py +0 -0
  66. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/mcp.py +0 -0
  67. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/planexit.py +0 -0
  68. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/question.py +0 -0
  69. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/read.py +0 -0
  70. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/skill.py +0 -0
  71. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/todo.py +0 -0
  72. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tools/write.py +0 -0
  73. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/__init__.py +0 -0
  74. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/commands.py +0 -0
  75. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/core.py +0 -0
  76. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/input.py +0 -0
  77. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/mouse.py +0 -0
  78. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness/tui/render.py +0 -0
  79. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness.egg-info/SOURCES.txt +0 -0
  80. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness.egg-info/dependency_links.txt +0 -0
  81. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness.egg-info/entry_points.txt +0 -0
  82. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness.egg-info/requires.txt +0 -0
  83. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/python_agent_harness.egg-info/top_level.txt +0 -0
  84. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/setup.cfg +0 -0
  85. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/tests/test_invariants.py +0 -0
  86. {python_agent_harness-1.5.6.8 → python_agent_harness-1.5.6.9}/tests/test_scenarios.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-agent-harness
3
- Version: 1.5.6.8
3
+ Version: 1.5.6.9
4
4
  Summary: A lightweight, hackable mini-OpenCode written in Python.
5
5
  Author-email: Huming Chen <chenhuming@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-agent-harness"
7
- version = "1.5.6.8"
7
+ version = "1.5.6.9"
8
8
  description = "A lightweight, hackable mini-OpenCode written in Python."
9
9
  authors = [
10
10
  {name = "Huming Chen", email = "chenhuming@gmail.com"}
@@ -7,7 +7,7 @@ from .mcp.config import MCPConfig, MCPServerConfig
7
7
  from .mcp.manager import MCPManager
8
8
  from .session.session import Session
9
9
 
10
- __version__ = "1.5.6.8"
10
+ __version__ = "1.5.6.9"
11
11
 
12
12
  __all__ = [
13
13
  "Client",
@@ -79,8 +79,12 @@ def load_saved_session(path: str) -> SavedSession:
79
79
 
80
80
 
81
81
  def restore_agent(controller: Controller, agent: str | None, report: Report) -> None:
82
- """Switch to the saved AGENT; fall back to the default agent (so no
83
- stale tool exclusions linger) when it no longer exists."""
82
+ """Switch to the saved AGENT; keep the current agent when the session
83
+ was saved without one (pre-agent-era file), and fall back to the
84
+ default agent (so no stale tool exclusions linger) when the saved
85
+ name no longer exists. A session saved on the default agent records
86
+ ``default`` explicitly (see SessionPersistence.metadata_block), so it
87
+ still switches back even when a custom agent is active now."""
84
88
  if not agent:
85
89
  return
86
90
  try:
@@ -170,10 +170,18 @@ class SessionPersistence:
170
170
  # -- saving ---------------------------------------------------------------
171
171
  def metadata_block(self) -> str:
172
172
  lines = [";; Local Variables:"]
173
+ # The agent is ALWAYS recorded: the built-in default is stored
174
+ # as "default" rather than omitted, so "saved on the default
175
+ # agent" stays distinguishable from a pre-agent-era file (no
176
+ # key at all) and /restore can switch a currently-active custom
177
+ # agent back to the default prompt. switch_agent also stores
178
+ # None there on a default switch (see Session.switch_agent),
179
+ # which is normalized to the reserved name here.
180
+ agent = self.agent if self.agent else "default"
173
181
  pairs = [
174
182
  ("python-agent-harness--project-dir", self.project_dir),
175
183
  ("python-agent-harness--model", self.model),
176
- ("python-agent-harness--agent", self.agent),
184
+ ("python-agent-harness--agent", agent),
177
185
  ]
178
186
  for name, value in pairs:
179
187
  if value is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-agent-harness
3
- Version: 1.5.6.8
3
+ Version: 1.5.6.9
4
4
  Summary: A lightweight, hackable mini-OpenCode written in Python.
5
5
  Author-email: Huming Chen <chenhuming@gmail.com>
6
6
  License-Expression: MIT