From 311fde9a8b907097d2d47a106eb57f5097865bcc Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 6 Jun 2026 12:44:07 -0400 Subject: [PATCH] fixes --- src/ai_client.py | 5 ++--- src/models.py | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ai_client.py b/src/ai_client.py index 5b29d64f..c7c3aa8a 100644 --- a/src/ai_client.py +++ b/src/ai_client.py @@ -11,13 +11,12 @@ stale [FILES UPDATED] entries and dropping the oldest message pairs. For Gemini: injects the initial context directly into system_instruction during chat creation to avoid massive history bloat. """ -# ai_client.py import anthropic from google import genai -from google.api_core import exceptions as gac -from google.genai import types from openai import OpenAI +from google.genai import types + import asyncio import datetime import difflib diff --git a/src/models.py b/src/models.py index ea4e7e8c..c113d907 100644 --- a/src/models.py +++ b/src/models.py @@ -21,7 +21,7 @@ Status Machine (Ticket): Serialization: All dataclasses provide to_dict() and from_dict() class methods for TOML/JSON persistence via project_manager.py. -tomli_w + Thread Safety: These dataclasses are NOT thread-safe. Callers must synchronize mutations if sharing instances across threads (e.g., during ConductorEngine execution). @@ -29,7 +29,6 @@ Thread Safety: Configuration Integration: - load_config() / save_config() read/write the global config.toml - AGENT_TOOL_NAMES defines the canonical list of MCP tools available to agents - See Also: - docs/guide_mma.md for MMA orchestration documentation - src/dag_engine.py for TrackDAG and ExecutionEngine @@ -38,6 +37,7 @@ See Also: """ from __future__ import annotations + import datetime import json import os @@ -50,7 +50,6 @@ from pathlib import Path from typing import Any, Dict, List, Optional, Union from pydantic import BaseModel -from src.dag_engine import TrackDAG from src.paths import get_config_path @@ -927,7 +926,7 @@ class MCPServerConfig: @classmethod def from_dict(cls, name: str, data: Dict[str, Any]) -> 'MCPServerConfig': """ - [C: src/personas.py:PersonaManager.load_all, src/presets.py:PresetManager.load_all, src/project_manager.py:load_project, src/project_manager.py:load_track_state, src/tool_presets.py:ToolPresetManager.load_all_bias_profiles, src/tool_presets.py:ToolPresetManager.load_all_presets, src/workspace_manager.py:WorkspaceManager.load_all_profiles, tests/test_bias_models.py:test_bias_profile_model, tests/test_bias_models.py:test_tool_model, tests/test_bias_models.py:test_tool_preset_extension, tests/test_context_presets_models.py:test_context_preset_from_dict_legacy, tests/test_context_presets_models.py:test_context_preset_serialization, tests/test_context_presets_models.py:test_file_view_preset_serialization, tests/test_custom_slices_annotations.py:test_file_item_custom_slices_deserialization_with_annotations, tests/test_custom_slices_annotations.py:test_file_item_custom_slices_round_trip_annotations, tests/test_external_editor.py:TestExternalEditorConfig.test_from_dict_with_dict_editors, tests/test_external_editor.py:TestExternalEditorConfig.test_from_dict_with_string_editors, tests/test_external_editor.py:TestTextEditorConfig.test_from_dict_with_diff_args, tests/test_external_editor.py:TestTextEditorConfig.test_from_dict_without_diff_args, tests/test_file_item_model.py:test_file_item_from_dict, tests/test_file_item_model.py:test_file_item_from_dict_defaults, tests/test_history_manager.py:TestHistoryManager.test_snapshot_roundtrip, tests/test_mcp_config.py:test_mcp_configuration_to_from_dict, tests/test_mcp_config.py:test_mcp_server_config_to_from_dict, tests/test_per_ticket_model.py:test_model_override_default_on_deserialize, tests/test_per_ticket_model.py:test_model_override_deserialization, tests/test_persona_id.py:test_ticket_persona_id_deserialization, tests/test_persona_models.py:test_persona_defaults, tests/test_persona_models.py:test_persona_deserialization, tests/test_project_serialization.py:TestProjectSerialization.test_backward_compatibility_strings, tests/test_slice_editor_behavior.py:test_add_slice_with_annotations, tests/test_ticket_queue.py:test_ticket_from_dict_default_priority, tests/test_ticket_queue.py:test_ticket_from_dict_priority, tests/test_tiered_aggregation.py:test_persona_aggregation_strategy, tests/test_track_state_schema.py:test_track_state_from_dict, tests/test_track_state_schema.py:test_track_state_from_dict_empty_and_missing, tests/test_ui_summary_only_removal.py:test_file_item_serialization_with_flags] + [C: src/personas.py:PersonaManager.load_all, src/presets.py:PresetManager.load_all, src/project_manager.py:load_project, src/project_manager.py:load_track_state, src/tool_presets.py:ToolPresetManager.load_all_bias_profiles, src/tool_presets.py:ToolPresetManager.load_all_presets, src/workspace_manager.py:WorkspaceManager.load_all_profiles, tests/test_bias_models.py:test_bias_profile_model, tests/test_bias_models.py:test_tool_model, tests/test_bias_models.py:test_tool_preset_extension, tests/test_context_presets_models.py:test_context_preset_serialization, tests/test_context_presets_models.py:test_file_view_preset_model, tests/test_context_presets_models.py:test_file_view_preset_serialization, tests/test_custom_slices_annotations.py:test_file_item_custom_slices_deserialization_with_annotations, tests/test_custom_slices_annotations.py:test_file_item_custom_slices_round_trip_annotations, tests/test_event_serialization.py:test_user_request_event_serialization, tests/test_external_editor.py:TestExternalEditorConfig.test_from_dict_with_dict_editors, tests/test_external_editor.py:TestExternalEditorConfig.test_from_dict_with_string_editors, tests/test_external_editor.py:TestTextEditorConfig.test_from_dict_with_diff_args, tests/test_external_editor.py:TestTextEditorConfig.test_from_dict_without_diff_args, tests/test_file_item_model.py:test_file_item_from_dict, tests/test_file_item_model.py:test_file_item_from_dict_defaults, tests/test_gui_events_v2.py:test_user_request_event_payload, tests/test_history_manager.py:TestHistoryManager.test_snapshot_roundtrip, tests/test_mcp_config.py:test_load_mcp_config, tests/test_mcp_config.py:test_mcp_configuration_to_from_dict, tests/test_mcp_config.py:test_mcp_server_config_to_from_dict, tests/test_per_ticket_model.py:test_model_override_default_on_serialize, tests/test_per_ticket_model.py:test_model_override_deserialization, tests/test_persona_id.py:test_ticket_persona_id_deserialization, tests/test_persona_models.py:test_persona_defaults, tests/test_persona_models.py:test_persona_deserialization, tests/test_project_serialization.py:TestProjectSerialization.test_backward_compatibility_strings, tests/test_slice_editor_behavior.py:test_add_slice_with_annotations, tests/test_thinking_gui.py:test_thinking_segment_model_compatibility, tests/test_ticket_queue.py:test_ticket_from_dict_default_priority, tests/test_ticket_queue.py:test_ticket_from_dict_priority, tests/test_tiered_aggregation.py:test_persona_aggregation_strategy, tests/test_track_state_schema.py:test_track_state_from_dict, tests/test_track_state_schema.py:test_track_state_from_dict_empty_and_missing, tests/test_ui_summary_only_view_mode_removal.py:test_file_item_serialization_with_flags] """ return cls( name = name, @@ -937,6 +936,10 @@ class MCPServerConfig: auto_start = data.get('auto_start', False), ) +#endregion: MCP Config + +from src.dag_engine import TrackDAG + @dataclass class MCPConfiguration: mcpServers: Dict[str, MCPServerConfig] = field(default_factory=dict)