kollabor 0.1.0__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 (229) hide show
  1. kollabor-0.1.0/CLAUDE.md +243 -0
  2. kollabor-0.1.0/LICENSE +21 -0
  3. kollabor-0.1.0/MANIFEST.in +31 -0
  4. kollabor-0.1.0/PKG-INFO +247 -0
  5. kollabor-0.1.0/README.md +214 -0
  6. kollabor-0.1.0/core/__init__.py +18 -0
  7. kollabor-0.1.0/core/application.py +543 -0
  8. kollabor-0.1.0/core/cli.py +177 -0
  9. kollabor-0.1.0/core/commands/__init__.py +43 -0
  10. kollabor-0.1.0/core/commands/executor.py +244 -0
  11. kollabor-0.1.0/core/commands/menu_renderer.py +319 -0
  12. kollabor-0.1.0/core/commands/parser.py +186 -0
  13. kollabor-0.1.0/core/commands/registry.py +317 -0
  14. kollabor-0.1.0/core/commands/system_commands.py +420 -0
  15. kollabor-0.1.0/core/config/__init__.py +7 -0
  16. kollabor-0.1.0/core/config/llm_task_config.py +110 -0
  17. kollabor-0.1.0/core/config/loader.py +222 -0
  18. kollabor-0.1.0/core/config/manager.py +112 -0
  19. kollabor-0.1.0/core/config/service.py +399 -0
  20. kollabor-0.1.0/core/effects/__init__.py +1 -0
  21. kollabor-0.1.0/core/events/__init__.py +12 -0
  22. kollabor-0.1.0/core/events/bus.py +129 -0
  23. kollabor-0.1.0/core/events/executor.py +154 -0
  24. kollabor-0.1.0/core/events/models.py +256 -0
  25. kollabor-0.1.0/core/events/processor.py +176 -0
  26. kollabor-0.1.0/core/events/registry.py +289 -0
  27. kollabor-0.1.0/core/fullscreen/__init__.py +19 -0
  28. kollabor-0.1.0/core/fullscreen/command_integration.py +290 -0
  29. kollabor-0.1.0/core/fullscreen/components/__init__.py +12 -0
  30. kollabor-0.1.0/core/fullscreen/components/animation.py +258 -0
  31. kollabor-0.1.0/core/fullscreen/components/drawing.py +160 -0
  32. kollabor-0.1.0/core/fullscreen/components/matrix_components.py +177 -0
  33. kollabor-0.1.0/core/fullscreen/manager.py +302 -0
  34. kollabor-0.1.0/core/fullscreen/plugin.py +204 -0
  35. kollabor-0.1.0/core/fullscreen/renderer.py +240 -0
  36. kollabor-0.1.0/core/fullscreen/session.py +286 -0
  37. kollabor-0.1.0/core/io/__init__.py +52 -0
  38. kollabor-0.1.0/core/io/buffer_manager.py +362 -0
  39. kollabor-0.1.0/core/io/config_status_view.py +228 -0
  40. kollabor-0.1.0/core/io/core_status_views.py +250 -0
  41. kollabor-0.1.0/core/io/input_errors.py +313 -0
  42. kollabor-0.1.0/core/io/input_handler.py +2299 -0
  43. kollabor-0.1.0/core/io/input_mode_manager.py +402 -0
  44. kollabor-0.1.0/core/io/key_parser.py +318 -0
  45. kollabor-0.1.0/core/io/layout.py +587 -0
  46. kollabor-0.1.0/core/io/message_coordinator.py +204 -0
  47. kollabor-0.1.0/core/io/message_renderer.py +601 -0
  48. kollabor-0.1.0/core/io/modal_interaction_handler.py +254 -0
  49. kollabor-0.1.0/core/io/raw_input_processor.py +865 -0
  50. kollabor-0.1.0/core/io/status_renderer.py +839 -0
  51. kollabor-0.1.0/core/io/terminal_renderer.py +564 -0
  52. kollabor-0.1.0/core/io/terminal_state.py +469 -0
  53. kollabor-0.1.0/core/io/visual_effects.py +734 -0
  54. kollabor-0.1.0/core/llm/__init__.py +26 -0
  55. kollabor-0.1.0/core/llm/api_communication_service.py +805 -0
  56. kollabor-0.1.0/core/llm/conversation_logger.py +473 -0
  57. kollabor-0.1.0/core/llm/conversation_manager.py +412 -0
  58. kollabor-0.1.0/core/llm/file_operations_executor.py +1383 -0
  59. kollabor-0.1.0/core/llm/hook_system.py +402 -0
  60. kollabor-0.1.0/core/llm/llm_service.py +1226 -0
  61. kollabor-0.1.0/core/llm/mcp_integration.py +386 -0
  62. kollabor-0.1.0/core/llm/message_display_service.py +450 -0
  63. kollabor-0.1.0/core/llm/model_router.py +214 -0
  64. kollabor-0.1.0/core/llm/plugin_sdk.py +396 -0
  65. kollabor-0.1.0/core/llm/response_parser.py +827 -0
  66. kollabor-0.1.0/core/llm/response_processor.py +364 -0
  67. kollabor-0.1.0/core/llm/tool_executor.py +520 -0
  68. kollabor-0.1.0/core/logging/__init__.py +19 -0
  69. kollabor-0.1.0/core/logging/setup.py +206 -0
  70. kollabor-0.1.0/core/models/__init__.py +5 -0
  71. kollabor-0.1.0/core/models/base.py +23 -0
  72. kollabor-0.1.0/core/plugins/__init__.py +13 -0
  73. kollabor-0.1.0/core/plugins/collector.py +212 -0
  74. kollabor-0.1.0/core/plugins/discovery.py +335 -0
  75. kollabor-0.1.0/core/plugins/factory.py +256 -0
  76. kollabor-0.1.0/core/plugins/registry.py +152 -0
  77. kollabor-0.1.0/core/storage/__init__.py +5 -0
  78. kollabor-0.1.0/core/storage/state_manager.py +84 -0
  79. kollabor-0.1.0/core/ui/__init__.py +5 -0
  80. kollabor-0.1.0/core/ui/config_merger.py +174 -0
  81. kollabor-0.1.0/core/ui/config_widgets.py +298 -0
  82. kollabor-0.1.0/core/ui/modal_actions.py +157 -0
  83. kollabor-0.1.0/core/ui/modal_overlay_renderer.py +373 -0
  84. kollabor-0.1.0/core/ui/modal_renderer.py +531 -0
  85. kollabor-0.1.0/core/ui/modal_state_manager.py +443 -0
  86. kollabor-0.1.0/core/ui/widget_integration.py +222 -0
  87. kollabor-0.1.0/core/ui/widgets/__init__.py +25 -0
  88. kollabor-0.1.0/core/ui/widgets/base_widget.py +136 -0
  89. kollabor-0.1.0/core/ui/widgets/checkbox.py +78 -0
  90. kollabor-0.1.0/core/ui/widgets/dropdown.py +140 -0
  91. kollabor-0.1.0/core/ui/widgets/slider.py +185 -0
  92. kollabor-0.1.0/core/ui/widgets/text_input.py +224 -0
  93. kollabor-0.1.0/core/utils/__init__.py +11 -0
  94. kollabor-0.1.0/core/utils/dict_utils.py +212 -0
  95. kollabor-0.1.0/core/utils/error_utils.py +275 -0
  96. kollabor-0.1.0/core/utils/key_reader.py +93 -0
  97. kollabor-0.1.0/core/utils/plugin_utils.py +267 -0
  98. kollabor-0.1.0/docs/CONFIG_COMMAND_ENHANCEMENT_SPEC.md +1224 -0
  99. kollabor-0.1.0/docs/EDIT_TOOL_SPEC.md +2578 -0
  100. kollabor-0.1.0/docs/LLM_CORE_MIGRATION_PLAN.md +480 -0
  101. kollabor-0.1.0/docs/README.md +269 -0
  102. kollabor-0.1.0/docs/STARTUP_TO_FIRST_MESSAGE_FLOW.md +560 -0
  103. kollabor-0.1.0/docs/archive/PROJECT_OVERVIEW.md +836 -0
  104. kollabor-0.1.0/docs/archive/agent.md +1463 -0
  105. kollabor-0.1.0/docs/archive/application-dataflow.md +402 -0
  106. kollabor-0.1.0/docs/archive/config-command-dataflow.md +437 -0
  107. kollabor-0.1.0/docs/archive/config_audit_report.md +382 -0
  108. kollabor-0.1.0/docs/archive/core_refactoring_analysis.md +826 -0
  109. kollabor-0.1.0/docs/archive/dead_code_analysis_report.md +337 -0
  110. kollabor-0.1.0/docs/archive/kollabor.md +1208 -0
  111. kollabor-0.1.0/docs/archive/matrix-command-dataflow.md +348 -0
  112. kollabor-0.1.0/docs/archive/mcp_status_spec.md +641 -0
  113. kollabor-0.1.0/docs/archive/multi-agent-tmux-coordination.md +127 -0
  114. kollabor-0.1.0/docs/archive/plugins_found.md +222 -0
  115. kollabor-0.1.0/docs/archive/terminal-llm-chat-dataflow.md +342 -0
  116. kollabor-0.1.0/docs/assets/asset-management-framework.md +123 -0
  117. kollabor-0.1.0/docs/assets/brand-guidelines.md +270 -0
  118. kollabor-0.1.0/docs/assets/diagram-standards.md +317 -0
  119. kollabor-0.1.0/docs/assets/template-library.md +374 -0
  120. kollabor-0.1.0/docs/assets/visual-design-standards.md +186 -0
  121. kollabor-0.1.0/docs/bug_fixes/01_startup_race_condition.md +180 -0
  122. kollabor-0.1.0/docs/bug_fixes/02_memory_leak_queue_processing.md +186 -0
  123. kollabor-0.1.0/docs/bug_fixes/03_resource_leak_http_sessions.md +356 -0
  124. kollabor-0.1.0/docs/bug_fixes/04_async_task_not_awaited.md +335 -0
  125. kollabor-0.1.0/docs/bug_fixes/05_infinite_loop_input_processing.md +374 -0
  126. kollabor-0.1.0/docs/bug_fixes/06_unsafe_module_import.md +399 -0
  127. kollabor-0.1.0/docs/bug_fixes/07_conversation_manager_memory_leak.md +425 -0
  128. kollabor-0.1.0/docs/bug_fixes/08_race_condition_event_processing.md +459 -0
  129. kollabor-0.1.0/docs/bug_fixes/09_missing_error_handling_status_rendering.md +459 -0
  130. kollabor-0.1.0/docs/bug_fixes/10_inefficient_string_operations.md +517 -0
  131. kollabor-0.1.0/docs/bug_fixes/BUG-011_VALIDATION_REPORT.md +395 -0
  132. kollabor-0.1.0/docs/bug_fixes/README.md +269 -0
  133. kollabor-0.1.0/docs/bug_fixes/enhanced_input_fix.md +180 -0
  134. kollabor-0.1.0/docs/bug_fixes/orphaned_think_tags_display.md +669 -0
  135. kollabor-0.1.0/docs/claude-code-enhancements.md +1208 -0
  136. kollabor-0.1.0/docs/modal-gap-filling-implementation copy.md +340 -0
  137. kollabor-0.1.0/docs/modal-implementation-roadmap copy.md +364 -0
  138. kollabor-0.1.0/docs/modal-system-implementation-guide.md +1113 -0
  139. kollabor-0.1.0/docs/modal-ui-framework copy.md +692 -0
  140. kollabor-0.1.0/docs/project-management/README.md +153 -0
  141. kollabor-0.1.0/docs/project-management/agile-ai-methodology.md +276 -0
  142. kollabor-0.1.0/docs/project-management/deliverables/chat-app-project-charter.md +1118 -0
  143. kollabor-0.1.0/docs/project-management/deliverables/chat-app-technical-specs.md +1385 -0
  144. kollabor-0.1.0/docs/project-management/deliverables/chat-app-user-stories.md +2675 -0
  145. kollabor-0.1.0/docs/project-management/issue-tracking/issue-tracking-guide.md +462 -0
  146. kollabor-0.1.0/docs/project-management/performance-metrics.md +320 -0
  147. kollabor-0.1.0/docs/project-management/processes/change-management-process.md +718 -0
  148. kollabor-0.1.0/docs/project-management/processes/documentation-adherence-coordinator.md +529 -0
  149. kollabor-0.1.0/docs/project-management/processes/release-management-process.md +768 -0
  150. kollabor-0.1.0/docs/project-management/resource-planning.md +265 -0
  151. kollabor-0.1.0/docs/project-management/risk-management.md +282 -0
  152. kollabor-0.1.0/docs/project-management/stakeholder-communication.md +310 -0
  153. kollabor-0.1.0/docs/project-management/templates/project-charter-template.md +1087 -0
  154. kollabor-0.1.0/docs/project-management/templates/technical-specification-template.md +1009 -0
  155. kollabor-0.1.0/docs/project-management/templates/user-story-template.md +615 -0
  156. kollabor-0.1.0/docs/reference/api-documentation.md +493 -0
  157. kollabor-0.1.0/docs/reference/architecture-overview.md +576 -0
  158. kollabor-0.1.0/docs/reference/fullscreen-plugin-system.md +439 -0
  159. kollabor-0.1.0/docs/reference/glossary.md +312 -0
  160. kollabor-0.1.0/docs/reference/hook-system-sdk.md +983 -0
  161. kollabor-0.1.0/docs/reference/slash-commands-guide.md +420 -0
  162. kollabor-0.1.0/docs/reference/technology-stack.md +519 -0
  163. kollabor-0.1.0/docs/reference/troubleshooting-guide.md +576 -0
  164. kollabor-0.1.0/docs/sdlc/ai-enhanced-requirements.md +504 -0
  165. kollabor-0.1.0/docs/sdlc/deployment/automated-deployment-pipeline.md +942 -0
  166. kollabor-0.1.0/docs/sdlc/design/design-document-template.md +195 -0
  167. kollabor-0.1.0/docs/sdlc/design-methodology.md +719 -0
  168. kollabor-0.1.0/docs/sdlc/development/ai-assisted-coding-practices.md +994 -0
  169. kollabor-0.1.0/docs/sdlc/maintenance/ai-powered-maintenance.md +1228 -0
  170. kollabor-0.1.0/docs/sdlc/requirements/requirements-template.md +107 -0
  171. kollabor-0.1.0/docs/sdlc/testing/ai-enhanced-testing-strategy.md +1150 -0
  172. kollabor-0.1.0/docs/sdlc/testing/test-plan-template.md +223 -0
  173. kollabor-0.1.0/docs/sop/compliance/security-compliance-procedures.md +562 -0
  174. kollabor-0.1.0/docs/sop/development/ai-assisted-development-workflow.md +529 -0
  175. kollabor-0.1.0/docs/sop/development/code-review-process.md +425 -0
  176. kollabor-0.1.0/docs/sop/development/deployment-process.md +505 -0
  177. kollabor-0.1.0/docs/sop/operations/incident-response-procedures.md +678 -0
  178. kollabor-0.1.0/docs/sop/support/customer-support-procedures.md +729 -0
  179. kollabor-0.1.0/docs/standards/architecture/system-architecture-standards.md +1303 -0
  180. kollabor-0.1.0/docs/standards/coding/javascript-typescript-standards.md +1183 -0
  181. kollabor-0.1.0/docs/standards/coding/python-coding-standards.md +437 -0
  182. kollabor-0.1.0/docs/standards/quality/quality-assurance-standards.md +1829 -0
  183. kollabor-0.1.0/docs/standards/security/security-standards.md +552 -0
  184. kollabor-0.1.0/kollabor.egg-info/PKG-INFO +247 -0
  185. kollabor-0.1.0/kollabor.egg-info/SOURCES.txt +227 -0
  186. kollabor-0.1.0/kollabor.egg-info/dependency_links.txt +1 -0
  187. kollabor-0.1.0/kollabor.egg-info/entry_points.txt +2 -0
  188. kollabor-0.1.0/kollabor.egg-info/requires.txt +8 -0
  189. kollabor-0.1.0/kollabor.egg-info/top_level.txt +3 -0
  190. kollabor-0.1.0/kollabor_cli_main.py +20 -0
  191. kollabor-0.1.0/plugins/__init__.py +1 -0
  192. kollabor-0.1.0/plugins/enhanced_input/__init__.py +18 -0
  193. kollabor-0.1.0/plugins/enhanced_input/box_renderer.py +103 -0
  194. kollabor-0.1.0/plugins/enhanced_input/box_styles.py +142 -0
  195. kollabor-0.1.0/plugins/enhanced_input/color_engine.py +165 -0
  196. kollabor-0.1.0/plugins/enhanced_input/config.py +150 -0
  197. kollabor-0.1.0/plugins/enhanced_input/cursor_manager.py +72 -0
  198. kollabor-0.1.0/plugins/enhanced_input/geometry.py +81 -0
  199. kollabor-0.1.0/plugins/enhanced_input/state.py +130 -0
  200. kollabor-0.1.0/plugins/enhanced_input/text_processor.py +115 -0
  201. kollabor-0.1.0/plugins/enhanced_input_plugin.py +267 -0
  202. kollabor-0.1.0/plugins/fullscreen/__init__.py +9 -0
  203. kollabor-0.1.0/plugins/fullscreen/example_plugin.py +327 -0
  204. kollabor-0.1.0/plugins/fullscreen/matrix_plugin.py +132 -0
  205. kollabor-0.1.0/plugins/hook_monitoring_plugin.py +1257 -0
  206. kollabor-0.1.0/plugins/query_enhancer_plugin.py +333 -0
  207. kollabor-0.1.0/plugins/system_commands_plugin.py +81 -0
  208. kollabor-0.1.0/plugins/workflow_enforcement_plugin.py +616 -0
  209. kollabor-0.1.0/pyproject.toml +80 -0
  210. kollabor-0.1.0/requirements.txt +13 -0
  211. kollabor-0.1.0/setup.cfg +4 -0
  212. kollabor-0.1.0/setup.py +12 -0
  213. kollabor-0.1.0/tests/test_api_communication_service.py +330 -0
  214. kollabor-0.1.0/tests/test_complete_integration.py +65 -0
  215. kollabor-0.1.0/tests/test_config_manager.py +89 -0
  216. kollabor-0.1.0/tests/test_conversation_manager.py +39 -0
  217. kollabor-0.1.0/tests/test_final_integration.py +65 -0
  218. kollabor-0.1.0/tests/test_full_integration.py +39 -0
  219. kollabor-0.1.0/tests/test_input_handler_infinite_loop_fix.py +282 -0
  220. kollabor-0.1.0/tests/test_integration.py +38 -0
  221. kollabor-0.1.0/tests/test_llm_plugin.py +123 -0
  222. kollabor-0.1.0/tests/test_llm_service.py +443 -0
  223. kollabor-0.1.0/tests/test_message_display_service.py +358 -0
  224. kollabor-0.1.0/tests/test_minimal.py +29 -0
  225. kollabor-0.1.0/tests/test_orphaned_tags_fix.py +234 -0
  226. kollabor-0.1.0/tests/test_plugin_registry.py +86 -0
  227. kollabor-0.1.0/tests/test_task_management.py +411 -0
  228. kollabor-0.1.0/tests/test_tool_executor.py +339 -0
  229. kollabor-0.1.0/tests/test_wrapper_method.py +33 -0
@@ -0,0 +1,243 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ This is a **Kollabor CLI Interface** - an advanced, highly customizable terminal-based chat application for interacting with LLMs. The core principle is that **everything has hooks** - every action triggers customizable hooks that plugins can attach to for complete customization.
8
+
9
+ ## Architecture
10
+
11
+ The application follows a modular, event-driven architecture:
12
+
13
+ - **Core Application** (`core/application.py`): Main orchestrator that initializes all components
14
+ - **Event System** (`core/events/`): Central event bus with hook system for plugins
15
+ - **LLM Core** (`core/llm/`): Essential LLM services including API communication, conversation management, and tool execution
16
+ - **I/O System** (`core/io/`): Terminal rendering, input handling, visual effects, and layout management
17
+ - **Plugin System** (`core/plugins/`, `plugins/`): Dynamic plugin discovery and loading
18
+ - **Storage** (`core/storage/`): State management and persistence
19
+ - **Configuration** (`core/config/`): Flexible configuration management
20
+
21
+ ## Key Components
22
+
23
+ ### LLM Core Services (`core/llm/`)
24
+ - `llm_service.py`: Main LLM orchestration service
25
+ - `api_communication_service.py`: API communication with rate limiting
26
+ - `conversation_logger.py`: Conversation persistence and logging (KollaborConversationLogger)
27
+ - `conversation_manager.py`: Conversation state and history management
28
+ - `tool_executor.py`: Tool/function calling execution
29
+ - `hook_system.py`: LLM-specific hook management
30
+ - `message_display_service.py`: Response formatting and display
31
+ - `mcp_integration.py`: Model Context Protocol integration
32
+ - `plugin_sdk.py`: Plugin development interface (KollaborPluginSDK)
33
+ - `model_router.py`: Model selection and routing
34
+ - `response_processor.py`: Response processing and formatting
35
+ - `response_parser.py`: Response parsing utilities
36
+
37
+ ### Terminal I/O System (`core/io/`)
38
+ - `terminal_renderer.py`: Main terminal rendering with status areas
39
+ - `input_handler.py`: Raw mode input handling with key parsing
40
+ - `layout.py`: Terminal layout management and thinking animations
41
+ - `visual_effects.py`: Color palettes and visual effects
42
+ - `status_renderer.py`: Multi-area status display system
43
+ - `message_coordinator.py`: Message flow coordination
44
+ - `message_renderer.py`: Message display rendering
45
+ - `buffer_manager.py`: Terminal buffer management
46
+ - `key_parser.py`: Keyboard input parsing
47
+ - `terminal_state.py`: Terminal state management
48
+ - `core_status_views.py`: Core status view implementations
49
+ - `config_status_view.py`: Configuration status display
50
+
51
+ ### Plugin Architecture
52
+ - Plugin discovery from `plugins/` directory
53
+ - Dynamic instantiation with dependency injection
54
+ - Hook registration for event interception
55
+ - Configuration merging from plugin configs
56
+
57
+ ## Development Commands
58
+
59
+ ### Running the Application
60
+ ```bash
61
+ python main.py
62
+ ```
63
+
64
+ ### Testing
65
+ ```bash
66
+ # Run all tests
67
+ python tests/run_tests.py
68
+
69
+ # Run specific test file
70
+ python -m unittest tests.test_llm_plugin
71
+ python -m unittest tests.test_config_manager
72
+ python -m unittest tests.test_plugin_registry
73
+
74
+ # Run individual test case
75
+ python -m unittest tests.test_llm_plugin.TestLLMPlugin.test_thinking_tags_removal
76
+ ```
77
+
78
+ ### Code Quality
79
+ ```bash
80
+ # Install dependencies
81
+ pip install -r requirements.txt
82
+
83
+ # Format code (Black is configured for 88-character line length)
84
+ python -m black core/ plugins/ tests/ main.py
85
+
86
+ # Type checking (if mypy is available)
87
+ python -m mypy core/ plugins/
88
+
89
+ # Run linting (if flake8 is available)
90
+ python -m flake8 core/ plugins/ tests/ main.py --max-line-length=88
91
+ ```
92
+
93
+ ### Debugging
94
+ - Application logs to `.kollabor/logs/kollabor.log` with daily rotation
95
+ - Configuration stored in `.kollabor/config.json`
96
+ - State persistence in `.kollabor/state.db`
97
+
98
+ ## Configuration System
99
+
100
+ Configuration uses dot notation (e.g., `config.get("core.llm.max_history", 90)`):
101
+ - Core LLM settings: `core.llm.*`
102
+ - Terminal rendering: `terminal.*`
103
+ - Application metadata: `application.*`
104
+
105
+ ## Core Architecture Patterns
106
+
107
+ ### Event-Driven Design
108
+ The application uses an event bus (`core/events/bus.py`) that coordinates between:
109
+ - **HookRegistry**: Manages hook registration and lookup
110
+ - **HookExecutor**: Handles hook execution with error handling
111
+ - **EventProcessor**: Processes events through registered hooks
112
+
113
+ ### Plugin Lifecycle
114
+ 1. **Discovery**: `PluginDiscovery` scans `plugins/` directory
115
+ 2. **Factory**: `PluginFactory` instantiates plugins with dependency injection
116
+ 3. **Registration**: Plugins register hooks during initialization
117
+ 4. **Execution**: Events trigger hooks through the event bus
118
+
119
+ ### LLM Service Architecture
120
+ The `LLMService` (`core/llm/llm_service.py`) orchestrates:
121
+ - **APICommunicationService**: HTTP client with rate limiting
122
+ - **KollaborConversationLogger**: Persistent conversation history
123
+ - **MessageDisplayService**: Response formatting and display
124
+ - **ToolExecutor**: Function calling execution
125
+ - **MCPIntegration**: Model Context Protocol support
126
+ - **KollaborPluginSDK**: Plugin development interface
127
+ - **LLMHookSystem**: LLM-specific hook management
128
+
129
+ ## Hook System
130
+
131
+ The application's hook system allows plugins to:
132
+ - Intercept user input before processing (`pre_user_input`)
133
+ - Transform LLM requests before API calls (`pre_api_request`)
134
+ - Process responses before display (`post_api_response`)
135
+ - Add custom status indicators via `get_status_line()`
136
+ - Create new terminal UI elements
137
+
138
+ ## Plugin Development
139
+
140
+ Plugins should:
141
+ 1. Inherit from base plugin classes in `core/plugins/`
142
+ 2. Register hooks in `register_hooks()` method using `EventType` enum
143
+ 3. Provide status line information via `get_status_line()`
144
+ 4. Implement `initialize()` and `shutdown()` lifecycle methods
145
+ 5. Follow the async/await pattern for all hook handlers
146
+
147
+ ## Project Structure
148
+
149
+ ```
150
+ .
151
+ ├── core/ # Core application modules
152
+ │ ├── application.py # Main orchestrator
153
+ │ ├── config/ # Configuration management
154
+ │ ├── events/ # Event bus and hook system
155
+ │ ├── io/ # Terminal I/O, rendering, input handling
156
+ │ ├── llm/ # LLM services (API, conversation, tools)
157
+ │ ├── models/ # Data models
158
+ │ ├── plugins/ # Plugin system (discovery, registry)
159
+ │ ├── storage/ # State management
160
+ │ ├── utils/ # Utility functions
161
+ │ ├── commands/ # Command system (parser, registry, executor)
162
+ │ ├── ui/ # UI system (modals, widgets, rendering)
163
+ │ ├── effects/ # Visual effects (matrix rain, etc.)
164
+ │ └── logging/ # Logging configuration
165
+ ├── plugins/ # Plugin implementations
166
+ │ ├── enhanced_input/ # Enhanced input plugin modules
167
+ │ ├── enhanced_input_plugin.py # Main enhanced input plugin
168
+ │ ├── hook_monitoring_plugin.py # Hook system monitoring
169
+ │ └── [other plugins]
170
+ ├── tests/ # Test suite
171
+ │ ├── run_tests.py # Test runner
172
+ │ ├── unit/ # Unit tests
173
+ │ ├── integration/ # Integration tests
174
+ │ ├── visual/ # Visual effect tests
175
+ │ ├── test_*.py # Component tests
176
+ │ └── README.md # Test documentation
177
+ ├── docs/ # Comprehensive documentation
178
+ │ ├── project-management/ # Project processes and templates
179
+ │ ├── reference/ # API docs and architecture
180
+ │ ├── sdlc/ # Software development lifecycle
181
+ │ ├── sop/ # Standard operating procedures
182
+ │ └── standards/ # Coding and quality standards
183
+ ├── main.py # Application entry point
184
+ ├── .kollabor/ # Runtime data (created at startup)
185
+ │ ├── config.json # User configuration
186
+ │ ├── logs/ # Application logs
187
+ │ └── state.db # Persistent state
188
+ └── .github/scripts/ # Repository automation
189
+ ```
190
+
191
+ Key directories:
192
+ - **`core/`**: Modular core functionality with clear separation of concerns
193
+ - **`plugins/`**: Dynamic plugin system with auto-discovery
194
+ - **`tests/`**: Comprehensive test coverage with multiple test types
195
+ - **`docs/`**: Extensive documentation following enterprise standards
196
+ - **`.kollabor/`**: Runtime configuration, logs, and state (created automatically)
197
+
198
+ ## Development Guidelines
199
+
200
+ ### Code Standards
201
+ - Follow PEP 8 with 88-character line length (Black formatter)
202
+ - Use double quotes for strings, single quotes for character literals
203
+ - All async functions should use proper `async`/`await` patterns
204
+ - Type hints required for all public functions and methods
205
+ - Comprehensive docstrings for classes and public methods
206
+
207
+ ### Testing Strategy
208
+ - Unit tests in `tests/unit/` for individual components
209
+ - Integration tests in `tests/integration/` for cross-component functionality
210
+ - Visual tests in `tests/visual/` for terminal rendering
211
+ - Component tests (`test_*.py`) for specific modules
212
+ - Use unittest framework with descriptive test method names
213
+ - Test coverage includes LLM plugins, configuration, and plugin registry
214
+
215
+ ### Hook Development
216
+ When creating hooks, consider:
217
+ - Hook priority using `HookPriority` enum (CRITICAL, HIGH, NORMAL, LOW)
218
+ - Error handling - hooks should not crash the application
219
+ - Performance - hooks are in the hot path for user interaction
220
+ - State management - avoid shared mutable state between hooks
221
+
222
+ ## Key Features
223
+
224
+ Current implementation includes:
225
+ - **Modal System**: Full-screen modal overlays with widget support (dropdowns, checkboxes, sliders, text inputs)
226
+ - **Command System**: Extensible command parser and executor with menu rendering
227
+ - **Plugin System**: Dynamic plugin discovery with comprehensive SDK
228
+ - **Visual Effects**: Matrix rain effect and customizable color palettes
229
+ - **Status Display**: Multi-area status rendering with flexible view registry
230
+ - **Configuration**: Dot notation config system with plugin integration
231
+ - **Message Processing**: Advanced response parsing with thinking tag removal
232
+
233
+ ## Current State
234
+
235
+ Recent development focused on:
236
+ - Enhanced input plugin architecture with modular design
237
+ - LLM service output formatting consistency
238
+ - Message display and error handling improvements
239
+ - Event bus system with specialized components
240
+ - Modal system with overlay rendering and widget integration
241
+ - Command system with menu and executor components
242
+
243
+ The codebase uses Python 3.12+ and follows async/await patterns throughout.
kollabor-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Kollabor Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # Include documentation
2
+ include README.md
3
+ include LICENSE
4
+ include CLAUDE.md
5
+ include requirements.txt
6
+
7
+ # Include all markdown files in docs
8
+ recursive-include docs *.md
9
+ recursive-include docs *.rst
10
+
11
+ # Include plugin configuration files
12
+ recursive-include plugins *.json
13
+ recursive-include plugins *.yaml
14
+ recursive-include plugins *.yml
15
+
16
+ # Include type stubs
17
+ recursive-include core *.pyi
18
+ recursive-include plugins *.pyi
19
+
20
+ # Exclude common unwanted files
21
+ global-exclude __pycache__
22
+ global-exclude *.py[cod]
23
+ global-exclude *$py.class
24
+ global-exclude *.so
25
+ global-exclude .DS_Store
26
+ global-exclude *.egg-info
27
+ global-exclude .git*
28
+ global-exclude .pytest_cache
29
+ global-exclude .mypy_cache
30
+ global-exclude .coverage
31
+ global-exclude htmlcov
@@ -0,0 +1,247 @@
1
+ Metadata-Version: 2.4
2
+ Name: kollabor
3
+ Version: 0.1.0
4
+ Summary: An advanced, highly customizable terminal-based chat application for interacting with LLMs
5
+ Author-email: Kollabor Contributors <contributors@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/malmazan/kollabor-cli
8
+ Project-URL: Repository, https://github.com/malmazan/kollabor-cli
9
+ Project-URL: Documentation, https://github.com/malmazan/kollabor-cli/blob/main/docs/
10
+ Project-URL: Bug Tracker, https://github.com/malmazan/kollabor-cli/issues
11
+ Keywords: llm,cli,chat,terminal,ai,chatbot,assistant,kollabor,plugin-system,event-driven
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Communications :: Chat
18
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
19
+ Classifier: Topic :: Terminals
20
+ Classifier: Environment :: Console
21
+ Classifier: Operating System :: OS Independent
22
+ Requires-Python: >=3.12
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: aiohttp>=3.10.11
26
+ Provides-Extra: dev
27
+ Requires-Dist: black>=23.0.0; extra == "dev"
28
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
29
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
30
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
31
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # Kollabor
35
+
36
+ [![Python Version](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
+
39
+ An advanced, highly customizable terminal-based chat application for interacting with Large Language Models (LLMs). Built with a powerful plugin system and comprehensive hook architecture for complete customization.
40
+
41
+ **Install:** `pip install kollabor`
42
+ **Run:** `kollab`
43
+
44
+ ## Features
45
+
46
+ - **Event-Driven Architecture**: Everything has hooks - every action triggers customizable hooks that plugins can attach to
47
+ - **Advanced Plugin System**: Dynamic plugin discovery and loading with comprehensive SDK
48
+ - **Rich Terminal UI**: Beautiful terminal rendering with status areas, visual effects, and modal overlays
49
+ - **Conversation Management**: Persistent conversation history with full logging support
50
+ - **Model Context Protocol (MCP)**: Built-in support for MCP integration
51
+ - **Tool Execution**: Function calling and tool execution capabilities
52
+ - **Pipe Mode**: Non-interactive mode for scripting and automation
53
+ - **Extensible Configuration**: Flexible configuration system with plugin integration
54
+ - **Async/Await Throughout**: Modern Python async patterns for responsive performance
55
+
56
+ ## Installation
57
+
58
+ ### From PyPI
59
+
60
+ ```bash
61
+ pip install kollabor
62
+ ```
63
+
64
+ ### From Source
65
+
66
+ ```bash
67
+ git clone https://github.com/malmazan/kollabor-cli.git
68
+ cd kollabor-cli
69
+ pip install -e .
70
+ ```
71
+
72
+ ### Development Installation
73
+
74
+ ```bash
75
+ pip install -e ".[dev]"
76
+ ```
77
+
78
+ ## Quick Start
79
+
80
+ ### Interactive Mode
81
+
82
+ Simply run the CLI to start an interactive chat session:
83
+
84
+ ```bash
85
+ kollab
86
+ ```
87
+
88
+ ### Pipe Mode
89
+
90
+ Process a single query and exit:
91
+
92
+ ```bash
93
+ # Direct query
94
+ kollab "What is the capital of France?"
95
+
96
+ # From stdin
97
+ echo "Explain quantum computing" | kollab -p
98
+
99
+ # From file
100
+ cat document.txt | kollab -p
101
+
102
+ # With custom timeout
103
+ kollab --timeout 5min "Complex analysis task"
104
+ ```
105
+
106
+ ## Configuration
107
+
108
+ On first run, Kollabor creates a `.kollabor` directory in your current working directory:
109
+
110
+ ```
111
+ .kollabor/
112
+ ├── config.json # User configuration
113
+ ├── logs/ # Application logs
114
+ └── state.db # Persistent state
115
+ ```
116
+
117
+ ### Configuration Options
118
+
119
+ The configuration system uses dot notation:
120
+
121
+ - `core.llm.*` - LLM service settings
122
+ - `terminal.*` - Terminal rendering options
123
+ - `application.*` - Application metadata
124
+
125
+ ## Architecture
126
+
127
+ Kollabor follows a modular, event-driven architecture:
128
+
129
+ ### Core Components
130
+
131
+ - **Application Core** (`core/application.py`): Main orchestrator
132
+ - **Event System** (`core/events/`): Central event bus with hook system
133
+ - **LLM Services** (`core/llm/`): API communication, conversation management, tool execution
134
+ - **I/O System** (`core/io/`): Terminal rendering, input handling, visual effects
135
+ - **Plugin System** (`core/plugins/`): Dynamic plugin discovery and loading
136
+ - **Configuration** (`core/config/`): Flexible configuration management
137
+ - **Storage** (`core/storage/`): State management and persistence
138
+
139
+ ### Plugin Development
140
+
141
+ Create custom plugins by inheriting from base plugin classes:
142
+
143
+ ```python
144
+ from core.plugins import BasePlugin
145
+ from core.events import EventType
146
+
147
+ class MyPlugin(BasePlugin):
148
+ def register_hooks(self):
149
+ """Register plugin hooks."""
150
+ self.event_bus.register_hook(
151
+ EventType.PRE_USER_INPUT,
152
+ self.on_user_input,
153
+ priority=HookPriority.NORMAL
154
+ )
155
+
156
+ async def on_user_input(self, context):
157
+ """Process user input before it's sent to the LLM."""
158
+ # Your custom logic here
159
+ return context
160
+
161
+ def get_status_line(self):
162
+ """Provide status information for the status bar."""
163
+ return "MyPlugin: Active"
164
+ ```
165
+
166
+ ## Hook System
167
+
168
+ The comprehensive hook system allows plugins to intercept and modify behavior at every stage:
169
+
170
+ - `pre_user_input` - Before processing user input
171
+ - `pre_api_request` - Before API calls to LLM
172
+ - `post_api_response` - After receiving LLM responses
173
+ - `pre_message_display` - Before displaying messages
174
+ - `post_message_display` - After displaying messages
175
+ - And many more...
176
+
177
+ ## Project Structure
178
+
179
+ ```
180
+ kollabor/
181
+ ├── core/ # Core application modules
182
+ │ ├── application.py # Main orchestrator
183
+ │ ├── config/ # Configuration management
184
+ │ ├── events/ # Event bus and hooks
185
+ │ ├── io/ # Terminal I/O
186
+ │ ├── llm/ # LLM services
187
+ │ ├── plugins/ # Plugin system
188
+ │ └── storage/ # State management
189
+ ├── plugins/ # Plugin implementations
190
+ ├── docs/ # Documentation
191
+ ├── tests/ # Test suite
192
+ └── main.py # Application entry point
193
+ ```
194
+
195
+ ## Development
196
+
197
+ ### Running Tests
198
+
199
+ ```bash
200
+ # All tests
201
+ python tests/run_tests.py
202
+
203
+ # Specific test file
204
+ python -m unittest tests.test_llm_plugin
205
+
206
+ # Individual test case
207
+ python -m unittest tests.test_llm_plugin.TestLLMPlugin.test_thinking_tags_removal
208
+ ```
209
+
210
+ ### Code Quality
211
+
212
+ ```bash
213
+ # Format code
214
+ python -m black core/ plugins/ tests/ main.py
215
+
216
+ # Type checking
217
+ python -m mypy core/ plugins/
218
+
219
+ # Linting
220
+ python -m flake8 core/ plugins/ tests/ main.py --max-line-length=88
221
+
222
+ # Clean up cache files and build artifacts
223
+ python scripts/clean.py
224
+ ```
225
+
226
+ ## Requirements
227
+
228
+ - Python 3.12 or higher
229
+ - aiohttp 3.8.0 or higher
230
+
231
+ ## License
232
+
233
+ MIT License - see LICENSE file for details
234
+
235
+ ## Contributing
236
+
237
+ Contributions are welcome! Please see the documentation for development guidelines.
238
+
239
+ ## Links
240
+
241
+ - [Documentation](https://github.com/malmazan/kollabor-cli/blob/main/docs/)
242
+ - [Bug Tracker](https://github.com/malmazan/kollabor-cli/issues)
243
+ - [Repository](https://github.com/malmazan/kollabor-cli)
244
+
245
+ ## Acknowledgments
246
+
247
+ Built with modern Python async/await patterns and designed for extensibility and customization.