claude-mpm 4.15.2__py3-none-any.whl → 4.20.3__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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_ENGINEER.md +286 -0
- claude_mpm/agents/BASE_PM.md +255 -23
- claude_mpm/agents/PM_INSTRUCTIONS.md +40 -0
- claude_mpm/agents/agent_loader.py +4 -4
- claude_mpm/agents/templates/agentic-coder-optimizer.json +9 -2
- claude_mpm/agents/templates/api_qa.json +7 -1
- claude_mpm/agents/templates/clerk-ops.json +8 -1
- claude_mpm/agents/templates/code_analyzer.json +4 -1
- claude_mpm/agents/templates/dart_engineer.json +11 -1
- claude_mpm/agents/templates/data_engineer.json +11 -1
- claude_mpm/agents/templates/documentation.json +6 -1
- claude_mpm/agents/templates/engineer.json +18 -1
- claude_mpm/agents/templates/gcp_ops_agent.json +8 -1
- claude_mpm/agents/templates/golang_engineer.json +11 -1
- claude_mpm/agents/templates/java_engineer.json +12 -2
- claude_mpm/agents/templates/local_ops_agent.json +216 -37
- claude_mpm/agents/templates/nextjs_engineer.json +11 -1
- claude_mpm/agents/templates/ops.json +8 -1
- claude_mpm/agents/templates/php-engineer.json +11 -1
- claude_mpm/agents/templates/project_organizer.json +9 -2
- claude_mpm/agents/templates/prompt-engineer.json +5 -1
- claude_mpm/agents/templates/python_engineer.json +19 -4
- claude_mpm/agents/templates/qa.json +7 -1
- claude_mpm/agents/templates/react_engineer.json +11 -1
- claude_mpm/agents/templates/refactoring_engineer.json +8 -1
- claude_mpm/agents/templates/research.json +4 -1
- claude_mpm/agents/templates/ruby-engineer.json +11 -1
- claude_mpm/agents/templates/rust_engineer.json +23 -8
- claude_mpm/agents/templates/security.json +6 -1
- claude_mpm/agents/templates/svelte-engineer.json +225 -0
- claude_mpm/agents/templates/ticketing.json +6 -1
- claude_mpm/agents/templates/typescript_engineer.json +11 -1
- claude_mpm/agents/templates/vercel_ops_agent.json +8 -1
- claude_mpm/agents/templates/version_control.json +8 -1
- claude_mpm/agents/templates/web_qa.json +7 -1
- claude_mpm/agents/templates/web_ui.json +11 -1
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/configure.py +164 -16
- claude_mpm/cli/commands/configure_agent_display.py +6 -6
- claude_mpm/cli/commands/configure_behavior_manager.py +8 -8
- claude_mpm/cli/commands/configure_navigation.py +20 -18
- claude_mpm/cli/commands/configure_startup_manager.py +14 -14
- claude_mpm/cli/commands/configure_template_editor.py +8 -8
- claude_mpm/cli/commands/mpm_init.py +109 -24
- claude_mpm/cli/commands/skills.py +434 -0
- claude_mpm/cli/executor.py +2 -0
- claude_mpm/cli/interactive/__init__.py +3 -0
- claude_mpm/cli/interactive/skills_wizard.py +491 -0
- claude_mpm/cli/parsers/base_parser.py +7 -0
- claude_mpm/cli/parsers/skills_parser.py +137 -0
- claude_mpm/cli/startup.py +83 -0
- claude_mpm/commands/mpm-auto-configure.md +52 -0
- claude_mpm/commands/mpm-help.md +3 -0
- claude_mpm/commands/mpm-init.md +112 -6
- claude_mpm/commands/mpm-version.md +113 -0
- claude_mpm/commands/mpm.md +1 -0
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/constants.py +12 -0
- claude_mpm/core/config.py +42 -0
- claude_mpm/core/enums.py +18 -0
- claude_mpm/core/factories.py +1 -1
- claude_mpm/core/optimized_agent_loader.py +3 -3
- claude_mpm/core/types.py +2 -9
- claude_mpm/dashboard/static/js/dashboard.js +0 -14
- claude_mpm/dashboard/templates/index.html +3 -41
- claude_mpm/hooks/__init__.py +8 -0
- claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/models/resume_log.py +340 -0
- claude_mpm/services/agents/auto_config_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
- claude_mpm/services/agents/deployment/agent_validator.py +17 -1
- claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
- claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
- claude_mpm/services/agents/deployment/validation/__init__.py +3 -1
- claude_mpm/services/agents/deployment/validation/validation_result.py +1 -9
- claude_mpm/services/agents/local_template_manager.py +1 -1
- claude_mpm/services/agents/recommender.py +47 -0
- claude_mpm/services/cli/resume_service.py +617 -0
- claude_mpm/services/cli/session_manager.py +87 -0
- claude_mpm/services/cli/session_resume_helper.py +352 -0
- claude_mpm/services/core/models/health.py +1 -28
- claude_mpm/services/core/path_resolver.py +1 -1
- claude_mpm/services/infrastructure/monitoring/__init__.py +1 -1
- claude_mpm/services/infrastructure/monitoring/aggregator.py +12 -12
- claude_mpm/services/infrastructure/monitoring/base.py +5 -13
- claude_mpm/services/infrastructure/monitoring/network.py +7 -6
- claude_mpm/services/infrastructure/monitoring/process.py +13 -12
- claude_mpm/services/infrastructure/monitoring/resources.py +7 -6
- claude_mpm/services/infrastructure/monitoring/service.py +16 -15
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/local_ops/__init__.py +1 -1
- claude_mpm/services/local_ops/crash_detector.py +1 -1
- claude_mpm/services/local_ops/health_checks/http_check.py +2 -1
- claude_mpm/services/local_ops/health_checks/process_check.py +2 -1
- claude_mpm/services/local_ops/health_checks/resource_check.py +2 -1
- claude_mpm/services/local_ops/health_manager.py +1 -1
- claude_mpm/services/local_ops/restart_manager.py +1 -1
- claude_mpm/services/mcp_config_manager.py +7 -131
- claude_mpm/services/session_manager.py +205 -1
- claude_mpm/services/shared/async_service_base.py +16 -27
- claude_mpm/services/shared/lifecycle_service_base.py +1 -14
- claude_mpm/services/socketio/handlers/__init__.py +5 -2
- claude_mpm/services/socketio/handlers/hook.py +10 -0
- claude_mpm/services/socketio/handlers/registry.py +4 -2
- claude_mpm/services/socketio/server/main.py +7 -7
- claude_mpm/services/unified/deployment_strategies/local.py +1 -1
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/skills/__init__.py +42 -0
- claude_mpm/skills/agent_skills_injector.py +331 -0
- claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
- claude_mpm/skills/bundled/__init__.py +6 -0
- claude_mpm/skills/bundled/api-documentation.md +393 -0
- claude_mpm/skills/bundled/async-testing.md +571 -0
- claude_mpm/skills/bundled/code-review.md +143 -0
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +75 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +184 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +107 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/code-reviewer.md +146 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +118 -0
- claude_mpm/skills/bundled/database-migration.md +199 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +177 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +175 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/common-failures.md +213 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +314 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +227 -0
- claude_mpm/skills/bundled/docker-containerization.md +194 -0
- claude_mpm/skills/bundled/express-local-dev.md +1429 -0
- claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
- claude_mpm/skills/bundled/git-workflow.md +414 -0
- claude_mpm/skills/bundled/imagemagick.md +204 -0
- claude_mpm/skills/bundled/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +74 -0
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +32 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +328 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +150 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +372 -0
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +209 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +302 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +111 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +65 -0
- claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
- claude_mpm/skills/bundled/pdf.md +141 -0
- claude_mpm/skills/bundled/performance-profiling.md +567 -0
- claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
- claude_mpm/skills/bundled/security-scanning.md +327 -0
- claude_mpm/skills/bundled/systematic-debugging.md +473 -0
- claude_mpm/skills/bundled/test-driven-development.md +378 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +123 -0
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +304 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +96 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +40 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +107 -0
- claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
- claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
- claude_mpm/skills/bundled/xlsx.md +157 -0
- claude_mpm/skills/registry.py +286 -0
- claude_mpm/skills/skill_manager.py +310 -0
- claude_mpm/skills/skills_registry.py +351 -0
- claude_mpm/skills/skills_service.py +730 -0
- claude_mpm/utils/agent_dependency_loader.py +2 -2
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/METADATA +211 -33
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/RECORD +195 -115
- claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
- claude_mpm/dashboard/static/css/code-tree.css +0 -1639
- claude_mpm/dashboard/static/js/components/code-tree/tree-breadcrumb.js +0 -353
- claude_mpm/dashboard/static/js/components/code-tree/tree-constants.js +0 -235
- claude_mpm/dashboard/static/js/components/code-tree/tree-search.js +0 -409
- claude_mpm/dashboard/static/js/components/code-tree/tree-utils.js +0 -435
- claude_mpm/dashboard/static/js/components/code-tree.js +0 -5869
- claude_mpm/dashboard/static/js/components/code-viewer.js +0 -1386
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/top_level.txt +0 -0
|
@@ -69,33 +69,33 @@ class BehaviorManager:
|
|
|
69
69
|
self.console.print("\n[bold]Options:[/bold]")
|
|
70
70
|
|
|
71
71
|
text_1 = Text(" ")
|
|
72
|
-
text_1.append("[1]", style="
|
|
72
|
+
text_1.append("[1]", style="bold blue")
|
|
73
73
|
text_1.append(" Edit identity configuration")
|
|
74
74
|
self.console.print(text_1)
|
|
75
75
|
|
|
76
76
|
text_2 = Text(" ")
|
|
77
|
-
text_2.append("[2]", style="
|
|
77
|
+
text_2.append("[2]", style="bold blue")
|
|
78
78
|
text_2.append(" Edit workflow configuration")
|
|
79
79
|
self.console.print(text_2)
|
|
80
80
|
|
|
81
81
|
text_3 = Text(" ")
|
|
82
|
-
text_3.append("[3]", style="
|
|
82
|
+
text_3.append("[3]", style="bold blue")
|
|
83
83
|
text_3.append(" Import behavior file")
|
|
84
84
|
self.console.print(text_3)
|
|
85
85
|
|
|
86
86
|
text_4 = Text(" ")
|
|
87
|
-
text_4.append("[4]", style="
|
|
87
|
+
text_4.append("[4]", style="bold blue")
|
|
88
88
|
text_4.append(" Export behavior file")
|
|
89
89
|
self.console.print(text_4)
|
|
90
90
|
|
|
91
91
|
text_b = Text(" ")
|
|
92
|
-
text_b.append("[b]", style="
|
|
92
|
+
text_b.append("[b]", style="bold blue")
|
|
93
93
|
text_b.append(" Back to main menu")
|
|
94
94
|
self.console.print(text_b)
|
|
95
95
|
|
|
96
96
|
self.console.print()
|
|
97
97
|
|
|
98
|
-
choice = Prompt.ask("[bold
|
|
98
|
+
choice = Prompt.ask("[bold blue]Select an option[/bold blue]", default="b")
|
|
99
99
|
|
|
100
100
|
if choice == "b":
|
|
101
101
|
break
|
|
@@ -117,9 +117,9 @@ class BehaviorManager:
|
|
|
117
117
|
Extracted from ConfigureCommand._display_behavior_files()
|
|
118
118
|
"""
|
|
119
119
|
table = Table(title="Behavior Files", box=ROUNDED)
|
|
120
|
-
table.add_column("File", style="
|
|
120
|
+
table.add_column("File", style="bold blue", width=30)
|
|
121
121
|
table.add_column("Size", style="dim", width=10)
|
|
122
|
-
table.add_column("Modified", style="
|
|
122
|
+
table.add_column("Modified", style="", width=20)
|
|
123
123
|
|
|
124
124
|
identity_file = self.behaviors_dir / "identity.yaml"
|
|
125
125
|
workflow_file = self.behaviors_dir / "workflow.yaml"
|
|
@@ -59,11 +59,11 @@ class ConfigNavigation:
|
|
|
59
59
|
|
|
60
60
|
# Create header panel
|
|
61
61
|
header_text = Text()
|
|
62
|
-
header_text.append("Claude MPM ", style="bold
|
|
63
|
-
header_text.append("Configuration Interface", style="bold
|
|
64
|
-
header_text.append(f"\nv{__version__}", style="dim
|
|
62
|
+
header_text.append("Claude MPM ", style="bold blue")
|
|
63
|
+
header_text.append("Configuration Interface", style="bold")
|
|
64
|
+
header_text.append(f"\nv{__version__}", style="dim blue")
|
|
65
65
|
|
|
66
|
-
scope_text = Text(f"Scope: {self.current_scope.upper()}", style="
|
|
66
|
+
scope_text = Text(f"Scope: {self.current_scope.upper()}", style="bold blue")
|
|
67
67
|
dir_text = Text(f"Directory: {self.project_dir}", style="dim")
|
|
68
68
|
|
|
69
69
|
header_content = Columns([header_text], align="center")
|
|
@@ -85,11 +85,12 @@ class ConfigNavigation:
|
|
|
85
85
|
|
|
86
86
|
Displays main configuration menu with options:
|
|
87
87
|
1. Agent Management
|
|
88
|
-
2.
|
|
89
|
-
3.
|
|
90
|
-
4.
|
|
91
|
-
5.
|
|
92
|
-
6.
|
|
88
|
+
2. Skills Management
|
|
89
|
+
3. Template Editing
|
|
90
|
+
4. Behavior Files
|
|
91
|
+
5. Startup Configuration
|
|
92
|
+
6. Switch Scope
|
|
93
|
+
7. Version Info
|
|
93
94
|
l. Save & Launch
|
|
94
95
|
q. Quit
|
|
95
96
|
|
|
@@ -98,23 +99,24 @@ class ConfigNavigation:
|
|
|
98
99
|
"""
|
|
99
100
|
menu_items = [
|
|
100
101
|
("1", "Agent Management", "Enable/disable agents and customize settings"),
|
|
101
|
-
("2", "
|
|
102
|
-
("3", "
|
|
102
|
+
("2", "Skills Management", "Configure skills for agents"),
|
|
103
|
+
("3", "Template Editing", "Edit agent JSON templates"),
|
|
104
|
+
("4", "Behavior Files", "Manage identity and workflow configurations"),
|
|
103
105
|
(
|
|
104
|
-
"
|
|
106
|
+
"5",
|
|
105
107
|
"Startup Configuration",
|
|
106
108
|
"Configure MCP services and agents to start",
|
|
107
109
|
),
|
|
108
|
-
("
|
|
109
|
-
("
|
|
110
|
+
("6", "Switch Scope", f"Current: {self.current_scope}"),
|
|
111
|
+
("7", "Version Info", "Display MPM and Claude versions"),
|
|
110
112
|
("l", "Save & Launch", "Save all changes and start Claude MPM"),
|
|
111
113
|
("q", "Quit", "Exit without launching"),
|
|
112
114
|
]
|
|
113
115
|
|
|
114
116
|
table = Table(show_header=False, box=None, padding=(0, 2))
|
|
115
|
-
table.add_column("Key", style="
|
|
116
|
-
table.add_column("Option", style="bold
|
|
117
|
-
table.add_column("Description", style="
|
|
117
|
+
table.add_column("Key", style="bold blue", width=4) # Bolder shortcuts
|
|
118
|
+
table.add_column("Option", style="bold", width=24) # Wider for titles
|
|
119
|
+
table.add_column("Description", style="") # Use default terminal color
|
|
118
120
|
|
|
119
121
|
for key, option, desc in menu_items:
|
|
120
122
|
table.add_row(f"\\[{key}]", option, desc)
|
|
@@ -126,7 +128,7 @@ class ConfigNavigation:
|
|
|
126
128
|
self.console.print(menu_panel)
|
|
127
129
|
self.console.print()
|
|
128
130
|
|
|
129
|
-
choice = Prompt.ask("[bold
|
|
131
|
+
choice = Prompt.ask("[bold blue]Select an option[/bold blue]", default="q")
|
|
130
132
|
# Strip whitespace to handle leading/trailing spaces
|
|
131
133
|
return choice.strip().lower()
|
|
132
134
|
|
|
@@ -178,8 +178,8 @@ class StartupManager:
|
|
|
178
178
|
title="Current Startup Configuration", box=ROUNDED, show_lines=True
|
|
179
179
|
)
|
|
180
180
|
|
|
181
|
-
table.add_column("Category", style="
|
|
182
|
-
table.add_column("Enabled Services", style="
|
|
181
|
+
table.add_column("Category", style="bold blue", width=20)
|
|
182
|
+
table.add_column("Enabled Services", style="", width=50)
|
|
183
183
|
table.add_column("Count", style="dim", width=10)
|
|
184
184
|
|
|
185
185
|
# MCP Services
|
|
@@ -236,9 +236,9 @@ class StartupManager:
|
|
|
236
236
|
# Display services with checkboxes
|
|
237
237
|
table = Table(box=ROUNDED, show_lines=True)
|
|
238
238
|
table.add_column("ID", style="dim", width=5)
|
|
239
|
-
table.add_column("Service", style="
|
|
239
|
+
table.add_column("Service", style="bold blue", width=25)
|
|
240
240
|
table.add_column("Status", width=15)
|
|
241
|
-
table.add_column("Description", style="
|
|
241
|
+
table.add_column("Description", style="", width=45)
|
|
242
242
|
|
|
243
243
|
service_descriptions = {
|
|
244
244
|
"kuzu-memory": "Graph-based memory system for agents",
|
|
@@ -261,17 +261,17 @@ class StartupManager:
|
|
|
261
261
|
self.console.print(" Enter service IDs to toggle (e.g., '1,3' or '1-4')")
|
|
262
262
|
|
|
263
263
|
text_a = Text(" ")
|
|
264
|
-
text_a.append("[a]", style="
|
|
264
|
+
text_a.append("[a]", style="bold blue")
|
|
265
265
|
text_a.append(" Enable all")
|
|
266
266
|
self.console.print(text_a)
|
|
267
267
|
|
|
268
268
|
text_n = Text(" ")
|
|
269
|
-
text_n.append("[n]", style="
|
|
269
|
+
text_n.append("[n]", style="bold blue")
|
|
270
270
|
text_n.append(" Disable all")
|
|
271
271
|
self.console.print(text_n)
|
|
272
272
|
|
|
273
273
|
text_b = Text(" ")
|
|
274
|
-
text_b.append("[b]", style="
|
|
274
|
+
text_b.append("[b]", style="bold blue")
|
|
275
275
|
text_b.append(" Back to previous menu")
|
|
276
276
|
self.console.print(text_b)
|
|
277
277
|
|
|
@@ -324,9 +324,9 @@ class StartupManager:
|
|
|
324
324
|
# Display services with checkboxes
|
|
325
325
|
table = Table(box=ROUNDED, show_lines=True)
|
|
326
326
|
table.add_column("ID", style="dim", width=5)
|
|
327
|
-
table.add_column("Service", style="
|
|
327
|
+
table.add_column("Service", style="bold blue", width=25)
|
|
328
328
|
table.add_column("Status", width=15)
|
|
329
|
-
table.add_column("Description", style="
|
|
329
|
+
table.add_column("Description", style="", width=45)
|
|
330
330
|
|
|
331
331
|
for idx, (service, description) in enumerate(available_services, 1):
|
|
332
332
|
status = (
|
|
@@ -341,17 +341,17 @@ class StartupManager:
|
|
|
341
341
|
self.console.print(" Enter service IDs to toggle (e.g., '1,3' or '1-4')")
|
|
342
342
|
|
|
343
343
|
text_a = Text(" ")
|
|
344
|
-
text_a.append("[a]", style="
|
|
344
|
+
text_a.append("[a]", style="bold blue")
|
|
345
345
|
text_a.append(" Enable all")
|
|
346
346
|
self.console.print(text_a)
|
|
347
347
|
|
|
348
348
|
text_n = Text(" ")
|
|
349
|
-
text_n.append("[n]", style="
|
|
349
|
+
text_n.append("[n]", style="bold blue")
|
|
350
350
|
text_n.append(" Disable all")
|
|
351
351
|
self.console.print(text_n)
|
|
352
352
|
|
|
353
353
|
text_b = Text(" ")
|
|
354
|
-
text_b.append("[b]", style="
|
|
354
|
+
text_b.append("[b]", style="bold blue")
|
|
355
355
|
text_b.append(" Back to previous menu")
|
|
356
356
|
self.console.print(text_b)
|
|
357
357
|
|
|
@@ -406,9 +406,9 @@ class StartupManager:
|
|
|
406
406
|
# Display agents with checkboxes
|
|
407
407
|
table = Table(box=ROUNDED, show_lines=True)
|
|
408
408
|
table.add_column("ID", style="dim", width=5)
|
|
409
|
-
table.add_column("Agent", style="
|
|
409
|
+
table.add_column("Agent", style="bold blue", width=25)
|
|
410
410
|
table.add_column("Status", width=15)
|
|
411
|
-
table.add_column("Description", style="bold
|
|
411
|
+
table.add_column("Description", style="bold", width=45)
|
|
412
412
|
|
|
413
413
|
for idx, agent in enumerate(agents, 1):
|
|
414
414
|
# Agent is ENABLED if NOT in disabled list
|
|
@@ -191,43 +191,43 @@ class TemplateEditor:
|
|
|
191
191
|
self.console.print("[bold]Editing Options:[/bold]")
|
|
192
192
|
if not is_system:
|
|
193
193
|
text_1 = Text(" ")
|
|
194
|
-
text_1.append("[1]", style="
|
|
194
|
+
text_1.append("[1]", style="bold blue")
|
|
195
195
|
text_1.append(" Edit in external editor")
|
|
196
196
|
self.console.print(text_1)
|
|
197
197
|
|
|
198
198
|
text_2 = Text(" ")
|
|
199
|
-
text_2.append("[2]", style="
|
|
199
|
+
text_2.append("[2]", style="bold blue")
|
|
200
200
|
text_2.append(" Add/modify a field")
|
|
201
201
|
self.console.print(text_2)
|
|
202
202
|
|
|
203
203
|
text_3 = Text(" ")
|
|
204
|
-
text_3.append("[3]", style="
|
|
204
|
+
text_3.append("[3]", style="bold blue")
|
|
205
205
|
text_3.append(" Remove a field")
|
|
206
206
|
self.console.print(text_3)
|
|
207
207
|
|
|
208
208
|
text_4 = Text(" ")
|
|
209
|
-
text_4.append("[4]", style="
|
|
209
|
+
text_4.append("[4]", style="bold blue")
|
|
210
210
|
text_4.append(" Reset to defaults")
|
|
211
211
|
self.console.print(text_4)
|
|
212
212
|
else:
|
|
213
213
|
text_1 = Text(" ")
|
|
214
|
-
text_1.append("[1]", style="
|
|
214
|
+
text_1.append("[1]", style="bold blue")
|
|
215
215
|
text_1.append(" Create customized copy")
|
|
216
216
|
self.console.print(text_1)
|
|
217
217
|
|
|
218
218
|
text_2 = Text(" ")
|
|
219
|
-
text_2.append("[2]", style="
|
|
219
|
+
text_2.append("[2]", style="bold blue")
|
|
220
220
|
text_2.append(" View full template")
|
|
221
221
|
self.console.print(text_2)
|
|
222
222
|
|
|
223
223
|
text_b = Text(" ")
|
|
224
|
-
text_b.append("[b]", style="
|
|
224
|
+
text_b.append("[b]", style="bold blue")
|
|
225
225
|
text_b.append(" Back")
|
|
226
226
|
self.console.print(text_b)
|
|
227
227
|
|
|
228
228
|
self.console.print()
|
|
229
229
|
|
|
230
|
-
choice = Prompt.ask("[bold
|
|
230
|
+
choice = Prompt.ask("[bold blue]Select an option[/bold blue]", default="b")
|
|
231
231
|
|
|
232
232
|
if is_system:
|
|
233
233
|
if choice == "1":
|
|
@@ -1952,19 +1952,24 @@ def context_command(session_id, days, project_path):
|
|
|
1952
1952
|
sys.exit(1)
|
|
1953
1953
|
|
|
1954
1954
|
|
|
1955
|
-
#
|
|
1956
|
-
@mpm_init.command(name="resume"
|
|
1955
|
+
# Resume command - NEW: reads from stop event logs
|
|
1956
|
+
@mpm_init.command(name="resume")
|
|
1957
|
+
@click.option(
|
|
1958
|
+
"--list",
|
|
1959
|
+
"list_sessions",
|
|
1960
|
+
is_flag=True,
|
|
1961
|
+
help="List available sessions from logs",
|
|
1962
|
+
)
|
|
1957
1963
|
@click.option(
|
|
1958
1964
|
"--session-id",
|
|
1959
|
-
"-
|
|
1965
|
+
"-s",
|
|
1960
1966
|
type=str,
|
|
1961
|
-
help="
|
|
1967
|
+
help="Resume specific session by ID",
|
|
1962
1968
|
)
|
|
1963
1969
|
@click.option(
|
|
1964
|
-
"--
|
|
1970
|
+
"--last",
|
|
1965
1971
|
type=int,
|
|
1966
|
-
|
|
1967
|
-
help="Number of days of git history to analyze (default: 7)",
|
|
1972
|
+
help="Show last N sessions",
|
|
1968
1973
|
)
|
|
1969
1974
|
@click.argument(
|
|
1970
1975
|
"project_path",
|
|
@@ -1972,35 +1977,115 @@ def context_command(session_id, days, project_path):
|
|
|
1972
1977
|
required=False,
|
|
1973
1978
|
default=".",
|
|
1974
1979
|
)
|
|
1975
|
-
def
|
|
1980
|
+
def resume_command(list_sessions, session_id, last, project_path):
|
|
1976
1981
|
"""
|
|
1977
|
-
|
|
1982
|
+
Resume work from previous session using stop event logs.
|
|
1983
|
+
|
|
1984
|
+
Reads from:
|
|
1985
|
+
- .claude-mpm/resume-logs/ (structured summaries, preferred)
|
|
1986
|
+
- .claude-mpm/responses/ (raw conversation logs, fallback)
|
|
1978
1987
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1988
|
+
Examples:
|
|
1989
|
+
claude-mpm mpm-init resume # Show latest session
|
|
1990
|
+
claude-mpm mpm-init resume --list # List all sessions
|
|
1991
|
+
claude-mpm mpm-init resume --session-id ID # Resume specific session
|
|
1992
|
+
claude-mpm mpm-init resume --last 5 # Show last 5 sessions
|
|
1981
1993
|
"""
|
|
1982
|
-
|
|
1983
|
-
"[yellow]⚠️ Warning: 'resume' is deprecated. Use 'context' instead.[/yellow]"
|
|
1984
|
-
)
|
|
1985
|
-
console.print("[dim]Run: claude-mpm mpm-init context[/dim]\n")
|
|
1994
|
+
from claude_mpm.services.cli.resume_service import ResumeService
|
|
1986
1995
|
|
|
1987
1996
|
try:
|
|
1988
|
-
|
|
1989
|
-
result = command.handle_context(session_id=session_id, days=days)
|
|
1997
|
+
service = ResumeService(Path(project_path))
|
|
1990
1998
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1999
|
+
# Handle --list flag
|
|
2000
|
+
if list_sessions:
|
|
2001
|
+
sessions = service.list_sessions()
|
|
2002
|
+
if not sessions:
|
|
2003
|
+
console.print("[yellow]No sessions found in response logs.[/yellow]")
|
|
2004
|
+
console.print(
|
|
2005
|
+
"[dim]Sessions are stored in .claude-mpm/responses/[/dim]\n"
|
|
2006
|
+
)
|
|
2007
|
+
sys.exit(1)
|
|
2008
|
+
|
|
2009
|
+
# Limit by --last if specified
|
|
2010
|
+
if last and last > 0:
|
|
2011
|
+
sessions = sessions[:last]
|
|
2012
|
+
|
|
2013
|
+
console.print(
|
|
2014
|
+
f"\n[bold cyan]📋 Available Sessions ({len(sessions)})[/bold cyan]\n"
|
|
2015
|
+
)
|
|
2016
|
+
|
|
2017
|
+
from rich.table import Table
|
|
2018
|
+
|
|
2019
|
+
table = Table(show_header=True, header_style="bold magenta")
|
|
2020
|
+
table.add_column("Session ID", style="cyan", width=25)
|
|
2021
|
+
table.add_column("Time", style="yellow", width=20)
|
|
2022
|
+
table.add_column("Agent", style="green", width=15)
|
|
2023
|
+
table.add_column("Stop Reason", style="white", width=20)
|
|
2024
|
+
table.add_column("Tokens", style="dim", width=10)
|
|
2025
|
+
|
|
2026
|
+
for session in sessions:
|
|
2027
|
+
time_str = session.timestamp.strftime("%Y-%m-%d %H:%M")
|
|
2028
|
+
tokens_str = (
|
|
2029
|
+
f"{session.token_usage // 1000}k"
|
|
2030
|
+
if session.token_usage > 0
|
|
2031
|
+
else "-"
|
|
2032
|
+
)
|
|
2033
|
+
|
|
2034
|
+
table.add_row(
|
|
2035
|
+
session.session_id,
|
|
2036
|
+
time_str,
|
|
2037
|
+
session.last_agent,
|
|
2038
|
+
session.stop_reason,
|
|
2039
|
+
tokens_str,
|
|
2040
|
+
)
|
|
2041
|
+
|
|
2042
|
+
console.print(table)
|
|
2043
|
+
console.print()
|
|
1995
2044
|
sys.exit(0)
|
|
2045
|
+
|
|
2046
|
+
# Handle --session-id
|
|
2047
|
+
if session_id:
|
|
2048
|
+
context = service.get_session_context(session_id)
|
|
2049
|
+
if not context:
|
|
2050
|
+
console.print(f"[red]Session '{session_id}' not found.[/red]")
|
|
2051
|
+
console.print("[dim]Use --list to see available sessions.[/dim]\n")
|
|
2052
|
+
sys.exit(1)
|
|
1996
2053
|
else:
|
|
1997
|
-
|
|
2054
|
+
# Default: get latest session
|
|
2055
|
+
context = service.get_latest_session()
|
|
2056
|
+
if not context:
|
|
2057
|
+
console.print("[yellow]No sessions found in logs.[/yellow]")
|
|
2058
|
+
console.print(
|
|
2059
|
+
"[dim]Sessions are stored in .claude-mpm/responses/[/dim]\n"
|
|
2060
|
+
)
|
|
2061
|
+
sys.exit(1)
|
|
2062
|
+
|
|
2063
|
+
# Display context
|
|
2064
|
+
display_text = service.format_resume_display(context)
|
|
2065
|
+
console.print(display_text)
|
|
2066
|
+
|
|
2067
|
+
# Ask if user wants to continue
|
|
2068
|
+
from rich.prompt import Confirm
|
|
2069
|
+
|
|
2070
|
+
should_continue = Confirm.ask(
|
|
2071
|
+
"\n[bold]Would you like to continue this work?[/bold]", default=True
|
|
2072
|
+
)
|
|
2073
|
+
|
|
2074
|
+
if should_continue:
|
|
2075
|
+
console.print(
|
|
2076
|
+
"\n[green]✅ Great! Use this context to continue your work.[/green]\n"
|
|
2077
|
+
)
|
|
2078
|
+
sys.exit(0)
|
|
2079
|
+
else:
|
|
2080
|
+
console.print("\n[cyan]Starting fresh session instead.[/cyan]\n")
|
|
2081
|
+
sys.exit(0)
|
|
1998
2082
|
|
|
1999
2083
|
except KeyboardInterrupt:
|
|
2000
|
-
console.print("\n[yellow]
|
|
2084
|
+
console.print("\n[yellow]Resume cancelled by user[/yellow]")
|
|
2001
2085
|
sys.exit(130)
|
|
2002
2086
|
except Exception as e:
|
|
2003
|
-
|
|
2087
|
+
logger.error(f"Resume failed: {e}")
|
|
2088
|
+
console.print(f"[red]Resume failed: {e}[/red]")
|
|
2004
2089
|
sys.exit(1)
|
|
2005
2090
|
|
|
2006
2091
|
|