tunacode-cli 0.0.76__tar.gz → 0.1.4__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 (752) hide show
  1. tunacode_cli-0.1.4/.claude/README.md +28 -0
  2. tunacode_cli-0.1.4/.claude/cheatsheets/agents.core.json +12 -0
  3. tunacode_cli-0.1.4/.claude/debug_history/2025-09-21-rag-search-hyphen-gotcha.md +8 -0
  4. tunacode_cli-0.1.4/.claude/debug_history/2025-11-05_tool_handler_refactoring.md +236 -0
  5. tunacode_cli-0.1.4/.claude/debug_history/agent.state.json +13 -0
  6. tunacode_cli-0.1.4/.claude/debug_history/agent.tool_execution.json +13 -0
  7. tunacode_cli-0.1.4/.claude/debug_history/agent_components.streaming.json +13 -0
  8. tunacode_cli-0.1.4/.claude/debug_history/agents.delegation.json +13 -0
  9. tunacode_cli-0.1.4/.claude/debug_history/cli.textual_repl.json +13 -0
  10. tunacode_cli-0.1.4/.claude/debug_history/cli.tool_confirmation.json +13 -0
  11. tunacode_cli-0.1.4/.claude/debug_history/core.agents.main.json +13 -0
  12. tunacode_cli-0.1.4/.claude/debug_history/core.agents.prompts.json +13 -0
  13. tunacode_cli-0.1.4/.claude/debug_history/debug_sessions.json +142 -0
  14. tunacode_cli-0.1.4/.claude/debug_history/error-handling.json +13 -0
  15. tunacode_cli-0.1.4/.claude/debug_history/streaming.json +13 -0
  16. tunacode_cli-0.1.4/.claude/debug_history/ui.panels.json +13 -0
  17. tunacode_cli-0.1.4/.claude/debug_history/ui.research_agent.json +13 -0
  18. tunacode_cli-0.1.4/.claude/debug_history/ui.research_feedback.json +13 -0
  19. tunacode_cli-0.1.4/.claude/delta_summaries/2025-09-21-models_registry-pydantic-conversion.md +26 -0
  20. tunacode_cli-0.1.4/.claude/delta_summaries/2025-09-21-models_registry-validation-tests.md +18 -0
  21. tunacode_cli-0.1.4/.claude/delta_summaries/2025-09-21-test-update-model-command-characterization.md +17 -0
  22. tunacode_cli-0.1.4/.claude/delta_summaries/2025-10-01-startup-banner-panel.md +14 -0
  23. tunacode_cli-0.1.4/.claude/delta_summaries/2025-10-03-tool_handler-behavior-optimization.md +70 -0
  24. tunacode_cli-0.1.4/.claude/delta_summaries/2025-11-05_tool_handler_api_changes.md +372 -0
  25. tunacode_cli-0.1.4/.claude/delta_summaries/api_change_logs.json +145 -0
  26. tunacode_cli-0.1.4/.claude/delta_summaries/behavior_changes.json +405 -0
  27. tunacode_cli-0.1.4/.claude/delta_summaries/prompt_system_xml_migration.json +23 -0
  28. tunacode_cli-0.1.4/.claude/delta_summaries/reasoning_logs.json +352 -0
  29. tunacode_cli-0.1.4/.claude/development/version-management.md +73 -0
  30. tunacode_cli-0.1.4/.claude/docs_model_friendly/component_purpose.md +273 -0
  31. tunacode_cli-0.1.4/.claude/docs_model_friendly/component_relationships.md +341 -0
  32. tunacode_cli-0.1.4/.claude/docs_model_friendly/option3_feedback_flow.md +207 -0
  33. tunacode_cli-0.1.4/.claude/docs_model_friendly/rag_modules_overview.md +21 -0
  34. tunacode_cli-0.1.4/.claude/kv/github-actions-release-fix.json +1 -0
  35. tunacode_cli-0.1.4/.claude/manifest.json +354 -0
  36. tunacode_cli-0.1.4/.claude/memory_anchors/anchors.json +60 -0
  37. tunacode_cli-0.1.4/.claude/metadata/file_classifications.json +195 -0
  38. tunacode_cli-0.1.4/.claude/patterns/agent.state.json +11 -0
  39. tunacode_cli-0.1.4/.claude/patterns/agents.delegation.json +11 -0
  40. tunacode_cli-0.1.4/.claude/patterns/agents.main_beta.json +11 -0
  41. tunacode_cli-0.1.4/.claude/patterns/agents.parallel_execution.json +15 -0
  42. tunacode_cli-0.1.4/.claude/patterns/canonical_patterns/backward_compatibility_refactor.md +18 -0
  43. tunacode_cli-0.1.4/.claude/patterns/cli.textual_tui.json +31 -0
  44. tunacode_cli-0.1.4/.claude/patterns/core.agents.agent_config.json +11 -0
  45. tunacode_cli-0.1.4/.claude/patterns/core.agents.main.json +11 -0
  46. tunacode_cli-0.1.4/.claude/patterns/error-handling.json +15 -0
  47. tunacode_cli-0.1.4/.claude/patterns/templates.json +11 -0
  48. tunacode_cli-0.1.4/.claude/patterns/testing.json +11 -0
  49. tunacode_cli-0.1.4/.claude/patterns/tool-status-widget-pattern.md +27 -0
  50. tunacode_cli-0.1.4/.claude/patterns/tool_handler_refactoring_pattern.md +245 -0
  51. tunacode_cli-0.1.4/.claude/patterns/tools.bash.json +11 -0
  52. tunacode_cli-0.1.4/.claude/patterns/ui.concurrent_updates.json +11 -0
  53. tunacode_cli-0.1.4/.claude/patterns/ui.research_agent.json +11 -0
  54. tunacode_cli-0.1.4/.claude/patterns/ui.research_agent_panel.json +11 -0
  55. tunacode_cli-0.1.4/.claude/qa/agents.core.json +11 -0
  56. tunacode_cli-0.1.4/.claude/qa/context_logs/latest_session.txt +1 -0
  57. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-123100/commits.txt +6 -0
  58. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-123100/diffstat.txt +1 -0
  59. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-123100/files.json +7 -0
  60. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-123100/hunks.txt +4 -0
  61. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-141518/commits.txt +1 -0
  62. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-141518/diffstat.txt +1 -0
  63. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-141518/files.json +22 -0
  64. tunacode_cli-0.1.4/.claude/qa/context_logs/main-agent-integration-20250917-141518/hunks.txt +29 -0
  65. tunacode_cli-0.1.4/.claude/qa/context_logs/react-tool-session-20250120-000002/summary.md +6 -0
  66. tunacode_cli-0.1.4/.claude/qa/context_logs/smart-git-20250917-122934/commits.txt +5 -0
  67. tunacode_cli-0.1.4/.claude/qa/context_logs/smart-git-20250917-122934/diffstat.txt +9 -0
  68. tunacode_cli-0.1.4/.claude/qa/context_logs/smart-git-20250917-122934/files.json +10 -0
  69. tunacode_cli-0.1.4/.claude/qa/context_logs/tool-rejection-feedback-20251010-000001/summary.md +7 -0
  70. tunacode_cli-0.1.4/.claude/qa/core.agents.main.json +11 -0
  71. tunacode_cli-0.1.4/.claude/qa/reasoning_docs/main-agent-integration-20250917-123100.md +27 -0
  72. tunacode_cli-0.1.4/.claude/qa/reasoning_docs/main-agent-integration-20250917-141518.md +31 -0
  73. tunacode_cli-0.1.4/.claude/qa/reasoning_docs/simplified-agent-handoff-20250929.md +21 -0
  74. tunacode_cli-0.1.4/.claude/qa/reasoning_docs/smart-git-20250917-122934.md +37 -0
  75. tunacode_cli-0.1.4/.claude/qa/reasoning_docs/tool-rejection-feedback-20251010-000001.md +16 -0
  76. tunacode_cli-0.1.4/.claude/qa/tools.bash.json +11 -0
  77. tunacode_cli-0.1.4/.claude/rag_knowledge.db +0 -0
  78. tunacode_cli-0.1.4/.claude/semantic_index/function_call_graphs.json +326 -0
  79. tunacode_cli-0.1.4/.claude/semantic_index/intent_mappings.json +266 -0
  80. tunacode_cli-0.1.4/.claude/semantic_index/prompt_system_changes.json +21 -0
  81. tunacode_cli-0.1.4/.claude/semantic_index/type_relationships.json +582 -0
  82. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.github/scripts/check_file_size.py +7 -4
  83. tunacode_cli-0.0.76/.github/workflows/publish.yml → tunacode_cli-0.1.4/.github/workflows/publish-release.yml +9 -11
  84. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.gitignore +9 -15
  85. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.pre-commit-config.yaml +3 -12
  86. tunacode_cli-0.1.4/AGENTS.md +75 -0
  87. tunacode_cli-0.1.4/CLAUDE.md +75 -0
  88. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/MANIFEST.in +1 -1
  89. tunacode_cli-0.1.4/PKG-INFO +132 -0
  90. tunacode_cli-0.1.4/README.md +81 -0
  91. tunacode_cli-0.1.4/docs/configuration/README.md +20 -0
  92. tunacode_cli-0.1.4/docs/configuration/tunacode.json.example +29 -0
  93. tunacode_cli-0.1.4/docs/images/theme.png +0 -0
  94. tunacode_cli-0.1.4/docs/images/tui-model-setup.png +0 -0
  95. tunacode_cli-0.1.4/docs/images/tui.png +0 -0
  96. tunacode_cli-0.1.4/docs/tools/architecture.md +221 -0
  97. tunacode_cli-0.1.4/memory-bank/communication/2025-11-29_gemini_textual-migration-discussion.md +300 -0
  98. tunacode_cli-0.1.4/memory-bank/execute/2025-09-29_12-15-00_git_safety_branch_removal_log.md +112 -0
  99. tunacode_cli-0.1.4/memory-bank/execute/2025-10-02_14-45-00_release_process_automation.md +25 -0
  100. tunacode_cli-0.1.4/memory-bank/execute/2025-11-18_17-15-00_multi-agent-delegation-implementation.md +424 -0
  101. tunacode_cli-0.1.4/memory-bank/execute/2025-11-19_error_handling_hardening.md +194 -0
  102. tunacode_cli-0.1.4/memory-bank/execute/2025-11-19_error_handling_hardening_REPORT.md +236 -0
  103. tunacode_cli-0.1.4/memory-bank/execute/2025-11-20_23-50-00_global-request-timeout.md +185 -0
  104. tunacode_cli-0.1.4/memory-bank/execute/2025-11-29_01-00-00_tool-activity-display.md +121 -0
  105. tunacode_cli-0.1.4/memory-bank/execute/2025-11-29_17-55-00_textual-tui-architecture-refactor.md +178 -0
  106. tunacode_cli-0.1.4/memory-bank/execute/2025-11-30_15-00-00_nextstep-tui-rebuild.md +107 -0
  107. tunacode_cli-0.1.4/memory-bank/execute/2025-11-30_20-15-00_textual_tui_tool_error_search_display.md +244 -0
  108. tunacode_cli-0.1.4/memory-bank/execute/2025-12-01_14-45-23_dead-code-removal.md +120 -0
  109. tunacode_cli-0.1.4/memory-bank/plan/2025-09-17_15-30-00_main-agent-refactor_plan.md +325 -0
  110. tunacode_cli-0.1.4/memory-bank/plan/2025-09-19_11-30-00_tunacode_md_to_agents_md_migration.md +440 -0
  111. tunacode_cli-0.1.4/memory-bank/plan/2025-09-24_cli_prompt_toolkit_fuzzy_plan.md +88 -0
  112. tunacode_cli-0.1.4/memory-bank/plan/2025-09-29_11-15-30_simplified_agent_implementation.md +81 -0
  113. tunacode_cli-0.1.4/memory-bank/plan/2025-09-29_11-45-00_git_safety_branch_removal_plan.md +334 -0
  114. tunacode_cli-0.1.4/memory-bank/plan/2025-10-02_14-30-45_release_process_automation.md +114 -0
  115. tunacode_cli-0.1.4/memory-bank/plan/2025-11-12_15-50-42_critical_thread_safety_resource_fixes.md +433 -0
  116. tunacode_cli-0.1.4/memory-bank/plan/2025-11-18_17-09-12_multi-agent-delegation-implementation.md +474 -0
  117. tunacode_cli-0.1.4/memory-bank/plan/2025-11-19_10-00-00_main_agent_error_handling_hardening.md +321 -0
  118. tunacode_cli-0.1.4/memory-bank/plan/2025-11-20_global-request-timeout-plan.md +243 -0
  119. tunacode_cli-0.1.4/memory-bank/plan/2025-11-20_rate-limit-signaling-plan.md +172 -0
  120. tunacode_cli-0.1.4/memory-bank/plan/2025-11-20_recovery-notification-plan.md +201 -0
  121. tunacode_cli-0.1.4/memory-bank/plan/2025-11-29_00-45-00_tool-activity-display.md +132 -0
  122. tunacode_cli-0.1.4/memory-bank/plan/2025-11-29_17-15-00_textual-tui-modernization.md +289 -0
  123. tunacode_cli-0.1.4/memory-bank/plan/2025-11-29_17-20-38_textual-tui-architecture-refactor.md +215 -0
  124. tunacode_cli-0.1.4/memory-bank/plan/2025-11-29_textual-repl-migration-plan.md +208 -0
  125. tunacode_cli-0.1.4/memory-bank/plan/2025-11-30_14-30-00_nextstep-tui-component-rebuild.md +231 -0
  126. tunacode_cli-0.1.4/memory-bank/plan/2025-11-30_20-00-00_textual_tui_tool_error_search_display.md +327 -0
  127. tunacode_cli-0.1.4/memory-bank/plan/2025-12-01_16-15-00_json-utils-auth-decoupling.md +161 -0
  128. tunacode_cli-0.1.4/memory-bank/plan/2025-12-01_dead-code-removal.md +165 -0
  129. tunacode_cli-0.1.4/memory-bank/plan/2025-12-04_13-30-00_permission_modal_keybindings.md +149 -0
  130. tunacode_cli-0.1.4/memory-bank/plan/2025-12-04_16-51-48_simple_setup_command.md +191 -0
  131. tunacode_cli-0.1.4/memory-bank/plan/2025-12-04_17-30-00_ui-theme-unification.md +243 -0
  132. tunacode_cli-0.1.4/memory-bank/plan/2025-12-06_15-30-00_startup_index_build.md +303 -0
  133. tunacode_cli-0.1.4/memory-bank/plan/plan-1.md +389 -0
  134. tunacode_cli-0.1.4/memory-bank/qa/coderabbit/cr-qa-2025-11-29.md +57 -0
  135. tunacode_cli-0.1.4/memory-bank/research/2025-01-19_react-shim-analysis.md +101 -0
  136. tunacode_cli-0.1.4/memory-bank/research/2025-09-15_12-19-00_configuration_system_and_dashboard.md +184 -0
  137. tunacode_cli-0.1.4/memory-bank/research/2025-09-15_13-54-11_first-chunk_character_loss_investigation.md +109 -0
  138. tunacode_cli-0.1.4/memory-bank/research/2025-09-16_11-12-45_setup_py_usage_and_location_analysis.md +145 -0
  139. tunacode_cli-0.1.4/memory-bank/research/2025-09-19_11-25-00_tunacode_md_to_agents_md_migration.md +207 -0
  140. tunacode_cli-0.1.4/memory-bank/research/2025-09-21_models-registry-pydantic-conversion.md +217 -0
  141. tunacode_cli-0.1.4/memory-bank/research/2025-09-24_fuzzy_logic_implementation_analysis.md +96 -0
  142. tunacode_cli-0.1.4/memory-bank/research/2025-09-26_10-56-29_main_agent_architecture.md +727 -0
  143. tunacode_cli-0.1.4/memory-bank/research/2025-09-29_11-08-14_state_and_task_logic.md +140 -0
  144. tunacode_cli-0.1.4/memory-bank/research/2025-09-29_11-41-39_git_safety_branch_removal_analysis.md +127 -0
  145. tunacode_cli-0.1.4/memory-bank/research/2025-10-01_11-15-38_model_validation_error.md +42 -0
  146. tunacode_cli-0.1.4/memory-bank/research/2025-10-02_12-19-05_startup_performance_analysis.md +183 -0
  147. tunacode_cli-0.1.4/memory-bank/research/2025-10-02_14-26-18_release_process_analysis.md +151 -0
  148. tunacode_cli-0.1.4/memory-bank/research/2025-10-03_11-17-55_repl-test-analysis.md +101 -0
  149. tunacode_cli-0.1.4/memory-bank/research/2025-10-10_11-44-51_userabort_error_analysis.md +76 -0
  150. tunacode_cli-0.1.4/memory-bank/research/2025-11-05_17-35-17_tool_handler_mapping.md +200 -0
  151. tunacode_cli-0.1.4/memory-bank/research/2025-11-05_refactored_tool_handler_design.md +580 -0
  152. tunacode_cli-0.1.4/memory-bank/research/2025-11-11_12-12-42_option3_feedback_flow.md +526 -0
  153. tunacode_cli-0.1.4/memory-bank/research/2025-11-11_12-23-58_plan_mode_architecture.md +956 -0
  154. tunacode_cli-0.1.4/memory-bank/research/2025-11-12_15-48-04_ai_agent_system_mapping.md +222 -0
  155. tunacode_cli-0.1.4/memory-bank/research/2025-11-12_permission_system_map.md +838 -0
  156. tunacode_cli-0.1.4/memory-bank/research/2025-11-16_main-agent-architecture-map.md +863 -0
  157. tunacode_cli-0.1.4/memory-bank/research/2025-11-16_venv_setup_complexity_analysis.md +325 -0
  158. tunacode_cli-0.1.4/memory-bank/research/2025-11-17_15-00-59_todo-tool-architecture-map.md +806 -0
  159. tunacode_cli-0.1.4/memory-bank/research/2025-11-17_15-06-17_retry-rate-limit-configuration.md +348 -0
  160. tunacode_cli-0.1.4/memory-bank/research/2025-11-17_16-49-12_parallel-tool-calling-single-batch-issue.md +251 -0
  161. tunacode_cli-0.1.4/memory-bank/research/2025-11-17_18-24-31_input-display-truncation.md +243 -0
  162. tunacode_cli-0.1.4/memory-bank/research/2025-11-17_23-35-02_tool-output-formatting-inconsistency.md +367 -0
  163. tunacode_cli-0.1.4/memory-bank/research/2025-11-18_13-08-42_streaming-retry-state-corruption.md +532 -0
  164. tunacode_cli-0.1.4/memory-bank/research/2025-11-18_14-00-45_http-retry-vs-streaming-state-corruption.md +468 -0
  165. tunacode_cli-0.1.4/memory-bank/research/2025-11-18_17-01-30_multi-agent-delegation-pydantic-ai.md +809 -0
  166. tunacode_cli-0.1.4/memory-bank/research/2025-11-18_agent-feedback-visibility-issue.md +420 -0
  167. tunacode_cli-0.1.4/memory-bank/research/2025-11-18_main-py-refactoring-logic-map.md +204 -0
  168. tunacode_cli-0.1.4/memory-bank/research/2025-11-19_09-45-17_main_agent_error_handling_analysis.md +174 -0
  169. tunacode_cli-0.1.4/memory-bank/research/2025-11-19_11-30-00_node_processor_refactoring_analysis.md +185 -0
  170. tunacode_cli-0.1.4/memory-bank/research/2025-11-20_17-33-18_output_visibility_issues.md +121 -0
  171. tunacode_cli-0.1.4/memory-bank/research/2025-11-20_23-45-24_global-request-timeout-architecture.md +553 -0
  172. tunacode_cli-0.1.4/memory-bank/research/2025-11-20_error_signaling_gaps_analysis.md +112 -0
  173. tunacode_cli-0.1.4/memory-bank/research/2025-11-29_14-53-40_rich-to-textual-migration.md +190 -0
  174. tunacode_cli-0.1.4/memory-bank/research/2025-11-29_textual-repl-tui-modernization.md +283 -0
  175. tunacode_cli-0.1.4/memory-bank/research/2025-11-29_textual-tui-architecture-and-style-guide.md +586 -0
  176. tunacode_cli-0.1.4/memory-bank/research/2025-11-29_textual-tui-architecture-diagrams.md +359 -0
  177. tunacode_cli-0.1.4/memory-bank/research/2025-11-29_tool-activity-display-blueprint.md +335 -0
  178. tunacode_cli-0.1.4/memory-bank/research/2025-11-30_13-45-00_tui-architecture-map.md +417 -0
  179. tunacode_cli-0.1.4/memory-bank/research/2025-11-30_17-15-00_rich-prompt_toolkit-to-textual-deletion-map.md +335 -0
  180. tunacode_cli-0.1.4/memory-bank/research/2025-11-30_19-48-30_tool_error_search_display_textual_tui.md +159 -0
  181. tunacode_cli-0.1.4/memory-bank/research/2025-11-30_21-52-16_remove_tool_status_bar.md +248 -0
  182. tunacode_cli-0.1.4/memory-bank/research/2025-11-30_22-06-48_cli_directory_architecture_mapping.md +186 -0
  183. tunacode_cli-0.1.4/memory-bank/research/2025-12-01_15-35-51_json-utils-authorization-coupling.md +170 -0
  184. tunacode_cli-0.1.4/memory-bank/research/2025-12-01_services-directory-mapping.md +260 -0
  185. tunacode_cli-0.1.4/memory-bank/research/2025-12-01_utils-directory-mapping.md +233 -0
  186. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_09-45-00_tutorial-deletion-mapping.md +224 -0
  187. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_14-30-00_tools-directory-mapping.md +216 -0
  188. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_15-13-03_tooling_rewrite_bash_command_analysis.md +131 -0
  189. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_16-15-00_tools-decorator-refactor-mapping.md +243 -0
  190. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_18-15-00_core-empty-directories.md +63 -0
  191. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_18-25-55_core-module-architecture.md +300 -0
  192. tunacode_cli-0.1.4/memory-bank/research/2025-12-02_18-45-00_core-reorganization-map.md +259 -0
  193. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_12-24-58_permission_prompt_regression.md +183 -0
  194. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_14-07-20_tui_message_differentiation.md +101 -0
  195. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_14-27-17_status_bar_file_tracking.md +142 -0
  196. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_14-50-38_at_file_picker_autocomplete.md +266 -0
  197. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_15-21-47_editor_autocomplete_migration.md +160 -0
  198. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_16-15-00_inline_confirmation_ui.md +217 -0
  199. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_16-46-37_simple_setup_command.md +314 -0
  200. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_23-23-08_error-flash-silent-stop.md +171 -0
  201. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_23-38-36_pricing-mechanism-consolidation.md +265 -0
  202. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_bash-mode-ui-indicator.md +166 -0
  203. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_permission_modal_keybindings.md +185 -0
  204. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_theme-switching-config-persistence.md +203 -0
  205. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_token-counting-verification.md +269 -0
  206. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_token-management-context-compaction.md +258 -0
  207. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_tools_test_suite_design.md +93 -0
  208. tunacode_cli-0.1.4/memory-bank/research/2025-12-04_ui-theme-unification.md +207 -0
  209. tunacode_cli-0.1.4/memory-bank/research/2025-12-05_14-41-57_at_search_depth_limitation.md +137 -0
  210. tunacode_cli-0.1.4/memory-bank/research/2025-12-05_hatch-to-uv-migration.md +173 -0
  211. tunacode_cli-0.1.4/memory-bank/research/2025-12-05_sparse_directories_cleanup_map.md +143 -0
  212. tunacode_cli-0.1.4/memory-bank/research/2025-12-06_18-25-48_ruff-lint-cleanup-map.md +192 -0
  213. tunacode_cli-0.1.4/memory-bank/research/2025-12-06_code_index_analysis.md +256 -0
  214. tunacode_cli-0.1.4/memory-bank/research/2025-12-06_error_handling_and_retry_mechanisms.md +505 -0
  215. tunacode_cli-0.1.4/memory-bank/research/2025-12-06_uniform_truncation_research.md +245 -0
  216. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/pyproject.toml +28 -22
  217. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/pytest.ini +10 -1
  218. tunacode_cli-0.1.4/reports/SMALL_WINS_AUDIT.md +211 -0
  219. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/check-file-length.sh +7 -1
  220. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/download_ripgrep.py +13 -13
  221. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/install_linux.sh +1 -2
  222. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/playwright_cache.py +3 -3
  223. tunacode_cli-0.1.4/scripts/run-dead-imports.sh +81 -0
  224. tunacode_cli-0.1.4/scripts/setup_dev_env.sh +115 -0
  225. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/startup_timer.py +7 -7
  226. tunacode_cli-0.1.4/scripts/ui_import_timer.py +194 -0
  227. tunacode_cli-0.1.4/src/__init__.py +12 -0
  228. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/configuration/defaults.py +5 -4
  229. tunacode_cli-0.1.4/src/tunacode/configuration/key_descriptions.py +267 -0
  230. tunacode_cli-0.1.4/src/tunacode/configuration/models.py +84 -0
  231. tunacode_cli-0.1.4/src/tunacode/configuration/models_registry.json +1 -0
  232. tunacode_cli-0.1.4/src/tunacode/configuration/pricing.py +54 -0
  233. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/configuration/settings.py +1 -2
  234. tunacode_cli-0.1.4/src/tunacode/constants.py +283 -0
  235. tunacode_cli-0.1.4/src/tunacode/core/__init__.py +6 -0
  236. tunacode_cli-0.1.4/src/tunacode/core/agents/__init__.py +39 -0
  237. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/__init__.py +4 -3
  238. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/agent_config.py +388 -0
  239. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/agent_helpers.py +78 -7
  240. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/message_handler.py +8 -9
  241. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/node_processor.py +377 -0
  242. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/response_state.py +44 -31
  243. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/result_wrapper.py +2 -1
  244. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/state_transition.py +3 -3
  245. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/streaming.py +294 -0
  246. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/task_completion.py +40 -0
  247. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/tool_buffer.py +44 -0
  248. tunacode_cli-0.1.4/src/tunacode/core/agents/agent_components/tool_executor.py +123 -0
  249. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/agents/agent_components/truncation_checker.py +1 -4
  250. tunacode_cli-0.1.4/src/tunacode/core/agents/delegation_tools.py +109 -0
  251. tunacode_cli-0.1.4/src/tunacode/core/agents/main.py +564 -0
  252. tunacode_cli-0.1.4/src/tunacode/core/agents/prompts.py +66 -0
  253. tunacode_cli-0.1.4/src/tunacode/core/agents/research_agent.py +117 -0
  254. tunacode_cli-0.1.4/src/tunacode/core/compaction.py +244 -0
  255. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/logging/__init__.py +1 -8
  256. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/logging/config.py +1 -1
  257. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/state.py +66 -79
  258. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/exceptions.py +25 -37
  259. tunacode_cli-0.1.4/src/tunacode/indexing/__init__.py +5 -0
  260. {tunacode_cli-0.0.76/src/tunacode/core → tunacode_cli-0.1.4/src/tunacode/indexing}/code_index.py +126 -26
  261. tunacode_cli-0.1.4/src/tunacode/prompts/research/system.xml +104 -0
  262. tunacode_cli-0.1.4/src/tunacode/prompts/system.xml +961 -0
  263. tunacode_cli-0.1.4/src/tunacode/templates/__init__.py +5 -0
  264. tunacode_cli-0.1.4/src/tunacode/templates/loader.py +15 -0
  265. tunacode_cli-0.1.4/src/tunacode/tools/authorization/__init__.py +29 -0
  266. tunacode_cli-0.1.4/src/tunacode/tools/authorization/context.py +32 -0
  267. tunacode_cli-0.1.4/src/tunacode/tools/authorization/factory.py +20 -0
  268. tunacode_cli-0.1.4/src/tunacode/tools/authorization/handler.py +58 -0
  269. tunacode_cli-0.1.4/src/tunacode/tools/authorization/notifier.py +36 -0
  270. tunacode_cli-0.1.4/src/tunacode/tools/authorization/policy.py +19 -0
  271. tunacode_cli-0.1.4/src/tunacode/tools/authorization/requests.py +11 -0
  272. tunacode_cli-0.1.4/src/tunacode/tools/authorization/rules.py +69 -0
  273. tunacode_cli-0.1.4/src/tunacode/tools/bash.py +230 -0
  274. tunacode_cli-0.1.4/src/tunacode/tools/decorators.py +100 -0
  275. tunacode_cli-0.1.4/src/tunacode/tools/glob.py +353 -0
  276. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/grep.py +56 -142
  277. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/grep_components/file_filter.py +7 -7
  278. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/grep_components/pattern_matcher.py +4 -4
  279. tunacode_cli-0.1.4/src/tunacode/tools/grep_components/result_formatter.py +88 -0
  280. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/grep_components/search_result.py +4 -5
  281. tunacode_cli-0.1.4/src/tunacode/tools/list_dir.py +192 -0
  282. tunacode_cli-0.1.4/src/tunacode/tools/prompts/bash_prompt.xml +10 -0
  283. tunacode_cli-0.1.4/src/tunacode/tools/prompts/glob_prompt.xml +7 -0
  284. tunacode_cli-0.1.4/src/tunacode/tools/prompts/grep_prompt.xml +10 -0
  285. tunacode_cli-0.1.4/src/tunacode/tools/prompts/list_dir_prompt.xml +7 -0
  286. tunacode_cli-0.1.4/src/tunacode/tools/prompts/read_file_prompt.xml +9 -0
  287. tunacode_cli-0.1.4/src/tunacode/tools/prompts/update_file_prompt.xml +9 -0
  288. tunacode_cli-0.1.4/src/tunacode/tools/prompts/write_file_prompt.xml +7 -0
  289. tunacode_cli-0.1.4/src/tunacode/tools/react.py +111 -0
  290. tunacode_cli-0.1.4/src/tunacode/tools/read_file.py +68 -0
  291. tunacode_cli-0.1.4/src/tunacode/tools/update_file.py +51 -0
  292. tunacode_cli-0.1.4/src/tunacode/tools/utils/__init__.py +1 -0
  293. {tunacode_cli-0.0.76/src/tunacode → tunacode_cli-0.1.4/src/tunacode/tools}/utils/ripgrep.py +13 -14
  294. tunacode_cli-0.1.4/src/tunacode/tools/utils/text_match.py +338 -0
  295. tunacode_cli-0.1.4/src/tunacode/tools/write_file.py +34 -0
  296. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/xml_helper.py +5 -5
  297. tunacode_cli-0.1.4/src/tunacode/types.py +203 -0
  298. tunacode_cli-0.1.4/src/tunacode/ui/__init__.py +5 -0
  299. tunacode_cli-0.1.4/src/tunacode/ui/app.py +498 -0
  300. tunacode_cli-0.1.4/src/tunacode/ui/app.tcss +605 -0
  301. tunacode_cli-0.1.4/src/tunacode/ui/commands/__init__.py +249 -0
  302. tunacode_cli-0.1.4/src/tunacode/ui/components/__init__.py +7 -0
  303. tunacode_cli-0.1.4/src/tunacode/ui/components/error_display.py +101 -0
  304. tunacode_cli-0.1.4/src/tunacode/ui/components/search_results.py +82 -0
  305. tunacode_cli-0.1.4/src/tunacode/ui/components/tool_panel.py +98 -0
  306. tunacode_cli-0.1.4/src/tunacode/ui/main.py +99 -0
  307. tunacode_cli-0.1.4/src/tunacode/ui/renderers/__init__.py +41 -0
  308. tunacode_cli-0.1.4/src/tunacode/ui/renderers/errors.py +196 -0
  309. tunacode_cli-0.1.4/src/tunacode/ui/renderers/panels.py +457 -0
  310. tunacode_cli-0.1.4/src/tunacode/ui/renderers/search.py +313 -0
  311. tunacode_cli-0.1.4/src/tunacode/ui/screens/__init__.py +12 -0
  312. tunacode_cli-0.1.4/src/tunacode/ui/screens/model_picker.py +247 -0
  313. tunacode_cli-0.1.4/src/tunacode/ui/screens/setup.py +217 -0
  314. tunacode_cli-0.1.4/src/tunacode/ui/screens/theme_picker.py +90 -0
  315. tunacode_cli-0.1.4/src/tunacode/ui/styles.py +18 -0
  316. tunacode_cli-0.1.4/src/tunacode/ui/widgets/__init__.py +21 -0
  317. tunacode_cli-0.1.4/src/tunacode/ui/widgets/editor.py +69 -0
  318. tunacode_cli-0.1.4/src/tunacode/ui/widgets/file_autocomplete.py +47 -0
  319. tunacode_cli-0.1.4/src/tunacode/ui/widgets/messages.py +45 -0
  320. tunacode_cli-0.1.4/src/tunacode/ui/widgets/resource_bar.py +93 -0
  321. tunacode_cli-0.1.4/src/tunacode/ui/widgets/status_bar.py +74 -0
  322. tunacode_cli-0.1.4/src/tunacode/utils/config/__init__.py +15 -0
  323. {tunacode_cli-0.0.76/src/tunacode/utils → tunacode_cli-0.1.4/src/tunacode/utils/config}/user_configuration.py +13 -54
  324. tunacode_cli-0.1.4/src/tunacode/utils/messaging/__init__.py +10 -0
  325. {tunacode_cli-0.0.76/src/tunacode/utils → tunacode_cli-0.1.4/src/tunacode/utils/messaging}/token_counter.py +2 -11
  326. tunacode_cli-0.1.4/src/tunacode/utils/parsing/__init__.py +3 -0
  327. {tunacode_cli-0.0.76/src/tunacode/cli/repl_components → tunacode_cli-0.1.4/src/tunacode/utils/parsing}/command_parser.py +7 -14
  328. {tunacode_cli-0.0.76/src/tunacode/utils → tunacode_cli-0.1.4/src/tunacode/utils/parsing}/json_utils.py +7 -7
  329. {tunacode_cli-0.0.76/src/tunacode/utils → tunacode_cli-0.1.4/src/tunacode/utils/parsing}/retry.py +3 -2
  330. tunacode_cli-0.1.4/src/tunacode/utils/security/__init__.py +19 -0
  331. tunacode_cli-0.0.76/src/tunacode/utils/security.py → tunacode_cli-0.1.4/src/tunacode/utils/security/command.py +2 -61
  332. tunacode_cli-0.1.4/src/tunacode/utils/system/__init__.py +25 -0
  333. tunacode_cli-0.1.4/src/tunacode/utils/system/gitignore.py +156 -0
  334. tunacode_cli-0.1.4/src/tunacode/utils/system/paths.py +132 -0
  335. tunacode_cli-0.1.4/src/tunacode/utils/ui/__init__.py +9 -0
  336. tunacode_cli-0.1.4/src/tunacode/utils/ui/file_filter.py +135 -0
  337. tunacode_cli-0.1.4/src/tunacode/utils/ui/helpers.py +24 -0
  338. tunacode_cli-0.1.4/tests/__init__.py +1 -0
  339. tunacode_cli-0.1.4/tests/conftest.py +19 -0
  340. tunacode_cli-0.1.4/tests/test_compaction.py +340 -0
  341. tunacode_cli-0.1.4/tests/test_tool_conformance.py +143 -0
  342. tunacode_cli-0.1.4/tests/test_tool_decorators.py +209 -0
  343. tunacode_cli-0.1.4/tests/test_tool_retry.py +224 -0
  344. tunacode_cli-0.0.76/.claude/MEMORY_ANCHOR_SPEC.md +0 -70
  345. tunacode_cli-0.0.76/.claude/NEXT_PR_RULES.md +0 -23
  346. tunacode_cli-0.0.76/.claude/README.md +0 -56
  347. tunacode_cli-0.0.76/.claude/agents/antipattern-sniffer.md +0 -84
  348. tunacode_cli-0.0.76/.claude/agents/bug-context-analyzer.md +0 -49
  349. tunacode_cli-0.0.76/.claude/agents/code-synthesis-analyzer.md +0 -58
  350. tunacode_cli-0.0.76/.claude/agents/codebase-analyzer.md +0 -120
  351. tunacode_cli-0.0.76/.claude/agents/codebase-locator.md +0 -104
  352. tunacode_cli-0.0.76/.claude/agents/context-synthesis.md +0 -61
  353. tunacode_cli-0.0.76/.claude/agents/documentation-synthesis-qa.md +0 -46
  354. tunacode_cli-0.0.76/.claude/agents/expert-debugger.md +0 -59
  355. tunacode_cli-0.0.76/.claude/agents/phased-task-processor.md +0 -61
  356. tunacode_cli-0.0.76/.claude/agents/prompt-engineer.md +0 -167
  357. tunacode_cli-0.0.76/.claude/agents/rapid-code-synthesis-qa.md +0 -62
  358. tunacode_cli-0.0.76/.claude/agents/tech-docs-maintainer.md +0 -65
  359. tunacode_cli-0.0.76/.claude/anchors.json +0 -100
  360. tunacode_cli-0.0.76/.claude/commands/CE/QA.md +0 -106
  361. tunacode_cli-0.0.76/.claude/commands/CE/documentation-synthesis.md +0 -114
  362. tunacode_cli-0.0.76/.claude/commands/CE/execute.md +0 -176
  363. tunacode_cli-0.0.76/.claude/commands/CE/plan.md +0 -112
  364. tunacode_cli-0.0.76/.claude/commands/CE/research.md +0 -148
  365. tunacode_cli-0.0.76/.claude/commands/context-engineer/QA.md +0 -106
  366. tunacode_cli-0.0.76/.claude/commands/context-engineer/documentation-synthesis.md +0 -114
  367. tunacode_cli-0.0.76/.claude/commands/context-engineer/execute.md +0 -176
  368. tunacode_cli-0.0.76/.claude/commands/context-engineer/plan.md +0 -112
  369. tunacode_cli-0.0.76/.claude/commands/context-engineer/research.md +0 -148
  370. tunacode_cli-0.0.76/.claude/commands/deploy.md +0 -54
  371. tunacode_cli-0.0.76/.claude/commands/github-issue.md +0 -48
  372. tunacode_cli-0.0.76/.claude/commands/phaser.md +0 -143
  373. tunacode_cli-0.0.76/.claude/commands/smart-git.md +0 -38
  374. tunacode_cli-0.0.76/.claude/commands/smells.md +0 -156
  375. tunacode_cli-0.0.76/.claude/commands/work.md +0 -306
  376. tunacode_cli-0.0.76/.claude/commands/workflow.md +0 -62
  377. tunacode_cli-0.0.76/.claude/scratchpad/README.md +0 -14
  378. tunacode_cli-0.0.76/.claude/scratchpad/active/task_json_retry_implementation_summary_2025-07-24_13-05-40.md +0 -67
  379. tunacode_cli-0.0.76/.claude/scratchpad/active/task_standardize_ui_formatting_patterns_2025-07-23_20-43-28.md +0 -109
  380. tunacode_cli-0.0.76/.claude/scratchpad/agents/default/spinner-enhancement-2025-08-07.md +0 -88
  381. tunacode_cli-0.0.76/.claude/scratchpad/agents/esc-investigation/scratchpad.md +0 -12
  382. tunacode_cli-0.0.76/.claude/scratchpad/agents/phase5-recovery/scratchpad.md +0 -12
  383. tunacode_cli-0.0.76/.claude/scratchpad/agents/tech-docs-maintainer/scratchpad.md +0 -3
  384. tunacode_cli-0.0.76/.claude/scratchpad/archived/code-synthesis-analyzer_ESC_Double-Press_REPL_Abort_Analysis_2025-08-06_134859_scratchpad.md +0 -12
  385. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Add_Prompt_Injection_to_Remaining_Tools_-_Continuation_2025-08-13_152542_scratchpad.md +0 -5
  386. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Add_Prompt_Injection_to_Remaining_Tools_2025-08-13_152352_scratchpad.md +0 -16
  387. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_CLI_Agent_JSON_Recovery_Investigation_2025-08-12_124206_scratchpad.md +0 -16
  388. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_CLI_Agent_JSON_Recovery_Investigation_2025-08-12_124727_scratchpad.md +0 -13
  389. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Completely_remove_TUNACODE_TASK_COMPLETE_from_plan_mode_2025-08-09_091836_scratchpad.md +0 -5
  390. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Debug_ESC_key_still_not_working_in_approval_prompt_2025-08-09_033534_scratchpad.md +0 -6
  391. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Debug_persistent_KeyboardInterrupt_in_event_loop_2025-08-09_034136_scratchpad.md +0 -6
  392. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Debug_present_plan_tool_registration_and_model_capability_2025-08-09_092923_scratchpad.md +0 -5
  393. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Debug_stuck_double_escape_in_plan_approval_2025-08-09_033214_scratchpad.md +0 -8
  394. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_Application.exit()_failed_error_in_ESC_keybinding_2025-08-09_075607_scratchpad.md +0 -5
  395. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_ESC_double-tap_and_plan_display_issues_2025-08-09_090055_scratchpad.md +0 -6
  396. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_ESC_exceptions_and_missing_present_plan_tool_2025-08-09_081700_scratchpad.md +0 -7
  397. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_agent_not_calling_present_plan_tool_2025-08-09_090827_scratchpad.md +0 -5
  398. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_double_escape_for_planning_mode_approval_prompt_2025-08-09_032759_scratchpad.md +0 -8
  399. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_unhandled_KeyboardInterrupt_exception_in_event_loop_2025-08-09_033843_scratchpad.md +0 -6
  400. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fix_wizard_UI_-_branch_safety_interference_2025-08-20_222738_scratchpad.md +0 -9
  401. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Fixed_Thinking_dots_animation_2025-08-11_121009_scratchpad.md +0 -8
  402. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Force_agent_to_actually_call_present_plan_tool_2025-08-09_091334_scratchpad.md +0 -5
  403. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_GitHub_Directory_Review_2025-08-11_122451_scratchpad.md +0 -11
  404. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Implementing_ESC_key_double-press_for_REPL_abort_2025-08-06_124754_scratchpad.md +0 -11
  405. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_JSON_Recovery_Implementation_2025-08-12_130251_scratchpad.md +0 -11
  406. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Makefile_to_Hatch_Migration_2025-08-07_192356_scratchpad.md +0 -12
  407. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Performance_Optimization_-_Agent_Initialization_2025-08-13_160447_scratchpad.md +0 -18
  408. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Phase_3_-_Glob_Tool_Optimization_2025-08-13_142601_scratchpad.md +0 -21
  409. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Replace_entire_system_prompt_with_tool-only_instructions_2025-08-09_112839_scratchpad.md +0 -5
  410. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_TunaCode_Search_Enhancement_Implementation_2025-08-13_140905_scratchpad.md +0 -17
  411. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Update_Documentation_for_JSON_Recovery_System_2025-08-12_131127_scratchpad.md +0 -10
  412. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_Update_documentation_for_always-on_display_UX_improvements_2025-08-12_154818_scratchpad.md +0 -9
  413. tunacode_cli-0.0.76/.claude/scratchpad/archived/default_slash_command_system_implementation_2025-08-14_034024_scratchpad.md +0 -30
  414. tunacode_cli-0.0.76/.claude/scratchpad/archived/phase5-recovery_Phase_5_Recovery_Analysis_2025-08-13_145339_scratchpad.md +0 -13
  415. tunacode_cli-0.0.76/.claude/scratchpad/locks/code-synthesis-analyzer.lock +0 -0
  416. tunacode_cli-0.0.76/.claude/scratchpad/locks/default.lock +0 -0
  417. tunacode_cli-0.0.76/.claude/scratchpad/locks/esc-investigation.lock +0 -0
  418. tunacode_cli-0.0.76/.claude/scratchpad/locks/phase5-recovery.lock +0 -0
  419. tunacode_cli-0.0.76/.claude/scratchpad/locks/tech-docs-maintainer.lock +0 -0
  420. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/code-synthesis-analyzer_ESC_Double-Press_REPL_Abort_Analysis_2025-08-06_134859_scratchpad.md +0 -12
  421. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Add_Prompt_Injection_to_Remaining_Tools_-_Continuation_2025-08-13_152542_scratchpad.md +0 -5
  422. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Add_Prompt_Injection_to_Remaining_Tools_2025-08-13_152352_scratchpad.md +0 -16
  423. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_CLI_Agent_JSON_Recovery_Investigation_2025-08-12_124206_scratchpad.md +0 -16
  424. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_CLI_Agent_JSON_Recovery_Investigation_2025-08-12_124727_scratchpad.md +0 -13
  425. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Completely_remove_TUNACODE_TASK_COMPLETE_from_plan_mode_2025-08-09_091836_scratchpad.md +0 -5
  426. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Debug_ESC_key_still_not_working_in_approval_prompt_2025-08-09_033534_scratchpad.md +0 -6
  427. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Debug_persistent_KeyboardInterrupt_in_event_loop_2025-08-09_034136_scratchpad.md +0 -6
  428. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Debug_present_plan_tool_registration_and_model_capability_2025-08-09_092923_scratchpad.md +0 -5
  429. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Debug_stuck_double_escape_in_plan_approval_2025-08-09_033214_scratchpad.md +0 -8
  430. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_Application.exit()_failed_error_in_ESC_keybinding_2025-08-09_075607_scratchpad.md +0 -5
  431. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_ESC_double-tap_and_plan_display_issues_2025-08-09_090055_scratchpad.md +0 -6
  432. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_ESC_exceptions_and_missing_present_plan_tool_2025-08-09_081700_scratchpad.md +0 -7
  433. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_agent_not_calling_present_plan_tool_2025-08-09_090827_scratchpad.md +0 -5
  434. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_double_escape_for_planning_mode_approval_prompt_2025-08-09_032759_scratchpad.md +0 -8
  435. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_unhandled_KeyboardInterrupt_exception_in_event_loop_2025-08-09_033843_scratchpad.md +0 -6
  436. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fix_wizard_UI_-_branch_safety_interference_2025-08-20_222738_scratchpad.md +0 -9
  437. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Fixed_Thinking_dots_animation_2025-08-11_121009_scratchpad.md +0 -8
  438. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Force_agent_to_actually_call_present_plan_tool_2025-08-09_091334_scratchpad.md +0 -5
  439. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_GitHub_Directory_Review_2025-08-11_122451_scratchpad.md +0 -11
  440. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Implementing_ESC_key_double-press_for_REPL_abort_2025-08-06_124754_scratchpad.md +0 -11
  441. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_JSON_Recovery_Implementation_2025-08-12_130251_scratchpad.md +0 -11
  442. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Makefile_to_Hatch_Migration_2025-08-07_192356_scratchpad.md +0 -12
  443. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Performance_Optimization_-_Agent_Initialization_2025-08-13_160447_scratchpad.md +0 -18
  444. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Phase_3_-_Glob_Tool_Optimization_2025-08-13_142601_scratchpad.md +0 -21
  445. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Replace_entire_system_prompt_with_tool-only_instructions_2025-08-09_112839_scratchpad.md +0 -5
  446. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_TunaCode_Search_Enhancement_Implementation_2025-08-13_140905_scratchpad.md +0 -17
  447. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Update_Documentation_for_JSON_Recovery_System_2025-08-12_131127_scratchpad.md +0 -10
  448. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/default_Update_documentation_for_always-on_display_UX_improvements_2025-08-12_154818_scratchpad.md +0 -9
  449. tunacode_cli-0.0.76/.claude/scratchpad/shared/done_tasks/phase5-recovery_Phase_5_Recovery_Analysis_2025-08-13_145339_scratchpad.md +0 -13
  450. tunacode_cli-0.0.76/.claude/tech-docs-maintainer.md +0 -65
  451. tunacode_cli-0.0.76/.claude/test_suite_issues_resolved.md +0 -70
  452. tunacode_cli-0.0.76/CLAUDE.md +0 -114
  453. tunacode_cli-0.0.76/PKG-INFO +0 -192
  454. tunacode_cli-0.0.76/README.md +0 -144
  455. tunacode_cli-0.0.76/TUNACODE.md +0 -73
  456. tunacode_cli-0.0.76/documentation/README.md +0 -43
  457. tunacode_cli-0.0.76/documentation/agent/TOOLS_WORKFLOW.md +0 -207
  458. tunacode_cli-0.0.76/documentation/agent/agent-flow.md +0 -85
  459. tunacode_cli-0.0.76/documentation/agent/agent-inspo.md +0 -133
  460. tunacode_cli-0.0.76/documentation/agent/how-tunacode-agent-works.md +0 -482
  461. tunacode_cli-0.0.76/documentation/agent/main-agent-architecture.md +0 -216
  462. tunacode_cli-0.0.76/documentation/agent/swepmini-example.md +0 -123
  463. tunacode_cli-0.0.76/documentation/agent/tunacode-tool-system.md +0 -515
  464. tunacode_cli-0.0.76/documentation/agent-tools/tools-architecture.md +0 -222
  465. tunacode_cli-0.0.76/documentation/changelog/CHANGELOG.md +0 -188
  466. tunacode_cli-0.0.76/documentation/configuration/.env.example +0 -12
  467. tunacode_cli-0.0.76/documentation/configuration/config-file-example.md +0 -61
  468. tunacode_cli-0.0.76/documentation/configuration/environment-variables.md +0 -195
  469. tunacode_cli-0.0.76/documentation/configuration/local-models.md +0 -107
  470. tunacode_cli-0.0.76/documentation/configuration/logging-configuration.md +0 -187
  471. tunacode_cli-0.0.76/documentation/configuration/tunacode-json-example.md +0 -125
  472. tunacode_cli-0.0.76/documentation/configuration/tunacode.json.example +0 -37
  473. tunacode_cli-0.0.76/documentation/development/codebase-hygiene.md +0 -0
  474. tunacode_cli-0.0.76/documentation/development/command-system-architecture.md +0 -259
  475. tunacode_cli-0.0.76/documentation/development/creating-custom-commands.md +0 -399
  476. tunacode_cli-0.0.76/documentation/development/hatch-build-system.md +0 -179
  477. tunacode_cli-0.0.76/documentation/development/performance-optimizations.md +0 -106
  478. tunacode_cli-0.0.76/documentation/development/prompt-principles.md +0 -84
  479. tunacode_cli-0.0.76/documentation/development/publishing-workflow.md +0 -119
  480. tunacode_cli-0.0.76/documentation/tests/README.md +0 -55
  481. tunacode_cli-0.0.76/documentation/tests/characterization-testing.md +0 -142
  482. tunacode_cli-0.0.76/documentation/tests/mocking-strategies.md +0 -340
  483. tunacode_cli-0.0.76/documentation/tests/troubleshooting.md +0 -219
  484. tunacode_cli-0.0.76/documentation/ui/ui-architecture.md +0 -454
  485. tunacode_cli-0.0.76/documentation/user/commands.md +0 -113
  486. tunacode_cli-0.0.76/documentation/user/getting-started.md +0 -103
  487. tunacode_cli-0.0.76/documentation/user/tools.md +0 -28
  488. tunacode_cli-0.0.76/scripts/setup_dev_env.sh +0 -457
  489. tunacode_cli-0.0.76/scripts/verify_dev_env.sh +0 -71
  490. tunacode_cli-0.0.76/setup.py +0 -10
  491. tunacode_cli-0.0.76/src/README.md +0 -3
  492. tunacode_cli-0.0.76/src/tunacode/cli/__init__.py +0 -4
  493. tunacode_cli-0.0.76/src/tunacode/cli/commands/__init__.py +0 -68
  494. tunacode_cli-0.0.76/src/tunacode/cli/commands/base.py +0 -99
  495. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/__init__.py +0 -49
  496. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/command_reload.py +0 -48
  497. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/conversation.py +0 -115
  498. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/debug.py +0 -189
  499. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/development.py +0 -80
  500. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/model.py +0 -389
  501. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/plan.py +0 -50
  502. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/quickstart.py +0 -43
  503. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/system.py +0 -308
  504. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/template.py +0 -132
  505. tunacode_cli-0.0.76/src/tunacode/cli/commands/implementations/todo.py +0 -217
  506. tunacode_cli-0.0.76/src/tunacode/cli/commands/registry.py +0 -401
  507. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/__init__.py +0 -32
  508. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/command.py +0 -157
  509. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/loader.py +0 -134
  510. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/processor.py +0 -294
  511. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/types.py +0 -93
  512. tunacode_cli-0.0.76/src/tunacode/cli/commands/slash/validator.py +0 -399
  513. tunacode_cli-0.0.76/src/tunacode/cli/commands/template_shortcut.py +0 -93
  514. tunacode_cli-0.0.76/src/tunacode/cli/main.py +0 -96
  515. tunacode_cli-0.0.76/src/tunacode/cli/repl.py +0 -567
  516. tunacode_cli-0.0.76/src/tunacode/cli/repl_components/__init__.py +0 -10
  517. tunacode_cli-0.0.76/src/tunacode/cli/repl_components/error_recovery.py +0 -166
  518. tunacode_cli-0.0.76/src/tunacode/cli/repl_components/output_display.py +0 -53
  519. tunacode_cli-0.0.76/src/tunacode/cli/repl_components/tool_executor.py +0 -98
  520. tunacode_cli-0.0.76/src/tunacode/configuration/models.py +0 -93
  521. tunacode_cli-0.0.76/src/tunacode/constants.py +0 -207
  522. tunacode_cli-0.0.76/src/tunacode/context.py +0 -71
  523. tunacode_cli-0.0.76/src/tunacode/core/__init__.py +0 -0
  524. tunacode_cli-0.0.76/src/tunacode/core/agents/__init__.py +0 -8
  525. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/agent_config.py +0 -312
  526. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/json_tool_parser.py +0 -109
  527. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/node_processor.py +0 -498
  528. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/task_completion.py +0 -32
  529. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/tool_buffer.py +0 -24
  530. tunacode_cli-0.0.76/src/tunacode/core/agents/agent_components/tool_executor.py +0 -49
  531. tunacode_cli-0.0.76/src/tunacode/core/agents/main.py +0 -506
  532. tunacode_cli-0.0.76/src/tunacode/core/agents/utils.py +0 -393
  533. tunacode_cli-0.0.76/src/tunacode/core/background/__init__.py +0 -0
  534. tunacode_cli-0.0.76/src/tunacode/core/background/manager.py +0 -36
  535. tunacode_cli-0.0.76/src/tunacode/core/llm/__init__.py +0 -0
  536. tunacode_cli-0.0.76/src/tunacode/core/logging/handlers.py +0 -117
  537. tunacode_cli-0.0.76/src/tunacode/core/setup/__init__.py +0 -17
  538. tunacode_cli-0.0.76/src/tunacode/core/setup/agent_setup.py +0 -41
  539. tunacode_cli-0.0.76/src/tunacode/core/setup/base.py +0 -37
  540. tunacode_cli-0.0.76/src/tunacode/core/setup/config_setup.py +0 -429
  541. tunacode_cli-0.0.76/src/tunacode/core/setup/config_wizard.py +0 -228
  542. tunacode_cli-0.0.76/src/tunacode/core/setup/coordinator.py +0 -62
  543. tunacode_cli-0.0.76/src/tunacode/core/setup/environment_setup.py +0 -62
  544. tunacode_cli-0.0.76/src/tunacode/core/setup/git_safety_setup.py +0 -186
  545. tunacode_cli-0.0.76/src/tunacode/core/setup/template_setup.py +0 -75
  546. tunacode_cli-0.0.76/src/tunacode/core/token_usage/api_response_parser.py +0 -48
  547. tunacode_cli-0.0.76/src/tunacode/core/token_usage/cost_calculator.py +0 -66
  548. tunacode_cli-0.0.76/src/tunacode/core/token_usage/usage_tracker.py +0 -144
  549. tunacode_cli-0.0.76/src/tunacode/core/tool_handler.py +0 -118
  550. tunacode_cli-0.0.76/src/tunacode/prompts/system.md +0 -383
  551. tunacode_cli-0.0.76/src/tunacode/prompts/system.md.bak +0 -487
  552. tunacode_cli-0.0.76/src/tunacode/services/__init__.py +0 -1
  553. tunacode_cli-0.0.76/src/tunacode/services/mcp.py +0 -108
  554. tunacode_cli-0.0.76/src/tunacode/setup.py +0 -63
  555. tunacode_cli-0.0.76/src/tunacode/templates/__init__.py +0 -9
  556. tunacode_cli-0.0.76/src/tunacode/templates/loader.py +0 -210
  557. tunacode_cli-0.0.76/src/tunacode/tools/base.py +0 -321
  558. tunacode_cli-0.0.76/src/tunacode/tools/bash.py +0 -347
  559. tunacode_cli-0.0.76/src/tunacode/tools/exit_plan_mode.py +0 -273
  560. tunacode_cli-0.0.76/src/tunacode/tools/glob.py +0 -584
  561. tunacode_cli-0.0.76/src/tunacode/tools/grep_components/result_formatter.py +0 -139
  562. tunacode_cli-0.0.76/src/tunacode/tools/list_dir.py +0 -320
  563. tunacode_cli-0.0.76/src/tunacode/tools/present_plan.py +0 -288
  564. tunacode_cli-0.0.76/src/tunacode/tools/prompts/bash_prompt.xml +0 -72
  565. tunacode_cli-0.0.76/src/tunacode/tools/prompts/exit_plan_mode_prompt.xml +0 -25
  566. tunacode_cli-0.0.76/src/tunacode/tools/prompts/glob_prompt.xml +0 -45
  567. tunacode_cli-0.0.76/src/tunacode/tools/prompts/grep_prompt.xml +0 -97
  568. tunacode_cli-0.0.76/src/tunacode/tools/prompts/list_dir_prompt.xml +0 -31
  569. tunacode_cli-0.0.76/src/tunacode/tools/prompts/present_plan_prompt.xml +0 -20
  570. tunacode_cli-0.0.76/src/tunacode/tools/prompts/read_file_prompt.xml +0 -54
  571. tunacode_cli-0.0.76/src/tunacode/tools/prompts/run_command_prompt.xml +0 -64
  572. tunacode_cli-0.0.76/src/tunacode/tools/prompts/todo_prompt.xml +0 -96
  573. tunacode_cli-0.0.76/src/tunacode/tools/prompts/update_file_prompt.xml +0 -53
  574. tunacode_cli-0.0.76/src/tunacode/tools/prompts/write_file_prompt.xml +0 -37
  575. tunacode_cli-0.0.76/src/tunacode/tools/read_file.py +0 -191
  576. tunacode_cli-0.0.76/src/tunacode/tools/run_command.py +0 -222
  577. tunacode_cli-0.0.76/src/tunacode/tools/schema_assembler.py +0 -167
  578. tunacode_cli-0.0.76/src/tunacode/tools/todo.py +0 -456
  579. tunacode_cli-0.0.76/src/tunacode/tools/update_file.py +0 -206
  580. tunacode_cli-0.0.76/src/tunacode/tools/write_file.py +0 -167
  581. tunacode_cli-0.0.76/src/tunacode/tutorial/__init__.py +0 -9
  582. tunacode_cli-0.0.76/src/tunacode/tutorial/content.py +0 -98
  583. tunacode_cli-0.0.76/src/tunacode/tutorial/manager.py +0 -182
  584. tunacode_cli-0.0.76/src/tunacode/tutorial/steps.py +0 -124
  585. tunacode_cli-0.0.76/src/tunacode/types.py +0 -394
  586. tunacode_cli-0.0.76/src/tunacode/ui/__init__.py +0 -1
  587. tunacode_cli-0.0.76/src/tunacode/ui/completers.py +0 -338
  588. tunacode_cli-0.0.76/src/tunacode/ui/console.py +0 -124
  589. tunacode_cli-0.0.76/src/tunacode/ui/constants.py +0 -16
  590. tunacode_cli-0.0.76/src/tunacode/ui/decorators.py +0 -59
  591. tunacode_cli-0.0.76/src/tunacode/ui/input.py +0 -116
  592. tunacode_cli-0.0.76/src/tunacode/ui/keybindings.py +0 -71
  593. tunacode_cli-0.0.76/src/tunacode/ui/lexers.py +0 -45
  594. tunacode_cli-0.0.76/src/tunacode/ui/logging_compat.py +0 -44
  595. tunacode_cli-0.0.76/src/tunacode/ui/model_selector.py +0 -394
  596. tunacode_cli-0.0.76/src/tunacode/ui/output.py +0 -206
  597. tunacode_cli-0.0.76/src/tunacode/ui/panels.py +0 -385
  598. tunacode_cli-0.0.76/src/tunacode/ui/prompt_manager.py +0 -152
  599. tunacode_cli-0.0.76/src/tunacode/ui/tool_descriptions.py +0 -115
  600. tunacode_cli-0.0.76/src/tunacode/ui/tool_ui.py +0 -212
  601. tunacode_cli-0.0.76/src/tunacode/ui/utils.py +0 -3
  602. tunacode_cli-0.0.76/src/tunacode/ui/validators.py +0 -23
  603. tunacode_cli-0.0.76/src/tunacode/utils/__init__.py +0 -0
  604. tunacode_cli-0.0.76/src/tunacode/utils/api_key_validation.py +0 -93
  605. tunacode_cli-0.0.76/src/tunacode/utils/bm25.py +0 -55
  606. tunacode_cli-0.0.76/src/tunacode/utils/diff_utils.py +0 -69
  607. tunacode_cli-0.0.76/src/tunacode/utils/file_utils.py +0 -41
  608. tunacode_cli-0.0.76/src/tunacode/utils/import_cache.py +0 -11
  609. tunacode_cli-0.0.76/src/tunacode/utils/models_registry.py +0 -563
  610. tunacode_cli-0.0.76/src/tunacode/utils/system.py +0 -332
  611. tunacode_cli-0.0.76/src/tunacode/utils/text_utils.py +0 -206
  612. tunacode_cli-0.0.76/tests/CHARACTERIZATION_README.md +0 -23
  613. tunacode_cli-0.0.76/tests/CHARACTERIZATION_TEST_PLAN.md +0 -248
  614. tunacode_cli-0.0.76/tests/CHARACTERIZATION_TEST_PLAN_AGENT_MAIN.md +0 -316
  615. tunacode_cli-0.0.76/tests/CHARACTERIZATION_TEST_PLAN_COMMANDS.md +0 -112
  616. tunacode_cli-0.0.76/tests/FILE_OPERATIONS_TEST_GUIDE.md +0 -288
  617. tunacode_cli-0.0.76/tests/characterization/__init__.py +0 -1
  618. tunacode_cli-0.0.76/tests/characterization/agent/__init__.py +0 -1
  619. tunacode_cli-0.0.76/tests/characterization/agent/conftest.py +0 -44
  620. tunacode_cli-0.0.76/tests/characterization/agent/test_agent_creation.py +0 -187
  621. tunacode_cli-0.0.76/tests/characterization/agent/test_json_tool_parsing.py +0 -235
  622. tunacode_cli-0.0.76/tests/characterization/agent/test_process_node.py +0 -321
  623. tunacode_cli-0.0.76/tests/characterization/agent/test_process_request.py +0 -409
  624. tunacode_cli-0.0.76/tests/characterization/agent/test_tool_message_patching.py +0 -200
  625. tunacode_cli-0.0.76/tests/characterization/background/test_background_edge_cases.py +0 -80
  626. tunacode_cli-0.0.76/tests/characterization/background/test_cleanup.py +0 -60
  627. tunacode_cli-0.0.76/tests/characterization/background/test_task_cancellation.py +0 -51
  628. tunacode_cli-0.0.76/tests/characterization/background/test_task_creation.py +0 -55
  629. tunacode_cli-0.0.76/tests/characterization/background/test_task_execution.py +0 -54
  630. tunacode_cli-0.0.76/tests/characterization/code_index/test_cache_management.py +0 -49
  631. tunacode_cli-0.0.76/tests/characterization/code_index/test_file_scanning.py +0 -61
  632. tunacode_cli-0.0.76/tests/characterization/code_index/test_index_building.py +0 -57
  633. tunacode_cli-0.0.76/tests/characterization/code_index/test_search_operations.py +0 -65
  634. tunacode_cli-0.0.76/tests/characterization/code_index/test_symbol_extraction.py +0 -68
  635. tunacode_cli-0.0.76/tests/characterization/commands/__init__.py +0 -1
  636. tunacode_cli-0.0.76/tests/characterization/commands/test_init_command.py +0 -248
  637. tunacode_cli-0.0.76/tests/characterization/commands/test_model_selection_persistence.py +0 -237
  638. tunacode_cli-0.0.76/tests/characterization/conftest.py +0 -260
  639. tunacode_cli-0.0.76/tests/characterization/context/README.md +0 -28
  640. tunacode_cli-0.0.76/tests/characterization/context/__init__.py +0 -1
  641. tunacode_cli-0.0.76/tests/characterization/context/test_context_acceptance.py +0 -103
  642. tunacode_cli-0.0.76/tests/characterization/context/test_context_integration.py +0 -115
  643. tunacode_cli-0.0.76/tests/characterization/context/test_context_loading.py +0 -151
  644. tunacode_cli-0.0.76/tests/characterization/context/test_tunacode_logging.py +0 -92
  645. tunacode_cli-0.0.76/tests/characterization/repl/test_command_parsing.py +0 -66
  646. tunacode_cli-0.0.76/tests/characterization/repl/test_error_handling.py +0 -243
  647. tunacode_cli-0.0.76/tests/characterization/repl/test_escape_key_behavior.py +0 -98
  648. tunacode_cli-0.0.76/tests/characterization/repl/test_input_handling.py +0 -100
  649. tunacode_cli-0.0.76/tests/characterization/repl/test_keyboard_interrupts.py +0 -57
  650. tunacode_cli-0.0.76/tests/characterization/repl/test_multiline_input.py +0 -58
  651. tunacode_cli-0.0.76/tests/characterization/repl/test_output_display_logic.py +0 -74
  652. tunacode_cli-0.0.76/tests/characterization/repl/test_repl_initialization.py +0 -122
  653. tunacode_cli-0.0.76/tests/characterization/repl/test_session_flow.py +0 -109
  654. tunacode_cli-0.0.76/tests/characterization/services/test_error_recovery.py +0 -31
  655. tunacode_cli-0.0.76/tests/characterization/services/test_llm_routing.py +0 -31
  656. tunacode_cli-0.0.76/tests/characterization/services/test_mcp_integration.py +0 -31
  657. tunacode_cli-0.0.76/tests/characterization/services/test_service_lifecycle.py +0 -31
  658. tunacode_cli-0.0.76/tests/characterization/state/test_agent_tracking.py +0 -34
  659. tunacode_cli-0.0.76/tests/characterization/state/test_message_history.py +0 -48
  660. tunacode_cli-0.0.76/tests/characterization/state/test_permissions.py +0 -25
  661. tunacode_cli-0.0.76/tests/characterization/state/test_session_management.py +0 -40
  662. tunacode_cli-0.0.76/tests/characterization/state/test_state_initialization.py +0 -66
  663. tunacode_cli-0.0.76/tests/characterization/state/test_user_config.py +0 -34
  664. tunacode_cli-0.0.76/tests/characterization/test_characterization_commands.py +0 -358
  665. tunacode_cli-0.0.76/tests/characterization/test_characterization_grep.py +0 -281
  666. tunacode_cli-0.0.76/tests/characterization/test_characterization_main.py +0 -324
  667. tunacode_cli-0.0.76/tests/characterization/test_characterization_repl.py +0 -372
  668. tunacode_cli-0.0.76/tests/characterization/ui/test_async_ui.py +0 -32
  669. tunacode_cli-0.0.76/tests/characterization/ui/test_console_output.py +0 -31
  670. tunacode_cli-0.0.76/tests/characterization/ui/test_diff_display.py +0 -25
  671. tunacode_cli-0.0.76/tests/characterization/ui/test_prompt_rendering.py +0 -42
  672. tunacode_cli-0.0.76/tests/characterization/ui/test_spinner_messages.py +0 -101
  673. tunacode_cli-0.0.76/tests/characterization/ui/test_tool_confirmations.py +0 -29
  674. tunacode_cli-0.0.76/tests/characterization/utils/test_expand_file_refs.py +0 -175
  675. tunacode_cli-0.0.76/tests/characterization/utils/test_file_operations.py +0 -35
  676. tunacode_cli-0.0.76/tests/characterization/utils/test_git_commands.py +0 -163
  677. tunacode_cli-0.0.76/tests/characterization/utils/test_token_counting.py +0 -40
  678. tunacode_cli-0.0.76/tests/characterization/utils/test_utils_edge_cases.py +0 -51
  679. tunacode_cli-0.0.76/tests/conftest.py +0 -420
  680. tunacode_cli-0.0.76/tests/test_agent_output_formatting.py +0 -108
  681. tunacode_cli-0.0.76/tests/test_command_parser_retry.py +0 -186
  682. tunacode_cli-0.0.76/tests/test_completion_detection.py +0 -76
  683. tunacode_cli-0.0.76/tests/test_glob_phase3.py +0 -191
  684. tunacode_cli-0.0.76/tests/test_json_concatenation_recovery.py +0 -326
  685. tunacode_cli-0.0.76/tests/test_json_retry.py +0 -230
  686. tunacode_cli-0.0.76/tests/test_logging_config.py +0 -112
  687. tunacode_cli-0.0.76/tests/test_onboarding_features.py +0 -457
  688. tunacode_cli-0.0.76/tests/test_phase2_type_hints.py +0 -203
  689. tunacode_cli-0.0.76/tests/test_plan_mode.py +0 -177
  690. tunacode_cli-0.0.76/tests/test_prompt_changes_validation.py +0 -39
  691. tunacode_cli-0.0.76/tests/test_prompt_injection.py +0 -124
  692. tunacode_cli-0.0.76/tests/test_security.py +0 -196
  693. tunacode_cli-0.0.76/tests/test_slash_commands_comprehensive.py +0 -359
  694. tunacode_cli-0.0.76/tests/test_slash_commands_functional.py +0 -457
  695. tunacode_cli-0.0.76/tests/test_slash_commands_integration.py +0 -349
  696. tunacode_cli-0.0.76/tests/test_slash_commands_isolated.py +0 -270
  697. tunacode_cli-0.0.76/tests/test_spinner_updates.py +0 -110
  698. tunacode_cli-0.0.76/tests/test_tool_batching_retry.py +0 -285
  699. tunacode_cli-0.0.76/tests/unit/commands/test_model_selection_persistence_new.py +0 -118
  700. tunacode_cli-0.0.76/tests/unit/config/test_user_configuration_permissions.py +0 -95
  701. tunacode_cli-0.0.76/tests/unit/test_constants_enums.py +0 -117
  702. tunacode_cli-0.0.76/tools/emoji_cleaner.py +0 -220
  703. {tunacode_cli-0.0.76/.claude/delta → tunacode_cli-0.1.4/.claude/delta_summaries}/2025-01-05-baseline.yml +0 -0
  704. {tunacode_cli-0.0.76/.claude/delta → tunacode_cli-0.1.4/.claude/delta_summaries}/fix-text-alignment-layout-task3.md +0 -0
  705. {tunacode_cli-0.0.76/.claude/delta → tunacode_cli-0.1.4/.claude/delta_summaries}/task4_ui_formatting_fix.md +0 -0
  706. {tunacode_cli-0.0.76/.claude/delta → tunacode_cli-0.1.4/.claude/delta_summaries}/v0.0.53_to_v0.0.54.diff +0 -0
  707. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/always-on-display-implementation.md +0 -0
  708. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/cli-json-recovery-incident.md +0 -0
  709. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/directory-caching-optimization.md +0 -0
  710. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/esc-investigation/ESC_KEY_INVESTIGATION.md +0 -0
  711. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/esc-investigation/ESC_KEY_STREAMING_ANALYSIS.md +0 -0
  712. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/hatch-commands.md +0 -0
  713. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/model-updates-2025.md +0 -0
  714. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/onboarding-improvements.md +0 -0
  715. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/openai_tool_calling_evaluation.md +0 -0
  716. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/phase5-prompt-injection-system.md +0 -0
  717. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/slash-commands.md +0 -0
  718. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/uv-hatch-setup.md +0 -0
  719. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/development/uv-installer-updates.md +0 -0
  720. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/metadata/components.yml +0 -0
  721. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/metadata/hotspots.txt +0 -0
  722. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/patterns/json_retry_implementation.md +0 -0
  723. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/qa/fix-agent-errors.yml +0 -0
  724. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/qa/fix-publish-script.yml +0 -0
  725. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.claude/qa/fix-runtime-warnings.yml +0 -0
  726. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.github/pull_request_template.md +0 -0
  727. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/.github/workflows/lint.yml +0 -0
  728. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/LICENSE +0 -0
  729. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/assets/tunacode_example.png +0 -0
  730. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/execute/2025-09-12_15-20-00_model_selection_config_persistence_fix.md +0 -0
  731. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/plan/2025-09-11_13-30-00_agent_loop_architecture_enhancement.md +0 -0
  732. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/plan/2025-09-11_14-00-00_enum_state_machine_implementation.md +0 -0
  733. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/plan/2025-09-11_14-15-00_automated_cli_tool_testing_framework.md +0 -0
  734. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/plan/2025-09-12_12-20-00_global_graceful_error_handling_implementation.md +0 -0
  735. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/plan/2025-09-12_15-08-14_model_selection_config_persistence_fix.md +0 -0
  736. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-07_21-13-37_agent_loop_architecture.md +0 -0
  737. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-11_13-14-06_agent_loop_enhancement_analysis.md +0 -0
  738. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-12_12-15-48_global_graceful_error_handling_analysis.md +0 -0
  739. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-12_14-54-43_model_configuration_crash_analysis.md +0 -0
  740. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-12_15-06-58_model_selection_config_update_issue.md +0 -0
  741. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/memory-bank/research/2025-09-12_ai-agent-tools-architecture.md +0 -0
  742. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/uninstall.sh +0 -0
  743. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/scripts/utils/vulture_whitelist.py +0 -0
  744. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/__init__.py +0 -0
  745. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/configuration/__init__.py +0 -0
  746. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/logging/formatters.py +0 -0
  747. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/core/logging/logger.py +0 -0
  748. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/py.typed +0 -0
  749. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/__init__.py +0 -0
  750. {tunacode_cli-0.0.76 → tunacode_cli-0.1.4}/src/tunacode/tools/grep_components/__init__.py +0 -0
  751. {tunacode_cli-0.0.76/src → tunacode_cli-0.1.4/src/tunacode/utils}/__init__.py +0 -0
  752. {tunacode_cli-0.0.76/src/tunacode/utils → tunacode_cli-0.1.4/src/tunacode/utils/messaging}/message_utils.py +0 -0
@@ -0,0 +1,28 @@
1
+ .claude/
2
+ ├── metadata/
3
+ │ ├── dependency_graphs/
4
+ │ ├── file_classifications.json (implementation vs. interface)
5
+ │ └── intent_classifications.json
6
+ ├── semantic_index/
7
+ │ ├── function_call_graphs.json
8
+ │ ├── intent_mappings.json
9
+ │ └── type_relationships.json
10
+ ├── debug_history/
11
+ │ ├── error_solution_logs.json (categorized by component and error type)
12
+ │ └── context_and_versions.json
13
+ ├── patterns/
14
+ │ ├── canonical_patterns/
15
+ │ ├── empirical_interface_patterns/
16
+ │ └── reliability_metrics.json
17
+ ├── qa/
18
+ │ ├── solved_problems/
19
+ │ ├── context_logs/
20
+ │ └── reasoning_docs/
21
+ ├── debug_history/
22
+ │ └── debug_sessions.json (error→solution pairs, context, code versions)
23
+ ├── delta_summaries/
24
+ │ ├── api_change_logs.json
25
+ │ ├── behavior_changes.json
26
+ │ └── reasoning_logs/
27
+ └── memory_anchors/
28
+ ├── anchors.json (UUID-based anchors with semantic structure)
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/cheatsheet/v1",
3
+ "component": "agents.core",
4
+ "title": "main agent sections",
5
+ "sections": [
6
+ {
7
+ "heading": "agent-main key sections",
8
+ "content": "Prioritized map of src/tunacode/core/agents/main.py: highlights process_request lifecycle control, StateFacade resets, productivity/react enforcement, tool batching, fallback synthesis, and streaming hooks. See documentation/agent/main-agent-key-sections.md for details."
9
+ }
10
+ ],
11
+ "last_updated": "2025-11-17T18:01:44.062552062Z"
12
+ }
@@ -0,0 +1,8 @@
1
+ # Debug Log: RAG search hyphen gotcha
2
+
3
+ - Date: 2025-09-21
4
+ - Context: Running `./llm-agent-tools/rag_modules/rag-cli.sh search "models_registry OR plan-models"`
5
+ - Error: `sqlite3.OperationalError: no such column: models`
6
+ - Root Cause: FTS5 `MATCH` parser interprets hyphen (`-`) as an operator; the token `plan-models` is parsed as `plan - models`, leading SQLite to look for a `models` column/symbol.
7
+ - Resolution: Quote hyphenated terms: `"plan-models"`, or replace hyphens with spaces. Example: `./rag-cli.sh search 'models_registry OR "plan-models"' --format json`.
8
+ - Follow-ups: Added `.claude/docs_model_friendly/rag_modules_overview.md` with usage notes.
@@ -0,0 +1,236 @@
1
+ # Debug Session: Tool Handler Refactoring
2
+
3
+ **Date:** 2025-11-05
4
+ **Component:** tunacode.core.tool_handler
5
+ **Session Type:** Architectural Refactoring
6
+ **Status:** Success
7
+
8
+ ## Problem Statement
9
+
10
+ Major code smells identified in ToolHandler class:
11
+ 1. God Object anti-pattern (doing too much)
12
+ 2. Complex nested authorization logic (hard to reason about)
13
+ 3. Tight coupling to multiple subsystems
14
+ 4. Mutable global state via active_template
15
+ 5. Mixed abstraction levels
16
+
17
+ ## Solution Approach
18
+
19
+ Applied separation of concerns using:
20
+ - Strategy Pattern for authorization rules
21
+ - Facade Pattern for ToolHandler
22
+ - Dependency Injection for testability
23
+ - Immutable Context to eliminate state bugs
24
+
25
+ ## Issues Encountered & Solutions
26
+
27
+ ### Issue 1: Test Failures - Plan Mode Not Overriding YOLO
28
+
29
+ **Error:**
30
+ ```
31
+ FAILED test_plan_mode_overrides_yolo - AssertionError: assert False
32
+ ```
33
+
34
+ **Root Cause:**
35
+ Initial implementation evaluated all rules in simple priority order. Plan mode blocking rule couldn't override YOLO mode because YOLO had higher priority in the flat rule list.
36
+
37
+ **Solution:**
38
+ Implemented two-phase authorization:
39
+ 1. Phase 1: Check if tool is blocked (plan mode) - overrides everything
40
+ 2. Phase 2: Evaluate allowlist rules in priority order
41
+
42
+ ```python
43
+ def should_confirm(self, tool_name: ToolName, context: AuthContext) -> bool:
44
+ # Phase 1: Blocking overrides everything
45
+ if self.is_tool_blocked(tool_name, context):
46
+ return True # Force confirmation
47
+
48
+ # Phase 2: Evaluate allowlist rules
49
+ for rule in self._rules:
50
+ if rule.should_allow_without_confirmation(tool_name, context):
51
+ return False
52
+
53
+ return True
54
+ ```
55
+
56
+ **Lesson:** Override logic needs separate evaluation path, not just priority ordering.
57
+
58
+ ### Issue 2: Template Context Not Available
59
+
60
+ **Error:**
61
+ ```
62
+ FAILED test_template_allowed_tools_skip_confirmation - AssertionError: assert not True
63
+ ```
64
+
65
+ **Root Cause:**
66
+ `AuthContext.from_state()` couldn't read `active_template` because ToolHandler wasn't registered with StateManager yet.
67
+
68
+ **Solution:**
69
+ ToolHandler registers itself with StateManager during initialization:
70
+
71
+ ```python
72
+ if state_manager.tool_handler is None:
73
+ state_manager.set_tool_handler(self)
74
+ ```
75
+
76
+ **Lesson:** Context extraction depends on object lifecycle - ensure objects are registered before context creation.
77
+
78
+ ### Issue 3: Property Has No Setter
79
+
80
+ **Error:**
81
+ ```
82
+ AttributeError: property 'tool_handler' of 'StateManager' object has no setter
83
+ ```
84
+
85
+ **Root Cause:**
86
+ Attempted direct property assignment instead of using setter method.
87
+
88
+ **Solution:**
89
+ Use proper setter method:
90
+ ```python
91
+ state_manager.set_tool_handler(self) # Correct
92
+ # NOT: state_manager.tool_handler = self
93
+ ```
94
+
95
+ **Lesson:** Always check if property has setter before direct assignment.
96
+
97
+ ## Testing Strategy
98
+
99
+ ### Golden Baseline Tests (36 tests)
100
+ Created comprehensive test suite capturing exact behavior of original implementation:
101
+
102
+ 1. **present_plan special case** (3 tests)
103
+ 2. **Plan mode blocking** (5 tests)
104
+ - Overrides YOLO
105
+ - Overrides ignore list
106
+ - Allows read-only
107
+ 3. **Read-only tools** (2 tests)
108
+ 4. **Template allowed tools** (4 tests)
109
+ 5. **YOLO mode** (2 tests)
110
+ 6. **Tool ignore list** (3 tests)
111
+ 7. **Default behavior** (2 tests)
112
+ 8. **Priority ordering** (4 tests)
113
+ 9. **Confirmation request factory** (2 tests)
114
+ 10. **Confirmation processing** (5 tests)
115
+ 11. **Tool blocking checks** (4 tests)
116
+
117
+ **Result:** All 36 tests pass, confirming identical behavior.
118
+
119
+ ## Code Quality Improvements
120
+
121
+ ### Before Refactoring
122
+ ```python
123
+ def should_confirm(self, tool_name: ToolName) -> bool:
124
+ if tool_name == "present_plan":
125
+ return False
126
+ if self.is_tool_blocked_in_plan_mode(tool_name):
127
+ return True
128
+ if is_read_only_tool(tool_name):
129
+ return False
130
+ if self.active_template and self.active_template.allowed_tools:
131
+ if tool_name in self.active_template.allowed_tools:
132
+ return False
133
+ return not (self.state.session.yolo or tool_name in self.state.session.tool_ignore)
134
+ ```
135
+
136
+ **Issues:**
137
+ - Hard to understand precedence
138
+ - Difficult to add new rules
139
+ - Hidden state dependencies
140
+ - Complex testing requirements
141
+
142
+ ### After Refactoring
143
+ ```python
144
+ def should_confirm(self, tool_name: ToolName) -> bool:
145
+ context = AuthContext.from_state(self.state)
146
+ return self._policy.should_confirm(tool_name, context)
147
+ ```
148
+
149
+ **Benefits:**
150
+ - Clear intent
151
+ - Easy to extend (add new rule)
152
+ - Explicit context
153
+ - Simple testing
154
+
155
+ ## Metrics
156
+
157
+ **Cyclomatic Complexity:**
158
+ - Original `should_confirm`: 12
159
+ - Refactored `should_confirm`: 3
160
+ - Each rule method: 2-3
161
+
162
+ **Lines of Code:**
163
+ - Original module: 135 lines
164
+ - Refactored authorization module: 400 lines (includes comprehensive docs)
165
+ - Refactored handler module: 135 lines
166
+
167
+ **Test Coverage:**
168
+ - 36 golden baseline tests
169
+ - 100% pass rate
170
+ - Zero regressions
171
+
172
+ ## Commands Used
173
+
174
+ ```bash
175
+ # Run golden baseline tests
176
+ PYTHONPATH=/home/user/tunacode/src:$PYTHONPATH python3 -m pytest \
177
+ tests/golden_baseline_tool_handler_authorization.py -v
178
+
179
+ # Run code formatting
180
+ python3 -m ruff check src/tunacode/core/tool_authorization.py --fix
181
+ python3 -m ruff format src/tunacode/core/tool_authorization.py
182
+
183
+ # Verify all tests pass
184
+ PYTHONPATH=/home/user/tunacode/src:$PYTHONPATH python3 -m pytest \
185
+ tests/golden_baseline_tool_handler_authorization.py -v --tb=line
186
+ ```
187
+
188
+ ## Files Modified
189
+
190
+ **New Files:**
191
+ - `src/tunacode/core/tool_authorization.py` (400 lines)
192
+ - `tests/golden_baseline_tool_handler_authorization.py` (532 lines)
193
+ - `memory-bank/research/2025-11-05_refactored_tool_handler_design.md`
194
+
195
+ **Modified Files:**
196
+ - `src/tunacode/core/tool_handler.py` (refactored to use new components)
197
+
198
+ ## Success Criteria
199
+
200
+ ✅ All existing tests pass
201
+ ✅ Golden baseline tests pass (36/36)
202
+ ✅ Code formatted with ruff
203
+ ✅ No regressions in behavior
204
+ ✅ Clear separation of concerns
205
+ ✅ Improved testability
206
+ ✅ Better maintainability
207
+
208
+ ## Reusable Pattern
209
+
210
+ This refactoring pattern can be applied to other God Objects:
211
+
212
+ 1. **Identify concerns** (authorization, communication, UI, etc.)
213
+ 2. **Create immutable context** for decision inputs
214
+ 3. **Define protocol** for strategy interface
215
+ 4. **Implement concrete strategies** with clear priorities
216
+ 5. **Create orchestrator** to coordinate strategies
217
+ 6. **Separate side effects** (notification, factory)
218
+ 7. **Use facade** to present clean API
219
+ 8. **Write golden tests** to capture existing behavior
220
+ 9. **Refactor incrementally** with dependency injection
221
+ 10. **Verify no regressions** with comprehensive tests
222
+
223
+ ## Next Steps
224
+
225
+ Future enhancements (not required now):
226
+ - Rule configuration from external file
227
+ - Audit logging for authorization decisions
228
+ - Custom rule API for users
229
+ - Performance profiling (if needed)
230
+
231
+ ## References
232
+
233
+ - Strategy Pattern: https://refactoring.guru/design-patterns/strategy
234
+ - Facade Pattern: https://refactoring.guru/design-patterns/facade
235
+ - Open/Closed Principle: https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle
236
+ - Protocol vs ABC: PEP 544
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "agent.state",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Race conditions in ResponseState boolean flags (_has_user_response, _task_completed, etc.) during concurrent async operations via asyncio.gather(). Flags accessed without locks causing potential data corruption.",
8
+ "solution": "Added threading.RLock() to ResponseState class. Protected all boolean flag property getters/setters with 'with self._lock:' context manager. Ensures atomic flag updates during concurrent async operations.",
9
+ "date": "2025-11-12T21:57:03.726620160Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-12T21:57:03.726621009Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "agent.tool_execution",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Missing finally blocks in tool execution error handlers. Tool callbacks may create resources (file handles, connections, memory buffers) that aren't cleaned up when exceptions occur in node_processor.py and tool_executor.py.",
8
+ "solution": "Added finally blocks to all try/except blocks in tool execution paths. Ensures resource cleanup logging and cleanup code execution regardless of success or failure. Applied to node_processor.py:495-512 and tool_executor.py:31-36.",
9
+ "date": "2025-11-12T21:57:04.442932340Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-12T21:57:04.442933554Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "agent_components.streaming",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "AssertionError: stream() should only be called once per node; You must finish streaming before calling run()",
8
+ "solution": "Reset node._did_stream=False in exception handler (streaming.py:268-289); Remove retry loop at line 38; Full analysis: memory-bank/research/2025-11-18_13-08-42_streaming-retry-state-corruption.md",
9
+ "date": "2025-11-18T19:12:07.767679069Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-18T19:12:07.767679814Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "agents.delegation",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Research agent delegation fails with 'Exceeded maximum retries for output validation' and crashes entire system instead of handling gracefully. Error originates in delegation_tools.py:83-86 where research_agent.run() has no error handling. When child research agent throws AgentRunError, it propagates uncaught through tool callback.",
8
+ "solution": "Added try-catch block around research_agent.run() in delegation_tools.py. Catches all exceptions including pydantic-ai AgentRunError. Logs errors with full traceback using logger.error(). Returns structured error dict with error=True, error_type, error_message, and empty results arrays instead of crashing. This provides graceful degradation when child agents fail during parallel execution.",
9
+ "date": "2025-11-19T18:11:53.677268515Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-19T18:11:53.677270887Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "cli.textual_repl",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Output sink used call_from_thread from the Textual thread, raising RuntimeError so tool/research panels never reached the UI",
8
+ "solution": "Write directly to RichLog on the running thread, filter kwargs to supported keys, and clear the sink on shutdown",
9
+ "date": "2025-11-30T00:33:51.904242671Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-30T00:33:51.904243879Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "cli.tool_confirmation",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "User feedback from Option 3 tool rejection never reached agent because patch_tool_messages() adds 'Operation aborted by user.' message AFTER the feedback message, and extraction only checked the last message",
8
+ "solution": "Modified _extract_feedback_from_last_message() in repl.py to check last 3 messages instead of just the last one, accounting for patch_tool_messages() appending after feedback",
9
+ "date": "2025-11-11T18:25:06.557636695Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-11T18:25:06.557638078Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "core.agents.main",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Agent sees intervention messages (empty response, iteration limit, clarification) as if they were user feedback",
8
+ "solution": "Root cause: create_user_message() appends ModelRequest with part_kind='user-prompt' to session.messages. NOT introduced by refactoring - both main.py and main_legact.py have identical vulnerability. See memory-bank/research/2025-11-18_agent-feedback-visibility-issue.md for full analysis and 6 recommended solutions.",
9
+ "date": "2025-11-18T23:42:21.600062885Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-18T23:42:21.600063685Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "core.agents.prompts",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Typo 'Plese add more context to the task' in format_iteration_limit() function at line 60",
8
+ "solution": "Changed 'Plese' to 'Please' in prompts.py:60. Pre-existing typo from legacy main.py:500 that was carried over during refactoring.",
9
+ "date": "2025-11-18T21:24:09.655244587Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-18T21:24:09.655245175Z"
13
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "version": 1,
3
+ "sessions": [
4
+ {
5
+ "id": "dev-env-unification-20251116-setup",
6
+ "time": "2025-11-16T00:00:00Z",
7
+ "branch": "master",
8
+ "base": "current",
9
+ "head": "current",
10
+ "changed_files": [
11
+ ".gitignore",
12
+ "pyproject.toml",
13
+ "scripts/setup_dev_env.sh",
14
+ "setup_dev_env.log"
15
+ ],
16
+ "notes": "Added a UV-first developer setup script that reinstalls Hatch as needed, binds its default env to .venv, and falls back to uv pip after discovering the Hatch-provisioned env intentionally ships without pip."
17
+ },
18
+ {
19
+ "id": "code-index-char-tests-removal-20251116-000002",
20
+ "time": "2025-11-16T00:05:00Z",
21
+ "branch": "master",
22
+ "base": "current",
23
+ "head": "current",
24
+ "changed_files": [
25
+ "src/tunacode/ui/config_dashboard.py",
26
+ "tests/characterization/conftest.py",
27
+ "tests/characterization/code_index/test_cache_management.py",
28
+ "tests/characterization/code_index/test_file_scanning.py",
29
+ "tests/characterization/code_index/test_index_building.py",
30
+ "tests/characterization/code_index/test_search_operations.py"
31
+ ],
32
+ "notes": "Trimmed the Rich dashboard header to supported styling and deleted the obsolete CodeIndex characterization suite (plus the Rich stub file) so hatch run test passes cleanly while we design a new indexer."
33
+ },
34
+ {
35
+ "id": "tool-rejection-feedback-20251010-000001",
36
+ "time": "2025-10-10T00:00:01",
37
+ "branch": "master",
38
+ "base": "current",
39
+ "head": "current",
40
+ "changed_files": [
41
+ "src/tunacode/ui/tool_ui.py",
42
+ "src/tunacode/core/tool_handler.py",
43
+ "src/tunacode/types.py",
44
+ "src/tunacode/cli/repl.py",
45
+ "tests/characterization/ui/test_tool_confirmations.py",
46
+ "tests/characterization/repl/test_error_handling.py",
47
+ "tests/test_plan_mode.py"
48
+ ],
49
+ "notes": "Golden test captured existing abort-only option 3, failing test asserted rejection guidance should become a user message. Added instructions field to ToolConfirmationResponse, prompted for feedback in ToolUI, and routed guidance via create_user_message so the agent receives corrective direction."
50
+ },
51
+ {
52
+ "id": "publish-workflow-cache-bust-20250105-000000",
53
+ "time": "2025-01-05T00:00:00",
54
+ "branch": "master",
55
+ "base": "current",
56
+ "head": "current",
57
+ "changed_files": [
58
+ ".github/workflows/publish-release.yml",
59
+ ".claude/development/version-management.md",
60
+ ".claude/memory_anchors/anchors.json",
61
+ ".claude/delta_summaries/behavior_changes.json",
62
+ ".claude/delta_summaries/reasoning_logs.json",
63
+ "documentation/development/publishing-workflow.md",
64
+ "memory-bank/research/2025-09-16_11-12-45_setup_py_usage_and_location_analysis.md"
65
+ ],
66
+ "notes": "Release pipeline fix: renamed publish workflow to publish-release.yml, added memory anchor, synced docs, and pinned Python 3.12 so Hatch test runs avoid the 3.13 --filter sentinel bug."
67
+ },
68
+ {
69
+ "id": "version-metadata-test-fallback-20251002-000004",
70
+ "time": "2025-10-02T00:00:04Z",
71
+ "branch": "master",
72
+ "base": "current",
73
+ "head": "current",
74
+ "changed_files": [
75
+ "tests/characterization/version/test_version_metadata.py"
76
+ ],
77
+ "notes": "Pytest run failed on Python 3.10 because tomllib is 3.11+. Added tomli fallback import in new characterization test to restore compatibility."
78
+ },
79
+ {
80
+ "id": "smart-git-20250917-122934",
81
+ "time": "2025-09-17T12:29:34",
82
+ "branch": "main-agent-refactor",
83
+ "base": "011acc9",
84
+ "head": "2433ad7",
85
+ "changed_files": [
86
+ "docs/reports/subagent_analysis/code-synthesis-analyzer_report.md",
87
+ "docs/reports/subagent_analysis/codebase-analyzer_report.md",
88
+ "docs/reviews/FAGAN_PLAN.md",
89
+ "docs/reviews/agent_seams.md",
90
+ "docs/reviews/fagan_inspection_defects.json",
91
+ "docs/reviews/fagan_inspection_summary.md",
92
+ "docs/reviews/main_agent_refactor_issues.md",
93
+ "src/tunacode/core/agents/main_v2.py"
94
+ ],
95
+ "notes": "Documentation and analysis session for main agent refactor preparation. No bugs investigated."
96
+ },
97
+ {
98
+ "id": "main-agent-integration-20250917-123100",
99
+ "time": "2025-09-17T12:31:00",
100
+ "branch": "main-agent-refactor",
101
+ "base": "2433ad7",
102
+ "head": "66f49f2",
103
+ "changed_files": [
104
+ "docs/reviews/main_agent_refactor_plan.md",
105
+ "src/tunacode/core/agents/main.py",
106
+ "tests/characterization/agent/test_process_request.py",
107
+ "memory-bank/research/main_agent_refactor_plan.md"
108
+ ],
109
+ "notes": "Main agent refactoring implementation session. No bugs investigated - focused on architecture changes with compatibility shims."
110
+ },
111
+ {
112
+ "id": "main-agent-integration-20250917-141518",
113
+ "time": "2025-09-17T14:15:18",
114
+ "branch": "main-agent-refactor",
115
+ "base": "0455acc7536d3c49f021f6055f6c6f8a7a959b06",
116
+ "head": "0455acc7536d3c49f021f6055f6c6f8a7a959b06",
117
+ "changed_files": [
118
+ "src/tunacode/core/agents/main.py",
119
+ "src/tunacode/core/agents/main_v2.py",
120
+ "src/tunacode/cli/repl_components/error_recovery.py",
121
+ "memory-bank/research/main_agent_refactor_plan.md"
122
+ ],
123
+ "notes": "Enhanced tool recovery and error handling in main agent modules. No bugs investigated - focused on improving error recovery mechanisms and API exports."
124
+ },
125
+ {
126
+ "id": "react-tool-session-20250120-000002",
127
+ "time": "2025-01-20T00:00:02",
128
+ "branch": "master",
129
+ "base": "current",
130
+ "head": "current",
131
+ "changed_files": [
132
+ "src/tunacode/tools/react.py",
133
+ "src/tunacode/core/state.py",
134
+ "src/tunacode/core/agents/main.py",
135
+ "src/tunacode/core/agents/agent_components/agent_config.py",
136
+ "documentation/agent-tools/react-patterns.md",
137
+ "tests/unit/test_react_tool.py"
138
+ ],
139
+ "notes": "ReactTool scratchpad now auto-logs every two iterations (max five) with /thoughts output; removed from default tool list, updated docs/tests/state helpers."
140
+ }
141
+ ]
142
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "error-handling",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "CLI crashes with unhandled exceptions from background tasks, request orchestrator, and potential state access races",
8
+ "solution": "1) Added error callbacks to asyncio.create_task() calls in main.py and repl.py. 2) Modified RequestOrchestrator.run() to return graceful error states (AgentRunWrapper with fallback) instead of re-raising. 3) Validated agent init working as designed. 4) Determined state lock not needed - CodeIndex has own thread-safety. 5) Created comprehensive integration tests (5 tests, all passing). Results: Zero unhandled exceptions reaching CLI, graceful degradation under failure. Plan: memory-bank/plan/2025-11-19_10-00-00_main_agent_error_handling_hardening.md",
9
+ "date": "2025-11-19T17:52:24.338132765Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-19T17:52:24.338133528Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "streaming",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "You must finish streaming before calling run() - occurs when provider errors happen mid-stream after HTTP connection established",
8
+ "solution": "Reset node._did_stream=False in streaming.py exception handler (lines 275-291) to allow graceful degradation to non-streaming mode",
9
+ "date": "2025-11-18T20:04:29.550773578Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-18T20:04:29.550774865Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "ui.panels",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "When two research agents execute in parallel via asyncio.gather(), both simultaneously call streaming_panel.update() causing race condition. The string concatenation 'self.content = (self.content or \"\") + incoming' at panels.py:298 is NOT atomic across concurrent async calls. Both agents read stale self.content values before either completes write, resulting in jumbled messages like 'Delegating to agent 1...Delegating to agent 2...' on single line without proper separation.",
8
+ "solution": "Added asyncio.Lock to StreamingAgentPanel class. Declared _lock: asyncio.Lock type annotation (panels.py:142). Initialized self._lock = asyncio.Lock() in __init__() (line 152). Wrapped entire critical section in update() method with 'async with self._lock:' (lines 293-320) to ensure atomic read-modify-write for self.content concatenation. This prevents concurrent agents from interleaving their writes and ensures each message displays on separate line.",
9
+ "date": "2025-11-19T18:11:55.871232473Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-19T18:11:55.871233129Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "ui.research_agent",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Purple-bordered research_agent() panel function exists in panels.py:124-128 and is exported from console.py:35, but is NEVER called. In node_processor.py:369-383, code parses research agent args with comment 'Build research agent panel content' but does nothing with extracted data. Instead, delegation_tools.py calls streaming_panel.update() which dumps text into main panel. Result: no distinct panels for parallel research agents, just jumbled text in streaming panel.",
8
+ "solution": "Wired up ui.research_agent() call in node_processor.py:365-396. Added 'from tunacode.ui import console as ui' import. Extract query, directories, max_files from tool_args. Format panel_text with markdown: **Query:**, **Directories:**, **Max files:**. Call 'await ui.research_agent(panel_text)' for each research agent BEFORE execution. Removed redundant streaming_panel.update() calls from delegation_tools.py since proper purple panels now display. Each parallel research agent now shows distinct purple-bordered panel with query details.",
9
+ "date": "2025-11-19T18:11:57.558793550Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-19T18:11:57.558794293Z"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://claude-kb.io/schema/debug/v1",
3
+ "component": "ui.research_feedback",
4
+ "entries": [
5
+ {
6
+ "id": "dbg_001",
7
+ "error": "Research agents showed no progress during execution, appearing blank until completion",
8
+ "solution": "Added 3 changes: (1) Enhanced purple panel with batch-style format showing tools available, (2) Spinner update during execution showing query preview, (3) Completion summary showing files analyzed and findings count. Total: ~20 lines of code in node_processor.py:365-426",
9
+ "date": "2025-11-19T18:39:32.979136185Z"
10
+ }
11
+ ],
12
+ "last_updated": "2025-11-19T18:39:32.979137206Z"
13
+ }
@@ -0,0 +1,26 @@
1
+ # Delta: Models Registry Pydantic Conversion (Phase 2)
2
+
3
+ - Date: 2025-09-21
4
+ - Component: `src/tunacode/utils/models_registry.py`
5
+ - Change Type: Internal type conversion + validation
6
+
7
+ Summary
8
+ - Converted dataclasses to Pydantic `BaseModel`:
9
+ - `ModelCapabilities`, `ModelCost`, `ModelLimits`, `ModelInfo`, `ProviderInfo`
10
+ - Added validation:
11
+ - `ModelCost`: non-negative `input|output|cache`
12
+ - `ModelLimits`: positive integer `context|output`
13
+ - Kept public surface compatible:
14
+ - Attribute access unchanged, methods (`full_id`, `format_display`, `format_limits`, `matches_search`) unchanged
15
+ - `extra="ignore"` to tolerate unknown fields from API
16
+
17
+ Rationale
18
+ - Improve input validation and reduce manual parsing logic per plan-models.md Phase 2.
19
+ - Fail-fast on invalid data while preserving existing behavior for valid inputs.
20
+
21
+ Behavioral Impact
22
+ - No changes to expected outputs in golden tests; `tests/unit/utils/test_models_registry.py` passes unchanged.
23
+ - Invalid negative costs/limits will now raise validation errors during parse.
24
+
25
+ Follow-ups
26
+ - Add Phase 3 validation tests for malformed inputs and error paths.