code-muse 0.0.1__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.
- code_muse/__init__.py +26 -0
- code_muse/__main__.py +10 -0
- code_muse/agents/__init__.py +31 -0
- code_muse/agents/_builder.py +214 -0
- code_muse/agents/_compaction.py +506 -0
- code_muse/agents/_diagnostics.py +171 -0
- code_muse/agents/_history.py +382 -0
- code_muse/agents/_key_listeners.py +148 -0
- code_muse/agents/_non_streaming_render.py +148 -0
- code_muse/agents/_runtime.py +596 -0
- code_muse/agents/agent_creator_agent.py +603 -0
- code_muse/agents/agent_helios.py +47 -0
- code_muse/agents/agent_manager.py +740 -0
- code_muse/agents/agent_muse.py +78 -0
- code_muse/agents/agent_planning.py +44 -0
- code_muse/agents/agent_qa_melpomene.py +207 -0
- code_muse/agents/base_agent.py +194 -0
- code_muse/agents/event_stream_handler.py +361 -0
- code_muse/agents/json_agent.py +201 -0
- code_muse/agents/prompt_v3.py +521 -0
- code_muse/agents/subagent_stream_handler.py +273 -0
- code_muse/callbacks.py +941 -0
- code_muse/chatgpt_codex_client.py +333 -0
- code_muse/claude_cache_client.py +853 -0
- code_muse/cli_runner/__init__.py +319 -0
- code_muse/cli_runner/args.py +63 -0
- code_muse/cli_runner/loop.py +510 -0
- code_muse/cli_runner/resume.py +72 -0
- code_muse/cli_runner/runner.py +161 -0
- code_muse/command_line/__init__.py +1 -0
- code_muse/command_line/add_model_menu.py +1331 -0
- code_muse/command_line/agent_menu.py +674 -0
- code_muse/command_line/attachments.py +397 -0
- code_muse/command_line/autosave_menu.py +709 -0
- code_muse/command_line/clipboard.py +528 -0
- code_muse/command_line/colors_menu.py +530 -0
- code_muse/command_line/command_handler.py +262 -0
- code_muse/command_line/command_registry.py +150 -0
- code_muse/command_line/config_commands.py +711 -0
- code_muse/command_line/core_commands.py +740 -0
- code_muse/command_line/diff_menu.py +865 -0
- code_muse/command_line/file_path_completion.py +73 -0
- code_muse/command_line/load_context_completion.py +57 -0
- code_muse/command_line/model_picker_completion.py +512 -0
- code_muse/command_line/model_settings_menu.py +983 -0
- code_muse/command_line/onboarding_slides.py +162 -0
- code_muse/command_line/onboarding_wizard.py +337 -0
- code_muse/command_line/pagination.py +41 -0
- code_muse/command_line/pin_command_completion.py +329 -0
- code_muse/command_line/prompt_toolkit_completion.py +886 -0
- code_muse/command_line/session_commands.py +304 -0
- code_muse/command_line/shell_passthrough.py +145 -0
- code_muse/command_line/skills_completion.py +158 -0
- code_muse/command_line/types.py +18 -0
- code_muse/command_line/uc_menu.py +908 -0
- code_muse/command_line/utils.py +105 -0
- code_muse/command_line/wiggum_state.py +77 -0
- code_muse/config.py +1138 -0
- code_muse/config_agent.py +168 -0
- code_muse/config_appearance.py +241 -0
- code_muse/config_model.py +357 -0
- code_muse/config_security.py +73 -0
- code_muse/error_logging.py +132 -0
- code_muse/evals/__init__.py +35 -0
- code_muse/evals/eval_helpers.py +81 -0
- code_muse/evals/eval_runner.py +299 -0
- code_muse/evals/sample_evals/__init__.py +1 -0
- code_muse/evals/sample_evals/eval_frugal_reads.py +59 -0
- code_muse/evals/sample_evals/eval_memory_planning.py +31 -0
- code_muse/evals/sample_evals/eval_shell_efficiency.py +39 -0
- code_muse/evals/sample_evals/eval_tool_masking.py +33 -0
- code_muse/fs_scan_cache/__init__.py +31 -0
- code_muse/fs_scan_cache/invalidation_hooks.py +89 -0
- code_muse/fs_scan_cache/scan_cache_core.cpython-314-darwin.so +0 -0
- code_muse/fs_scan_cache/scan_cache_core.pyx +203 -0
- code_muse/fs_scan_cache/tool_integration.py +309 -0
- code_muse/fs_scan_cache/ttl_policy.py +44 -0
- code_muse/gemini_code_assist.py +383 -0
- code_muse/gemini_model.py +838 -0
- code_muse/hook_engine/README.md +105 -0
- code_muse/hook_engine/__init__.py +21 -0
- code_muse/hook_engine/aliases.py +153 -0
- code_muse/hook_engine/engine.py +221 -0
- code_muse/hook_engine/executor.py +347 -0
- code_muse/hook_engine/matcher.py +154 -0
- code_muse/hook_engine/models.py +245 -0
- code_muse/hook_engine/registry.py +114 -0
- code_muse/hook_engine/trust.py +268 -0
- code_muse/hook_engine/validator.py +144 -0
- code_muse/http_utils.py +360 -0
- code_muse/keymap.py +128 -0
- code_muse/list_filtering.py +26 -0
- code_muse/main.py +10 -0
- code_muse/messaging/__init__.py +259 -0
- code_muse/messaging/bus.py +621 -0
- code_muse/messaging/commands.py +166 -0
- code_muse/messaging/markdown_patches.py +57 -0
- code_muse/messaging/message_queue.py +397 -0
- code_muse/messaging/messages.py +591 -0
- code_muse/messaging/queue_console.py +269 -0
- code_muse/messaging/renderers.py +308 -0
- code_muse/messaging/rich_renderer.py +1158 -0
- code_muse/messaging/shimmer.py +154 -0
- code_muse/messaging/spinner/__init__.py +87 -0
- code_muse/messaging/spinner/console_spinner.py +250 -0
- code_muse/messaging/spinner/spinner_base.py +82 -0
- code_muse/messaging/subagent_console.py +458 -0
- code_muse/model_factory.py +1203 -0
- code_muse/model_switching.py +59 -0
- code_muse/model_utils.py +156 -0
- code_muse/models.json +66 -0
- code_muse/models_cache/__init__.py +26 -0
- code_muse/models_cache/blocking_lru_cache.py +98 -0
- code_muse/models_cache/cache_writer.py +86 -0
- code_muse/models_cache/sha256_hash.cpython-314-darwin.so +0 -0
- code_muse/models_cache/sha256_hash.pyx +34 -0
- code_muse/models_cache/startup_integration.py +75 -0
- code_muse/models_dev_api.json +1 -0
- code_muse/models_dev_parser.py +590 -0
- code_muse/motion.py +126 -0
- code_muse/plugins/__init__.py +471 -0
- code_muse/plugins/agent_skills/__init__.py +32 -0
- code_muse/plugins/agent_skills/config.py +176 -0
- code_muse/plugins/agent_skills/discovery.py +309 -0
- code_muse/plugins/agent_skills/downloader.py +389 -0
- code_muse/plugins/agent_skills/installer.py +19 -0
- code_muse/plugins/agent_skills/metadata.py +293 -0
- code_muse/plugins/agent_skills/prompt_builder.py +66 -0
- code_muse/plugins/agent_skills/register_callbacks.py +298 -0
- code_muse/plugins/agent_skills/remote_catalog.py +320 -0
- code_muse/plugins/agent_skills/skill_catalog.py +254 -0
- code_muse/plugins/agent_skills/skills_install_menu.py +690 -0
- code_muse/plugins/agent_skills/skills_menu.py +791 -0
- code_muse/plugins/autonomous_memory/__init__.py +39 -0
- code_muse/plugins/autonomous_memory/bm25_scorer.cpython-314-darwin.so +0 -0
- code_muse/plugins/autonomous_memory/bm25_scorer.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/autonomous_memory/bm25_scorer.pyx +291 -0
- code_muse/plugins/autonomous_memory/consolidation.py +82 -0
- code_muse/plugins/autonomous_memory/extraction.py +382 -0
- code_muse/plugins/autonomous_memory/lease_lock.py +105 -0
- code_muse/plugins/autonomous_memory/memory_injection.py +59 -0
- code_muse/plugins/autonomous_memory/register_callbacks.py +268 -0
- code_muse/plugins/autonomous_memory/secret_scanner.py +62 -0
- code_muse/plugins/autonomous_memory/session_scanner.py +163 -0
- code_muse/plugins/aws_bedrock/__init__.py +14 -0
- code_muse/plugins/aws_bedrock/config.py +99 -0
- code_muse/plugins/aws_bedrock/register_callbacks.py +241 -0
- code_muse/plugins/aws_bedrock/utils.py +153 -0
- code_muse/plugins/azure_foundry/README.md +238 -0
- code_muse/plugins/azure_foundry/__init__.py +15 -0
- code_muse/plugins/azure_foundry/config.py +125 -0
- code_muse/plugins/azure_foundry/discovery.py +187 -0
- code_muse/plugins/azure_foundry/register_callbacks.py +495 -0
- code_muse/plugins/azure_foundry/token.py +180 -0
- code_muse/plugins/azure_foundry/utils.py +345 -0
- code_muse/plugins/build_filter/__init__.py +1 -0
- code_muse/plugins/build_filter/register_callbacks.py +201 -0
- code_muse/plugins/build_filter/strategies/__init__.py +1 -0
- code_muse/plugins/build_filter/strategies/build.py +397 -0
- code_muse/plugins/chatgpt_oauth/__init__.py +6 -0
- code_muse/plugins/chatgpt_oauth/config.py +52 -0
- code_muse/plugins/chatgpt_oauth/oauth_flow.py +338 -0
- code_muse/plugins/chatgpt_oauth/register_callbacks.py +172 -0
- code_muse/plugins/chatgpt_oauth/test_plugin.py +301 -0
- code_muse/plugins/chatgpt_oauth/utils.py +538 -0
- code_muse/plugins/checkpointing/__init__.py +29 -0
- code_muse/plugins/checkpointing/checkpoint_hook.py +51 -0
- code_muse/plugins/checkpointing/conversation_snapshots.py +117 -0
- code_muse/plugins/checkpointing/register_callbacks.py +51 -0
- code_muse/plugins/checkpointing/restore_command.py +263 -0
- code_muse/plugins/checkpointing/rewind_shortcut.py +88 -0
- code_muse/plugins/checkpointing/shadow_git.py +90 -0
- code_muse/plugins/claude_code_hooks/__init__.py +1 -0
- code_muse/plugins/claude_code_hooks/config.py +188 -0
- code_muse/plugins/claude_code_hooks/register_callbacks.py +208 -0
- code_muse/plugins/claude_code_oauth/README.md +167 -0
- code_muse/plugins/claude_code_oauth/SETUP.md +93 -0
- code_muse/plugins/claude_code_oauth/__init__.py +25 -0
- code_muse/plugins/claude_code_oauth/config.py +52 -0
- code_muse/plugins/claude_code_oauth/fast_mode.py +124 -0
- code_muse/plugins/claude_code_oauth/prompt_handler.py +63 -0
- code_muse/plugins/claude_code_oauth/register_callbacks.py +547 -0
- code_muse/plugins/claude_code_oauth/test_fast_mode.py +165 -0
- code_muse/plugins/claude_code_oauth/test_plugin.py +283 -0
- code_muse/plugins/claude_code_oauth/token_refresh_heartbeat.py +237 -0
- code_muse/plugins/claude_code_oauth/utils.py +664 -0
- code_muse/plugins/copilot_auth/__init__.py +11 -0
- code_muse/plugins/copilot_auth/config.py +91 -0
- code_muse/plugins/copilot_auth/reasoning_client.py +409 -0
- code_muse/plugins/copilot_auth/register_callbacks.py +461 -0
- code_muse/plugins/copilot_auth/utils.py +584 -0
- code_muse/plugins/custom_commands/__init__.py +14 -0
- code_muse/plugins/custom_commands/args_injection.py +82 -0
- code_muse/plugins/custom_commands/command_discovery.py +89 -0
- code_muse/plugins/custom_commands/command_toml_schema.py +71 -0
- code_muse/plugins/custom_commands/register_callbacks.py +176 -0
- code_muse/plugins/customizable_commands/__init__.py +0 -0
- code_muse/plugins/customizable_commands/register_callbacks.py +136 -0
- code_muse/plugins/destructive_command_guard/__init__.py +14 -0
- code_muse/plugins/destructive_command_guard/detector.py +375 -0
- code_muse/plugins/destructive_command_guard/register_callbacks.py +148 -0
- code_muse/plugins/example_custom_command/README.md +280 -0
- code_muse/plugins/example_custom_command/register_callbacks.py +51 -0
- code_muse/plugins/file_permission_handler/__init__.py +4 -0
- code_muse/plugins/file_permission_handler/register_callbacks.py +441 -0
- code_muse/plugins/filter_engine/__init__.py +30 -0
- code_muse/plugins/filter_engine/classifier.py +153 -0
- code_muse/plugins/filter_engine/content_detector.py +184 -0
- code_muse/plugins/filter_engine/dispatcher.py +244 -0
- code_muse/plugins/filter_engine/register_callbacks.py +188 -0
- code_muse/plugins/filter_engine/registry.py +279 -0
- code_muse/plugins/filter_engine/strategies/__init__.py +8 -0
- code_muse/plugins/filter_engine/strategies/ast_compressor.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/ast_compressor.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/filter_engine/strategies/ast_compressor.pyx +348 -0
- code_muse/plugins/filter_engine/strategies/ast_parser.py +167 -0
- code_muse/plugins/filter_engine/strategies/code.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/code.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/filter_engine/strategies/code.pyx +584 -0
- code_muse/plugins/filter_engine/strategies/git.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/git.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/filter_engine/strategies/git.pyx +438 -0
- code_muse/plugins/filter_engine/strategies/json_compressor.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/json_compressor.pyx +253 -0
- code_muse/plugins/filter_engine/strategies/json_patterns.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/json_patterns.pyx +178 -0
- code_muse/plugins/filter_engine/strategies/lint.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/lint.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/filter_engine/strategies/lint.pyx +626 -0
- code_muse/plugins/filter_engine/strategies/test.cpython-314-darwin.so +0 -0
- code_muse/plugins/filter_engine/strategies/test.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/plugins/filter_engine/strategies/test.pyx +431 -0
- code_muse/plugins/filter_engine/verbosity.py +63 -0
- code_muse/plugins/force_push_guard/__init__.py +5 -0
- code_muse/plugins/force_push_guard/detector.py +96 -0
- code_muse/plugins/force_push_guard/register_callbacks.py +144 -0
- code_muse/plugins/force_push_guard/test_detector.py +143 -0
- code_muse/plugins/frontend_emitter/__init__.py +25 -0
- code_muse/plugins/frontend_emitter/emitter.py +121 -0
- code_muse/plugins/frontend_emitter/register_callbacks.py +259 -0
- code_muse/plugins/gac/__init__.py +4 -0
- code_muse/plugins/gac/git_ops.py +136 -0
- code_muse/plugins/gac/prompt.py +191 -0
- code_muse/plugins/gac/register_callbacks.py +82 -0
- code_muse/plugins/hook_creator/__init__.py +1 -0
- code_muse/plugins/hook_creator/register_callbacks.py +34 -0
- code_muse/plugins/hook_manager/__init__.py +1 -0
- code_muse/plugins/hook_manager/config.py +289 -0
- code_muse/plugins/hook_manager/hooks_menu.py +563 -0
- code_muse/plugins/hook_manager/register_callbacks.py +227 -0
- code_muse/plugins/hook_monitor/register_callbacks.py +36 -0
- code_muse/plugins/mindpack/__init__.py +0 -0
- code_muse/plugins/mindpack/factory.py +930 -0
- code_muse/plugins/mindpack/judge.py +573 -0
- code_muse/plugins/mindpack/memory.py +100 -0
- code_muse/plugins/mindpack/mindpack_menu.py +1552 -0
- code_muse/plugins/mindpack/orchestration.py +605 -0
- code_muse/plugins/mindpack/register_callbacks.py +175 -0
- code_muse/plugins/mindpack/schemas.py +358 -0
- code_muse/plugins/mindpack/tools.py +387 -0
- code_muse/plugins/oauth_muse_html.py +226 -0
- code_muse/plugins/ollama_setup/__init__.py +5 -0
- code_muse/plugins/ollama_setup/completer.py +36 -0
- code_muse/plugins/ollama_setup/register_callbacks.py +410 -0
- code_muse/plugins/plan_command/__init__.py +0 -0
- code_muse/plugins/plan_command/register_callbacks.py +206 -0
- code_muse/plugins/plan_mode/__init__.py +37 -0
- code_muse/plugins/plan_mode/mode_cycling.py +40 -0
- code_muse/plugins/plan_mode/plan_generation.py +68 -0
- code_muse/plugins/plan_mode/plan_hooks.py +74 -0
- code_muse/plugins/plan_mode/plan_mode_tools.py +138 -0
- code_muse/plugins/plan_mode/register_callbacks.py +121 -0
- code_muse/plugins/plugin_trust/register_callbacks.py +140 -0
- code_muse/plugins/policy_engine/__init__.py +46 -0
- code_muse/plugins/policy_engine/approval_flow_integration.py +59 -0
- code_muse/plugins/policy_engine/policy_evaluator.py +75 -0
- code_muse/plugins/policy_engine/policy_file_discovery.py +90 -0
- code_muse/plugins/policy_engine/policy_toml_schema.py +115 -0
- code_muse/plugins/policy_engine/register_callbacks.py +112 -0
- code_muse/plugins/pop_command/__init__.py +1 -0
- code_muse/plugins/pop_command/register_callbacks.py +189 -0
- code_muse/plugins/prompt_newline/__init__.py +13 -0
- code_muse/plugins/prompt_newline/config.py +19 -0
- code_muse/plugins/prompt_newline/register_callbacks.py +159 -0
- code_muse/plugins/safety_status/__init__.py +0 -0
- code_muse/plugins/safety_status/register_callbacks.py +113 -0
- code_muse/plugins/semantic_compression/__init__.py +6 -0
- code_muse/plugins/semantic_compression/compressor.py +295 -0
- code_muse/plugins/semantic_compression/config.py +123 -0
- code_muse/plugins/semantic_compression/register_callbacks.py +320 -0
- code_muse/plugins/shell_minimizer/__init__.py +50 -0
- code_muse/plugins/shell_minimizer/builtin_filters.toml +393 -0
- code_muse/plugins/shell_minimizer/pipeline.py +556 -0
- code_muse/plugins/shell_minimizer/primitives.py +482 -0
- code_muse/plugins/shell_minimizer/register_callbacks.py +276 -0
- code_muse/plugins/shell_safety/__init__.py +6 -0
- code_muse/plugins/shell_safety/agent_shell_safety.py +69 -0
- code_muse/plugins/shell_safety/command_cache.py +149 -0
- code_muse/plugins/shell_safety/register_callbacks.py +202 -0
- code_muse/plugins/synthetic_status/__init__.py +1 -0
- code_muse/plugins/synthetic_status/register_callbacks.py +128 -0
- code_muse/plugins/synthetic_status/status_api.py +145 -0
- code_muse/plugins/token_caching/__init__.py +21 -0
- code_muse/plugins/token_caching/cache_hit_tracking.py +128 -0
- code_muse/plugins/token_caching/cacheable_prefix_detection.py +28 -0
- code_muse/plugins/token_caching/register_callbacks.py +54 -0
- code_muse/plugins/token_caching/stats_display.py +35 -0
- code_muse/plugins/token_tracking/__init__.py +26 -0
- code_muse/plugins/token_tracking/database.py +381 -0
- code_muse/plugins/token_tracking/edit_analyzer.py +97 -0
- code_muse/plugins/token_tracking/record.py +55 -0
- code_muse/plugins/token_tracking/register_callbacks.py +277 -0
- code_muse/plugins/token_tracking/reports.py +329 -0
- code_muse/plugins/universal_constructor/__init__.py +13 -0
- code_muse/plugins/universal_constructor/models.py +136 -0
- code_muse/plugins/universal_constructor/register_callbacks.py +47 -0
- code_muse/plugins/universal_constructor/registry.py +390 -0
- code_muse/plugins/universal_constructor/runner.py +474 -0
- code_muse/plugins/universal_constructor/safety.py +440 -0
- code_muse/plugins/universal_constructor/sandbox.py +584 -0
- code_muse/provider_identity.py +105 -0
- code_muse/pydantic_patches.py +410 -0
- code_muse/reopenable_async_client.py +233 -0
- code_muse/round_robin_model.py +151 -0
- code_muse/secret_storage.py +74 -0
- code_muse/security/__init__.py +1 -0
- code_muse/security/redaction.cpython-314-darwin.so +0 -0
- code_muse/security/redaction.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/security/redaction.pyx +135 -0
- code_muse/session_storage.py +565 -0
- code_muse/status_display.py +261 -0
- code_muse/stream_parser/__init__.py +76 -0
- code_muse/stream_parser/assistant_text_parser.py +90 -0
- code_muse/stream_parser/citation_parser.py +76 -0
- code_muse/stream_parser/inline_hidden_tag_parser.py +236 -0
- code_muse/stream_parser/proposed_plan_parser.py +158 -0
- code_muse/stream_parser/stream_text_chunk.py +23 -0
- code_muse/stream_parser/stream_text_parser.py +27 -0
- code_muse/stream_parser/tagged_line_parser.cpython-314-darwin.so +0 -0
- code_muse/stream_parser/tagged_line_parser.pyx +251 -0
- code_muse/stream_parser/utf8_stream_parser.cpython-314-darwin.so +0 -0
- code_muse/stream_parser/utf8_stream_parser.pyx +206 -0
- code_muse/summarization_agent.py +308 -0
- code_muse/terminal_utils.cpython-314-darwin.so +0 -0
- code_muse/terminal_utils.cpython-314-x86_64-linux-gnu.so +0 -0
- code_muse/terminal_utils.pyx +483 -0
- code_muse/tools/__init__.py +459 -0
- code_muse/tools/agent_tools.py +613 -0
- code_muse/tools/ask_user_question/__init__.py +26 -0
- code_muse/tools/ask_user_question/constants.py +73 -0
- code_muse/tools/ask_user_question/demo_tui.py +55 -0
- code_muse/tools/ask_user_question/handler.py +232 -0
- code_muse/tools/ask_user_question/models.py +302 -0
- code_muse/tools/ask_user_question/registration.py +37 -0
- code_muse/tools/ask_user_question/renderers.py +336 -0
- code_muse/tools/ask_user_question/terminal_ui.py +327 -0
- code_muse/tools/ask_user_question/theme.py +156 -0
- code_muse/tools/ask_user_question/tui_loop.py +422 -0
- code_muse/tools/background_jobs.py +99 -0
- code_muse/tools/browser/__init__.py +37 -0
- code_muse/tools/browser/browser_control.py +289 -0
- code_muse/tools/browser/browser_interactions.py +545 -0
- code_muse/tools/browser/browser_locators.py +640 -0
- code_muse/tools/browser/browser_manager.py +376 -0
- code_muse/tools/browser/browser_navigation.py +251 -0
- code_muse/tools/browser/browser_screenshot.py +180 -0
- code_muse/tools/browser/browser_scripts.py +462 -0
- code_muse/tools/browser/browser_workflows.py +222 -0
- code_muse/tools/chrome_cdp/__init__.py +1070 -0
- code_muse/tools/chrome_cdp/register_callbacks.py +61 -0
- code_muse/tools/command_runner.py +1401 -0
- code_muse/tools/common.py +1407 -0
- code_muse/tools/display.py +87 -0
- code_muse/tools/file_modifications.py +1099 -0
- code_muse/tools/file_operations.py +860 -0
- code_muse/tools/image_tools.py +185 -0
- code_muse/tools/meetin_proxy/__init__.py +243 -0
- code_muse/tools/meetin_proxy/capture_addon.py +82 -0
- code_muse/tools/meetin_proxy/proxy_manager.py +326 -0
- code_muse/tools/meetin_proxy/register_callbacks.py +45 -0
- code_muse/tools/path_policy.py +219 -0
- code_muse/tools/skills_tools.py +586 -0
- code_muse/tools/subagent_context.py +158 -0
- code_muse/tools/tools_content.py +50 -0
- code_muse/tools/universal_constructor.py +965 -0
- code_muse/uvx_detection.py +241 -0
- code_muse/version_checker.py +86 -0
- code_muse-0.0.1.data/data/code_muse/models.json +66 -0
- code_muse-0.0.1.data/data/code_muse/models_dev_api.json +1 -0
- code_muse-0.0.1.dist-info/METADATA +845 -0
- code_muse-0.0.1.dist-info/RECORD +394 -0
- code_muse-0.0.1.dist-info/WHEEL +4 -0
- code_muse-0.0.1.dist-info/entry_points.txt +2 -0
- code_muse-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""Callback registration for the MindPack plugin.
|
|
2
|
+
|
|
3
|
+
Registers:
|
|
4
|
+
- The 'register_tools' hook to expose the ask_mindpack tool to agents.
|
|
5
|
+
- The 'custom_command' + 'custom_command_help' hooks to expose the
|
|
6
|
+
/ask_mindpack slash command for direct user invocation.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import logging
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
from code_muse.callbacks import register_callback
|
|
13
|
+
from code_muse.messaging import emit_info, emit_success, emit_warning
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
# ---------------------------------------------------------------------------
|
|
18
|
+
# Agent tool registration (existing)
|
|
19
|
+
# ---------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _register_mindpack_tools() -> list[dict[str, Any]]:
|
|
23
|
+
"""Callback for the 'register_tools' hook.
|
|
24
|
+
|
|
25
|
+
Returns tool definitions that the core tool loader will merge
|
|
26
|
+
into TOOL_REGISTRY.
|
|
27
|
+
"""
|
|
28
|
+
from code_muse.plugins.mindpack.tools import register_ask_mindpack
|
|
29
|
+
|
|
30
|
+
return [
|
|
31
|
+
{"name": "ask_mindpack", "register_func": register_ask_mindpack},
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# ---------------------------------------------------------------------------
|
|
36
|
+
# Slash-command help
|
|
37
|
+
# ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _custom_help() -> list[tuple[str, str]]:
|
|
41
|
+
"""Provide help entries for /help display."""
|
|
42
|
+
return [
|
|
43
|
+
(
|
|
44
|
+
"ask_mindpack",
|
|
45
|
+
"Run MindPack multi-expert advisory analysis on a problem",
|
|
46
|
+
),
|
|
47
|
+
(
|
|
48
|
+
"mindpack",
|
|
49
|
+
"Manage MindPack profiles and expert panel (profiles bundle experts for different tasks)",
|
|
50
|
+
),
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# ---------------------------------------------------------------------------
|
|
55
|
+
# Slash-command handler
|
|
56
|
+
# ---------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
async def _handle_custom_command(command: str, name: str) -> bool | None:
|
|
60
|
+
"""Handle the /ask_mindpack slash command.
|
|
61
|
+
|
|
62
|
+
Extracts the user's problem description from the command text,
|
|
63
|
+
spins up the MindPack expert panel, and displays the merged
|
|
64
|
+
advisory output directly in the chat.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
True if the command was handled (advisory displayed).
|
|
68
|
+
None if the command name doesn't match.
|
|
69
|
+
"""
|
|
70
|
+
if name == "mindpack":
|
|
71
|
+
from code_muse.plugins.mindpack.mindpack_menu import (
|
|
72
|
+
interactive_mindpack_menu,
|
|
73
|
+
interactive_profile_selector_menu,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Profile selector first, then filtered expert menu
|
|
77
|
+
while True:
|
|
78
|
+
result = await interactive_profile_selector_menu()
|
|
79
|
+
if result is None:
|
|
80
|
+
break # User exited profile selector
|
|
81
|
+
if result is True:
|
|
82
|
+
break # Profile activated — exit to CLI
|
|
83
|
+
# Otherwise it's a profile name — open expert list
|
|
84
|
+
await interactive_mindpack_menu(profile_name=result)
|
|
85
|
+
return True
|
|
86
|
+
|
|
87
|
+
if name != "ask_mindpack":
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
# Extract problem text after the command name
|
|
91
|
+
parts = command.split(maxsplit=1)
|
|
92
|
+
problem_text = parts[1].strip() if len(parts) > 1 else ""
|
|
93
|
+
|
|
94
|
+
if not problem_text:
|
|
95
|
+
emit_warning(
|
|
96
|
+
"Usage: /ask_mindpack <your problem description>\n"
|
|
97
|
+
"Example: /ask_mindpack How should I refactor the auth module "
|
|
98
|
+
"to support multi-tenancy?"
|
|
99
|
+
)
|
|
100
|
+
return True
|
|
101
|
+
|
|
102
|
+
from code_muse.plugins.mindpack.schemas import AskMindPackInput
|
|
103
|
+
from code_muse.plugins.mindpack.tools import orchestrator
|
|
104
|
+
|
|
105
|
+
emit_info("🧠 MindPack is consulting the expert panel…")
|
|
106
|
+
|
|
107
|
+
active_profile = orchestrator.get_active_profile_name()
|
|
108
|
+
if active_profile:
|
|
109
|
+
emit_info(f"📋 Active profile: {active_profile}")
|
|
110
|
+
|
|
111
|
+
request = AskMindPackInput(
|
|
112
|
+
problem_statement=problem_text,
|
|
113
|
+
current_goal="User requested advisory analysis via /ask_mindpack",
|
|
114
|
+
desired_output="plan",
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
try:
|
|
118
|
+
output = await orchestrator.consult(request)
|
|
119
|
+
except Exception as exc:
|
|
120
|
+
emit_warning(f"MindPack consultation failed: {exc}")
|
|
121
|
+
return True
|
|
122
|
+
|
|
123
|
+
# -- Display results ------------------------------------------------
|
|
124
|
+
emit_success(f"🧠 MindPack Advisory Complete (confidence: {output.confidence:.2f})")
|
|
125
|
+
|
|
126
|
+
emit_info(f"📋 Summary: {output.summary}")
|
|
127
|
+
emit_info(f"🎯 Recommended Plan:\n{output.recommended_plan}")
|
|
128
|
+
|
|
129
|
+
if output.ranked_options:
|
|
130
|
+
emit_info("🏆 Ranked Options:")
|
|
131
|
+
for opt in output.ranked_options:
|
|
132
|
+
emit_info(
|
|
133
|
+
f" #{opt.rank} {opt.title} "
|
|
134
|
+
f"[risk: {opt.risk}, confidence: {opt.confidence:.2f}]"
|
|
135
|
+
)
|
|
136
|
+
emit_info(f" {opt.summary}")
|
|
137
|
+
if opt.pros:
|
|
138
|
+
emit_info(f" Pros: {', '.join(opt.pros)}")
|
|
139
|
+
if opt.cons:
|
|
140
|
+
emit_info(f" Cons: {', '.join(opt.cons)}")
|
|
141
|
+
|
|
142
|
+
if output.risks:
|
|
143
|
+
emit_warning("⚠️ Risks Identified:")
|
|
144
|
+
for r in output.risks:
|
|
145
|
+
emit_warning(f" • {r}")
|
|
146
|
+
|
|
147
|
+
if output.tests_to_run:
|
|
148
|
+
emit_info("🧪 Suggested Tests:")
|
|
149
|
+
for t in output.tests_to_run:
|
|
150
|
+
emit_info(f" • {t}")
|
|
151
|
+
|
|
152
|
+
if output.files_to_inspect_or_change:
|
|
153
|
+
emit_info("📁 Files to Inspect/Change:")
|
|
154
|
+
for f in output.files_to_inspect_or_change:
|
|
155
|
+
emit_info(f" • {f}")
|
|
156
|
+
|
|
157
|
+
if output.disagreements:
|
|
158
|
+
emit_warning("⚡ Expert Disagreements:")
|
|
159
|
+
for d in output.disagreements:
|
|
160
|
+
emit_warning(f" • {d}")
|
|
161
|
+
|
|
162
|
+
emit_info(f"🤝 Expert Consensus: {output.expert_consensus}")
|
|
163
|
+
|
|
164
|
+
return True # Handled — no model invocation needed
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
# ---------------------------------------------------------------------------
|
|
168
|
+
# Register all callbacks
|
|
169
|
+
# ---------------------------------------------------------------------------
|
|
170
|
+
|
|
171
|
+
register_callback("register_tools", _register_mindpack_tools)
|
|
172
|
+
register_callback("custom_command_help", _custom_help)
|
|
173
|
+
register_callback("custom_command", _handle_custom_command)
|
|
174
|
+
|
|
175
|
+
logger.debug("MindPack plugin callbacks registered")
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"""MindPack schemas — shared Pydantic models for cross-module use.
|
|
2
|
+
|
|
3
|
+
Breaks the circular dependency between ``orchestration.py`` and ``tools.py``
|
|
4
|
+
by keeping pure data models in a single importable location.
|
|
5
|
+
|
|
6
|
+
These models carry no logic — they are plain data contracts.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Literal
|
|
10
|
+
|
|
11
|
+
from pydantic import BaseModel, Field
|
|
12
|
+
|
|
13
|
+
# ---------------------------------------------------------------------------
|
|
14
|
+
# Expert descriptor
|
|
15
|
+
# ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ExpertDescriptor(BaseModel):
|
|
19
|
+
"""Metadata describing an expert that may be consulted."""
|
|
20
|
+
|
|
21
|
+
name: str = Field(..., description="Unique expert identifier")
|
|
22
|
+
speciality: str = Field(..., description="Domain of expertise")
|
|
23
|
+
system_prompt_fragment: str = Field(
|
|
24
|
+
default="",
|
|
25
|
+
description="Prompt fragment injected into the expert's context",
|
|
26
|
+
)
|
|
27
|
+
max_experts_override: int | None = Field(
|
|
28
|
+
default=None,
|
|
29
|
+
description="If set, caps how many experts of this type to spawn",
|
|
30
|
+
)
|
|
31
|
+
model: str | None = Field(
|
|
32
|
+
default=None,
|
|
33
|
+
description="Optional custom model override for this specific expert",
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# ---------------------------------------------------------------------------
|
|
38
|
+
# Profile descriptor
|
|
39
|
+
# ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ProfileDescriptor(BaseModel):
|
|
43
|
+
"""A named bundle of expert names forming a reusable advisory panel."""
|
|
44
|
+
|
|
45
|
+
name: str = Field(..., description="Unique profile identifier")
|
|
46
|
+
description: str = Field(
|
|
47
|
+
default="",
|
|
48
|
+
description="Human-readable summary of what this profile is for",
|
|
49
|
+
)
|
|
50
|
+
expert_names: list[str] = Field(
|
|
51
|
+
default_factory=list,
|
|
52
|
+
description="Names of experts that belong to this profile",
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# ---------------------------------------------------------------------------
|
|
57
|
+
# AskMindPack I/O models
|
|
58
|
+
# ---------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class MindPackRankedOption(BaseModel):
|
|
62
|
+
"""A single ranked option produced by the MindPack judge."""
|
|
63
|
+
|
|
64
|
+
rank: int = Field(..., description="Ranking position (1 = best)")
|
|
65
|
+
title: str = Field(..., description="Short title for this option")
|
|
66
|
+
source_experts: list[str] = Field(
|
|
67
|
+
default_factory=list,
|
|
68
|
+
description="Expert names that contributed to this option",
|
|
69
|
+
)
|
|
70
|
+
summary: str = Field(..., description="One-paragraph summary of the option")
|
|
71
|
+
pros: list[str] = Field(default_factory=list, description="Advantages")
|
|
72
|
+
cons: list[str] = Field(default_factory=list, description="Disadvantages")
|
|
73
|
+
risk: Literal["low", "medium", "high"] = Field(
|
|
74
|
+
default="medium", description="Risk level"
|
|
75
|
+
)
|
|
76
|
+
confidence: float = Field(
|
|
77
|
+
default=0.5, ge=0, le=1, description="Confidence score 0–1"
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class MindPackComparisonMatrix(BaseModel):
|
|
82
|
+
consensus_points: list[str] = Field(default_factory=list)
|
|
83
|
+
disagreements: list[str] = Field(default_factory=list)
|
|
84
|
+
unsupported_claims: list[str] = Field(default_factory=list)
|
|
85
|
+
missing_information: list[str] = Field(default_factory=list)
|
|
86
|
+
ranked_options: list[MindPackRankedOption] = Field(default_factory=list)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class MindPackMergedDecision(BaseModel):
|
|
90
|
+
summary: str
|
|
91
|
+
comparison: MindPackComparisonMatrix
|
|
92
|
+
selected_option: MindPackRankedOption
|
|
93
|
+
merged_plan_steps: list[str] = Field(default_factory=list)
|
|
94
|
+
files_to_inspect_first: list[str] = Field(default_factory=list)
|
|
95
|
+
files_expected_to_change: list[str] = Field(default_factory=list)
|
|
96
|
+
tests_to_run: list[str] = Field(default_factory=list)
|
|
97
|
+
risks: list[str] = Field(default_factory=list)
|
|
98
|
+
acceptance_criteria: list[str] = Field(default_factory=list)
|
|
99
|
+
executor_instructions: str
|
|
100
|
+
confidence: float = Field(default=0.5, ge=0, le=1)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class AskMindPackInput(BaseModel):
|
|
104
|
+
"""Input model for the ask_mindpack tool.
|
|
105
|
+
|
|
106
|
+
Carries the executor's problem context so MindPack can spin up
|
|
107
|
+
an appropriate expert pool.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
problem_statement: str = Field(..., description="The specific problem to solve")
|
|
111
|
+
current_goal: str = Field(
|
|
112
|
+
..., description="What the executor is currently trying to achieve"
|
|
113
|
+
)
|
|
114
|
+
current_plan: str | None = Field(default=None, description="Current plan, if any")
|
|
115
|
+
what_has_been_tried: list[str] = Field(
|
|
116
|
+
default_factory=list,
|
|
117
|
+
description="Approaches already attempted",
|
|
118
|
+
)
|
|
119
|
+
relevant_files: list[str] = Field(
|
|
120
|
+
default_factory=list,
|
|
121
|
+
description="File paths relevant to the problem",
|
|
122
|
+
)
|
|
123
|
+
observed_errors: list[str] = Field(
|
|
124
|
+
default_factory=list,
|
|
125
|
+
description="Error messages or unexpected behaviours observed",
|
|
126
|
+
)
|
|
127
|
+
uncertainty: str | None = Field(
|
|
128
|
+
default=None,
|
|
129
|
+
description="What the executor is uncertain about",
|
|
130
|
+
)
|
|
131
|
+
desired_output: Literal[
|
|
132
|
+
"plan",
|
|
133
|
+
"review",
|
|
134
|
+
"debug_strategy",
|
|
135
|
+
"architecture_decision",
|
|
136
|
+
"test_strategy",
|
|
137
|
+
"compare_options",
|
|
138
|
+
] = Field(
|
|
139
|
+
default="plan",
|
|
140
|
+
description="Kind of advisory output the executor wants",
|
|
141
|
+
)
|
|
142
|
+
max_experts: int | None = Field(
|
|
143
|
+
default=None,
|
|
144
|
+
description="Cap on number of experts to consult",
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class AskMindPackOutput(BaseModel):
|
|
149
|
+
"""Output model for the ask_mindpack tool.
|
|
150
|
+
|
|
151
|
+
Returns a merged, judge-vetted advisory response that the
|
|
152
|
+
executor can use to continue its work.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
summary: str = Field(..., description="High-level summary of the advisory")
|
|
156
|
+
recommended_plan: str = Field(..., description="The judge-merged recommended plan")
|
|
157
|
+
ranked_options: list[MindPackRankedOption] = Field(
|
|
158
|
+
default_factory=list,
|
|
159
|
+
description="Ranked alternative options from the expert pool",
|
|
160
|
+
)
|
|
161
|
+
risks: list[str] = Field(
|
|
162
|
+
default_factory=list,
|
|
163
|
+
description="Risks identified across all experts",
|
|
164
|
+
)
|
|
165
|
+
tests_to_run: list[str] = Field(
|
|
166
|
+
default_factory=list,
|
|
167
|
+
description="Suggested tests to validate the plan",
|
|
168
|
+
)
|
|
169
|
+
files_to_inspect_or_change: list[str] = Field(
|
|
170
|
+
default_factory=list,
|
|
171
|
+
description="Files the experts recommend inspecting or changing",
|
|
172
|
+
)
|
|
173
|
+
expert_consensus: str = Field(..., description="Summary of what experts agreed on")
|
|
174
|
+
disagreements: list[str] = Field(
|
|
175
|
+
default_factory=list,
|
|
176
|
+
description="Key disagreements between experts",
|
|
177
|
+
)
|
|
178
|
+
confidence: float = Field(
|
|
179
|
+
default=0.5,
|
|
180
|
+
ge=0,
|
|
181
|
+
le=1,
|
|
182
|
+
description="Overall confidence in the recommendation",
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# ---------------------------------------------------------------------------
|
|
187
|
+
# MindPack V3 Configuration & Expert Models
|
|
188
|
+
# ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
ExpertSpawnMode = Literal[
|
|
192
|
+
"fixed",
|
|
193
|
+
"adaptive",
|
|
194
|
+
"same_agent_replicas",
|
|
195
|
+
"multi_model_replicas",
|
|
196
|
+
"multi_agent",
|
|
197
|
+
"hybrid",
|
|
198
|
+
]
|
|
199
|
+
|
|
200
|
+
ModelStrategy = Literal[
|
|
201
|
+
"same_model",
|
|
202
|
+
"model_pool",
|
|
203
|
+
"per_expert",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
ReportStoreMode = Literal[
|
|
207
|
+
"memory",
|
|
208
|
+
"cache",
|
|
209
|
+
"workspace",
|
|
210
|
+
"both",
|
|
211
|
+
]
|
|
212
|
+
|
|
213
|
+
MemoryScope = Literal[
|
|
214
|
+
"run",
|
|
215
|
+
"session",
|
|
216
|
+
"project",
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class MindPackExpertSpec(BaseModel):
|
|
221
|
+
id: str
|
|
222
|
+
agent: str | None = None
|
|
223
|
+
model: str | None = None
|
|
224
|
+
lens: str
|
|
225
|
+
prompt_variant: str
|
|
226
|
+
permissions: Literal["read_only"] = "read_only"
|
|
227
|
+
max_model_requests: int = Field(default=8, ge=1, le=20)
|
|
228
|
+
max_tool_calls: int = Field(default=20, ge=0, le=100)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class MindPackJudgeSpec(BaseModel):
|
|
232
|
+
id: str = "judge"
|
|
233
|
+
agent: str | None = None
|
|
234
|
+
model: str | None = None
|
|
235
|
+
lens: str = "compare_merge_rank"
|
|
236
|
+
permissions: Literal["read_only"] = "read_only"
|
|
237
|
+
max_model_requests: int = Field(default=6, ge=1, le=20)
|
|
238
|
+
max_tool_calls: int = Field(default=10, ge=0, le=100)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class MindPackExpertPoolConfig(BaseModel):
|
|
242
|
+
spawn_mode: ExpertSpawnMode = "fixed"
|
|
243
|
+
default_expert_count: int = Field(default=5, ge=1, le=12)
|
|
244
|
+
min_experts: int = Field(default=3, ge=1, le=12)
|
|
245
|
+
max_experts: int = Field(default=7, ge=1, le=12)
|
|
246
|
+
model_strategy: ModelStrategy = "same_model"
|
|
247
|
+
experts: list[MindPackExpertSpec] = Field(default_factory=list)
|
|
248
|
+
judge: MindPackJudgeSpec = Field(default_factory=MindPackJudgeSpec)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class MindPackReportStoreConfig(BaseModel):
|
|
252
|
+
mode: ReportStoreMode = "memory"
|
|
253
|
+
memory_scope: MemoryScope = "run"
|
|
254
|
+
workspace_dir: str = ".mindpack/runs"
|
|
255
|
+
cache_dir: str = "~/.muse/packmind/runs"
|
|
256
|
+
save_raw_transcripts: bool = False
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class MindPackNestedConfig(BaseModel):
|
|
260
|
+
enabled: bool = True
|
|
261
|
+
mode: Literal["advisory", "review", "debug"] = "advisory"
|
|
262
|
+
max_depth: int = Field(default=1, ge=0, le=2)
|
|
263
|
+
max_calls_per_prompt: int = Field(default=2, ge=0, le=10)
|
|
264
|
+
timeout_sec: int = Field(default=90, ge=10, le=600)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class MindPackConfig(BaseModel):
|
|
268
|
+
"""Unified root configuration for MindPack V3.
|
|
269
|
+
|
|
270
|
+
Wraps the three sub-config domains — expert pool, report storage,
|
|
271
|
+
and nested (ask_mindpack) behaviour — into a single config object.
|
|
272
|
+
"""
|
|
273
|
+
|
|
274
|
+
expert_pool: MindPackExpertPoolConfig = Field(
|
|
275
|
+
default_factory=MindPackExpertPoolConfig,
|
|
276
|
+
description="Expert pool spawning and model strategy settings",
|
|
277
|
+
)
|
|
278
|
+
report_store: MindPackReportStoreConfig = Field(
|
|
279
|
+
default_factory=MindPackReportStoreConfig,
|
|
280
|
+
description="Report storage mode and paths",
|
|
281
|
+
)
|
|
282
|
+
nested: MindPackNestedConfig = Field(
|
|
283
|
+
default_factory=MindPackNestedConfig,
|
|
284
|
+
description="Nested ask_mindpack workflow limits",
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
DEFAULT_MINDPACK_CONFIG = MindPackConfig()
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class MindPackExpertReport(BaseModel):
|
|
292
|
+
run_id: str
|
|
293
|
+
expert_id: str
|
|
294
|
+
agent: str | None = None
|
|
295
|
+
model: str | None = None
|
|
296
|
+
lens: str
|
|
297
|
+
prompt_variant: str
|
|
298
|
+
status: Literal["success", "partial", "failed", "timeout"] = "success"
|
|
299
|
+
summary: str
|
|
300
|
+
findings: list[str] = Field(default_factory=list)
|
|
301
|
+
proposed_plan: list[str] = Field(default_factory=list)
|
|
302
|
+
files_to_inspect: list[str] = Field(default_factory=list)
|
|
303
|
+
files_expected_to_change: list[str] = Field(default_factory=list)
|
|
304
|
+
risks: list[str] = Field(default_factory=list)
|
|
305
|
+
tests_to_run: list[str] = Field(default_factory=list)
|
|
306
|
+
assumptions: list[str] = Field(default_factory=list)
|
|
307
|
+
confidence: float = Field(default=0.5, ge=0, le=1)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# ---------------------------------------------------------------------------
|
|
311
|
+
# Default profiles
|
|
312
|
+
# ---------------------------------------------------------------------------
|
|
313
|
+
|
|
314
|
+
_DEFAULT_PROFILES: list[ProfileDescriptor] = [
|
|
315
|
+
ProfileDescriptor(
|
|
316
|
+
name="Full Panel",
|
|
317
|
+
description="All five default experts — full coverage",
|
|
318
|
+
expert_names=[
|
|
319
|
+
"Scout",
|
|
320
|
+
"Architect",
|
|
321
|
+
"Strategic Architect",
|
|
322
|
+
"Systems Architect",
|
|
323
|
+
"Pragmatic Architect",
|
|
324
|
+
"Watchdog",
|
|
325
|
+
"Test Planner",
|
|
326
|
+
"Challenger",
|
|
327
|
+
],
|
|
328
|
+
),
|
|
329
|
+
ProfileDescriptor(
|
|
330
|
+
name="Security Audit",
|
|
331
|
+
description="Focused on risk, security, and adversarial review",
|
|
332
|
+
expert_names=["Watchdog", "Challenger"],
|
|
333
|
+
),
|
|
334
|
+
ProfileDescriptor(
|
|
335
|
+
name="Code Review",
|
|
336
|
+
description="Design and testing focus for code review",
|
|
337
|
+
expert_names=["Architect", "Test Planner"],
|
|
338
|
+
),
|
|
339
|
+
ProfileDescriptor(
|
|
340
|
+
name="Performance",
|
|
341
|
+
description="Lean panel for quick performance analysis",
|
|
342
|
+
expert_names=["Scout", "Watchdog"],
|
|
343
|
+
),
|
|
344
|
+
ProfileDescriptor(
|
|
345
|
+
name="Planning",
|
|
346
|
+
description="Three architect perspectives — strategic, systems, and pragmatic — competing to produce the best plan",
|
|
347
|
+
expert_names=[
|
|
348
|
+
"Strategic Architect",
|
|
349
|
+
"Systems Architect",
|
|
350
|
+
"Pragmatic Architect",
|
|
351
|
+
],
|
|
352
|
+
),
|
|
353
|
+
ProfileDescriptor(
|
|
354
|
+
name="Default",
|
|
355
|
+
description="Catch-all for experts not in any other profile",
|
|
356
|
+
expert_names=[],
|
|
357
|
+
),
|
|
358
|
+
]
|