tunacode-cli 0.0.26__py3-none-any.whl → 0.0.27__py3-none-any.whl

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.

Potentially problematic release.


This version of tunacode-cli might be problematic. Click here for more details.

tunacode/constants.py CHANGED
@@ -7,7 +7,7 @@ Centralizes all magic strings, UI text, error messages, and application constant
7
7
 
8
8
  # Application info
9
9
  APP_NAME = "TunaCode"
10
- APP_VERSION = "0.0.26"
10
+ APP_VERSION = "0.0.27"
11
11
 
12
12
  # File patterns
13
13
  GUIDE_FILE_PATTERN = "{name}.md"
@@ -370,6 +370,8 @@ async def process_request(
370
370
 
371
371
  await ui.warning(f"⚠️ Reached maximum iterations ({max_iterations})")
372
372
  break
373
+
374
+ # If we need to add a fallback response, create a wrapper
373
375
  if not response_state.has_user_response and i >= max_iterations and fallback_enabled:
374
376
  patch_tool_messages("Task incomplete", state_manager=state_manager)
375
377
  response_state.has_final_synthesis = True
@@ -378,6 +380,28 @@ async def process_request(
378
380
  progress=f"{i}/{max_iterations} iterations completed",
379
381
  )
380
382
 
381
- agent_run.result = SimpleResult(fallback.summary)
382
- agent_run.response_state = response_state
383
- return agent_run
383
+ # Create a wrapper object that mimics AgentRun with the required attributes
384
+ class AgentRunWrapper:
385
+ def __init__(self, wrapped_run, fallback_result):
386
+ self._wrapped = wrapped_run
387
+ self.result = fallback_result
388
+ self.response_state = response_state
389
+
390
+ def __getattr__(self, name):
391
+ # Delegate all other attributes to the wrapped object
392
+ return getattr(self._wrapped, name)
393
+
394
+ return AgentRunWrapper(agent_run, SimpleResult(fallback.summary))
395
+
396
+ # For non-fallback cases, we still need to handle the response_state
397
+ # Create a minimal wrapper just to add response_state
398
+ class AgentRunWithState:
399
+ def __init__(self, wrapped_run):
400
+ self._wrapped = wrapped_run
401
+ self.response_state = response_state
402
+
403
+ def __getattr__(self, name):
404
+ # Delegate all other attributes to the wrapped object
405
+ return getattr(self._wrapped, name)
406
+
407
+ return AgentRunWithState(agent_run)
@@ -108,8 +108,10 @@ class OrchestratorAgent:
108
108
  def __init__(self, output: str):
109
109
  self.output = output
110
110
 
111
- synth_run = type("SynthRun", (), {})()
112
- synth_run.result = SynthResult(summary)
113
- results.append(synth_run)
111
+ class SynthRun:
112
+ def __init__(self):
113
+ self.result = SynthResult(summary)
114
+
115
+ results.append(SynthRun())
114
116
 
115
117
  return results
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tunacode-cli
3
- Version: 0.0.26
3
+ Version: 0.0.27
4
4
  Summary: Your agentic CLI developer.
5
5
  Author-email: larock22 <noreply@github.com>
6
6
  License-Expression: MIT
@@ -1,5 +1,5 @@
1
1
  tunacode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- tunacode/constants.py,sha256=SMYCbgXv4sbGi2GEUuMAEWApzr9xG_1295HFgIcnI4A,3799
2
+ tunacode/constants.py,sha256=WSy8nXJvrK6kKfjppSFF-sliKj4m1q9WazZMKhvkgEw,3799
3
3
  tunacode/context.py,sha256=6sterdRvPOyG3LU0nEAXpBsEPZbO3qtPyTlJBi-_VXE,2612
4
4
  tunacode/exceptions.py,sha256=_Dyj6cC0868dMABekdQHXCg5XhucJumbGUMXaSDzgB4,2645
5
5
  tunacode/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -19,8 +19,8 @@ tunacode/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  tunacode/core/state.py,sha256=n1claG-gVVDMBCCS8cDmgas4XbKLJJwKRc-8CtXeTS8,1376
20
20
  tunacode/core/tool_handler.py,sha256=OKx7jM8pml6pSEnoARu33_uBY8awJBqvhbVeBn6T4ow,1804
21
21
  tunacode/core/agents/__init__.py,sha256=TiXwymGRNMuOqQaRLpNCAt7bZArg8rkadIRs4Nw21SQ,275
22
- tunacode/core/agents/main.py,sha256=cg6ouw3_nqDeatwI-VP9iay_092MUc59C-fhRZUrOWw,15620
23
- tunacode/core/agents/orchestrator.py,sha256=IEmhqn2SdiweMzJeQByy29_Rml8nz5cP2n55v_WADUI,4136
22
+ tunacode/core/agents/main.py,sha256=bfm_TS1Z9rpy3phIUb7d1lLbYK99xJwrtBy4PWPSEOE,16673
23
+ tunacode/core/agents/orchestrator.py,sha256=t_eXtCO_QkIz687uT88RpDCmaE0-UkrUaczuTEJOrYQ,4154
24
24
  tunacode/core/agents/planner_schema.py,sha256=pu2ehQVALjiJ5HJD7EN6xuZHCknsrXO9z0xHuVdlKW8,345
25
25
  tunacode/core/agents/readonly.py,sha256=NOPfqPWu53fJy77k5uqwKWmZ6yzqnDOZpBeQjGy0AG8,1624
26
26
  tunacode/core/background/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -67,9 +67,9 @@ tunacode/utils/ripgrep.py,sha256=AXUs2FFt0A7KBV996deS8wreIlUzKOlAHJmwrcAr4No,583
67
67
  tunacode/utils/system.py,sha256=FSoibTIH0eybs4oNzbYyufIiV6gb77QaeY2yGqW39AY,11381
68
68
  tunacode/utils/text_utils.py,sha256=B9M1cuLTm_SSsr15WNHF6j7WdLWPvWzKZV0Lvfgdbjg,2458
69
69
  tunacode/utils/user_configuration.py,sha256=IGvUH37wWtZ4M5xpukZEWYhtuKKyKcl6DaeObGXdleU,2610
70
- tunacode_cli-0.0.26.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
71
- tunacode_cli-0.0.26.dist-info/METADATA,sha256=BhZektuDc4IMD9T-CtcoNwWeRSWCtm-lnm5lZ9_1TPU,18910
72
- tunacode_cli-0.0.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- tunacode_cli-0.0.26.dist-info/entry_points.txt,sha256=hbkytikj4dGu6rizPuAd_DGUPBGF191RTnhr9wdhORY,51
74
- tunacode_cli-0.0.26.dist-info/top_level.txt,sha256=lKy2P6BWNi5XSA4DHFvyjQ14V26lDZctwdmhEJrxQbU,9
75
- tunacode_cli-0.0.26.dist-info/RECORD,,
70
+ tunacode_cli-0.0.27.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
71
+ tunacode_cli-0.0.27.dist-info/METADATA,sha256=Gt3IYKC2XvzlpwvgQwkH8Olqnx7IHZ6ZJ3asghSxf_8,18910
72
+ tunacode_cli-0.0.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
+ tunacode_cli-0.0.27.dist-info/entry_points.txt,sha256=hbkytikj4dGu6rizPuAd_DGUPBGF191RTnhr9wdhORY,51
74
+ tunacode_cli-0.0.27.dist-info/top_level.txt,sha256=lKy2P6BWNi5XSA4DHFvyjQ14V26lDZctwdmhEJrxQbU,9
75
+ tunacode_cli-0.0.27.dist-info/RECORD,,