kollabor 0.4.9__py3-none-any.whl → 0.4.15__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.
- agents/__init__.py +2 -0
- agents/coder/__init__.py +0 -0
- agents/coder/agent.json +4 -0
- agents/coder/api-integration.md +2150 -0
- agents/coder/cli-pretty.md +765 -0
- agents/coder/code-review.md +1092 -0
- agents/coder/database-design.md +1525 -0
- agents/coder/debugging.md +1102 -0
- agents/coder/dependency-management.md +1397 -0
- agents/coder/git-workflow.md +1099 -0
- agents/coder/refactoring.md +1454 -0
- agents/coder/security-hardening.md +1732 -0
- agents/coder/system_prompt.md +1448 -0
- agents/coder/tdd.md +1367 -0
- agents/creative-writer/__init__.py +0 -0
- agents/creative-writer/agent.json +4 -0
- agents/creative-writer/character-development.md +1852 -0
- agents/creative-writer/dialogue-craft.md +1122 -0
- agents/creative-writer/plot-structure.md +1073 -0
- agents/creative-writer/revision-editing.md +1484 -0
- agents/creative-writer/system_prompt.md +690 -0
- agents/creative-writer/worldbuilding.md +2049 -0
- agents/data-analyst/__init__.py +30 -0
- agents/data-analyst/agent.json +4 -0
- agents/data-analyst/data-visualization.md +992 -0
- agents/data-analyst/exploratory-data-analysis.md +1110 -0
- agents/data-analyst/pandas-data-manipulation.md +1081 -0
- agents/data-analyst/sql-query-optimization.md +881 -0
- agents/data-analyst/statistical-analysis.md +1118 -0
- agents/data-analyst/system_prompt.md +928 -0
- agents/default/__init__.py +0 -0
- agents/default/agent.json +4 -0
- agents/default/dead-code.md +794 -0
- agents/default/explore-agent-system.md +585 -0
- agents/default/system_prompt.md +1448 -0
- agents/kollabor/__init__.py +0 -0
- agents/kollabor/analyze-plugin-lifecycle.md +175 -0
- agents/kollabor/analyze-terminal-rendering.md +388 -0
- agents/kollabor/code-review.md +1092 -0
- agents/kollabor/debug-mcp-integration.md +521 -0
- agents/kollabor/debug-plugin-hooks.md +547 -0
- agents/kollabor/debugging.md +1102 -0
- agents/kollabor/dependency-management.md +1397 -0
- agents/kollabor/git-workflow.md +1099 -0
- agents/kollabor/inspect-llm-conversation.md +148 -0
- agents/kollabor/monitor-event-bus.md +558 -0
- agents/kollabor/profile-performance.md +576 -0
- agents/kollabor/refactoring.md +1454 -0
- agents/kollabor/system_prompt copy.md +1448 -0
- agents/kollabor/system_prompt.md +757 -0
- agents/kollabor/trace-command-execution.md +178 -0
- agents/kollabor/validate-config.md +879 -0
- agents/research/__init__.py +0 -0
- agents/research/agent.json +4 -0
- agents/research/architecture-mapping.md +1099 -0
- agents/research/codebase-analysis.md +1077 -0
- agents/research/dependency-audit.md +1027 -0
- agents/research/performance-profiling.md +1047 -0
- agents/research/security-review.md +1359 -0
- agents/research/system_prompt.md +492 -0
- agents/technical-writer/__init__.py +0 -0
- agents/technical-writer/agent.json +4 -0
- agents/technical-writer/api-documentation.md +2328 -0
- agents/technical-writer/changelog-management.md +1181 -0
- agents/technical-writer/readme-writing.md +1360 -0
- agents/technical-writer/style-guide.md +1410 -0
- agents/technical-writer/system_prompt.md +653 -0
- agents/technical-writer/tutorial-creation.md +1448 -0
- core/__init__.py +0 -2
- core/application.py +343 -88
- core/cli.py +229 -10
- core/commands/menu_renderer.py +463 -59
- core/commands/registry.py +14 -9
- core/commands/system_commands.py +2461 -14
- core/config/loader.py +151 -37
- core/config/service.py +18 -6
- core/events/bus.py +29 -9
- core/events/executor.py +205 -75
- core/events/models.py +27 -8
- core/fullscreen/command_integration.py +20 -24
- core/fullscreen/components/__init__.py +10 -1
- core/fullscreen/components/matrix_components.py +1 -2
- core/fullscreen/components/space_shooter_components.py +654 -0
- core/fullscreen/plugin.py +5 -0
- core/fullscreen/renderer.py +52 -13
- core/fullscreen/session.py +52 -15
- core/io/__init__.py +29 -5
- core/io/buffer_manager.py +6 -1
- core/io/config_status_view.py +7 -29
- core/io/core_status_views.py +267 -347
- core/io/input/__init__.py +25 -0
- core/io/input/command_mode_handler.py +711 -0
- core/io/input/display_controller.py +128 -0
- core/io/input/hook_registrar.py +286 -0
- core/io/input/input_loop_manager.py +421 -0
- core/io/input/key_press_handler.py +502 -0
- core/io/input/modal_controller.py +1011 -0
- core/io/input/paste_processor.py +339 -0
- core/io/input/status_modal_renderer.py +184 -0
- core/io/input_errors.py +5 -1
- core/io/input_handler.py +211 -2452
- core/io/key_parser.py +7 -0
- core/io/layout.py +15 -3
- core/io/message_coordinator.py +111 -2
- core/io/message_renderer.py +129 -4
- core/io/status_renderer.py +147 -607
- core/io/terminal_renderer.py +97 -51
- core/io/terminal_state.py +21 -4
- core/io/visual_effects.py +816 -165
- core/llm/agent_manager.py +1063 -0
- core/llm/api_adapters/__init__.py +44 -0
- core/llm/api_adapters/anthropic_adapter.py +432 -0
- core/llm/api_adapters/base.py +241 -0
- core/llm/api_adapters/openai_adapter.py +326 -0
- core/llm/api_communication_service.py +167 -113
- core/llm/conversation_logger.py +322 -16
- core/llm/conversation_manager.py +556 -30
- core/llm/file_operations_executor.py +84 -32
- core/llm/llm_service.py +934 -103
- core/llm/mcp_integration.py +541 -57
- core/llm/message_display_service.py +135 -18
- core/llm/plugin_sdk.py +1 -2
- core/llm/profile_manager.py +1183 -0
- core/llm/response_parser.py +274 -56
- core/llm/response_processor.py +16 -3
- core/llm/tool_executor.py +6 -1
- core/logging/__init__.py +2 -0
- core/logging/setup.py +34 -6
- core/models/resume.py +54 -0
- core/plugins/__init__.py +4 -2
- core/plugins/base.py +127 -0
- core/plugins/collector.py +23 -161
- core/plugins/discovery.py +37 -3
- core/plugins/factory.py +6 -12
- core/plugins/registry.py +5 -17
- core/ui/config_widgets.py +128 -28
- core/ui/live_modal_renderer.py +2 -1
- core/ui/modal_actions.py +5 -0
- core/ui/modal_overlay_renderer.py +0 -60
- core/ui/modal_renderer.py +268 -7
- core/ui/modal_state_manager.py +29 -4
- core/ui/widgets/base_widget.py +7 -0
- core/updates/__init__.py +10 -0
- core/updates/version_check_service.py +348 -0
- core/updates/version_comparator.py +103 -0
- core/utils/config_utils.py +685 -526
- core/utils/plugin_utils.py +1 -1
- core/utils/session_naming.py +111 -0
- fonts/LICENSE +21 -0
- fonts/README.md +46 -0
- fonts/SymbolsNerdFont-Regular.ttf +0 -0
- fonts/SymbolsNerdFontMono-Regular.ttf +0 -0
- fonts/__init__.py +44 -0
- {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/METADATA +54 -4
- kollabor-0.4.15.dist-info/RECORD +228 -0
- {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/top_level.txt +2 -0
- plugins/agent_orchestrator/__init__.py +39 -0
- plugins/agent_orchestrator/activity_monitor.py +181 -0
- plugins/agent_orchestrator/file_attacher.py +77 -0
- plugins/agent_orchestrator/message_injector.py +135 -0
- plugins/agent_orchestrator/models.py +48 -0
- plugins/agent_orchestrator/orchestrator.py +403 -0
- plugins/agent_orchestrator/plugin.py +976 -0
- plugins/agent_orchestrator/xml_parser.py +191 -0
- plugins/agent_orchestrator_plugin.py +9 -0
- plugins/enhanced_input/box_styles.py +1 -0
- plugins/enhanced_input/color_engine.py +19 -4
- plugins/enhanced_input/config.py +2 -2
- plugins/enhanced_input_plugin.py +61 -11
- plugins/fullscreen/__init__.py +6 -2
- plugins/fullscreen/example_plugin.py +1035 -222
- plugins/fullscreen/setup_wizard_plugin.py +592 -0
- plugins/fullscreen/space_shooter_plugin.py +131 -0
- plugins/hook_monitoring_plugin.py +436 -78
- plugins/query_enhancer_plugin.py +66 -30
- plugins/resume_conversation_plugin.py +1494 -0
- plugins/save_conversation_plugin.py +98 -32
- plugins/system_commands_plugin.py +70 -56
- plugins/tmux_plugin.py +154 -78
- plugins/workflow_enforcement_plugin.py +94 -92
- system_prompt/default.md +952 -886
- core/io/input_mode_manager.py +0 -402
- core/io/modal_interaction_handler.py +0 -315
- core/io/raw_input_processor.py +0 -946
- core/storage/__init__.py +0 -5
- core/storage/state_manager.py +0 -84
- core/ui/widget_integration.py +0 -222
- core/utils/key_reader.py +0 -171
- kollabor-0.4.9.dist-info/RECORD +0 -128
- {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/WHEEL +0 -0
- {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/entry_points.txt +0 -0
- {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/licenses/LICENSE +0 -0
|
@@ -13,6 +13,7 @@ from enum import Enum
|
|
|
13
13
|
from typing import Dict, List, Optional, Any
|
|
14
14
|
|
|
15
15
|
from core.events.models import EventType, HookPriority
|
|
16
|
+
from core.io.visual_effects import AgnosterSegment
|
|
16
17
|
|
|
17
18
|
logger = logging.getLogger(__name__)
|
|
18
19
|
|
|
@@ -57,23 +58,32 @@ class WorkflowContext:
|
|
|
57
58
|
|
|
58
59
|
class WorkflowEnforcementPlugin:
|
|
59
60
|
"""Plugin that enforces todo completion with tool calling verification."""
|
|
60
|
-
|
|
61
|
-
def __init__(self,
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
|
|
62
|
+
def __init__(self, name: str = "workflow_enforcement",
|
|
63
|
+
event_bus=None, renderer=None, config=None):
|
|
64
|
+
"""Initialize workflow enforcement plugin.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
name: Plugin name.
|
|
68
|
+
event_bus: Event bus for hook registration.
|
|
69
|
+
renderer: Terminal renderer.
|
|
70
|
+
config: Configuration manager.
|
|
71
|
+
"""
|
|
72
|
+
self.name = name
|
|
64
73
|
self.event_bus = event_bus
|
|
65
74
|
self.renderer = renderer
|
|
66
|
-
self.config = config
|
|
75
|
+
self.config = config or {}
|
|
67
76
|
|
|
68
77
|
# Workflow state
|
|
69
78
|
self.workflow_context = WorkflowContext()
|
|
70
79
|
|
|
71
|
-
# Configuration
|
|
72
|
-
self.
|
|
73
|
-
self.
|
|
74
|
-
self.
|
|
75
|
-
self.
|
|
76
|
-
|
|
80
|
+
# Configuration - use self.config with safe get
|
|
81
|
+
cfg = self.config if hasattr(self.config, 'get') else {}
|
|
82
|
+
self.enabled = cfg.get("workflow_enforcement.enabled", True) if cfg else True
|
|
83
|
+
self.require_tool_calls = cfg.get("workflow_enforcement.require_tool_calls", True) if cfg else True
|
|
84
|
+
self.confirmation_timeout = cfg.get("workflow_enforcement.confirmation_timeout", 300) if cfg else 300
|
|
85
|
+
self.bypass_keywords = cfg.get("workflow_enforcement.bypass_keywords",
|
|
86
|
+
["bypass", "skip", "blocked", "issue", "problem"]) if cfg else ["bypass", "skip", "blocked", "issue", "problem"]
|
|
77
87
|
|
|
78
88
|
logger.info("Workflow Enforcement Plugin initialized")
|
|
79
89
|
|
|
@@ -106,9 +116,80 @@ class WorkflowEnforcementPlugin:
|
|
|
106
116
|
|
|
107
117
|
async def initialize(self):
|
|
108
118
|
"""Initialize the plugin."""
|
|
109
|
-
#
|
|
110
|
-
await self.
|
|
119
|
+
# Register status view
|
|
120
|
+
await self._register_status_view()
|
|
121
|
+
|
|
111
122
|
logger.info("Workflow enforcement plugin initialized")
|
|
123
|
+
|
|
124
|
+
async def _register_status_view(self) -> None:
|
|
125
|
+
"""Register workflow enforcement status view."""
|
|
126
|
+
try:
|
|
127
|
+
if (self.renderer and
|
|
128
|
+
hasattr(self.renderer, 'status_renderer') and
|
|
129
|
+
self.renderer.status_renderer and
|
|
130
|
+
hasattr(self.renderer.status_renderer, 'status_registry') and
|
|
131
|
+
self.renderer.status_renderer.status_registry):
|
|
132
|
+
|
|
133
|
+
from core.io.status_renderer import StatusViewConfig, BlockConfig
|
|
134
|
+
|
|
135
|
+
view = StatusViewConfig(
|
|
136
|
+
name="Workflow Enforcement",
|
|
137
|
+
plugin_source="workflow_enforcement",
|
|
138
|
+
priority=450,
|
|
139
|
+
blocks=[BlockConfig(
|
|
140
|
+
width_fraction=1.0,
|
|
141
|
+
content_provider=self._get_status_content,
|
|
142
|
+
title="Workflow",
|
|
143
|
+
priority=100
|
|
144
|
+
)],
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
registry = self.renderer.status_renderer.status_registry
|
|
148
|
+
registry.register_status_view("workflow_enforcement", view)
|
|
149
|
+
logger.info("Registered 'Workflow Enforcement' status view")
|
|
150
|
+
|
|
151
|
+
except Exception as e:
|
|
152
|
+
logger.error(f"Failed to register status view: {e}")
|
|
153
|
+
|
|
154
|
+
def _get_status_content(self) -> List[str]:
|
|
155
|
+
"""Get workflow enforcement status (agnoster style)."""
|
|
156
|
+
try:
|
|
157
|
+
# Only show if workflow is active
|
|
158
|
+
if self.workflow_context.state == WorkflowState.INACTIVE:
|
|
159
|
+
return []
|
|
160
|
+
|
|
161
|
+
seg = AgnosterSegment()
|
|
162
|
+
|
|
163
|
+
if self.workflow_context.state == WorkflowState.ENFORCING:
|
|
164
|
+
current_todo = self._get_current_todo()
|
|
165
|
+
if current_todo:
|
|
166
|
+
progress = f"{current_todo.index + 1}/{len(self.workflow_context.todo_items)}"
|
|
167
|
+
seg.add_lime("Workflow", "dark")
|
|
168
|
+
seg.add_cyan(f"Todo {progress}", "dark")
|
|
169
|
+
seg.add_neutral(current_todo.text[:30] + "..." if len(current_todo.text) > 30 else current_todo.text, "mid")
|
|
170
|
+
else:
|
|
171
|
+
seg.add_lime("Workflow", "dark")
|
|
172
|
+
seg.add_cyan("Enforcing", "dark")
|
|
173
|
+
elif self.workflow_context.state == WorkflowState.WAITING_CONFIRMATION:
|
|
174
|
+
seg.add_lime("Workflow", "dark")
|
|
175
|
+
seg.add_cyan("Awaiting Confirm", "dark")
|
|
176
|
+
elif self.workflow_context.state == WorkflowState.BLOCKED:
|
|
177
|
+
seg.add_lime("Workflow", "dark")
|
|
178
|
+
seg.add_neutral("Blocked", "mid")
|
|
179
|
+
elif self.workflow_context.state == WorkflowState.TODO_DETECTED:
|
|
180
|
+
seg.add_lime("Workflow", "dark")
|
|
181
|
+
seg.add_cyan(f"{len(self.workflow_context.todo_items)} todos detected")
|
|
182
|
+
else:
|
|
183
|
+
seg.add_lime("Workflow", "dark")
|
|
184
|
+
seg.add_cyan(self.workflow_context.state.value.title(), "dark")
|
|
185
|
+
|
|
186
|
+
return [seg.render()]
|
|
187
|
+
|
|
188
|
+
except Exception as e:
|
|
189
|
+
logger.error(f"Error getting status content: {e}")
|
|
190
|
+
seg = AgnosterSegment()
|
|
191
|
+
seg.add_neutral("Workflow: Error", "dark")
|
|
192
|
+
return [seg.render()]
|
|
112
193
|
|
|
113
194
|
async def register_hooks(self):
|
|
114
195
|
"""Register hooks for workflow enforcement."""
|
|
@@ -503,85 +584,6 @@ Would you like to retry this todo or skip it?
|
|
|
503
584
|
"summary": "\n".join(summary_lines)
|
|
504
585
|
}
|
|
505
586
|
|
|
506
|
-
async def _save_workflow_state(self):
|
|
507
|
-
"""Save workflow state to persistent storage."""
|
|
508
|
-
try:
|
|
509
|
-
await self.state_manager.set_state("workflow_enforcement", {
|
|
510
|
-
"workflow_context": {
|
|
511
|
-
"original_request": self.workflow_context.original_request,
|
|
512
|
-
"current_todo_index": self.workflow_context.current_todo_index,
|
|
513
|
-
"state": self.workflow_context.state.value,
|
|
514
|
-
"bypass_requested": self.workflow_context.bypass_requested,
|
|
515
|
-
"bypass_reason": self.workflow_context.bypass_reason,
|
|
516
|
-
"todo_items": [
|
|
517
|
-
{
|
|
518
|
-
"index": todo.index,
|
|
519
|
-
"text": todo.text,
|
|
520
|
-
"terminal_command": todo.terminal_command,
|
|
521
|
-
"completed": todo.completed,
|
|
522
|
-
"confirmed": todo.confirmed,
|
|
523
|
-
"attempted": todo.attempted,
|
|
524
|
-
"failure_reason": todo.failure_reason
|
|
525
|
-
}
|
|
526
|
-
for todo in self.workflow_context.todo_items
|
|
527
|
-
]
|
|
528
|
-
}
|
|
529
|
-
})
|
|
530
|
-
except Exception as e:
|
|
531
|
-
logger.warning(f"Failed to save workflow state: {e}")
|
|
532
|
-
|
|
533
|
-
async def _load_workflow_state(self):
|
|
534
|
-
"""Load workflow state from persistent storage."""
|
|
535
|
-
try:
|
|
536
|
-
state_data = await self.state_manager.get_state("workflow_enforcement")
|
|
537
|
-
if state_data and "workflow_context" in state_data:
|
|
538
|
-
context_data = state_data["workflow_context"]
|
|
539
|
-
|
|
540
|
-
# Reconstruct workflow context
|
|
541
|
-
self.workflow_context.original_request = context_data.get("original_request", "")
|
|
542
|
-
self.workflow_context.current_todo_index = context_data.get("current_todo_index", 0)
|
|
543
|
-
self.workflow_context.state = WorkflowState(context_data.get("state", WorkflowState.INACTIVE.value))
|
|
544
|
-
self.workflow_context.bypass_requested = context_data.get("bypass_requested", False)
|
|
545
|
-
self.workflow_context.bypass_reason = context_data.get("bypass_reason", "")
|
|
546
|
-
|
|
547
|
-
# Reconstruct todo items
|
|
548
|
-
todo_items_data = context_data.get("todo_items", [])
|
|
549
|
-
self.workflow_context.todo_items = [
|
|
550
|
-
TodoItem(
|
|
551
|
-
index=item["index"],
|
|
552
|
-
text=item["text"],
|
|
553
|
-
terminal_command=item.get("terminal_command"),
|
|
554
|
-
completed=item.get("completed", False),
|
|
555
|
-
confirmed=item.get("confirmed", False),
|
|
556
|
-
attempted=item.get("attempted", False),
|
|
557
|
-
failure_reason=item.get("failure_reason")
|
|
558
|
-
)
|
|
559
|
-
for item in todo_items_data
|
|
560
|
-
]
|
|
561
|
-
|
|
562
|
-
if self.workflow_context.state != WorkflowState.INACTIVE:
|
|
563
|
-
logger.info(f"Restored workflow state: {self.workflow_context.state.value}")
|
|
564
|
-
except Exception as e:
|
|
565
|
-
logger.warning(f"Failed to load workflow state: {e}")
|
|
566
|
-
|
|
567
|
-
def get_status_line(self) -> Dict[str, List[str]]:
|
|
568
|
-
"""Return status information for display."""
|
|
569
|
-
if self.workflow_context.state == WorkflowState.INACTIVE:
|
|
570
|
-
return {"A": [], "B": [], "C": []}
|
|
571
|
-
|
|
572
|
-
status_text = f"Workflow: {self.workflow_context.state.value.title()}"
|
|
573
|
-
|
|
574
|
-
if self.workflow_context.state == WorkflowState.ENFORCING:
|
|
575
|
-
current_todo = self._get_current_todo()
|
|
576
|
-
if current_todo:
|
|
577
|
-
progress = f"{current_todo.index + 1}/{len(self.workflow_context.todo_items)}"
|
|
578
|
-
status_text = f"Workflow: Todo {progress}"
|
|
579
|
-
|
|
580
|
-
return {
|
|
581
|
-
"A": [],
|
|
582
|
-
"B": [status_text],
|
|
583
|
-
"C": []
|
|
584
|
-
}
|
|
585
587
|
|
|
586
588
|
async def _handle_workflow_response(self, event_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
587
589
|
"""Handle LLM responses during active workflow enforcement."""
|