kollabor 0.4.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. core/__init__.py +18 -0
  2. core/application.py +578 -0
  3. core/cli.py +193 -0
  4. core/commands/__init__.py +43 -0
  5. core/commands/executor.py +277 -0
  6. core/commands/menu_renderer.py +319 -0
  7. core/commands/parser.py +186 -0
  8. core/commands/registry.py +331 -0
  9. core/commands/system_commands.py +479 -0
  10. core/config/__init__.py +7 -0
  11. core/config/llm_task_config.py +110 -0
  12. core/config/loader.py +501 -0
  13. core/config/manager.py +112 -0
  14. core/config/plugin_config_manager.py +346 -0
  15. core/config/plugin_schema.py +424 -0
  16. core/config/service.py +399 -0
  17. core/effects/__init__.py +1 -0
  18. core/events/__init__.py +12 -0
  19. core/events/bus.py +129 -0
  20. core/events/executor.py +154 -0
  21. core/events/models.py +258 -0
  22. core/events/processor.py +176 -0
  23. core/events/registry.py +289 -0
  24. core/fullscreen/__init__.py +19 -0
  25. core/fullscreen/command_integration.py +290 -0
  26. core/fullscreen/components/__init__.py +12 -0
  27. core/fullscreen/components/animation.py +258 -0
  28. core/fullscreen/components/drawing.py +160 -0
  29. core/fullscreen/components/matrix_components.py +177 -0
  30. core/fullscreen/manager.py +302 -0
  31. core/fullscreen/plugin.py +204 -0
  32. core/fullscreen/renderer.py +282 -0
  33. core/fullscreen/session.py +324 -0
  34. core/io/__init__.py +52 -0
  35. core/io/buffer_manager.py +362 -0
  36. core/io/config_status_view.py +272 -0
  37. core/io/core_status_views.py +410 -0
  38. core/io/input_errors.py +313 -0
  39. core/io/input_handler.py +2655 -0
  40. core/io/input_mode_manager.py +402 -0
  41. core/io/key_parser.py +344 -0
  42. core/io/layout.py +587 -0
  43. core/io/message_coordinator.py +204 -0
  44. core/io/message_renderer.py +601 -0
  45. core/io/modal_interaction_handler.py +315 -0
  46. core/io/raw_input_processor.py +946 -0
  47. core/io/status_renderer.py +845 -0
  48. core/io/terminal_renderer.py +586 -0
  49. core/io/terminal_state.py +551 -0
  50. core/io/visual_effects.py +734 -0
  51. core/llm/__init__.py +26 -0
  52. core/llm/api_communication_service.py +863 -0
  53. core/llm/conversation_logger.py +473 -0
  54. core/llm/conversation_manager.py +414 -0
  55. core/llm/file_operations_executor.py +1401 -0
  56. core/llm/hook_system.py +402 -0
  57. core/llm/llm_service.py +1629 -0
  58. core/llm/mcp_integration.py +386 -0
  59. core/llm/message_display_service.py +450 -0
  60. core/llm/model_router.py +214 -0
  61. core/llm/plugin_sdk.py +396 -0
  62. core/llm/response_parser.py +848 -0
  63. core/llm/response_processor.py +364 -0
  64. core/llm/tool_executor.py +520 -0
  65. core/logging/__init__.py +19 -0
  66. core/logging/setup.py +208 -0
  67. core/models/__init__.py +5 -0
  68. core/models/base.py +23 -0
  69. core/plugins/__init__.py +13 -0
  70. core/plugins/collector.py +212 -0
  71. core/plugins/discovery.py +386 -0
  72. core/plugins/factory.py +263 -0
  73. core/plugins/registry.py +152 -0
  74. core/storage/__init__.py +5 -0
  75. core/storage/state_manager.py +84 -0
  76. core/ui/__init__.py +6 -0
  77. core/ui/config_merger.py +176 -0
  78. core/ui/config_widgets.py +369 -0
  79. core/ui/live_modal_renderer.py +276 -0
  80. core/ui/modal_actions.py +162 -0
  81. core/ui/modal_overlay_renderer.py +373 -0
  82. core/ui/modal_renderer.py +591 -0
  83. core/ui/modal_state_manager.py +443 -0
  84. core/ui/widget_integration.py +222 -0
  85. core/ui/widgets/__init__.py +27 -0
  86. core/ui/widgets/base_widget.py +136 -0
  87. core/ui/widgets/checkbox.py +85 -0
  88. core/ui/widgets/dropdown.py +140 -0
  89. core/ui/widgets/label.py +78 -0
  90. core/ui/widgets/slider.py +185 -0
  91. core/ui/widgets/text_input.py +224 -0
  92. core/utils/__init__.py +11 -0
  93. core/utils/config_utils.py +656 -0
  94. core/utils/dict_utils.py +212 -0
  95. core/utils/error_utils.py +275 -0
  96. core/utils/key_reader.py +171 -0
  97. core/utils/plugin_utils.py +267 -0
  98. core/utils/prompt_renderer.py +151 -0
  99. kollabor-0.4.9.dist-info/METADATA +298 -0
  100. kollabor-0.4.9.dist-info/RECORD +128 -0
  101. kollabor-0.4.9.dist-info/WHEEL +5 -0
  102. kollabor-0.4.9.dist-info/entry_points.txt +2 -0
  103. kollabor-0.4.9.dist-info/licenses/LICENSE +21 -0
  104. kollabor-0.4.9.dist-info/top_level.txt +4 -0
  105. kollabor_cli_main.py +20 -0
  106. plugins/__init__.py +1 -0
  107. plugins/enhanced_input/__init__.py +18 -0
  108. plugins/enhanced_input/box_renderer.py +103 -0
  109. plugins/enhanced_input/box_styles.py +142 -0
  110. plugins/enhanced_input/color_engine.py +165 -0
  111. plugins/enhanced_input/config.py +150 -0
  112. plugins/enhanced_input/cursor_manager.py +72 -0
  113. plugins/enhanced_input/geometry.py +81 -0
  114. plugins/enhanced_input/state.py +130 -0
  115. plugins/enhanced_input/text_processor.py +115 -0
  116. plugins/enhanced_input_plugin.py +385 -0
  117. plugins/fullscreen/__init__.py +9 -0
  118. plugins/fullscreen/example_plugin.py +327 -0
  119. plugins/fullscreen/matrix_plugin.py +132 -0
  120. plugins/hook_monitoring_plugin.py +1299 -0
  121. plugins/query_enhancer_plugin.py +350 -0
  122. plugins/save_conversation_plugin.py +502 -0
  123. plugins/system_commands_plugin.py +93 -0
  124. plugins/tmux_plugin.py +795 -0
  125. plugins/workflow_enforcement_plugin.py +629 -0
  126. system_prompt/default.md +1286 -0
  127. system_prompt/default_win.md +265 -0
  128. system_prompt/example_with_trender.md +47 -0
@@ -0,0 +1,298 @@
1
+ Metadata-Version: 2.4
2
+ Name: kollabor
3
+ Version: 0.4.9
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/kollaborai/kollabor-cli
8
+ Project-URL: Repository, https://github.com/kollaborai/kollabor-cli
9
+ Project-URL: Documentation, https://github.com/kollaborai/kollabor-cli/blob/main/docs/
10
+ Project-URL: Bug Tracker, https://github.com/kollaborai/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 :: MacOS
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Operating System :: POSIX :: Linux
24
+ Classifier: Operating System :: Unix
25
+ Requires-Python: >=3.12
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: aiohttp>=3.10.11
29
+ Requires-Dist: psutil>=5.9.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: black>=23.0.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
33
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
34
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
35
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # Kollabor
39
+
40
+ [![Python Version](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
42
+
43
+ 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.
44
+
45
+ **Install:** `pip install kollabor`
46
+ **Run:** `kollab`
47
+
48
+ ## Features
49
+
50
+ - **Event-Driven Architecture**: Everything has hooks - every action triggers customizable hooks that plugins can attach to
51
+ - **Advanced Plugin System**: Dynamic plugin discovery and loading with comprehensive SDK
52
+ - **Rich Terminal UI**: Beautiful terminal rendering with status areas, visual effects, and modal overlays
53
+ - **Conversation Management**: Persistent conversation history with full logging support
54
+ - **Model Context Protocol (MCP)**: Built-in support for MCP integration
55
+ - **Tool Execution**: Function calling and tool execution capabilities
56
+ - **Pipe Mode**: Non-interactive mode for scripting and automation
57
+ - **Environment Variable Support**: Complete configuration via environment variables (API settings, system prompts, etc.)
58
+ - **Extensible Configuration**: Flexible configuration system with plugin integration
59
+ - **Async/Await Throughout**: Modern Python async patterns for responsive performance
60
+
61
+ ## Installation
62
+
63
+ ### From PyPI
64
+
65
+ ```bash
66
+ pip install kollabor
67
+ ```
68
+
69
+ ### From Source
70
+
71
+ ```bash
72
+ git clone https://github.com/malmazan/kollabor-cli.git
73
+ cd kollabor-cli
74
+ pip install -e .
75
+ ```
76
+
77
+ ### Development Installation
78
+
79
+ ```bash
80
+ pip install -e ".[dev]"
81
+ ```
82
+
83
+ ## Quick Start
84
+
85
+ ### Interactive Mode
86
+
87
+ Simply run the CLI to start an interactive chat session:
88
+
89
+ ```bash
90
+ kollab
91
+ ```
92
+
93
+ ### Pipe Mode
94
+
95
+ Process a single query and exit:
96
+
97
+ ```bash
98
+ # Direct query
99
+ kollab "What is the capital of France?"
100
+
101
+ # From stdin
102
+ echo "Explain quantum computing" | kollab -p
103
+
104
+ # From file
105
+ cat document.txt | kollab -p
106
+
107
+ # With custom timeout
108
+ kollab --timeout 5min "Complex analysis task"
109
+ ```
110
+
111
+ ## Configuration
112
+
113
+ On first run, Kollabor creates a `.kollabor-cli` directory in your current working directory:
114
+
115
+ ```
116
+ .kollabor-cli/
117
+ ├── config.json # User configuration
118
+ ├── system_prompt/ # System prompt templates
119
+ ├── logs/ # Application logs
120
+ └── state.db # Persistent state
121
+ ```
122
+
123
+ ### Configuration Options
124
+
125
+ The configuration system uses dot notation:
126
+
127
+ - `core.llm.*` - LLM service settings
128
+ - `terminal.*` - Terminal rendering options
129
+ - `application.*` - Application metadata
130
+
131
+ ### Environment Variables
132
+
133
+ All configuration can be controlled via environment variables, which take precedence over config files:
134
+
135
+ #### API Configuration
136
+
137
+ ```bash
138
+ KOLLABOR_API_ENDPOINT=https://api.example.com/v1/chat/completions
139
+ KOLLABOR_API_TOKEN=your-api-token-here # or KOLLABOR_API_KEY
140
+ KOLLABOR_API_MODEL=gpt-4
141
+ KOLLABOR_API_MAX_TOKENS=4096
142
+ KOLLABOR_API_TEMPERATURE=0.7
143
+ KOLLABOR_API_TIMEOUT=30000
144
+ ```
145
+
146
+ #### System Prompt Configuration
147
+
148
+ ```bash
149
+ # Direct string (highest priority)
150
+ KOLLABOR_SYSTEM_PROMPT="You are a helpful coding assistant."
151
+
152
+ # Custom file path
153
+ KOLLABOR_SYSTEM_PROMPT_FILE="./my_custom_prompt.md"
154
+ ```
155
+
156
+ #### Using .env Files
157
+
158
+ Create a `.env` file in your project root:
159
+
160
+ ```bash
161
+ KOLLABOR_API_ENDPOINT=https://api.example.com/v1/chat/completions
162
+ KOLLABOR_API_TOKEN=your-token-here
163
+ KOLLABOR_API_MODEL=gpt-4
164
+ KOLLABOR_SYSTEM_PROMPT_FILE="./prompts/specialized.md"
165
+ ```
166
+
167
+ Load and run:
168
+
169
+ ```bash
170
+ export $(cat .env | xargs)
171
+ kollab
172
+ ```
173
+
174
+ See [ENV_VARS.md](ENV_VARS.md) for complete documentation and examples.
175
+
176
+ ## Architecture
177
+
178
+ Kollabor follows a modular, event-driven architecture:
179
+
180
+ ### Core Components
181
+
182
+ - **Application Core** (`core/application.py`): Main orchestrator
183
+ - **Event System** (`core/events/`): Central event bus with hook system
184
+ - **LLM Services** (`core/llm/`): API communication, conversation management, tool execution
185
+ - **I/O System** (`core/io/`): Terminal rendering, input handling, visual effects
186
+ - **Plugin System** (`core/plugins/`): Dynamic plugin discovery and loading
187
+ - **Configuration** (`core/config/`): Flexible configuration management
188
+ - **Storage** (`core/storage/`): State management and persistence
189
+
190
+ ### Plugin Development
191
+
192
+ Create custom plugins by inheriting from base plugin classes:
193
+
194
+ ```python
195
+ from core.plugins import BasePlugin
196
+ from core.events import EventType
197
+
198
+ class MyPlugin(BasePlugin):
199
+ def register_hooks(self):
200
+ """Register plugin hooks."""
201
+ self.event_bus.register_hook(
202
+ EventType.PRE_USER_INPUT,
203
+ self.on_user_input,
204
+ priority=HookPriority.NORMAL
205
+ )
206
+
207
+ async def on_user_input(self, context):
208
+ """Process user input before it's sent to the LLM."""
209
+ # Your custom logic here
210
+ return context
211
+
212
+ def get_status_line(self):
213
+ """Provide status information for the status bar."""
214
+ return "MyPlugin: Active"
215
+ ```
216
+
217
+ ## Hook System
218
+
219
+ The comprehensive hook system allows plugins to intercept and modify behavior at every stage:
220
+
221
+ - `pre_user_input` - Before processing user input
222
+ - `pre_api_request` - Before API calls to LLM
223
+ - `post_api_response` - After receiving LLM responses
224
+ - `pre_message_display` - Before displaying messages
225
+ - `post_message_display` - After displaying messages
226
+ - And many more...
227
+
228
+ ## Project Structure
229
+
230
+ ```
231
+ kollabor/
232
+ ├── core/ # Core application modules
233
+ │ ├── application.py # Main orchestrator
234
+ │ ├── config/ # Configuration management
235
+ │ ├── events/ # Event bus and hooks
236
+ │ ├── io/ # Terminal I/O
237
+ │ ├── llm/ # LLM services
238
+ │ ├── plugins/ # Plugin system
239
+ │ └── storage/ # State management
240
+ ├── plugins/ # Plugin implementations
241
+ ├── docs/ # Documentation
242
+ ├── tests/ # Test suite
243
+ └── main.py # Application entry point
244
+ ```
245
+
246
+ ## Development
247
+
248
+ ### Running Tests
249
+
250
+ ```bash
251
+ # All tests
252
+ python tests/run_tests.py
253
+
254
+ # Specific test file
255
+ python -m unittest tests.test_llm_plugin
256
+
257
+ # Individual test case
258
+ python -m unittest tests.test_llm_plugin.TestLLMPlugin.test_thinking_tags_removal
259
+ ```
260
+
261
+ ### Code Quality
262
+
263
+ ```bash
264
+ # Format code
265
+ python -m black core/ plugins/ tests/ main.py
266
+
267
+ # Type checking
268
+ python -m mypy core/ plugins/
269
+
270
+ # Linting
271
+ python -m flake8 core/ plugins/ tests/ main.py --max-line-length=88
272
+
273
+ # Clean up cache files and build artifacts
274
+ python scripts/clean.py
275
+ ```
276
+
277
+ ## Requirements
278
+
279
+ - Python 3.12 or higher
280
+ - aiohttp 3.8.0 or higher
281
+
282
+ ## License
283
+
284
+ MIT License - see LICENSE file for details
285
+
286
+ ## Contributing
287
+
288
+ Contributions are welcome! Please see the documentation for development guidelines.
289
+
290
+ ## Links
291
+
292
+ - [Documentation](https://github.com/malmazan/kollabor-cli/blob/main/docs/)
293
+ - [Bug Tracker](https://github.com/malmazan/kollabor-cli/issues)
294
+ - [Repository](https://github.com/malmazan/kollabor-cli)
295
+
296
+ ## Acknowledgments
297
+
298
+ Built with modern Python async/await patterns and designed for extensibility and customization.
@@ -0,0 +1,128 @@
1
+ kollabor_cli_main.py,sha256=RdGu7KpBzzxuhvPUiB_lHYk3IeHL6VQlkv_PqDF2wHk,625
2
+ core/__init__.py,sha256=ul7d7oL6nTgvY_r9XK0ZZSb3Fqj5Uw-mSbiojr1YhQg,570
3
+ core/application.py,sha256=BlLLDeNYvlB0of_42c5HQZg6rQgtMAENRia9sgAQvmc,24147
4
+ core/cli.py,sha256=65pWxUqgjVLRDJ0h5AuO-OgDcH3i7fkVEkKFYxPa0Ts,6375
5
+ core/commands/__init__.py,sha256=vnmRPP1Z9w-uRVq25hSC6XA7-kQD5GeyntkqjwGQsGs,1067
6
+ core/commands/executor.py,sha256=n89GkS2uTi5UGUKlAV1YKQCs2ee8aIqS0ToXyyxBivM,10659
7
+ core/commands/menu_renderer.py,sha256=taVWgDB3k_xvNhDE2TuhaZEkQQRXbwRQpCoknblVN-0,10632
8
+ core/commands/parser.py,sha256=QNQg6uLXGmrstGSVL3SZbzmuGFvBkyVnixksX8GmNV4,5804
9
+ core/commands/registry.py,sha256=elkOuFtzHVH1Bm8yGepi3odzAivoSADM2XGW-Owlxks,12091
10
+ core/commands/system_commands.py,sha256=325sLJp_Zxe3IYUFxnyAvq4vtngTjLr0REAsE8avi18,17970
11
+ core/config/__init__.py,sha256=LzIghvi-CGT_C-Tpzjpwryu35dKhniWI_QH3s2XsyOk,213
12
+ core/config/llm_task_config.py,sha256=Ri-Vu1crP2zcrt9H_vytvxSTiMctmzWkO3IG-nGeSAg,4201
13
+ core/config/loader.py,sha256=ulmhHvqU3O1X0bOd8epapA5L1DZ0USnHqEqOOtEhKew,19689
14
+ core/config/manager.py,sha256=f_qNV5BZ9Ee2wfWLntgw00NJiqudaVIvxnejWX8-HjQ,3359
15
+ core/config/plugin_config_manager.py,sha256=IqcrVOtqrM5R9rvZeiDsjJ4neFZkRtfNlTPJ5-OfIJg,13848
16
+ core/config/plugin_schema.py,sha256=Q6KjQc5r1sN48HDzNlv0fSH1MpCclgkdnDENUwxuF0Q,15013
17
+ core/config/service.py,sha256=c8XXUDOUv4qZjaXZ1HtS_RnAPX2Z75mksHqpXibkYbc,15099
18
+ core/effects/__init__.py,sha256=0dDDDiPEiauWQZBWWJ7XRhE_jGIRsxzPn0SD4BDMTjg,64
19
+ core/events/__init__.py,sha256=A6JciibuYZzmGqnhRlVu97LARiPHzRhN1zSh4_47uos,394
20
+ core/events/bus.py,sha256=OmeFmvGSEjciXac-mchl2SeZTCZ5uIrZTxNkaY63-aM,4538
21
+ core/events/executor.py,sha256=fqODnq1mWrrxy5TsNMtdd_KF-55NT8WHzzOST4b-Zm0,5728
22
+ core/events/models.py,sha256=Wk5aKu9Cdn-UQDhz1cWdc1tDwy_weBkOn2FCQuP-als,8180
23
+ core/events/processor.py,sha256=2GILZzv8bOc6RWB8i38SUdjw3O-zf83KGEyH3Crb38c,7023
24
+ core/events/registry.py,sha256=y4baUpj04_JLME9ZZZkFqH0pWBscm-GnBACfs1yCDxs,10508
25
+ core/fullscreen/__init__.py,sha256=RrZlDXqCNks7cmjimwpis7Yvo3lGCF-T3-kmVJf4BlM,558
26
+ core/fullscreen/command_integration.py,sha256=GlL3tREmxnhYKn-JA1mN3sTxqkxTOauxNvuKKfVcLRk,10732
27
+ core/fullscreen/manager.py,sha256=2aOBbRp2YG3gQSgBg_QKhtdL8qVOKIYF3maSZnDm-sg,10049
28
+ core/fullscreen/plugin.py,sha256=qzU-5AJT_LmxPhbXvn9DzCWvYGD3FyYTBlMNfl6KXwc,6341
29
+ core/fullscreen/renderer.py,sha256=9az9PNeFejp7PbcZBwxzFpNd5cWI1rkjZZYm-jkLJf4,9924
30
+ core/fullscreen/session.py,sha256=d76zUyz7n7Fy26fsESLPEIyjgFbE94QGJH1gC8BHovQ,12018
31
+ core/fullscreen/components/__init__.py,sha256=lP5pqxagiFRRt8TRNIGfR1WmXojoSpmdO4pDhQx7FdY,299
32
+ core/fullscreen/components/animation.py,sha256=f91iMDi-XnyuygP7FWO2LJZtgwbtoMv_n9guegYjwJ0,7078
33
+ core/fullscreen/components/drawing.py,sha256=yuZoY0tG04pWnA2YZqjkSB9mtn9bVc8SkdNcSwOCHfM,5885
34
+ core/fullscreen/components/matrix_components.py,sha256=wcR8aC7oGpiq3d76cJ_gRpy4C3fppOtHGSdeNjwQjhw,5871
35
+ core/io/__init__.py,sha256=h_Tt_tPQ7kHmu4Qj9RfFua7nPQLpYzkZwfvbcilx-J0,1410
36
+ core/io/buffer_manager.py,sha256=0GNP4udUARiAtE69woYBsRg2hY23u0B_xUlwWY0Ga6A,10956
37
+ core/io/config_status_view.py,sha256=Tq1Zn9FsK0oYMd8XTeIuLAoxMMFZVoduLpVRBKyouH4,9126
38
+ core/io/core_status_views.py,sha256=AakVrKgq75vmjQzL7cHGDdo8RPBrLKgJOuXUF9GxPK8,15910
39
+ core/io/input_errors.py,sha256=H3VGID8a8tTuihQguSV1uzG9vXjzOKjB6J-2lJkq-kc,10130
40
+ core/io/input_handler.py,sha256=D5cL0TXnCyO4qqSmmjhMCgy3jo9dB4dyfApj5O9uKd4,107665
41
+ core/io/input_mode_manager.py,sha256=zGoLmFsM9UNV2iRL_KTqGfXVNTFbaDKDaVZ2P83ZWjM,15328
42
+ core/io/key_parser.py,sha256=tLxNliS1Qtm4mQrwc7OzCMuQJ8dXFQ-u3-ySw-XOB3Q,10331
43
+ core/io/layout.py,sha256=t1l3MMB-L7Pk6JfbFoSY-o4x8w50TL7pSuuQ70LCMvQ,18308
44
+ core/io/message_coordinator.py,sha256=jx0-QCHm2IcWEhksBg5JzYkZC_qQopWaHFt67D0_bNI,7891
45
+ core/io/message_renderer.py,sha256=u2P8y9lSg6tCNkbmPU812za37bF3zk8eqZE23_AvtBs,19925
46
+ core/io/modal_interaction_handler.py,sha256=giQHTvTHAIoA-rSbPkQm7rdcKMGda7sHmijz-wkOWs4,12990
47
+ core/io/raw_input_processor.py,sha256=gQFWm9hQ0BHqadhfjlj2sNNCOBnSoj2sttE8oeC0RdU,38716
48
+ core/io/status_renderer.py,sha256=FvQxcdAybsaF-UwWTFQIZRMqDcyPcZW5iPr0uDnI5gI,28262
49
+ core/io/terminal_renderer.py,sha256=r-bQ92aHSj_Li_vNw7P9_iAsHwOz_UWTxBMgO8KOG6M,22664
50
+ core/io/terminal_state.py,sha256=dJQzECKPu1cZ9AdQ2xKUdHD8cZycDWvZtC_cPXrGXbc,17928
51
+ core/io/visual_effects.py,sha256=nzXMVCLXOQUDLM0lKZXaWKfephhgDWpxHLNxye9eNgo,25942
52
+ core/llm/__init__.py,sha256=ygjaJOgIBqE3ExUMMiAJQ2E-yDm-IQZrj9uxlGuxBfo,801
53
+ core/llm/api_communication_service.py,sha256=gUhV4DK0JMndKiCHgObGtZ74HNcZNr5hYAwLiY8W3nM,33551
54
+ core/llm/conversation_logger.py,sha256=My8Cn5DCSyZ-tM5XUvDDXy4Moe1BR1f07nIu9wJp6f8,19181
55
+ core/llm/conversation_manager.py,sha256=Atlxm5qACvlJ7MaLXvzKfd8642aARleHmxWxkVpoaH0,14514
56
+ core/llm/file_operations_executor.py,sha256=LuA-BXnrEY0K3-39yhFn7UaCYCMYJOVQdgf1s0E_BQA,45464
57
+ core/llm/hook_system.py,sha256=NwFfn4a-QSI17pK4ZHCVupfSEo4_iRstBwjOFuwDJKw,14006
58
+ core/llm/llm_service.py,sha256=eNWPoF33bDfESuwPKkYJR3x4ncNfI5xodnUrP9iH0k4,72654
59
+ core/llm/mcp_integration.py,sha256=DOHYuWDKJx30F83y7V3Vl0nU2DAu0jmMAZv5TCkSLo8,14296
60
+ core/llm/message_display_service.py,sha256=dQK2epugDVEt3nQ8dpfNL69Ii-0EDECyu5y0ttnfxXQ,18157
61
+ core/llm/model_router.py,sha256=oHbFyJGJvr1mW5MVZ4T2fHrwUy6IKXJijJ9jmPmTmP0,7062
62
+ core/llm/plugin_sdk.py,sha256=w9DU2yWLGsSujKtiZjBvMalq35uWWzr8dNQMsgGK6NE,14014
63
+ core/llm/response_parser.py,sha256=waZrT53wJ-5ljX6yekox0wzn1QDNZbtFGI0pSBkUnxE,31511
64
+ core/llm/response_processor.py,sha256=cIvw9s53gv13KXQZ5xxnRPXcYK5c7OJ_H4hLb1WpfZQ,11877
65
+ core/llm/tool_executor.py,sha256=uaGJ9v_l6JGb0h8NSGJuU-hjNbW2QWSoIWDYA5Z0p3c,18990
66
+ core/logging/__init__.py,sha256=SYu6X0lc8jICqsifpjBFLk18XSmcBIKcQSMLgtQOY_g,378
67
+ core/logging/setup.py,sha256=FIqg36PIJmZsulwjOtdBQu-0xnazuChQeqVN8vy4CyE,6606
68
+ core/models/__init__.py,sha256=BXuQeabXxRPMvmymiOjQR44s2TchbZqx2XBbTx7HuoY,111
69
+ core/models/base.py,sha256=9tZwUb2VBWkX8YRLpnFSxb_GXmO92IBkwsqyRcOA1EI,711
70
+ core/plugins/__init__.py,sha256=euJmpAkgN7nULkihQUu8VD9eXEInt5IgClVwOdGS0Po,307
71
+ core/plugins/collector.py,sha256=tRXN8AsH9C5DQm3VdjdijiW676IN10Ig2gmWy3lwwlk,7991
72
+ core/plugins/discovery.py,sha256=ivep1ueIbNbSfltTzDDOBU5iiPzljsgtJ1MEr5igg4c,14634
73
+ core/plugins/factory.py,sha256=SJmITFWtc2YLGdU8kEQLL9tCqhAEadGg2Nouxz4rl5U,9018
74
+ core/plugins/registry.py,sha256=a_KsQNOecTOzs4rvgQoZy2arDPUd3jqy4hLBvEjcX-k,5537
75
+ core/storage/__init__.py,sha256=NspAeaBeIcbtsEZcnTzUhmgxMMDoxyhFnAFxVKqawtE,110
76
+ core/storage/state_manager.py,sha256=LPjrwEtwzQsGY3Jl3cZYs7OFacm5nw9FaEaXtjlppY0,2492
77
+ core/ui/__init__.py,sha256=CqoUMYHlKWQ6Xbx2RPAkna8Sdq2h8QgFlTcI2o1PMb4,219
78
+ core/ui/config_merger.py,sha256=_AAzknetfacw3dHj7MpsHVtvmXGjyrc4OP-_BkW5PWc,6805
79
+ core/ui/config_widgets.py,sha256=b1tTirkGkzPjiqWjZ6wDf2hKM7yn4KIfhogv6OLQjQ4,15410
80
+ core/ui/live_modal_renderer.py,sha256=tSpjFcYSIfdTGOC_7SyM1x808Nb2QEYrksjHlD-KnL0,9875
81
+ core/ui/modal_actions.py,sha256=3jeFxFt0XLmtC4mejkgEMpzTK_f2SZvS8ztTPmShI5A,5645
82
+ core/ui/modal_overlay_renderer.py,sha256=OEUtaVZ-KPezSbEXUgFwPCUgZdo684uG6jgAgRz1lsY,12225
83
+ core/ui/modal_renderer.py,sha256=zBiWGqjmVZRTmOs_Znd_p-hsIhBWRpyqSb7yZqQwNbM,24359
84
+ core/ui/modal_state_manager.py,sha256=oh_OpoG2I7oAaG3RykJbaFi3586xNA5rvroxFKHdr9E,15182
85
+ core/ui/widget_integration.py,sha256=c02rFwJQ3iYuzpdnWo-AqcyE-cmsgEQNtI8mnRDdjP4,8071
86
+ core/ui/widgets/__init__.py,sha256=2FF0UzWwUIv8J8Ei_fcb0wZ8A-UsISZOmWBHti8vSmQ,799
87
+ core/ui/widgets/base_widget.py,sha256=eaFGpVL1hCsE6BEZGSjmvDRZnB4dVpsmu0qKpDHGHcg,4328
88
+ core/ui/widgets/checkbox.py,sha256=SWKFGFbgBSWoz03Bdlfhhge2AiaMqio_0a_j8sGXXUY,3038
89
+ core/ui/widgets/dropdown.py,sha256=FeaxkZMIiIxYc83hmFS-Ik7H5eBTVbO4yaxmIU7E1GM,4492
90
+ core/ui/widgets/label.py,sha256=H1TNVFTPzfJLcu8K6yqlTMuX9s1orE91dSvyX-MBg2M,2290
91
+ core/ui/widgets/slider.py,sha256=ZuIv7ClkeeuBs2A8GHVA1AClmwJRw-Bbm-JHITBSJNA,6860
92
+ core/ui/widgets/text_input.py,sha256=o3yAN70856vKzpj2hewFGo-QXYPOjRPYZH39638x67Q,7916
93
+ core/utils/__init__.py,sha256=f51izmJtTxFOscZANUX2KRmMq4zAHdIwJdtiR921Csk,391
94
+ core/utils/config_utils.py,sha256=9xldjhf5zb8LI9-DlKVv1A7F4SdMQj1lxfN7u3TzLvU,23163
95
+ core/utils/dict_utils.py,sha256=yxsrJFaW540qvxLqxF21sEm6paxxM2-C0V4N4qOEDWE,6153
96
+ core/utils/error_utils.py,sha256=JkIQk3x163rElse1MROssJROy6iHAIsfnYlLX6jfbcw,9799
97
+ core/utils/key_reader.py,sha256=Krr600Y6mS0XdpAnTVRRW3UlRv2AjPL8GEpUJKYrHDY,6379
98
+ core/utils/plugin_utils.py,sha256=BiiZRVHAovC30aAEdquB1GdobNS8C--lziHJ5AU2a9s,9441
99
+ core/utils/prompt_renderer.py,sha256=hCqrpGcRTFmDHiPUkjYG5OhGEurmw835o3JyUD-0Qog,5049
100
+ kollabor-0.4.9.dist-info/licenses/LICENSE,sha256=uWkgA9bNCoiOlyXN1KYAT8oSq6NbZ68EZDQ8nGlgHdQ,1078
101
+ plugins/__init__.py,sha256=cg-G1KOnSHMYazTkYu9otwKubVdNjda1jCO9F2Y0idY,39
102
+ plugins/enhanced_input_plugin.py,sha256=8Lh097j-9sz3OnmFTui2gJdQVpKl2aNW7qIPGUeD2dU,14425
103
+ plugins/hook_monitoring_plugin.py,sha256=BKmoWNWdR_4oCgdTTrf2dakClQryQNrSzJoXUda_wb0,58896
104
+ plugins/query_enhancer_plugin.py,sha256=FwuZbYAFuBSQfzIjfNe0hgdVowiSnowITwTc6V_8DW4,15228
105
+ plugins/save_conversation_plugin.py,sha256=tz1YS6DkXu58R2w8JEWwECJfMmQtZo_vCi-7ya9dwmg,17403
106
+ plugins/system_commands_plugin.py,sha256=RIUiyh8lDJxpTkUyxp5wuIViS85XKjje06zftDWV5Yg,3120
107
+ plugins/tmux_plugin.py,sha256=YoXSyVMrQcb25N3xLHgWJDpOrgSv0qE4dn-Rtsh8GFY,29509
108
+ plugins/workflow_enforcement_plugin.py,sha256=KaAI6eKvx7jiAixA5oKgOfO2s4W3hvgNjEkLOqVT8lw,26308
109
+ plugins/enhanced_input/__init__.py,sha256=GH0OHRYY1cdqXXu-0wX_TpEQj9H5lOUBUn50S76DhFc,603
110
+ plugins/enhanced_input/box_renderer.py,sha256=2f6gu1jIfsXDqnKA3pWXbqCOi2hi8bkolEbbaAvHiaw,3746
111
+ plugins/enhanced_input/box_styles.py,sha256=VoPRYdCWCVaZCjnbtcX-esW9pSYAuJTQ-owv2YFhRII,5330
112
+ plugins/enhanced_input/color_engine.py,sha256=vKUxLNH5NXmOZIc3Ve-joNcfGOKEMrTMjVevOFfFKlQ,5432
113
+ plugins/enhanced_input/config.py,sha256=Kcsu33omW0x5UYsFLnihhLFu4U3w1VWNMTZ-RPRoKXE,5757
114
+ plugins/enhanced_input/cursor_manager.py,sha256=iJoZTEUHtm--YrHRab1W_LkBsGy5Oz6Iw_h8NjnVRE0,2423
115
+ plugins/enhanced_input/geometry.py,sha256=6EFPKpaq-cZlaNF62DNKT5yQxFYd8MHK4mGO8pLJws0,2511
116
+ plugins/enhanced_input/state.py,sha256=hXUS66YguOasJxTgFlyr6mCtLOjsrSvGg1lWE8mCsKs,4149
117
+ plugins/enhanced_input/text_processor.py,sha256=QEP7xiA4Xvsf17SHJwF-FlqppvckG4nEO9z28bP7qbQ,3380
118
+ plugins/fullscreen/__init__.py,sha256=d-QsC15S8BzW-5lnVyQjalYRFxjU1fWuTUcew3FYSdY,182
119
+ plugins/fullscreen/example_plugin.py,sha256=Byh3OFWfNwtebP_lJ_gvHhGn3M9WS6O93_7_iIoLQLs,12011
120
+ plugins/fullscreen/matrix_plugin.py,sha256=ZecJMLn22mDcwPmMLJbe9hrf6xo1NibaEnzaYxb4J84,4048
121
+ system_prompt/default.md,sha256=Ovt_rIwdOiwGx8A3HthhBcbBFj6OHPEC2FWIQxXdhcI,39047
122
+ system_prompt/default_win.md,sha256=DVG4SP6S24KXbY2I5qkzgbJpQuS-3DRayEv0TPgsw_o,11487
123
+ system_prompt/example_with_trender.md,sha256=DL0NcgXi-BNknSaPm2Vk9ro3tncKPYm0z-etpT9nxN0,1401
124
+ kollabor-0.4.9.dist-info/METADATA,sha256=sPlBe21n9VrodSDAliqmoDirtQTfGVuHUs19cQyw7XQ,8753
125
+ kollabor-0.4.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
+ kollabor-0.4.9.dist-info/entry_points.txt,sha256=8VUD4TjPTE5aHr19bhfMiu9kX2lshLqUwRFr_8oPLos,54
127
+ kollabor-0.4.9.dist-info/top_level.txt,sha256=ArYE0j-k28Od59srp4P3vjOhthTwKZ4md4dlZhvBkYw,45
128
+ kollabor-0.4.9.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ kollab = kollabor_cli_main:cli_main
@@ -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,4 @@
1
+ core
2
+ kollabor_cli_main
3
+ plugins
4
+ system_prompt
kollabor_cli_main.py ADDED
@@ -0,0 +1,20 @@
1
+ """Entry point module for kollabor-cli to avoid namespace conflicts.
2
+
3
+ This module serves as the CLI entry point and ensures imports are resolved
4
+ from the correct location, avoiding conflicts with other 'core' packages.
5
+ """
6
+
7
+ import sys
8
+ import os
9
+ from pathlib import Path
10
+
11
+ # Add the current directory to sys.path to ensure we import from the right place
12
+ package_dir = Path(__file__).parent.absolute()
13
+ if str(package_dir) not in sys.path:
14
+ sys.path.insert(0, str(package_dir))
15
+
16
+ # Now import from our local core package
17
+ from core.cli import cli_main
18
+
19
+ # This is the entry point that setuptools will call
20
+ __all__ = ["cli_main"]
plugins/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """Plugins package for Kollabor CLI."""
@@ -0,0 +1,18 @@
1
+ """Enhanced Input Plugin Package.
2
+
3
+ A modular, DRY implementation of enhanced input rendering with bordered boxes.
4
+ """
5
+
6
+ from .box_styles import BoxStyleRegistry, BoxStyle
7
+ from .color_engine import ColorEngine
8
+ from .geometry import GeometryCalculator
9
+ from .box_renderer import BoxRenderer
10
+ from .cursor_manager import CursorManager
11
+ from .text_processor import TextProcessor
12
+ from .config import InputConfig
13
+ from .state import PluginState
14
+
15
+ __all__ = [
16
+ 'BoxStyleRegistry', 'BoxStyle', 'ColorEngine', 'GeometryCalculator',
17
+ 'BoxRenderer', 'CursorManager', 'TextProcessor', 'InputConfig', 'PluginState'
18
+ ]
@@ -0,0 +1,103 @@
1
+ """Box rendering components for enhanced input plugin."""
2
+
3
+ from typing import List
4
+ from .box_styles import BoxStyleRegistry, BoxStyle
5
+ from .color_engine import ColorEngine
6
+ from .geometry import GeometryCalculator
7
+ from .text_processor import TextProcessor
8
+
9
+
10
+ class BoxRenderer:
11
+ """Renders complete input boxes with borders and content."""
12
+
13
+ def __init__(self, style_registry: BoxStyleRegistry, color_engine: ColorEngine,
14
+ geometry_calculator: GeometryCalculator, text_processor: TextProcessor):
15
+ """Initialize box renderer.
16
+
17
+ Args:
18
+ style_registry: Registry for box styles.
19
+ color_engine: Engine for color operations.
20
+ geometry_calculator: Calculator for layout.
21
+ text_processor: Processor for text operations.
22
+ """
23
+ self.style_registry = style_registry
24
+ self.color_engine = color_engine
25
+ self.geometry = geometry_calculator
26
+ self.text_processor = text_processor
27
+
28
+ def render_box(self, content_lines: List[str], box_width: int, style_name: str) -> List[str]:
29
+ """Render a complete input box.
30
+
31
+ Args:
32
+ content_lines: Lines of content to display.
33
+ box_width: Total width of the box.
34
+ style_name: Name of the box style to use.
35
+
36
+ Returns:
37
+ List of rendered box lines.
38
+ """
39
+ style = self.style_registry.get_style(style_name)
40
+ box_height = self.geometry.calculate_box_height(content_lines)
41
+ content_width = self.geometry.calculate_content_width(box_width)
42
+
43
+ lines = []
44
+
45
+ # Top border
46
+ lines.append(self._create_top_border(box_width, style))
47
+
48
+ # Content lines
49
+ for line in content_lines:
50
+ fitted_content = self.text_processor.fit_text_to_width(line, content_width)
51
+ lines.append(self._create_content_line(fitted_content, box_width, style))
52
+
53
+ # Fill empty content lines if needed (for minimum height)
54
+ while len(lines) < box_height - 1: # -1 for bottom border
55
+ lines.append(self._create_content_line("", box_width, style))
56
+
57
+ # Bottom border
58
+ lines.append(self._create_bottom_border(box_width, style))
59
+
60
+ return lines
61
+
62
+ def _create_top_border(self, width: int, style: BoxStyle) -> str:
63
+ """Create the top border of the box.
64
+
65
+ Args:
66
+ width: Total width of the box.
67
+ style: Box style to use.
68
+
69
+ Returns:
70
+ Top border line.
71
+ """
72
+ horizontal_line = style.horizontal * (width - 2)
73
+ border_line = f"{style.top_left}{horizontal_line}{style.top_right}"
74
+ return self.color_engine.apply_color(border_line, 'border')
75
+
76
+ def _create_bottom_border(self, width: int, style: BoxStyle) -> str:
77
+ """Create the bottom border of the box.
78
+
79
+ Args:
80
+ width: Total width of the box.
81
+ style: Box style to use.
82
+
83
+ Returns:
84
+ Bottom border line.
85
+ """
86
+ horizontal_line = style.horizontal * (width - 2)
87
+ border_line = f"{style.bottom_left}{horizontal_line}{style.bottom_right}"
88
+ return self.color_engine.apply_color(border_line, 'border')
89
+
90
+ def _create_content_line(self, content: str, width: int, style: BoxStyle) -> str:
91
+ """Create a single content line of the input box.
92
+
93
+ Args:
94
+ content: Content to display in the box.
95
+ width: Total width of the box.
96
+ style: Box style to use.
97
+
98
+ Returns:
99
+ Formatted box line.
100
+ """
101
+ left_border = self.color_engine.apply_color(style.vertical, 'border')
102
+ right_border = self.color_engine.apply_color(style.vertical, 'border')
103
+ return f"{left_border} {content} {right_border}"