henchman-ai 0.1.8__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/CHANGELOG.md +17 -0
  2. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/PKG-INFO +1 -1
  3. henchman_ai-0.1.9/PROJECT_PLAN.md +233 -0
  4. henchman_ai-0.1.9/TOOL_CHAINING_DESIGN.md +425 -0
  5. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/pyproject.toml +1 -1
  6. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/input.py +5 -3
  7. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/config/schema.py +6 -0
  8. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/registry.py +111 -8
  9. henchman_ai-0.1.9/src/henchman/utils/__init__.py +15 -0
  10. henchman_ai-0.1.9/src/henchman/utils/retry.py +166 -0
  11. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/version.py +1 -1
  12. henchman_ai-0.1.9/tests/smoke/test_escape_key_behavior.py +309 -0
  13. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_registry.py +258 -1
  14. henchman_ai-0.1.9/tests/utils/test_retry.py +224 -0
  15. henchman_ai-0.1.8/400_error.md +0 -90
  16. henchman_ai-0.1.8/400_error_final_report.md +0 -152
  17. henchman_ai-0.1.8/400_error_fix_report.md +0 -47
  18. henchman_ai-0.1.8/ATTRIBUTE_ERROR_FIX_SUMMARY.md +0 -89
  19. henchman_ai-0.1.8/CI_100_PERCENT_PASS_RATE_ANALYSIS.md +0 -143
  20. henchman_ai-0.1.8/CI_FIX_ACTION_PLAN.md +0 -55
  21. henchman_ai-0.1.8/CI_FIX_PROGRESS_SUMMARY.md +0 -26
  22. henchman_ai-0.1.8/CI_PIPELINE_COMPREHENSIVE_ANALYSIS.md +0 -151
  23. henchman_ai-0.1.8/FUNCTIONAL_TEST_IMPLEMENTATION_SUMMARY.md +0 -128
  24. henchman_ai-0.1.8/IMPLEMENTATION_PLAN.md +0 -1900
  25. henchman_ai-0.1.8/INTEGRATION_TESTING.md +0 -145
  26. henchman_ai-0.1.8/INTEGRATION_TESTING_PROGRESS_SUMMARY.md +0 -25
  27. henchman_ai-0.1.8/INTEGRATION_TESTING_TASK_COMPLETION.md +0 -28
  28. henchman_ai-0.1.8/KEYBOARD_INTERRUPT_FIXES_SUMMARY.md +0 -74
  29. henchman_ai-0.1.8/UI_INTEGRATION_TESTING_SUMMARY.md +0 -157
  30. henchman_ai-0.1.8/UI_TOOL_CALLS_SUMMARY.md +0 -10
  31. henchman_ai-0.1.8/analyze_400_error.py +0 -156
  32. henchman_ai-0.1.8/compaction_bug_analysis.md +0 -200
  33. henchman_ai-0.1.8/detailed_400_analysis.md +0 -188
  34. henchman_ai-0.1.8/src/henchman/utils/__init__.py +0 -1
  35. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/.github/copilot-instructions.md +0 -0
  36. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/.github/workflows/ci.yml +0 -0
  37. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/.github/workflows/publish.yml +0 -0
  38. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/.gitignore +0 -0
  39. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/LICENSE +0 -0
  40. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/README.md +0 -0
  41. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/TASK_COMPLETION_SUMMARY.md +0 -0
  42. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/debug_compaction.py +0 -0
  43. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/api.md +0 -0
  44. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/configuration.md +0 -0
  45. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/extensions.md +0 -0
  46. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/getting-started.md +0 -0
  47. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/index.md +0 -0
  48. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/mcp.md +0 -0
  49. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/providers.md +0 -0
  50. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/docs/tools.md +0 -0
  51. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/fix_repl.py +0 -0
  52. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/fix_repl_simple.py +0 -0
  53. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/mkdocs.yml +0 -0
  54. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/replace_method.py +0 -0
  55. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/reproduce_400_error.py +0 -0
  56. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/run_interactive_tests.py +0 -0
  57. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/scripts/ci.sh +0 -0
  58. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/__init__.py +0 -0
  59. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/__main__.py +0 -0
  60. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/__init__.py +0 -0
  61. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/app.py +0 -0
  62. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/__init__.py +0 -0
  63. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/builtins.py +0 -0
  64. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/chat.py +0 -0
  65. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/extensions.py +0 -0
  66. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/mcp.py +0 -0
  67. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/plan.py +0 -0
  68. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/skill.py +0 -0
  69. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/commands/unlimited.py +0 -0
  70. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/console.py +0 -0
  71. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/json_output.py +0 -0
  72. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/prompts.py +0 -0
  73. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/repl.py +0 -0
  74. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/repl.py.backup +0 -0
  75. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/cli/repl.py.backup2 +0 -0
  76. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/config/__init__.py +0 -0
  77. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/config/context.py +0 -0
  78. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/config/settings.py +0 -0
  79. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/__init__.py +0 -0
  80. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/agent.py +0 -0
  81. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/agent.py.backup +0 -0
  82. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/events.py +0 -0
  83. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/session.py +0 -0
  84. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/core/turn.py +0 -0
  85. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/extensions/__init__.py +0 -0
  86. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/extensions/base.py +0 -0
  87. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/extensions/manager.py +0 -0
  88. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/mcp/__init__.py +0 -0
  89. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/mcp/client.py +0 -0
  90. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/mcp/config.py +0 -0
  91. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/mcp/manager.py +0 -0
  92. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/mcp/tool.py +0 -0
  93. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/__init__.py +0 -0
  94. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/anthropic.py +0 -0
  95. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/base.py +0 -0
  96. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/deepseek.py +0 -0
  97. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/ollama.py +0 -0
  98. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/openai_compat.py +0 -0
  99. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/openai_compat.py.backup +0 -0
  100. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/providers/registry.py +0 -0
  101. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/skills/__init__.py +0 -0
  102. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/skills/executor.py +0 -0
  103. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/skills/learner.py +0 -0
  104. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/skills/models.py +0 -0
  105. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/skills/store.py +0 -0
  106. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/__init__.py +0 -0
  107. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/base.py +0 -0
  108. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/__init__.py +0 -0
  109. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/ask_user.py +0 -0
  110. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/file_edit.py +0 -0
  111. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/file_read.py +0 -0
  112. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/file_write.py +0 -0
  113. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/glob_tool.py +0 -0
  114. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/grep.py +0 -0
  115. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/ls.py +0 -0
  116. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/shell.py +0 -0
  117. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/tools/builtins/web_fetch.py +0 -0
  118. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/utils/compaction.py +0 -0
  119. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/utils/tokens.py +0 -0
  120. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/src/henchman/utils/validation.py +0 -0
  121. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/test_compaction.py +0 -0
  122. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/test_compaction_fix.py +0 -0
  123. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/test_fixes.py +0 -0
  124. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/test_output.txt +0 -0
  125. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/test_run.py +0 -0
  126. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/__init__.py +0 -0
  127. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/__init__.py +0 -0
  128. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/commands/test_plan.py +0 -0
  129. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/commands/test_skill.py +0 -0
  130. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/commands/test_skill_extended.py +0 -0
  131. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/commands/test_unlimited.py +0 -0
  132. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_app.py +0 -0
  133. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_app_extended.py +0 -0
  134. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_builtins.py +0 -0
  135. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_chat_command.py +0 -0
  136. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_cli_smoke.py +0 -0
  137. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_commands.py +0 -0
  138. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_commands_repro.py +0 -0
  139. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_console.py +0 -0
  140. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_enhanced_tool_display.py +0 -0
  141. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_input.py +0 -0
  142. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_input_bindings.py +0 -0
  143. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_json_output.py +0 -0
  144. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_keyboard_fixes.py +0 -0
  145. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_keyboard_integration.py +0 -0
  146. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_keyboard_interrupt.py +0 -0
  147. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_keyboard_verification.py +0 -0
  148. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_loop_protection.py +0 -0
  149. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_mcp_command.py +0 -0
  150. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_repl.py +0 -0
  151. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_repl_attribute_fix.py +0 -0
  152. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_repl_startup_message.py +0 -0
  153. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/cli/test_repl_toolbar.py +0 -0
  154. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/config/__init__.py +0 -0
  155. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/config/test_context.py +0 -0
  156. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/config/test_schema.py +0 -0
  157. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/config/test_settings.py +0 -0
  158. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/conftest.py +0 -0
  159. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/__init__.py +0 -0
  160. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_automatic_compaction.py +0 -0
  161. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_events.py +0 -0
  162. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_session.py +0 -0
  163. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_session_manager.py +0 -0
  164. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_streaming_tool_calls.py +0 -0
  165. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/core/test_turn_state.py +0 -0
  166. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/e2e/test_context_safety.py +0 -0
  167. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/e2e/test_tool_fix.py +0 -0
  168. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/empty_message_validation/test_empty_messages.py +0 -0
  169. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/extensions/__init__.py +0 -0
  170. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/extensions/test_base.py +0 -0
  171. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/extensions/test_command.py +0 -0
  172. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/extensions/test_manager.py +0 -0
  173. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/integration/test_context_limits.py +0 -0
  174. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/integration/test_tool_integration.py +0 -0
  175. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/mcp/__init__.py +0 -0
  176. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/mcp/test_client.py +0 -0
  177. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/mcp/test_config.py +0 -0
  178. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/mcp/test_manager.py +0 -0
  179. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/mcp/test_tool.py +0 -0
  180. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/__init__.py +0 -0
  181. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_413_error_handling.py +0 -0
  182. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_anthropic.py +0 -0
  183. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_base.py +0 -0
  184. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_deepseek.py +0 -0
  185. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_ollama.py +0 -0
  186. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_openai_compat.py +0 -0
  187. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/providers/test_registry.py +0 -0
  188. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_executor.py +0 -0
  189. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_learner.py +0 -0
  190. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_markdown_skills.py +0 -0
  191. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_models.py +0 -0
  192. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_store.py +0 -0
  193. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/skills/test_store_extended.py +0 -0
  194. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/smoke/test_large_file_handling.py +0 -0
  195. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/test_coverage_suite.py +0 -0
  196. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/test_main.py +0 -0
  197. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/test_version.py +0 -0
  198. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/__init__.py +0 -0
  199. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_ask_user_tool.py +0 -0
  200. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_base.py +0 -0
  201. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_directory_tools.py +0 -0
  202. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_file_tools.py +0 -0
  203. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_grep_tool.py +0 -0
  204. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_plan_mode_enforcement.py +0 -0
  205. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_shell_tool.py +0 -0
  206. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/tools/test_web_fetch_tool.py +0 -0
  207. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/INTERACTIVE_SESSION_TESTS.md +0 -0
  208. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/__init__.py +0 -0
  209. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/conftest.py +0 -0
  210. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_agent.py +0 -0
  211. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_compaction_llm.py +0 -0
  212. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_events.py +0 -0
  213. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_llm.py +0 -0
  214. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_mcp.py +0 -0
  215. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_plan_mode.py +0 -0
  216. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_repl_e2e.py +0 -0
  217. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_repl_integration.py +0 -0
  218. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_session.py +0 -0
  219. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_skills.py +0 -0
  220. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_slash_commands.py +0 -0
  221. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_tokens_llm.py +0 -0
  222. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_tool_calls.py +0 -0
  223. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/ui_integration/test_tool_integration.py +0 -0
  224. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_compaction.py +0 -0
  225. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_compaction_edge_cases.py +0 -0
  226. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_compaction_validation.py +0 -0
  227. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_multi_turn_tool_calls.py +0 -0
  228. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_protected_zone.py +0 -0
  229. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_summarization.py +0 -0
  230. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_tiktoken_integration.py +0 -0
  231. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_token_counter_extended.py +0 -0
  232. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_tool_sequence_compaction.py +0 -0
  233. {henchman_ai-0.1.8 → henchman_ai-0.1.9}/tests/utils/test_validation.py +0 -0
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.9] - 2026-01-28
11
+
12
+ ### Added
13
+
14
+ - **Error Handling & Recovery**
15
+ - Added retry utilities with exponential backoff (`henchman.utils.retry`)
16
+ - NETWORK tools now automatically retry on transient failures (ConnectionError, TimeoutError, OSError)
17
+ - Configurable retry settings: `network_retries`, `retry_base_delay`, `retry_max_delay` in ToolSettings
18
+ - `RetryConfig` dataclass for fine-grained retry configuration
19
+ - `with_retry` decorator and `retry_async` function for custom retry logic
20
+
21
+ - **Batch Operations**
22
+ - Added `execute_batch()` method to ToolRegistry for parallel tool execution
23
+ - Independent tool calls now execute concurrently using `asyncio.gather()`
24
+ - `BatchResult` dataclass with success/failure counts and individual results
25
+ - Batch execution continues even when some tools fail
26
+
10
27
  ## [0.1.8] - 2024-01-XX
11
28
 
12
29
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: henchman-ai
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: A model-agnostic AI agent CLI - your AI henchman for the terminal
5
5
  Project-URL: Homepage, https://github.com/MGPowerlytics/henchman-ai
6
6
  Project-URL: Repository, https://github.com/MGPowerlytics/henchman-ai
@@ -0,0 +1,233 @@
1
+ # Henchman-AI Tool Usage Improvement Project Plan
2
+
3
+ ## Overview
4
+ This document outlines a comprehensive plan to enhance the tool usage capabilities of the Henchman-AI agent system. The goal is to make tool interactions more efficient, intelligent, and user-friendly.
5
+
6
+ ## Current State Analysis
7
+ The current tool system provides basic file operations, shell commands, and web fetching capabilities. Tools are invoked individually with stateless interactions and minimal error recovery.
8
+
9
+ ## Improvement Categories
10
+
11
+ ### 1. Error Handling & Recovery ✅
12
+ **Goal**: Make tool usage more resilient to failures
13
+ **Implementation Plan**:
14
+ - Add automatic retry logic with exponential backoff ✅
15
+ - Implement fallback strategies for common failure modes
16
+ - Add detailed error diagnostics and suggestions
17
+ - Create error recovery templates for different tool types
18
+
19
+ **Status**: Implemented - Retry utilities with exponential backoff for NETWORK tools
20
+ **Priority**: High
21
+ **Estimated Effort**: 2-3 weeks
22
+
23
+ ### 2. Tool Chaining & Pipelining
24
+ **Goal**: Enable seamless data flow between tools
25
+ **Implementation Plan**:
26
+ - Design a pipeline DSL for tool composition
27
+ - Implement output/input type matching system
28
+ - Create pipeline execution engine
29
+ - Add pipeline visualization and debugging
30
+
31
+ **Priority**: High
32
+ **Estimated Effort**: 3-4 weeks
33
+
34
+ ### 3. Context-Aware Tool Selection
35
+ **Goal**: Intelligent tool recommendation based on context
36
+ **Implementation Plan**:
37
+ - Build tool usage pattern analyzer
38
+ - Implement file type detection and appropriate tool mapping
39
+ - Create context-aware tool suggestion engine
40
+ - Add learning from user preferences
41
+
42
+ **Priority**: Medium
43
+ **Estimated Effort**: 2-3 weeks
44
+
45
+ ### 4. Batch Operations ✅
46
+ **Goal**: Support efficient bulk operations
47
+ **Implementation Plan**:
48
+ - Design batch operation API ✅
49
+ - Implement parallel execution for independent operations ✅
50
+ - Add progress tracking for batch jobs
51
+ - Create batch operation templates
52
+
53
+ **Status**: Implemented - execute_batch() with asyncio.gather() for parallel execution
54
+ **Priority**: Medium
55
+ **Estimated Effort**: 2 weeks
56
+
57
+ ### 5. Interactive Preview Mode
58
+ **Goal**: Safe editing with preview capabilities
59
+ **Implementation Plan**:
60
+ - Implement diff generation for file changes
61
+ - Create preview interface for tool outputs
62
+ - Add confirmation workflows for destructive operations
63
+ - Design undo/redo capability
64
+
65
+ **Priority**: Medium
66
+ **Estimated Effort**: 2-3 weeks
67
+
68
+ ### 6. State Management
69
+ **Goal**: Maintain context across tool interactions
70
+ **Implementation Plan**:
71
+ - Design session state management system
72
+ - Implement tool usage history tracking
73
+ - Create context persistence across turns
74
+ - Add state visualization and management tools
75
+
76
+ **Priority**: Low
77
+ **Estimated Effort**: 3 weeks
78
+
79
+ ### 7. Tool Composition
80
+ **Goal**: Create higher-level tools from basic ones
81
+ **Implementation Plan**:
82
+ - Design tool composition language
83
+ - Implement tool template system
84
+ - Create tool library with common compositions
85
+ - Add tool composition sharing mechanism
86
+
87
+ **Priority**: Medium
88
+ **Estimated Effort**: 3 weeks
89
+
90
+ ### 8. Progress Feedback
91
+ **Goal**: Provide real-time feedback for long operations
92
+ **Implementation Plan**:
93
+ - Implement progress tracking framework
94
+ - Create progress visualization components
95
+ - Add estimated time remaining calculations
96
+ - Design interruptible operations
97
+
98
+ **Priority**: Low
99
+ **Estimated Effort**: 2 weeks
100
+
101
+ ### 9. Resource Management
102
+ **Goal**: Efficient handling of large resources
103
+ **Implementation Plan**:
104
+ - Implement streaming file processing
105
+ - Add memory usage monitoring and limits
106
+ - Create resource cleanup mechanisms
107
+ - Design pagination for large outputs
108
+
109
+ **Priority**: Medium
110
+ **Estimated Effort**: 2 weeks
111
+
112
+ ### 10. Tool Validation & Safety
113
+ **Goal**: Prevent errors through validation
114
+ **Implementation Plan**:
115
+ - Create comprehensive parameter validation system
116
+ - Implement pre-execution safety checks
117
+ - Add tool-specific validation rules
118
+ - Design validation feedback system
119
+
120
+ **Priority**: High
121
+ **Estimated Effort**: 2 weeks
122
+
123
+ ### 11. Learning from Usage Patterns
124
+ **Goal**: Adaptive tool behavior based on usage
125
+ **Implementation Plan**:
126
+ - Implement usage pattern collection
127
+ - Create pattern analysis engine
128
+ - Design adaptive tool suggestions
129
+ - Add user preference learning
130
+
131
+ **Priority**: Low
132
+ **Estimated Effort**: 4 weeks
133
+
134
+ ### 12. Cross-Tool Optimization
135
+ **Goal**: Optimize sequences of tool calls
136
+ **Implementation Plan**:
137
+ - Implement tool call caching system
138
+ - Create dependency analysis for tool sequences
139
+ - Design optimization rules engine
140
+ - Add performance monitoring
141
+
142
+ **Priority**: Low
143
+ **Estimated Effort**: 3 weeks
144
+
145
+ ### 13. Better Documentation Integration
146
+ **Goal**: Inline help and examples
147
+ **Implementation Plan**:
148
+ - Enhance tool documentation system
149
+ - Create interactive help with examples
150
+ - Implement context-sensitive documentation
151
+ - Add tool tutorial system
152
+
153
+ **Priority**: Medium
154
+ **Estimated Effort**: 2 weeks
155
+
156
+ ### 14. Tool Discovery & Suggestions
157
+ **Goal**: Help users find the right tools
158
+ **Implementation Plan**:
159
+ - Create tool discovery interface
160
+ - Implement intent-based tool matching
161
+ - Add tool recommendation engine
162
+ - Design tool exploration features
163
+
164
+ **Priority**: Medium
165
+ **Estimated Effort**: 2 weeks
166
+
167
+ ### 15. Permission & Safety Controls
168
+ **Goal**: Configurable security boundaries
169
+ **Implementation Plan**:
170
+ - Design permission system architecture
171
+ - Implement tool access controls
172
+ - Create safety confirmation workflows
173
+ - Add audit logging for sensitive operations
174
+
175
+ **Priority**: High
176
+ **Estimated Effort**: 3 weeks
177
+
178
+ ## Implementation Phases
179
+
180
+ ### Phase 1: Foundation (Weeks 1-6)
181
+ 1. Error Handling & Recovery
182
+ 2. Tool Validation & Safety
183
+ 3. Permission & Safety Controls
184
+
185
+ ### Phase 2: Intelligence (Weeks 7-12)
186
+ 1. Context-Aware Tool Selection
187
+ 2. Tool Discovery & Suggestions
188
+ 3. Better Documentation Integration
189
+
190
+ ### Phase 3: Efficiency (Weeks 13-18)
191
+ 1. Tool Chaining & Pipelining
192
+ 2. Batch Operations
193
+ 3. Resource Management
194
+
195
+ ### Phase 4: User Experience (Weeks 19-24)
196
+ 1. Interactive Preview Mode
197
+ 2. Progress Feedback
198
+ 3. Tool Composition
199
+
200
+ ### Phase 5: Advanced Features (Weeks 25-30)
201
+ 1. State Management
202
+ 2. Learning from Usage Patterns
203
+ 3. Cross-Tool Optimization
204
+
205
+ ## Success Metrics
206
+ - 50% reduction in tool usage errors
207
+ - 30% improvement in task completion time
208
+ - 40% increase in user satisfaction scores
209
+ - 25% reduction in manual tool selection
210
+
211
+ ## Risks & Mitigations
212
+ 1. **Performance Overhead**: Monitor and optimize critical paths
213
+ 2. **Complexity Creep**: Maintain backward compatibility
214
+ 3. **Security Concerns**: Implement thorough security reviews
215
+ 4. **User Adoption**: Provide gradual migration paths
216
+
217
+ ## Dependencies
218
+ - Current tool system architecture
219
+ - User feedback and usage patterns
220
+ - Available development resources
221
+
222
+ ## Next Steps
223
+ 1. Review current tool implementation code
224
+ 2. Create detailed design documents for Phase 1
225
+ 3. Set up development environment and testing infrastructure
226
+ 4. Begin implementation of error handling improvements
227
+
228
+ ## Conclusion
229
+ This comprehensive improvement plan will transform Henchman-AI's tool usage from basic command execution to an intelligent, efficient, and user-friendly system. The phased approach ensures manageable development while delivering continuous value to users.
230
+
231
+ Last Updated: $(date)
232
+ Project Lead: [To be assigned]
233
+ Status: Planning Phase
@@ -0,0 +1,425 @@
1
+ # Tool Chaining & Pipelining Design Document
2
+
3
+ ## Overview
4
+ This document outlines the design for implementing tool chaining and pipelining capabilities in Henchman-AI. The goal is to enable seamless data flow between tools, allowing users to create complex workflows through simple pipeline syntax.
5
+
6
+ ## Current Limitations
7
+ 1. **Isolated Tool Calls**: Each tool operates independently with no data flow between calls
8
+ 2. **Manual Data Passing**: Users must manually extract and pass data between tools
9
+ 3. **No Composition**: Cannot create reusable tool combinations
10
+ 4. **Stateless Execution**: No context preservation between tool invocations
11
+
12
+ ## Design Goals
13
+ 1. **Intuitive Syntax**: Simple, readable pipeline syntax
14
+ 2. **Type Safety**: Automatic type checking between tool outputs and inputs
15
+ 3. **Error Propagation**: Clear error handling across pipeline stages
16
+ 4. **Performance**: Efficient execution with parallelization where possible
17
+ 5. **Debuggability**: Clear visibility into pipeline execution
18
+
19
+ ## Architecture
20
+
21
+ ### 1. Pipeline DSL (Domain Specific Language)
22
+ ```python
23
+ # Example pipeline syntax
24
+ pipeline = Pipeline(
25
+ read_file("data.txt")
26
+ | grep("error")
27
+ | write_file("errors.txt")
28
+ )
29
+
30
+ # Alternative syntax
31
+ pipeline = read_file("data.txt") >> grep("error") >> write_file("errors.txt")
32
+ ```
33
+
34
+ ### 2. Tool Interface Extensions
35
+ ```python
36
+ class ChainableTool(Tool):
37
+ """Base class for tools that can participate in chains."""
38
+
39
+ @property
40
+ def output_type(self) -> Type:
41
+ """Type annotation for tool output."""
42
+ return str # Default to string
43
+
44
+ @property
45
+ def input_type(self) -> Type:
46
+ """Type annotation for tool input."""
47
+ return Any # Default to accept anything
48
+
49
+ def can_accept(self, output_type: Type) -> bool:
50
+ """Check if this tool can accept the given output type."""
51
+ return issubclass(output_type, self.input_type)
52
+ ```
53
+
54
+ ### 3. Pipeline Engine
55
+ ```python
56
+ class PipelineEngine:
57
+ """Executes tool pipelines."""
58
+
59
+ def execute(self, pipeline: Pipeline) -> PipelineResult:
60
+ """Execute a pipeline and return results."""
61
+ pass
62
+
63
+ def validate(self, pipeline: Pipeline) -> ValidationResult:
64
+ """Validate pipeline structure and type compatibility."""
65
+ pass
66
+
67
+ def optimize(self, pipeline: Pipeline) -> Pipeline:
68
+ """Optimize pipeline execution plan."""
69
+ pass
70
+ ```
71
+
72
+ ## Core Components
73
+
74
+ ### 1. Pipeline Definition
75
+ ```python
76
+ @dataclass
77
+ class Pipeline:
78
+ """Represents a sequence of tool operations."""
79
+
80
+ stages: list[PipelineStage]
81
+ name: str = ""
82
+ description: str = ""
83
+
84
+ def add_stage(self, stage: PipelineStage) -> "Pipeline":
85
+ """Add a stage to the pipeline."""
86
+ pass
87
+
88
+ def validate(self) -> ValidationResult:
89
+ """Validate the entire pipeline."""
90
+ pass
91
+ ```
92
+
93
+ ### 2. Pipeline Stage
94
+ ```python
95
+ @dataclass
96
+ class PipelineStage:
97
+ """A single stage in a pipeline."""
98
+
99
+ tool: ChainableTool
100
+ parameters: dict[str, Any]
101
+ input_source: InputSource # Previous stage, file, or constant
102
+ output_dest: OutputDestination # Next stage, file, or variable
103
+
104
+ def execute(self, context: PipelineContext) -> StageResult:
105
+ """Execute this stage."""
106
+ pass
107
+ ```
108
+
109
+ ### 3. Type System
110
+ ```python
111
+ class ToolType:
112
+ """Type system for tool inputs/outputs."""
113
+
114
+ PRIMITIVE_TYPES = {
115
+ "string": str,
116
+ "integer": int,
117
+ "boolean": bool,
118
+ "array": list,
119
+ "object": dict,
120
+ }
121
+
122
+ FILE_TYPES = {
123
+ "text_file": TextFile,
124
+ "binary_file": BinaryFile,
125
+ "directory": Directory,
126
+ }
127
+
128
+ @classmethod
129
+ def infer_type(cls, value: Any) -> "ToolType":
130
+ """Infer type from value."""
131
+ pass
132
+
133
+ @classmethod
134
+ def are_compatible(cls, source: "ToolType", target: "ToolType") -> bool:
135
+ """Check if types are compatible for chaining."""
136
+ pass
137
+ ```
138
+
139
+ ### 4. Execution Context
140
+ ```python
141
+ @dataclass
142
+ class PipelineContext:
143
+ """Context for pipeline execution."""
144
+
145
+ variables: dict[str, Any] # Pipeline variables
146
+ files: dict[str, Path] # File references
147
+ stage_results: list[StageResult] # Results from previous stages
148
+ execution_id: str # Unique execution identifier
149
+
150
+ def get_variable(self, name: str) -> Any:
151
+ """Get a pipeline variable."""
152
+ pass
153
+
154
+ def set_variable(self, name: str, value: Any) -> None:
155
+ """Set a pipeline variable."""
156
+ pass
157
+ ```
158
+
159
+ ## Pipeline Syntax Examples
160
+
161
+ ### Example 1: Simple File Processing
162
+ ```python
163
+ # Read file, search for pattern, write results
164
+ pipeline = Pipeline(
165
+ name="error_extractor",
166
+ stages=[
167
+ Stage(read_file, {"path": "logs/app.log"}),
168
+ Stage(grep, {"pattern": "ERROR"}),
169
+ Stage(write_file, {"path": "errors.log"}),
170
+ ]
171
+ )
172
+ ```
173
+
174
+ ### Example 2: Web Data Processing
175
+ ```python
176
+ # Fetch data, extract information, save to file
177
+ pipeline = (
178
+ web_fetch("https://api.example.com/data.json")
179
+ | grep("important_value")
180
+ | write_file("extracted.txt")
181
+ )
182
+ ```
183
+
184
+ ### Example 3: Complex Workflow with Variables
185
+ ```python
186
+ # Multi-step analysis with intermediate variables
187
+ pipeline = Pipeline(
188
+ Stage(read_file, {"path": "data.csv"}, output_to="raw_data"),
189
+ Stage(shell, {"command": "wc -l"}, input_from="raw_data", output_to="line_count"),
190
+ Stage(write_file, {"path": "summary.txt", "content": "Lines: ${line_count}"}),
191
+ )
192
+ ```
193
+
194
+ ### Example 4: Conditional Execution
195
+ ```python
196
+ # Conditional pipeline based on file content
197
+ pipeline = Pipeline(
198
+ read_file("config.yaml"),
199
+ If(
200
+ condition=grep("debug: true"),
201
+ then=pipeline1,
202
+ else=pipeline2
203
+ )
204
+ )
205
+ ```
206
+
207
+ ## Implementation Phases
208
+
209
+ ### Phase 1: Foundation (Weeks 1-4)
210
+ 1. **Basic ChainableTool Interface**
211
+ - Extend existing Tool base class
212
+ - Add type annotations for inputs/outputs
213
+ - Create type compatibility checking
214
+
215
+ 2. **Simple Linear Pipelines**
216
+ - Implement sequential pipeline execution
217
+ - Basic error propagation
218
+ - Simple pipeline syntax
219
+
220
+ ### Phase 2: Advanced Features (Weeks 5-8)
221
+ 1. **Type System Enhancement**
222
+ - Comprehensive type inference
223
+ - Type conversion utilities
224
+ - Type validation at pipeline creation
225
+
226
+ 2. **Variable Support**
227
+ - Pipeline variable system
228
+ - Variable substitution in parameters
229
+ - Scope management
230
+
231
+ ### Phase 3: Optimization (Weeks 9-12)
232
+ 1. **Parallel Execution**
233
+ - Identify independent stages
234
+ - Implement parallel execution
235
+ - Resource management
236
+
237
+ 2. **Caching & Memoization**
238
+ - Stage result caching
239
+ - Input/output caching
240
+ - Cache invalidation
241
+
242
+ ### Phase 4: User Experience (Weeks 13-16)
243
+ 1. **Pipeline DSL**
244
+ - User-friendly syntax
245
+ - Pipeline visualization
246
+ - Interactive pipeline builder
247
+
248
+ 2. **Debugging Tools**
249
+ - Execution tracing
250
+ - Step-through debugging
251
+ - Pipeline state inspection
252
+
253
+ ## API Design
254
+
255
+ ### 1. Programmatic API
256
+ ```python
257
+ # Create pipeline programmatically
258
+ from henchman.tools.pipeline import Pipeline, Stage
259
+
260
+ pipeline = Pipeline(
261
+ Stage(read_file_tool, {"path": "input.txt"}),
262
+ Stage(grep_tool, {"pattern": "search"}),
263
+ Stage(write_file_tool, {"path": "output.txt"}),
264
+ )
265
+
266
+ result = pipeline.execute()
267
+ ```
268
+
269
+ ### 2. DSL API
270
+ ```python
271
+ # Use pipeline DSL
272
+ from henchman.tools.pipeline import p
273
+
274
+ result = p(
275
+ read_file("input.txt")
276
+ >> grep("search")
277
+ >> write_file("output.txt")
278
+ ).execute()
279
+ ```
280
+
281
+ ### 3. CLI Integration
282
+ ```bash
283
+ # Command line pipeline execution
284
+ henchman --pipeline "read_file input.txt | grep search | write_file output.txt"
285
+
286
+ # Pipeline from file
287
+ henchman --pipeline-file workflow.yaml
288
+ ```
289
+
290
+ ## Error Handling
291
+
292
+ ### 1. Stage-Level Errors
293
+ ```python
294
+ class StageError(Exception):
295
+ """Error in a pipeline stage."""
296
+
297
+ def __init__(self, stage: PipelineStage, error: Exception):
298
+ self.stage = stage
299
+ self.original_error = error
300
+ super().__init__(f"Stage {stage.name} failed: {error}")
301
+ ```
302
+
303
+ ### 2. Pipeline-Level Error Strategies
304
+ ```python
305
+ class ErrorStrategy(Enum):
306
+ STOP_ON_ERROR = "stop" # Default: Stop on first error
307
+ CONTINUE_ON_ERROR = "continue" # Continue with next stage
308
+ RETRY_ON_ERROR = "retry" # Retry failed stage
309
+ FALLBACK_ON_ERROR = "fallback" # Use fallback pipeline
310
+ ```
311
+
312
+ ### 3. Error Recovery
313
+ ```python
314
+ class PipelineRecovery:
315
+ """Handle pipeline errors and recovery."""
316
+
317
+ def retry_stage(self, stage: PipelineStage, max_retries: int = 3) -> bool:
318
+ """Retry a failed stage."""
319
+ pass
320
+
321
+ def fallback_pipeline(self, pipeline: Pipeline) -> Pipeline:
322
+ """Get fallback pipeline for error recovery."""
323
+ pass
324
+ ```
325
+
326
+ ## Performance Considerations
327
+
328
+ ### 1. Lazy Evaluation
329
+ ```python
330
+ class LazyPipeline(Pipeline):
331
+ """Pipeline with lazy evaluation."""
332
+
333
+ def execute(self) -> Generator[StageResult, None, None]:
334
+ """Execute pipeline lazily."""
335
+ for stage in self.stages:
336
+ yield stage.execute()
337
+ ```
338
+
339
+ ### 2. Parallel Execution
340
+ ```python
341
+ class ParallelPipeline(Pipeline):
342
+ """Pipeline with parallel stage execution."""
343
+
344
+ def execute_parallel(self, max_workers: int = 4) -> list[StageResult]:
345
+ """Execute independent stages in parallel."""
346
+ pass
347
+ ```
348
+
349
+ ### 3. Result Caching
350
+ ```python
351
+ class CachedPipeline(Pipeline):
352
+ """Pipeline with result caching."""
353
+
354
+ def __init__(self, cache_dir: Path = Path(".pipeline_cache")):
355
+ self.cache = PipelineCache(cache_dir)
356
+
357
+ def execute(self, use_cache: bool = True) -> PipelineResult:
358
+ """Execute with optional caching."""
359
+ pass
360
+ ```
361
+
362
+ ## Security Considerations
363
+
364
+ ### 1. Pipeline Validation
365
+ - Validate all tool parameters
366
+ - Check file paths for safety
367
+ - Limit resource usage
368
+ - Sandbox execution where possible
369
+
370
+ ### 2. Permission Escalation Prevention
371
+ - No automatic privilege escalation
372
+ - User confirmation for sensitive operations
373
+ - Audit logging for all pipeline executions
374
+
375
+ ### 3. Input Validation
376
+ - Validate all external inputs
377
+ - Sanitize file paths and URLs
378
+ - Limit pipeline recursion depth
379
+
380
+ ## Testing Strategy
381
+
382
+ ### 1. Unit Tests
383
+ - Individual tool chaining compatibility
384
+ - Type system validation
385
+ - Stage execution tests
386
+
387
+ ### 2. Integration Tests
388
+ - Complete pipeline execution
389
+ - Error handling scenarios
390
+ - Performance benchmarks
391
+
392
+ ### 3. End-to-End Tests
393
+ - Real-world workflow scenarios
394
+ - User interaction tests
395
+ - CLI integration tests
396
+
397
+ ## Migration Path
398
+
399
+ ### 1. Backward Compatibility
400
+ - Existing tools remain unchanged
401
+ - Optional chaining capability
402
+ - Gradual migration of tools to ChainableTool
403
+
404
+ ### 2. Deprecation Strategy
405
+ - Old API remains functional
406
+ - Clear migration documentation
407
+ - Automated migration tools
408
+
409
+ ## Success Metrics
410
+ 1. **Pipeline Creation Time**: Reduce by 50%
411
+ 2. **Error Rate**: Reduce pipeline errors by 40%
412
+ 3. **Execution Time**: Improve by 30% through optimization
413
+ 4. **User Satisfaction**: Increase based on user feedback
414
+
415
+ ## Next Steps
416
+ 1. **Week 1**: Design review and prototype
417
+ 2. **Week 2**: Implement ChainableTool base class
418
+ 3. **Week 3**: Create basic Pipeline engine
419
+ 4. **Week 4**: Test with simple use cases
420
+ 5. **Week 5**: Gather user feedback and iterate
421
+
422
+ ## Conclusion
423
+ The tool chaining and pipelining system will transform Henchman-AI from a collection of individual tools into a powerful workflow automation platform. By providing intuitive syntax, robust error handling, and performance optimizations, users will be able to create complex data processing pipelines with minimal effort.
424
+
425
+ This design provides a solid foundation for incremental implementation while maintaining backward compatibility and ensuring a smooth migration path for existing users.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "henchman-ai"
7
- version = "0.1.8"
7
+ version = "0.1.9"
8
8
  description = "A model-agnostic AI agent CLI - your AI henchman for the terminal"
9
9
  readme = "README.md"
10
10
  license = "MIT"