nanocode-cli 0.2.4__tar.gz → 0.2.5__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.
- {nanocode_cli-0.2.4/nanocode_cli.egg-info → nanocode_cli-0.2.5}/PKG-INFO +1 -1
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode.py +5 -24
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5/nanocode_cli.egg-info}/PKG-INFO +1 -1
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/pyproject.toml +1 -1
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/LICENSE +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/MANIFEST.in +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/README.md +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode_cli.egg-info/SOURCES.txt +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode_cli.egg-info/dependency_links.txt +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode_cli.egg-info/entry_points.txt +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode_cli.egg-info/requires.txt +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/nanocode_cli.egg-info/top_level.txt +0 -0
- {nanocode_cli-0.2.4 → nanocode_cli-0.2.5}/setup.cfg +0 -0
|
@@ -41,7 +41,7 @@ from prompt_toolkit.patch_stdout import patch_stdout
|
|
|
41
41
|
|
|
42
42
|
JsonValue: TypeAlias = Any
|
|
43
43
|
Json: TypeAlias = dict[str, JsonValue]
|
|
44
|
-
__version__ = "0.2.
|
|
44
|
+
__version__ = "0.2.5"
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
class Error(Exception): ...
|
|
@@ -1734,8 +1734,10 @@ Input:
|
|
|
1734
1734
|
- Latest_User_Input: latest user message
|
|
1735
1735
|
- Tools: available tool specs
|
|
1736
1736
|
|
|
1737
|
-
Output
|
|
1738
|
-
|
|
1737
|
+
Output MUST be exactly one JSON object.
|
|
1738
|
+
No markdown, prose, code fences, XML tags, native tool calls, or text outside JSON.
|
|
1739
|
+
Put normal replies in message_to_user.
|
|
1740
|
+
Put tool calls only in JSON tool_calls.
|
|
1739
1741
|
|
|
1740
1742
|
Schema:
|
|
1741
1743
|
{
|
|
@@ -2675,7 +2677,6 @@ class ConversationCompactor:
|
|
|
2675
2677
|
@final
|
|
2676
2678
|
class Agent:
|
|
2677
2679
|
MAX_CONSECUTIVE_FORMAT_ERRORS: ClassVar[int] = 3
|
|
2678
|
-
MAX_CONSECUTIVE_SUMMARY_GATES: ClassVar[int] = 1
|
|
2679
2680
|
|
|
2680
2681
|
def __init__(self, session: Session):
|
|
2681
2682
|
self.session = session
|
|
@@ -2725,7 +2726,6 @@ class Agent:
|
|
|
2725
2726
|
self.maybe_auto_compact()
|
|
2726
2727
|
self.session.append_conversation(UserMessage(content=user_input))
|
|
2727
2728
|
consecutive_format_errors = 0
|
|
2728
|
-
consecutive_summary_gates = 0
|
|
2729
2729
|
|
|
2730
2730
|
for _ in range(self.session.max_agent_steps):
|
|
2731
2731
|
response = self.step()
|
|
@@ -2758,25 +2758,6 @@ class Agent:
|
|
|
2758
2758
|
continue
|
|
2759
2759
|
consecutive_format_errors = 0
|
|
2760
2760
|
tool_calls = _json_list(response.get("tool_calls"))
|
|
2761
|
-
summary_gate = self._format_tool_summary_gate(tool_calls)
|
|
2762
|
-
if summary_gate:
|
|
2763
|
-
consecutive_summary_gates += 1
|
|
2764
|
-
if consecutive_summary_gates <= self.MAX_CONSECUTIVE_SUMMARY_GATES:
|
|
2765
|
-
self.state_updater.latest_report = ""
|
|
2766
|
-
self.latest_agent_feedback = summary_gate
|
|
2767
|
-
self._report_gate(
|
|
2768
|
-
on_message,
|
|
2769
|
-
"Retrying: model needs to summarize the latest tool results.",
|
|
2770
|
-
self._compact_gate_report(summary_gate),
|
|
2771
|
-
)
|
|
2772
|
-
continue
|
|
2773
|
-
self._report_gate(
|
|
2774
|
-
on_message,
|
|
2775
|
-
"Continuing: model did not summarize tool results after one retry.",
|
|
2776
|
-
"Tool_Summary_Gate: allowing continuation after one missing-summary retry.",
|
|
2777
|
-
)
|
|
2778
|
-
else:
|
|
2779
|
-
consecutive_summary_gates = 0
|
|
2780
2761
|
self.apply_response(response)
|
|
2781
2762
|
if on_message is not None and self.state_updater.latest_report:
|
|
2782
2763
|
on_message(self.state_updater.latest_report)
|
|
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
|