tunacode-cli 0.0.55__tar.gz → 0.0.57__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.

Potentially problematic release.


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

Files changed (228) hide show
  1. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/CLAUDE.md +39 -31
  2. {tunacode_cli-0.0.55/src/tunacode_cli.egg-info → tunacode_cli-0.0.57}/PKG-INFO +8 -3
  3. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/README.md +2 -2
  4. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/pyproject.toml +124 -1
  5. tunacode_cli-0.0.57/src/tunacode/cli/commands/implementations/plan.py +50 -0
  6. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/registry.py +3 -0
  7. tunacode_cli-0.0.57/src/tunacode/cli/repl.py +541 -0
  8. tunacode_cli-0.0.57/src/tunacode/cli/repl_components/command_parser.py +67 -0
  9. tunacode_cli-0.0.57/src/tunacode/cli/repl_components/error_recovery.py +166 -0
  10. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/repl_components/output_display.py +21 -1
  11. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/repl_components/tool_executor.py +12 -0
  12. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/configuration/defaults.py +8 -0
  13. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/constants.py +10 -2
  14. tunacode_cli-0.0.57/src/tunacode/core/agents/agent_components/agent_config.py +299 -0
  15. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/node_processor.py +46 -40
  16. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/code_index.py +83 -29
  17. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/state.py +44 -0
  18. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/token_usage/usage_tracker.py +2 -2
  19. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/tool_handler.py +20 -0
  20. tunacode_cli-0.0.57/src/tunacode/prompts/system.md +358 -0
  21. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/services/mcp.py +29 -7
  22. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/base.py +110 -0
  23. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/bash.py +96 -1
  24. tunacode_cli-0.0.57/src/tunacode/tools/exit_plan_mode.py +273 -0
  25. tunacode_cli-0.0.57/src/tunacode/tools/glob.py +621 -0
  26. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/grep.py +226 -77
  27. tunacode_cli-0.0.57/src/tunacode/tools/grep_components/result_formatter.py +139 -0
  28. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/list_dir.py +132 -2
  29. tunacode_cli-0.0.57/src/tunacode/tools/present_plan.py +288 -0
  30. tunacode_cli-0.0.57/src/tunacode/tools/read_file.py +191 -0
  31. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/run_command.py +99 -0
  32. tunacode_cli-0.0.57/src/tunacode/tools/schema_assembler.py +167 -0
  33. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/todo.py +108 -1
  34. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/update_file.py +94 -0
  35. tunacode_cli-0.0.57/src/tunacode/tools/write_file.py +167 -0
  36. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/types.py +58 -0
  37. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/input.py +14 -2
  38. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/keybindings.py +25 -4
  39. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/panels.py +53 -8
  40. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/prompt_manager.py +25 -2
  41. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/tool_ui.py +3 -2
  42. tunacode_cli-0.0.57/src/tunacode/utils/json_utils.py +206 -0
  43. tunacode_cli-0.0.57/src/tunacode/utils/message_utils.py +29 -0
  44. tunacode_cli-0.0.57/src/tunacode/utils/ripgrep.py +340 -0
  45. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57/src/tunacode_cli.egg-info}/PKG-INFO +8 -3
  46. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode_cli.egg-info/SOURCES.txt +10 -1
  47. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode_cli.egg-info/requires.txt +5 -0
  48. tunacode_cli-0.0.57/src/tunacode_cli.egg-info/top_level.txt +1 -0
  49. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/test_agent_creation.py +7 -8
  50. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/context/test_context_acceptance.py +5 -0
  51. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/context/test_tunacode_logging.py +8 -0
  52. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_output_display_logic.py +1 -0
  53. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_repl_initialization.py +13 -5
  54. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/test_characterization_main.py +3 -0
  55. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/test_characterization_repl.py +5 -1
  56. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_spinner_messages.py +2 -0
  57. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_agent_output_formatting.py +1 -0
  58. tunacode_cli-0.0.57/tests/test_command_parser_retry.py +186 -0
  59. tunacode_cli-0.0.57/tests/test_glob_phase3.py +191 -0
  60. tunacode_cli-0.0.57/tests/test_json_concatenation_recovery.py +326 -0
  61. tunacode_cli-0.0.57/tests/test_plan_mode.py +177 -0
  62. tunacode_cli-0.0.57/tests/test_prompt_changes_validation.py +36 -0
  63. tunacode_cli-0.0.57/tests/test_prompt_injection.py +124 -0
  64. tunacode_cli-0.0.55/src/tunacode/cli/repl.py +0 -400
  65. tunacode_cli-0.0.55/src/tunacode/cli/repl_components/command_parser.py +0 -34
  66. tunacode_cli-0.0.55/src/tunacode/cli/repl_components/error_recovery.py +0 -88
  67. tunacode_cli-0.0.55/src/tunacode/core/agents/agent_components/agent_config.py +0 -109
  68. tunacode_cli-0.0.55/src/tunacode/prompts/system.md +0 -731
  69. tunacode_cli-0.0.55/src/tunacode/tools/glob.py +0 -288
  70. tunacode_cli-0.0.55/src/tunacode/tools/grep_components/result_formatter.py +0 -45
  71. tunacode_cli-0.0.55/src/tunacode/tools/read_file.py +0 -100
  72. tunacode_cli-0.0.55/src/tunacode/tools/read_file_async_poc.py +0 -196
  73. tunacode_cli-0.0.55/src/tunacode/tools/write_file.py +0 -81
  74. tunacode_cli-0.0.55/src/tunacode/utils/message_utils.py +0 -19
  75. tunacode_cli-0.0.55/src/tunacode/utils/ripgrep.py +0 -17
  76. tunacode_cli-0.0.55/src/tunacode_cli.egg-info/top_level.txt +0 -2
  77. tunacode_cli-0.0.55/tests/test_prompt_changes_validation.py +0 -35
  78. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/LICENSE +0 -0
  79. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/MANIFEST.in +0 -0
  80. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/setup.cfg +0 -0
  81. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/setup.py +0 -0
  82. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/__init__.py +0 -0
  83. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/__init__.py +0 -0
  84. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/__init__.py +0 -0
  85. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/base.py +0 -0
  86. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/__init__.py +0 -0
  87. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/conversation.py +0 -0
  88. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/debug.py +0 -0
  89. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/development.py +0 -0
  90. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/model.py +0 -0
  91. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/system.py +0 -0
  92. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/template.py +0 -0
  93. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/implementations/todo.py +0 -0
  94. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/commands/template_shortcut.py +0 -0
  95. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/main.py +0 -0
  96. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/cli/repl_components/__init__.py +0 -0
  97. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/configuration/__init__.py +0 -0
  98. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/configuration/models.py +0 -0
  99. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/configuration/settings.py +0 -0
  100. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/context.py +0 -0
  101. {tunacode_cli-0.0.55/src/tunacode/utils → tunacode_cli-0.0.57/src/tunacode/core}/__init__.py +0 -0
  102. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/__init__.py +0 -0
  103. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/__init__.py +0 -0
  104. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/agent_helpers.py +0 -0
  105. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/json_tool_parser.py +0 -0
  106. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/message_handler.py +0 -0
  107. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/response_state.py +0 -0
  108. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/result_wrapper.py +0 -0
  109. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/task_completion.py +0 -0
  110. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/tool_buffer.py +0 -0
  111. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/tool_executor.py +0 -0
  112. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/agent_components/truncation_checker.py +0 -0
  113. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/main.py +0 -0
  114. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/agents/utils.py +0 -0
  115. {tunacode_cli-0.0.55/src/tunacode/core/llm → tunacode_cli-0.0.57/src/tunacode/core/background}/__init__.py +0 -0
  116. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/background/manager.py +0 -0
  117. {tunacode_cli-0.0.55/src/tunacode/core/background → tunacode_cli-0.0.57/src/tunacode/core/llm}/__init__.py +0 -0
  118. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/logging/__init__.py +0 -0
  119. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/logging/config.py +0 -0
  120. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/logging/formatters.py +0 -0
  121. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/logging/handlers.py +0 -0
  122. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/logging/logger.py +0 -0
  123. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/__init__.py +0 -0
  124. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/agent_setup.py +0 -0
  125. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/base.py +0 -0
  126. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/config_setup.py +0 -0
  127. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/coordinator.py +0 -0
  128. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/environment_setup.py +0 -0
  129. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/git_safety_setup.py +0 -0
  130. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/setup/template_setup.py +0 -0
  131. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/token_usage/api_response_parser.py +0 -0
  132. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/core/token_usage/cost_calculator.py +0 -0
  133. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/exceptions.py +0 -0
  134. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/py.typed +0 -0
  135. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/services/__init__.py +0 -0
  136. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/setup.py +0 -0
  137. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/templates/__init__.py +0 -0
  138. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/templates/loader.py +0 -0
  139. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/__init__.py +0 -0
  140. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/grep_components/__init__.py +0 -0
  141. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/grep_components/file_filter.py +0 -0
  142. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/grep_components/pattern_matcher.py +0 -0
  143. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/tools/grep_components/search_result.py +0 -0
  144. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/__init__.py +0 -0
  145. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/completers.py +0 -0
  146. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/console.py +0 -0
  147. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/constants.py +0 -0
  148. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/decorators.py +0 -0
  149. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/lexers.py +0 -0
  150. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/logging_compat.py +0 -0
  151. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/output.py +0 -0
  152. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/tool_descriptions.py +0 -0
  153. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/utils.py +0 -0
  154. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/ui/validators.py +0 -0
  155. {tunacode_cli-0.0.55/src/tunacode/core → tunacode_cli-0.0.57/src/tunacode/utils}/__init__.py +0 -0
  156. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/bm25.py +0 -0
  157. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/diff_utils.py +0 -0
  158. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/file_utils.py +0 -0
  159. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/import_cache.py +0 -0
  160. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/retry.py +0 -0
  161. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/security.py +0 -0
  162. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/system.py +0 -0
  163. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/text_utils.py +0 -0
  164. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/token_counter.py +0 -0
  165. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode/utils/user_configuration.py +0 -0
  166. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
  167. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
  168. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/__init__.py +0 -0
  169. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/__init__.py +0 -0
  170. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/conftest.py +0 -0
  171. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/test_json_tool_parsing.py +0 -0
  172. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/test_process_node.py +0 -0
  173. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/test_process_request.py +0 -0
  174. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/agent/test_tool_message_patching.py +0 -0
  175. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/background/test_background_edge_cases.py +0 -0
  176. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/background/test_cleanup.py +0 -0
  177. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/background/test_task_cancellation.py +0 -0
  178. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/background/test_task_creation.py +0 -0
  179. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/background/test_task_execution.py +0 -0
  180. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/code_index/test_cache_management.py +0 -0
  181. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/code_index/test_file_scanning.py +0 -0
  182. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/code_index/test_index_building.py +0 -0
  183. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/code_index/test_search_operations.py +0 -0
  184. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/code_index/test_symbol_extraction.py +0 -0
  185. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/commands/__init__.py +0 -0
  186. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/commands/test_init_command.py +0 -0
  187. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/conftest.py +0 -0
  188. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/context/__init__.py +0 -0
  189. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/context/test_context_integration.py +0 -0
  190. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/context/test_context_loading.py +0 -0
  191. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_command_parsing.py +0 -0
  192. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_error_handling.py +0 -0
  193. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_escape_key_behavior.py +0 -0
  194. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_input_handling.py +0 -0
  195. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_keyboard_interrupts.py +0 -0
  196. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_multiline_input.py +0 -0
  197. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/repl/test_session_flow.py +0 -0
  198. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/services/test_error_recovery.py +0 -0
  199. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/services/test_llm_routing.py +0 -0
  200. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/services/test_mcp_integration.py +0 -0
  201. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/services/test_service_lifecycle.py +0 -0
  202. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_agent_tracking.py +0 -0
  203. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_message_history.py +0 -0
  204. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_permissions.py +0 -0
  205. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_session_management.py +0 -0
  206. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_state_initialization.py +0 -0
  207. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/state/test_user_config.py +0 -0
  208. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/test_characterization_commands.py +0 -0
  209. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/test_characterization_grep.py +0 -0
  210. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_async_ui.py +0 -0
  211. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_console_output.py +0 -0
  212. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_diff_display.py +0 -0
  213. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_prompt_rendering.py +0 -0
  214. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/ui/test_tool_confirmations.py +0 -0
  215. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/utils/test_expand_file_refs.py +0 -0
  216. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/utils/test_file_operations.py +0 -0
  217. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/utils/test_git_commands.py +0 -0
  218. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/utils/test_token_counting.py +0 -0
  219. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/characterization/utils/test_utils_edge_cases.py +0 -0
  220. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/conftest.py +0 -0
  221. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_completion_detection.py +0 -0
  222. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_json_retry.py +0 -0
  223. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_logging_config.py +0 -0
  224. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_phase2_type_hints.py +0 -0
  225. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_security.py +0 -0
  226. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_spinner_updates.py +0 -0
  227. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/test_tool_batching_retry.py +0 -0
  228. {tunacode_cli-0.0.55 → tunacode_cli-0.0.57}/tests/unit/test_constants_enums.py +0 -0
@@ -1,46 +1,22 @@
1
- ### Documentation
2
-
3
- - update the documents @documentation and in .claude after any update.
4
-
5
-
6
- - use the subagent tech-docs-maintainer to update the documentation you MUST instruct the subagent to keep doc updates short you will be PUNISHED for not telling the documentation agent to keep it to only the most distilled information
7
-
8
- - always follow best practices with git commits naming and gh cli workflows
9
-
10
- - commit frequently
11
-
12
- - always be on the side of safety, if you have any question consult the user
13
-
14
- ### Python Coding Standards
15
-
16
- - Use type hints (PEP 484) for all function signatures
17
- - Prefer f-strings (PEP 498) over %-formatting or .format()
18
- - Use pathlib.Path instead of os.path for filesystem operations
19
- - Structure imports: stdlib → third-party → local (PEP 8)
20
- - Use dataclasses (PEP 557) for simple data containers
21
- - Prefer context managers (with) for resource handling
22
- - Use structural pattern matching (PEP 634) for complex
23
- - run ruff frequently
24
-
25
- ### Testing
26
-
27
- - "make test" command the entire testing suite
28
-
29
- - anytime a new feature or refactor is done, we MUST find or make the golden/character test FIRST as a baseline standaard BEFORE starting, under no circumstance are you to not follow this pattern
30
-
31
1
  ### Workflow
32
2
 
3
+ - **CRITICAL: WORKTREE REQUIREMENT** - When user requests a worktree, you MUST:
4
+ 1. Create the worktree with `git worktree add -b branch-name ../dirname`
5
+ 2. If access is blocked, immediately ask: "I cannot access the worktree directory. Should I: a) Work in a subdirectory instead, b) Use a branch in the main directory, or c) Another solution?"
6
+ 3. NEVER proceed without a worktree if user specifically requested one
7
+
33
8
  - before any updates make a git commit rollback point, clearly labeled for future agents
34
9
 
35
10
  - the clear outline of the objective MUST be established before we begin ANY coding, do not under any circumstance begin any updates untill this is clearly understood, if you have any ambiuguity or quesiton, the user can be brought in or use best practises
36
11
 
37
12
  - use scratchpad-multi.sh as you work, after the MD file is done being used sort it to the approate directory
13
+ - To use `llm-agent-tools/scratchpad-multi.sh`, start a task with `./llm-agent-tools/scratchpad-multi.sh --agent <name> start "Task Title"` and record updates using `step`, `revise <N>`, and `branch <N>`. When complete, run `finish` to interactively archive the scratchpad to `documentation/` and/or `.claude/` (a backup is stored under `.claude/scratchpad/shared/done_tasks/`).
38
14
 
39
15
  - the MD file created by the bash file MUST be used for the duiration of the task you will be PUNISHED if you do not update this file as you work.
40
16
 
41
17
  - any key logic or file's must be inlcuded here in the following format if this format is not followed you will STOP reasses, and begin again
42
18
 
43
- ### Scratchpad Template Example
19
+ - pre-commit hooks can NOT be skipped, you will be punished for skipping the,
44
20
 
45
21
  ```
46
22
  # Implementing Authentication Module
@@ -66,6 +42,38 @@ _Agent: default_
66
42
 
67
43
  - this is the most important part of this prompt: Synthesis context aggressively and heuristically AS NEEDED ONLY You can deploy the appropriate subagent for complex tasks agents list below
68
44
 
45
+ ### Documentation
46
+
47
+ - update the documents @documentation and in .claude after any update.
48
+
49
+ - use the subagent tech-docs-maintainer to update the documentation you MUST instruct the subagent to keep doc updates short you will be PUNISHED for not telling the documentation agent to keep it to only the most distilled information
50
+
51
+ - always follow best practices with git commits naming and gh cli workflows
52
+
53
+ - commit frequently
54
+
55
+ - always be on the side of safety, if you have any question consult the user
56
+
57
+ ### Python Coding Standards
58
+
59
+ - always use the venv
60
+ - Use type hints (PEP 484) for all function signatures
61
+ - Prefer f-strings (PEP 498) over %-formatting or .format()
62
+ - Use pathlib.Path instead of os.path for filesystem operations
63
+ - Structure imports: stdlib → third-party → local (PEP 8)
64
+ - Use dataclasses (PEP 557) for simple data containers
65
+ - Prefer context managers (with) for resource handling
66
+ - Use structural pattern matching (PEP 634) for complex
67
+ - run ruff frequently
68
+
69
+ ### Testing
70
+
71
+ - "hatch run test" command the entire testing suite
72
+
73
+ - anytime a new feature or refactor is done, we MUST find or make the golden/character test FIRST as a baseline standaard BEFORE starting, under no circumstance are you to not follow this pattern
74
+
75
+
76
+
69
77
  ## Available Agents:
70
78
 
71
79
  1. **bug-context-analyzer** - Investigates precise context around bugs without suggesting fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tunacode-cli
3
- Version: 0.0.55
3
+ Version: 0.0.57
4
4
  Summary: Your agentic CLI developer.
5
5
  Author-email: larock22 <noreply@github.com>
6
6
  License: MIT
@@ -29,6 +29,7 @@ Requires-Dist: rich==14.0.0
29
29
  Requires-Dist: tiktoken>=0.5.2
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: build; extra == "dev"
32
+ Requires-Dist: twine; extra == "dev"
32
33
  Requires-Dist: ruff; extra == "dev"
33
34
  Requires-Dist: pytest; extra == "dev"
34
35
  Requires-Dist: pytest-cov; extra == "dev"
@@ -39,6 +40,10 @@ Requires-Dist: vulture>=2.7; extra == "dev"
39
40
  Requires-Dist: unimport>=1.0.0; extra == "dev"
40
41
  Requires-Dist: autoflake>=2.0.0; extra == "dev"
41
42
  Requires-Dist: dead>=1.5.0; extra == "dev"
43
+ Requires-Dist: hatch>=1.6.0; extra == "dev"
44
+ Requires-Dist: defusedxml; extra == "dev"
45
+ Requires-Dist: mypy; extra == "dev"
46
+ Requires-Dist: bandit; extra == "dev"
42
47
  Dynamic: license-file
43
48
 
44
49
  # TunaCode CLI
@@ -106,7 +111,7 @@ tunacode --model "anthropic:claude-3.5-sonnet" --key "sk-ant-your-anthropic-key"
106
111
  tunacode --model "openrouter:openai/gpt-4o" --key "sk-or-your-openrouter-key"
107
112
  ```
108
113
 
109
- Your config is saved to `~/.config/tunacode.json` (edit directly with `nvim ~/.config/tunacode.json`)
114
+ Your config is saved to `~/.config/tunacode.json`. This file stores your API keys, model preferences, and runtime settings like `max_iterations` (default: 40) and `context_window_size`. You can edit it directly with `nvim ~/.config/tunacode.json` or see [the complete configuration example](documentation/configuration/config-file-example.md) for all available options.
110
115
 
111
116
  ### Recommended Models
112
117
 
@@ -243,7 +248,7 @@ tunacode --model "anthropic:claude-3.5-sonnet" --key "sk-ant-your-anthropic-key"
243
248
  tunacode --model "openrouter:openai/gpt-4o" --key "sk-or-your-openrouter-key"
244
249
  ```
245
250
 
246
- Your config is saved to `~/.config/tunacode.json` (edit directly with `nvim ~/.config/tunacode.json`)
251
+ Your config is saved to `~/.config/tunacode.json`. This file stores your API keys, model preferences, and runtime settings like `max_iterations` (default: 40) and `context_window_size`. You can edit it directly with `nvim ~/.config/tunacode.json` or see [the complete configuration example](documentation/configuration/config-file-example.md) for all available options.
247
252
 
248
253
  ### Recommended Models
249
254
 
@@ -63,7 +63,7 @@ tunacode --model "anthropic:claude-3.5-sonnet" --key "sk-ant-your-anthropic-key"
63
63
  tunacode --model "openrouter:openai/gpt-4o" --key "sk-or-your-openrouter-key"
64
64
  ```
65
65
 
66
- Your config is saved to `~/.config/tunacode.json` (edit directly with `nvim ~/.config/tunacode.json`)
66
+ Your config is saved to `~/.config/tunacode.json`. This file stores your API keys, model preferences, and runtime settings like `max_iterations` (default: 40) and `context_window_size`. You can edit it directly with `nvim ~/.config/tunacode.json` or see [the complete configuration example](documentation/configuration/config-file-example.md) for all available options.
67
67
 
68
68
  ### Recommended Models
69
69
 
@@ -200,7 +200,7 @@ tunacode --model "anthropic:claude-3.5-sonnet" --key "sk-ant-your-anthropic-key"
200
200
  tunacode --model "openrouter:openai/gpt-4o" --key "sk-or-your-openrouter-key"
201
201
  ```
202
202
 
203
- Your config is saved to `~/.config/tunacode.json` (edit directly with `nvim ~/.config/tunacode.json`)
203
+ Your config is saved to `~/.config/tunacode.json`. This file stores your API keys, model preferences, and runtime settings like `max_iterations` (default: 40) and `context_window_size`. You can edit it directly with `nvim ~/.config/tunacode.json` or see [the complete configuration example](documentation/configuration/config-file-example.md) for all available options.
204
204
 
205
205
  ### Recommended Models
206
206
 
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "tunacode-cli"
7
7
 
8
- version = "0.0.55"
8
+ version = "0.0.57"
9
9
  description = "Your agentic CLI developer."
10
10
  keywords = ["cli", "agent", "development", "automation"]
11
11
  readme = "README.md"
@@ -40,6 +40,7 @@ tunacode = "tunacode.cli.main:app"
40
40
  [project.optional-dependencies]
41
41
  dev = [
42
42
  "build",
43
+ "twine",
43
44
  "ruff",
44
45
  "pytest",
45
46
  "pytest-cov",
@@ -50,6 +51,10 @@ dev = [
50
51
  "unimport>=1.0.0",
51
52
  "autoflake>=2.0.0",
52
53
  "dead>=1.5.0",
54
+ "hatch>=1.6.0",
55
+ "defusedxml",
56
+ "mypy",
57
+ "bandit",
53
58
  ]
54
59
 
55
60
  [project.urls]
@@ -146,3 +151,121 @@ warn_no_return = true
146
151
  follow_imports = "silent"
147
152
  # Allow CLAUDE_ANCHOR comments in docstrings
148
153
  disable_error_code = ["annotation-unchecked"]
154
+
155
+ [tool.hatch.envs.default]
156
+ installer = "uv"
157
+ features = ["dev"]
158
+
159
+ [tool.hatch.envs.default.scripts]
160
+ # Development
161
+ install = "pip install -e '.[dev]'"
162
+ run = "python -m tunacode"
163
+ dev = "python -m tunacode"
164
+ test = "pytest -q tests/characterization tests/test_security.py tests/test_agent_output_formatting.py tests/test_prompt_changes_validation.py"
165
+ test-script = "echo 'Test script works'"
166
+
167
+ # Type checking and security
168
+ typecheck = "mypy src/"
169
+ security = "bandit -r src/ -ll"
170
+
171
+ # Version management
172
+ version = "0.0.57"
173
+
174
+ # Release workflow
175
+ release = [
176
+ "hatch run test",
177
+ "hatch run lint-check",
178
+ "hatch build",
179
+ "echo 'Ready to publish with: hatch publish'"
180
+ ]
181
+
182
+ # Cleaning
183
+ clean = "python -c \"import shutil, pathlib; dirs=['build', 'dist']; [shutil.rmtree(d, ignore_errors=True) for d in dirs]; [shutil.rmtree(p, ignore_errors=True) for p in pathlib.Path('.').rglob('*.egg-info') if p.is_dir()]; [shutil.rmtree(p, ignore_errors=True) for p in pathlib.Path('.').rglob('__pycache__') if p.is_dir()]; [p.unlink(missing_ok=True) for p in pathlib.Path('.').rglob('*.pyc')]; print('Cleaned build artifacts, egg-info, __pycache__, and *.pyc files')\""
184
+
185
+ # Linting & Formatting
186
+ lint = "ruff check . && ruff format ."
187
+ lint-check = [
188
+ "ruff check .",
189
+ "ruff format --check .",
190
+ ]
191
+
192
+ # Dead code analysis
193
+ vulture = "python -m vulture --config pyproject.toml"
194
+ vulture-check = "python -m vulture --config pyproject.toml --min-confidence 100"
195
+
196
+ dead-code-check = [
197
+ "python -c \"print('Running comprehensive dead code analysis...')\"",
198
+ "python -c \"print('\\n=== Vulture (unused code) ===')\"",
199
+ "python -m vulture . --min-confidence 80 --exclude '*/test/*,*/tests/*,venv/*,build/*,dist/*' || true",
200
+ "python -c \"print('\\n=== Unimport (unused imports) ===')\"",
201
+ "python -m unimport --check . || true",
202
+ "python -c \"print('\\n=== Dead (dead code detector) ===')\"",
203
+ "python -m dead . || true",
204
+ "python -c \"print('\\n=== Checking test coverage for dead code ===')\"",
205
+ ]
206
+
207
+ dead-code-clean = [
208
+ "python -c \"print('Removing dead code...')\"",
209
+ "python -m unimport --remove-all .",
210
+ "python -m autoflake --remove-all-unused-imports --remove-unused-variables -i -r src/",
211
+ "python -c \"print('Dead code cleanup complete!')\"",
212
+ ]
213
+
214
+ dead-code-report = [
215
+ "python -c \"print('Generating dead code reports...'); import pathlib; pathlib.Path('reports').mkdir(exist_ok=True)\"",
216
+ "python -m vulture . --min-confidence 60 > reports/dead_code_vulture.txt || true",
217
+ "python -m unimport --check . --diff > reports/unused_imports.txt || true",
218
+ "python -c \"print('Reports generated in reports/ directory')\"",
219
+ ]
220
+
221
+ # Testing
222
+ coverage = "pytest --cov=src/tunacode --cov-report=term"
223
+
224
+ # Building
225
+ build = "python -m build"
226
+
227
+ # Playwright utilities
228
+ remove-playwright = "python scripts/playwright_cache.py remove"
229
+ restore-playwright = "python scripts/playwright_cache.py restore"
230
+
231
+ # Hatch Environment Configurations
232
+
233
+ [tool.hatch.envs.test]
234
+ dependencies = [
235
+ "pytest",
236
+ "pytest-cov",
237
+ "pytest-asyncio",
238
+ ]
239
+
240
+ [tool.hatch.envs.test.scripts]
241
+ run = "pytest -q tests/characterization tests/test_security.py tests/test_agent_output_formatting.py tests/test_prompt_changes_validation.py"
242
+ all = "pytest tests/"
243
+ coverage = "pytest --cov=src/tunacode --cov-report=term"
244
+
245
+ [tool.hatch.envs.lint]
246
+ dependencies = [
247
+ "ruff",
248
+ "mypy",
249
+ "bandit",
250
+ "vulture",
251
+ ]
252
+
253
+ [tool.hatch.envs.lint.scripts]
254
+ check = [
255
+ "ruff check .",
256
+ "ruff format --check .",
257
+ "mypy src/",
258
+ "bandit -r src/ -ll",
259
+ ]
260
+
261
+ [tool.hatch.envs.py310]
262
+ python = "3.10"
263
+
264
+ [tool.hatch.envs.py311]
265
+ python = "3.11"
266
+
267
+ [tool.hatch.envs.py312]
268
+ python = "3.12"
269
+
270
+ [tool.hatch.envs.py313]
271
+ python = "3.13"
@@ -0,0 +1,50 @@
1
+ """Plan mode commands for TunaCode."""
2
+
3
+ from typing import List
4
+
5
+ from ....types import CommandContext
6
+ from ....ui import console as ui
7
+ from ..base import CommandCategory, CommandSpec, SimpleCommand
8
+
9
+
10
+ class PlanCommand(SimpleCommand):
11
+ """Enter plan mode for read-only research and planning."""
12
+
13
+ spec = CommandSpec(
14
+ name="plan",
15
+ aliases=["/plan"],
16
+ description="Enter Plan Mode - read-only research phase",
17
+ category=CommandCategory.DEVELOPMENT,
18
+ )
19
+
20
+ async def execute(self, args: List[str], context: CommandContext) -> None:
21
+ """Enter plan mode."""
22
+ context.state_manager.enter_plan_mode()
23
+
24
+ await ui.info("🔍 Entering Plan Mode")
25
+ await ui.info("• Only read-only operations available")
26
+ await ui.info("• Use tools to research and analyze the codebase")
27
+ await ui.info("• Use 'exit_plan_mode' tool to present your plan")
28
+ await ui.info("• Read-only tools: read_file, grep, list_dir, glob")
29
+ await ui.success("✅ Plan Mode active - indicator will appear above next input")
30
+
31
+
32
+ class ExitPlanCommand(SimpleCommand):
33
+ """Exit plan mode manually."""
34
+
35
+ spec = CommandSpec(
36
+ name="exit-plan",
37
+ aliases=["/exit-plan"],
38
+ description="Exit Plan Mode and return to normal mode",
39
+ category=CommandCategory.DEVELOPMENT,
40
+ )
41
+
42
+ async def execute(self, args: List[str], context: CommandContext) -> None:
43
+ """Exit plan mode manually."""
44
+ if not context.state_manager.is_plan_mode():
45
+ await ui.warning("Not currently in Plan Mode")
46
+ return
47
+
48
+ context.state_manager.exit_plan_mode()
49
+ await ui.success("🚪 Exiting Plan Mode - returning to normal mode")
50
+ await ui.info("✅ All tools are now available - '⏸ PLAN MODE ON' status removed")
@@ -23,6 +23,7 @@ from .implementations.debug import (
23
23
  )
24
24
  from .implementations.development import BranchCommand, InitCommand
25
25
  from .implementations.model import ModelCommand
26
+ from .implementations.plan import ExitPlanCommand, PlanCommand
26
27
  from .implementations.system import (
27
28
  ClearCommand,
28
29
  HelpCommand,
@@ -129,6 +130,8 @@ class CommandRegistry:
129
130
  InitCommand,
130
131
  TemplateCommand,
131
132
  TodoCommand,
133
+ PlanCommand, # Add plan command
134
+ ExitPlanCommand, # Add exit plan command
132
135
  ]
133
136
 
134
137
  # Register all discovered commands