SYMBOL INDEX (652 symbols across 66 files) FILE: evaluation/patch_selection/analysis.py function main (line 10) | def main(): function analyze_group (line 110) | def analyze_group(statistics_folder_path, total_num_instances=500): FILE: evaluation/patch_selection/selector.py function main (line 14) | def main(): FILE: evaluation/patch_selection/trae_selector/sandbox.py class Sandbox (line 8) | class Sandbox: method __init__ (line 9) | def __init__(self, namespace: str, name: str, tag: str, instance: dict... method get_project_path (line 20) | def get_project_path(self): method start_container (line 24) | def start_container(self): method start_shell (line 44) | def start_shell(self): method get_session (line 54) | def get_session(self): method stop_container (line 115) | def stop_container(self): FILE: evaluation/patch_selection/trae_selector/selector_agent.py class CandidatePatch (line 14) | class CandidatePatch: method __init__ (line 15) | def __init__(self, id, patch, cleaned_patch, is_success_regression, is... function build_system_prompt (line 23) | def build_system_prompt(candidate_length: int) -> str: function parse_tool_response (line 61) | def parse_tool_response(answer: LLMResponse, finish_reason: str, sandbox... class SelectorAgent (line 153) | class SelectorAgent: method __init__ (line 154) | def __init__( method run (line 190) | def run(self): FILE: evaluation/patch_selection/trae_selector/selector_evaluation.py function run_instance (line 18) | def run_instance( function run_instance_by_group (line 66) | def run_instance_by_group( class SelectorEvaluation (line 300) | class SelectorEvaluation: method __init__ (line 301) | def __init__( method run_all (line 331) | def run_all(self, max_workers=None): method run_one (line 372) | def run_one(self, instance_id): FILE: evaluation/patch_selection/trae_selector/tools/tools/base.py class ToolResult (line 5) | class ToolResult: method __bool__ (line 11) | def __bool__(self): method __add__ (line 14) | def __add__(self, other: "ToolResult"): method replace (line 29) | def replace(self, **kwargs): class CLIResult (line 33) | class CLIResult(ToolResult): class ToolFailure (line 37) | class ToolFailure(ToolResult): class ToolError (line 41) | class ToolError(Exception): method __init__ (line 44) | def __init__(self, message: str): FILE: evaluation/patch_selection/trae_selector/tools/tools/bash.py class _BashSession (line 8) | class _BashSession: method __init__ (line 17) | def __init__(self): method start (line 21) | async def start(self): method stop (line 37) | def stop(self): method run (line 44) | async def run(self, command: str): class BashTool (line 91) | class BashTool: method __init__ (line 96) | def __init__(self): method __call__ (line 100) | async def __call__(self, command: str | None = None, restart: bool = F... method to_params (line 118) | def to_params(self): FILE: evaluation/patch_selection/trae_selector/tools/tools/edit.py function write_text (line 21) | def write_text(filename, content): class EditTool (line 26) | class EditTool: method __init__ (line 32) | def __init__(self): method to_params (line 36) | def to_params(self): method __call__ (line 42) | async def __call__( method validate_path (line 80) | def validate_path(self, command: str, path: Path): method view (line 97) | async def view(self, path: Path, view_range: list[int] | None = None): method str_replace (line 137) | def str_replace(self, path: Path, old_str: str, new_str: str | None): method insert (line 170) | def insert(self, path: Path, insert_line: int, new_str: str): method undo_edit (line 206) | def undo_edit(self, path: Path): method read_file (line 217) | def read_file(self, path: Path): method write_file (line 223) | def write_file(self, path: Path, file: str): method _make_output (line 229) | def _make_output( FILE: evaluation/patch_selection/trae_selector/tools/tools/execute_bash.py function execute_command (line 8) | async def execute_command(**kwargs): FILE: evaluation/patch_selection/trae_selector/tools/tools/execute_str_replace_editor.py function execute_command (line 13) | async def execute_command(**kwargs): FILE: evaluation/patch_selection/trae_selector/tools/tools/run.py function maybe_truncate (line 8) | def maybe_truncate(content: str, truncate_after: int | None = MAX_RESPON... function run (line 16) | async def run( FILE: evaluation/patch_selection/trae_selector/utils.py function remove_comments_from_line (line 11) | def remove_comments_from_line(line: str) -> str: function clean_patch (line 33) | def clean_patch(ori_patch_text): function save_patches (line 77) | def save_patches(instance_id, patches_path, patches, group_id=1): function get_trajectory_filename (line 99) | def get_trajectory_filename(instance_id, traj_dir, group_id=1, voting_id... function save_selection_success (line 116) | def save_selection_success( FILE: evaluation/run_evaluation.py class BenchmarkEvaluation (line 23) | class BenchmarkEvaluation: method __init__ (line 29) | def __init__( method _image_name (line 94) | def _image_name(self, instance_id: str) -> str: method _check_images (line 106) | def _check_images(self): method pull_images (line 125) | def pull_images(self): method prepare_trae_agent (line 140) | def prepare_trae_agent(self): method prepare_experiment_container (line 213) | def prepare_experiment_container(self, instance: dict[str, str]) -> Co... method run_one_instance (line 272) | def run_one_instance(self, instance_id: str): method run_all (line 310) | def run_all(self): method run_eval (line 329) | def run_eval(self): method get_all_preds (line 352) | def get_all_preds(self, instance_ids: list[str] | None = None): function main (line 379) | def main(): FILE: evaluation/utils.py function docker_exec (line 15) | def docker_exec(container: Container, command: str): function swebench_evaluate_harness_after (line 32) | def swebench_evaluate_harness_after(benchmark_harness_path, task_id): function multi_swebench_evaluate_harness_after (line 55) | def multi_swebench_evaluate_harness_after(benchmark_harness_path, task_id): function _write_problem_statement (line 65) | def _write_problem_statement(instance_dir: Path, content: str) -> int: function _load_jsonl_dataset (line 71) | def _load_jsonl_dataset(dataset_name: str) -> list[dict]: function _write_multi_problem_statement (line 81) | def _write_multi_problem_statement(instance_dir: Path, resolved_issues: ... function multi_swebench_evaluate_harness_before (line 90) | def multi_swebench_evaluate_harness_before(task_results_dir, dataset_nam... class BenchmarkConfig (line 170) | class BenchmarkConfig: FILE: tests/agent/test_trae_agent.py class TestTraeAgentExtended (line 14) | class TestTraeAgentExtended(unittest.TestCase): method setUp (line 15) | def setUp(self): method tearDown (line 46) | def tearDown(self): method test_new_task_initialization (line 49) | def test_new_task_initialization(self): method test_git_diff_generation (line 70) | def test_git_diff_generation(self, mock_isdir, mock_chdir, mock_subpro... method test_patch_filtering (line 78) | def test_patch_filtering(self): method test_task_completion_detection (line 89) | def test_task_completion_detection(self): method test_tool_initialization (line 100) | def test_tool_initialization(self): method test_protected_attributes_access_restrictions (line 116) | def test_protected_attributes_access_restrictions(self): method test_public_property_access_allowed (line 135) | def test_public_property_access_allowed(self): FILE: tests/test_cli.py class TestCli (line 9) | class TestCli(unittest.TestCase): method setUp (line 10) | def setUp(self): method test_run_with_long_prompt (line 18) | def test_run_with_long_prompt( method test_run_with_file_argument (line 54) | def test_run_with_file_argument( method test_run_with_nonexistent_file (line 89) | def test_run_with_nonexistent_file(self, mock_resolve_config_file): method test_run_with_both_task_and_file (line 96) | def test_run_with_both_task_and_file(self, mock_resolve_config_file): method test_run_with_no_input (line 104) | def test_run_with_no_input(self): method test_run_with_nonexistent_working_dir (line 114) | def test_run_with_nonexistent_working_dir( method test_run_with_string_that_is_also_a_filename (line 145) | def test_run_with_string_that_is_also_a_filename( FILE: tests/tools/test_bash_tool.py class TestBashTool (line 10) | class TestBashTool(unittest.IsolatedAsyncioTestCase): method setUp (line 11) | def setUp(self): method asyncTearDown (line 14) | async def asyncTearDown(self): method test_tool_initialization (line 19) | async def test_tool_initialization(self): method test_command_error_handling (line 28) | async def test_command_error_handling(self): method test_session_restart (line 35) | async def test_session_restart(self): method test_successful_command_execution (line 53) | async def test_successful_command_execution(self): method test_missing_command_handling (line 61) | async def test_missing_command_handling(self): FILE: tests/tools/test_edit_tool.py class TestTextEditorTool (line 12) | class TestTextEditorTool(unittest.IsolatedAsyncioTestCase): method setUp (line 13) | def setUp(self): method mock_file_system (line 19) | def mock_file_system(self, exists=True, is_dir=False, content=""): method test_create_file (line 37) | async def test_create_file(self): method test_insert_line (line 51) | async def test_insert_line(self): method test_invalid_command (line 66) | async def test_invalid_command(self): method test_str_replace_multiple_occurrences (line 73) | async def test_str_replace_multiple_occurrences(self): method test_str_replace_success (line 88) | async def test_str_replace_success(self): method test_view_directory (line 103) | async def test_view_directory(self): method test_view_file (line 112) | async def test_view_file(self): method test_relative_path (line 119) | async def test_relative_path(self): method test_missing_parameters (line 125) | async def test_missing_parameters(self): FILE: tests/tools/test_json_edit_tool.py class TestJSONEditTool (line 14) | class TestJSONEditTool(unittest.IsolatedAsyncioTestCase): method setUp (line 15) | def setUp(self): method mock_file_read (line 26) | def mock_file_read(self, json_data=None): method test_set_config_value (line 48) | async def test_set_config_value(self, mock_json_dump): method test_update_user_name (line 69) | async def test_update_user_name(self, mock_json_dump): method test_add_new_user (line 89) | async def test_add_new_user(self, mock_json_dump): method test_add_new_config_key (line 110) | async def test_add_new_config_key(self, mock_json_dump): method test_remove_user_by_index (line 130) | async def test_remove_user_by_index(self, mock_json_dump): method test_remove_config_key (line 150) | async def test_remove_config_key(self, mock_json_dump): method test_view_operation (line 168) | async def test_view_operation(self): method test_error_file_not_found (line 184) | async def test_error_file_not_found(self): FILE: tests/tools/test_mcp_tool.py class TestMCPTool (line 8) | class TestMCPTool(unittest.IsolatedAsyncioTestCase): method setUp (line 9) | def setUp(self): method test_get_name (line 26) | def test_get_name(self): method test_get_description (line 29) | def test_get_description(self): method test_get_model_provider (line 32) | def test_get_model_provider(self): method test_get_parameters (line 35) | def test_get_parameters(self): method test_execute_success (line 41) | async def test_execute_success(self): method test_execute_failure (line 53) | async def test_execute_failure(self): method test_execute_exception (line 65) | async def test_execute_exception(self): FILE: tests/utils/test_config.py class TestConfigBaseURL (line 13) | class TestConfigBaseURL(unittest.TestCase): method test_config_with_base_url_in_config (line 14) | def test_config_with_base_url_in_config(self): method test_config_without_base_url (line 38) | def test_config_without_base_url(self): method test_default_anthropic_base_url (line 58) | def test_default_anthropic_base_url(self): method test_openai_client_with_custom_base_url (line 73) | def test_openai_client_with_custom_base_url(self, mock_openai): method test_anthropic_client_base_url_attribute_set (line 97) | def test_anthropic_client_base_url_attribute_set(self, mock_anthropic): method test_anthropic_client_with_custom_base_url (line 118) | def test_anthropic_client_with_custom_base_url(self, mock_anthropic): class TestLakeviewConfig (line 142) | class TestLakeviewConfig(unittest.TestCase): method get_base_config (line 143) | def get_base_config(self): method get_config_with_mcp_servers (line 168) | def get_config_with_mcp_servers(self): method test_lakeview_defaults_to_main_provider (line 194) | def test_lakeview_defaults_to_main_provider(self): method test_lakeview_null_values_fallback (line 202) | def test_lakeview_null_values_fallback(self): method test_lakeview_disabled_ignores_config (line 211) | def test_lakeview_disabled_ignores_config(self): method test_mcp_servers_config (line 219) | def test_mcp_servers_config(self): method test_mcp_servers_empty_config (line 228) | def test_mcp_servers_empty_config(self): FILE: tests/utils/test_google_client.py class TestGoogleClient (line 27) | class TestGoogleClient(unittest.TestCase): method test_google_client_init (line 29) | def test_google_client_init(self, mock_genai_client): method test_google_client_init_with_env_key (line 47) | def test_google_client_init_with_env_key(self, mock_genai_client): method test_google_client_init_no_key_raises_error (line 66) | def test_google_client_init_no_key_raises_error(self): method test_google_set_chat_history (line 84) | def test_google_set_chat_history(self, mock_genai_client): method test_google_chat (line 112) | def test_google_chat(self, mock_genai_client): method test_google_chat_with_tool_call (line 146) | def test_google_chat_with_tool_call(self, mock_genai_client): method test_parse_messages (line 196) | def test_parse_messages(self): method test_parse_tool_call_result (line 238) | def test_parse_tool_call_result(self): method test_supports_tool_calling (line 295) | def test_supports_tool_calling(self): FILE: tests/utils/test_mcp_client.py class TestMCPClient (line 7) | class TestMCPClient(unittest.IsolatedAsyncioTestCase): method setUp (line 8) | def setUp(self): method test_get_default_server_status (line 11) | def test_get_default_server_status(self): method test_update_and_get_server_status (line 15) | def test_update_and_get_server_status(self): method test_connect_to_server (line 21) | async def test_connect_to_server(self, mock_client_session): method test_connect_and_discover_stdio (line 37) | async def test_connect_and_discover_stdio(self, mock_client_session, m... method test_connect_and_discover_invalid_config (line 61) | async def test_connect_and_discover_invalid_config(self): method test_call_tool (line 70) | async def test_call_tool(self): method test_list_tools (line 78) | async def test_list_tools(self): method test_cleanup (line 86) | async def test_cleanup(self): FILE: tests/utils/test_ollama_client_utils.py class TestOllamaClient (line 26) | class TestOllamaClient(unittest.TestCase): method test_OllamaClient_init (line 27) | def test_OllamaClient_init(self): method test_ollama_set_chat_history (line 52) | def test_ollama_set_chat_history(self): method test_ollama_chat (line 76) | def test_ollama_chat(self): method test_supports_tool_calling (line 100) | def test_supports_tool_calling(self): FILE: tests/utils/test_openrouter_client_utils.py class TestOpenRouterClient (line 27) | class TestOpenRouterClient(unittest.TestCase): method test_OpenRouterClient_init (line 32) | def test_OpenRouterClient_init(self): method test_set_chat_history (line 51) | def test_set_chat_history(self): method test_openrouter_chat (line 72) | def test_openrouter_chat(self): method test_supports_tool_calling (line 96) | def test_supports_tool_calling(self): FILE: trae_agent/agent/agent.py class AgentType (line 10) | class AgentType(Enum): class Agent (line 14) | class Agent: method __init__ (line 15) | def __init__( method run (line 59) | async def run( FILE: trae_agent/agent/agent_basics.py class AgentStepState (line 19) | class AgentStepState(Enum): class AgentState (line 29) | class AgentState(Enum): class AgentStep (line 39) | class AgentStep: method __repr__ (line 58) | def __repr__(self) -> str: class AgentExecution (line 67) | class AgentExecution: method __repr__ (line 83) | def __repr__(self) -> str: class AgentError (line 87) | class AgentError(Exception): method __init__ (line 95) | def __init__(self, message: str): method __repr__ (line 99) | def __repr__(self) -> str: FILE: trae_agent/agent/base_agent.py class BaseAgent (line 24) | class BaseAgent(ABC): method __init__ (line 29) | def __init__( method llm_client (line 84) | def llm_client(self) -> LLMClient: method trajectory_recorder (line 88) | def trajectory_recorder(self) -> TrajectoryRecorder | None: method set_trajectory_recorder (line 92) | def set_trajectory_recorder(self, recorder: TrajectoryRecorder | None)... method cli_console (line 99) | def cli_console(self) -> CLIConsole | None: method set_cli_console (line 103) | def set_cli_console(self, cli_console: CLIConsole | None) -> None: method tools (line 108) | def tools(self) -> list[Tool]: method task (line 113) | def task(self) -> str: method task (line 118) | def task(self, value: str): method initial_messages (line 123) | def initial_messages(self) -> list[LLMMessage]: method model_config (line 128) | def model_config(self) -> ModelConfig: method max_steps (line 133) | def max_steps(self) -> int: method new_task (line 138) | def new_task( method execute_task (line 147) | async def execute_task(self) -> AgentExecution: method _close_tools (line 202) | async def _close_tools(self): method _run_llm_step (line 209) | async def _run_llm_step( method _finalize_step (line 238) | async def _finalize_step( method reflect_on_result (line 246) | def reflect_on_result(self, tool_results: list[ToolResult]) -> str | N... method llm_indicates_task_completed (line 259) | def llm_indicates_task_completed(self, llm_response: LLMResponse) -> b... method _is_task_completed (line 272) | def _is_task_completed(self, llm_response: LLMResponse) -> bool: # py... method task_incomplete_message (line 276) | def task_incomplete_message(self) -> str: method cleanup_mcp_clients (line 281) | async def cleanup_mcp_clients(self) -> None: method _update_cli_console (line 285) | def _update_cli_console( method _update_llm_usage (line 291) | def _update_llm_usage(self, llm_response: LLMResponse, execution: Agen... method _record_handler (line 301) | def _record_handler(self, step: AgentStep, messages: list[LLMMessage])... method _tool_call_handler (line 314) | async def _tool_call_handler( FILE: trae_agent/agent/docker_manager.py class DockerManager (line 10) | class DockerManager: method __init__ (line 18) | def __init__( method start (line 45) | def start(self): method execute (line 128) | def execute(self, command: str, timeout: int = 300) -> tuple[int, str]: method stop (line 140) | def stop(self): method _copy_tools_to_container (line 162) | def _copy_tools_to_container(self): method _start_persistent_shell (line 181) | def _start_persistent_shell(self): method _execute_interactive (line 204) | def _execute_interactive(self, command: str, timeout: int) -> tuple[in... FILE: trae_agent/agent/trae_agent.py class TraeAgent (line 30) | class TraeAgent(BaseAgent): method __init__ (line 33) | def __init__( method initialise_mcp (line 65) | async def initialise_mcp(self): method discover_mcp_tools (line 72) | async def discover_mcp_tools(self): method new_task (line 103) | def new_task( method execute_task (line 156) | async def execute_task(self) -> AgentExecution: method get_system_prompt (line 172) | def get_system_prompt(self) -> str: method reflect_on_result (line 177) | def reflect_on_result(self, tool_results: list[ToolResult]) -> str | N... method get_git_diff (line 180) | def get_git_diff(self) -> str: method remove_patches_to_tests (line 205) | def remove_patches_to_tests(self, model_patch: str) -> str: method llm_indicates_task_completed (line 229) | def llm_indicates_task_completed(self, llm_response: LLMResponse) -> b... method _is_task_completed (line 236) | def _is_task_completed(self, llm_response: LLMResponse) -> bool: method task_incomplete_message (line 247) | def task_incomplete_message(self) -> str: method cleanup_mcp_clients (line 252) | async def cleanup_mcp_clients(self) -> None: FILE: trae_agent/cli.py function resolve_config_file (line 31) | def resolve_config_file(config_file: str) -> str: function check_docker (line 53) | def check_docker(timeout=3): function build_with_pyinstaller (line 89) | def build_with_pyinstaller(): function cli (line 121) | def cli(): function run (line 192) | def run( function interactive (line 440) | def interactive( function _run_simple_interactive_loop (line 516) | async def _run_simple_interactive_loop( function _run_rich_interactive_loop (line 598) | async def _run_rich_interactive_loop( function show_config (line 626) | def show_config( function tools (line 707) | def tools(): function main (line 725) | def main(): FILE: trae_agent/tools/base.py class ToolError (line 16) | class ToolError(Exception): method __init__ (line 19) | def __init__(self, message: str): class ToolExecResult (line 25) | class ToolExecResult: class ToolResult (line 34) | class ToolResult: class ToolCall (line 49) | class ToolCall: method __str__ (line 58) | def __str__(self) -> str: class ToolParameter (line 63) | class ToolParameter: class Tool (line 74) | class Tool(ABC): method __init__ (line 77) | def __init__(self, model_provider: str | None = None): method model_provider (line 81) | def model_provider(self) -> str | None: method name (line 85) | def name(self) -> str: method description (line 89) | def description(self) -> str: method parameters (line 93) | def parameters(self) -> list[ToolParameter]: method get_model_provider (line 96) | def get_model_provider(self) -> str | None: method get_name (line 101) | def get_name(self) -> str: method get_description (line 106) | def get_description(self) -> str: method get_parameters (line 111) | def get_parameters(self) -> list[ToolParameter]: method execute (line 116) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method json_definition (line 120) | def json_definition(self) -> dict[str, object]: method get_input_schema (line 127) | def get_input_schema(self) -> dict[str, object]: method close (line 177) | async def close(self): class ToolExecutor (line 182) | class ToolExecutor: method __init__ (line 185) | def __init__(self, tools: list[Tool]): method close_tools (line 189) | async def close_tools(self): method _normalize_name (line 195) | def _normalize_name(self, name: str) -> str: method tools (line 200) | def tools(self) -> dict[str, Tool]: method execute_tool_call (line 205) | async def execute_tool_call(self, tool_call: ToolCall) -> ToolResult: method parallel_tool_call (line 238) | async def parallel_tool_call(self, tool_calls: list[ToolCall]) -> list... method sequential_tool_call (line 242) | async def sequential_tool_call(self, tool_calls: list[ToolCall]) -> li... FILE: trae_agent/tools/bash_tool.py class _BashSession (line 19) | class _BashSession: method __init__ (line 30) | def __init__(self) -> None: method start (line 35) | async def start(self) -> None: method stop (line 63) | async def stop(self) -> None: method run (line 87) | async def run(self, command: str) -> ToolExecResult: class BashTool (line 162) | class BashTool(Tool): method __init__ (line 168) | def __init__(self, model_provider: str | None = None): method get_model_provider (line 173) | def get_model_provider(self) -> str | None: method get_name (line 177) | def get_name(self) -> str: method get_description (line 181) | def get_description(self) -> str: method get_parameters (line 192) | def get_parameters(self) -> list[ToolParameter]: method execute (line 213) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method close (line 241) | async def close(self): FILE: trae_agent/tools/ckg/base.py class FunctionEntry (line 10) | class FunctionEntry: class ClassEntry (line 25) | class ClassEntry: FILE: trae_agent/tools/ckg/ckg_database.py function get_ckg_database_path (line 31) | def get_ckg_database_path(codebase_snapshot_hash: str) -> Path: function is_git_repository (line 36) | def is_git_repository(folder_path: Path) -> bool: function get_git_status_hash (line 51) | def get_git_status_hash(folder_path: Path) -> str: function get_file_metadata_hash (line 83) | def get_file_metadata_hash(folder_path: Path) -> str: function get_folder_snapshot_hash (line 97) | def get_folder_snapshot_hash(folder_path: Path) -> str: function clear_older_ckg (line 107) | def clear_older_ckg(): class CKGDatabase (line 148) | class CKGDatabase: method __init__ (line 149) | def __init__(self, codebase_path: Path): method __del__ (line 198) | def __del__(self): method update (line 201) | def update(self): method _recursive_visit_python (line 205) | def _recursive_visit_python( method _recursive_visit_java (line 279) | def _recursive_visit_java( method _recursive_visit_cpp (line 334) | def _recursive_visit_cpp( method _recursive_visit_c (line 399) | def _recursive_visit_c( method _recursive_visit_typescript (line 425) | def _recursive_visit_typescript( method _recursive_visit_javascript (line 479) | def _recursive_visit_javascript( method _construct_ckg (line 534) | def _construct_ckg(self) -> None: method _insert_entry (line 576) | def _insert_entry(self, entry: FunctionEntry | ClassEntry) -> None: method _insert_function (line 596) | def _insert_function(self, entry: FunctionEntry) -> None: method _insert_class (line 622) | def _insert_class(self, entry: ClassEntry) -> None: method query_function (line 648) | def query_function( method query_class (line 695) | def query_class(self, identifier: str) -> list[ClassEntry]: FILE: trae_agent/tools/ckg_tool.py class CKGTool (line 14) | class CKGTool(Tool): method __init__ (line 17) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 30) | def get_model_provider(self) -> str | None: method get_name (line 34) | def get_name(self) -> str: method get_description (line 38) | def get_description(self) -> str: method get_parameters (line 51) | def get_parameters(self) -> list[ToolParameter]: method execute (line 81) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method _search_function (line 135) | def _search_function( method _search_class (line 164) | def _search_class( method _search_class_method (line 197) | def _search_class_method( FILE: trae_agent/tools/docker_tool_executor.py class DockerToolExecutor (line 9) | class DockerToolExecutor: method __init__ (line 15) | def __init__( method _translate_path (line 35) | def _translate_path(self, host_path: str) -> str: method close_tools (line 49) | async def close_tools(self): method sequential_tool_call (line 57) | async def sequential_tool_call(self, tool_calls: list[ToolCall]) -> li... method parallel_tool_call (line 70) | async def parallel_tool_call(self, tool_calls: list[ToolCall]) -> list... method _execute_in_docker (line 77) | def _execute_in_docker(self, tool_call: ToolCall) -> ToolResult: FILE: trae_agent/tools/edit_tool.py class TextEditorTool (line 27) | class TextEditorTool(Tool): method __init__ (line 30) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 34) | def get_model_provider(self) -> str | None: method get_name (line 38) | def get_name(self) -> str: method get_description (line 42) | def get_description(self) -> str: method get_parameters (line 56) | def get_parameters(self) -> list[ToolParameter]: method execute (line 101) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method validate_path (line 134) | def validate_path(self, command: str, path: Path): method _view (line 154) | async def _view(self, path: Path, view_range: list[int] | None = None)... method str_replace (line 197) | def str_replace(self, path: Path, old_str: str, new_str: str | None) -... method _insert (line 238) | def _insert(self, path: Path, insert_line: int, new_str: str) -> ToolE... method read_file (line 278) | def read_file(self, path: Path): method write_file (line 285) | def write_file(self, path: Path, file: str): method _make_output (line 292) | def _make_output( method _view_handler (line 310) | async def _view_handler(self, arguments: ToolCallArguments, _path: Pat... method _create_handler (line 322) | def _create_handler(self, arguments: ToolCallArguments, _path: Path) -... method _str_replace_handler (line 332) | def _str_replace_handler(self, arguments: ToolCallArguments, _path: Pa... method _insert_handler (line 347) | def _insert_handler(self, arguments: ToolCallArguments, _path: Path) -... FILE: trae_agent/tools/edit_tool_cli.py function override (line 9) | def override(f): class Tool (line 14) | class Tool: method __init__ (line 15) | def __init__(self, model_provider: str | None = None) -> None: class ToolError (line 24) | class ToolError(Exception): class ToolExecResult (line 29) | class ToolExecResult: method __init__ (line 30) | def __init__(self, output: str | None = None, error: str | None = None... class ToolParameter (line 37) | class ToolParameter: method __init__ (line 38) | def __init__(self, name: str, type: str, description: str, required: b... function maybe_truncate (line 42) | def maybe_truncate(output: str, max_chars: int = 20000) -> str: function run (line 53) | async def run(command: str, timeout: int = 300) -> tuple[int, str, str]: class TextEditorTool (line 71) | class TextEditorTool(Tool): method __init__ (line 74) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 78) | def get_model_provider(self) -> str | None: method get_name (line 82) | def get_name(self) -> str: method get_description (line 86) | def get_description(self) -> str: method get_parameters (line 100) | def get_parameters(self) -> list[ToolParameter]: method execute (line 145) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method validate_path (line 178) | def validate_path(self, command: str, path: Path): method _view (line 198) | async def _view(self, path: Path, view_range: list[int] | None = None)... method str_replace (line 241) | def str_replace(self, path: Path, old_str: str, new_str: str | None) -... method _insert (line 282) | def _insert(self, path: Path, insert_line: int, new_str: str) -> ToolE... method read_file (line 322) | def read_file(self, path: Path): method write_file (line 329) | def write_file(self, path: Path, file: str): method _make_output (line 336) | def _make_output( method _view_handler (line 354) | async def _view_handler(self, arguments: ToolCallArguments, _path: Pat... method _create_handler (line 366) | def _create_handler(self, arguments: ToolCallArguments, _path: Path) -... method _str_replace_handler (line 376) | def _str_replace_handler(self, arguments: ToolCallArguments, _path: Pa... method _insert_handler (line 391) | def _insert_handler(self, arguments: ToolCallArguments, _path: Path) -... function main (line 407) | def main(): FILE: trae_agent/tools/json_edit_tool.py class JSONEditTool (line 17) | class JSONEditTool(Tool): method __init__ (line 20) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 24) | def get_model_provider(self) -> str | None: method get_name (line 28) | def get_name(self) -> str: method get_description (line 32) | def get_description(self) -> str: method get_parameters (line 56) | def get_parameters(self) -> list[ToolParameter]: method execute (line 93) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method _load_json_file (line 157) | async def _load_json_file(self, file_path: Path) -> dict | list: method _save_json_file (line 173) | async def _save_json_file( method _parse_jsonpath (line 186) | def _parse_jsonpath(self, json_path_str: str): method _view_json (line 195) | async def _view_json( method _set_json_value (line 226) | async def _set_json_value( method _add_json_value (line 247) | async def _add_json_value( method _remove_json_value (line 288) | async def _remove_json_value( FILE: trae_agent/tools/json_edit_tool_cli.py function override (line 12) | def override(f): class Tool (line 17) | class Tool: method __init__ (line 20) | def __init__(self, model_provider: str | None = None) -> None: class ToolError (line 27) | class ToolError(Exception): class ToolExecResult (line 33) | class ToolExecResult: method __init__ (line 36) | def __init__(self, output: str | None = None, error: str | None = None... class ToolParameter (line 42) | class ToolParameter: method __init__ (line 45) | def __init__(self, name: str, type: str, description: str, required: b... class JSONEditTool (line 49) | class JSONEditTool(Tool): method __init__ (line 52) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 56) | def get_model_provider(self) -> str | None: method get_name (line 60) | def get_name(self) -> str: method get_description (line 64) | def get_description(self) -> str: method get_parameters (line 68) | def get_parameters(self) -> list[ToolParameter]: method execute (line 72) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: method _load_json_file (line 75) | async def _load_json_file(self, file_path: Path) -> dict | list: method _save_json_file (line 89) | async def _save_json_file( method _parse_jsonpath (line 101) | def _parse_jsonpath(self, json_path_str: str): method _view_json (line 109) | async def _view_json( method _set_json_value (line 127) | async def _set_json_value( method _add_json_value (line 143) | async def _add_json_value( method _remove_json_value (line 174) | async def _remove_json_value( function amain (line 207) | async def amain(): FILE: trae_agent/tools/mcp_tool.py class MCPTool (line 8) | class MCPTool(Tool): method __init__ (line 9) | def __init__(self, client, tool: mcp.types.Tool, model_provider: str |... method get_model_provider (line 15) | def get_model_provider(self) -> str | None: method get_name (line 19) | def get_name(self) -> str: method get_description (line 23) | def get_description(self) -> str: method get_parameters (line 27) | def get_parameters(self) -> list[ToolParameter]: method execute (line 49) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: FILE: trae_agent/tools/run.py function maybe_truncate (line 21) | def maybe_truncate(content: str, truncate_after: int | None = MAX_RESPON... function run (line 30) | async def run( FILE: trae_agent/tools/sequential_thinking_tool.py class ThoughtData (line 20) | class ThoughtData: class SequentialThinkingTool (line 32) | class SequentialThinkingTool(Tool): method get_name (line 40) | def get_name(self) -> str: method get_description (line 44) | def get_description(self) -> str: method get_parameters (line 101) | def get_parameters(self) -> list[ToolParameter]: method __init__ (line 154) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 160) | def get_model_provider(self) -> str | None: method _validate_thought_data (line 163) | def _validate_thought_data(self, arguments: ToolCallArguments) -> Thou... method _format_thought (line 249) | def _format_thought(self, thought_data: ThoughtData) -> str: method execute (line 278) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: FILE: trae_agent/tools/task_done_tool.py class TaskDoneTool (line 9) | class TaskDoneTool(Tool): method __init__ (line 12) | def __init__(self, model_provider: str | None = None) -> None: method get_model_provider (line 16) | def get_model_provider(self) -> str | None: method get_name (line 20) | def get_name(self) -> str: method get_description (line 24) | def get_description(self) -> str: method get_parameters (line 28) | def get_parameters(self) -> list[ToolParameter]: method execute (line 32) | async def execute(self, arguments: ToolCallArguments) -> ToolExecResult: FILE: trae_agent/utils/cli/cli_console.py class ConsoleMode (line 19) | class ConsoleMode(Enum): class ConsoleType (line 26) | class ConsoleType(Enum): class ConsoleStep (line 43) | class ConsoleStep: class CLIConsole (line 51) | class CLIConsole(ABC): method __init__ (line 54) | def __init__( method start (line 69) | async def start(self): method update_status (line 74) | def update_status( method print_task_details (line 86) | def print_task_details(self, details: dict[str, str]): method print (line 91) | def print(self, message: str, color: str = "blue", bold: bool = False): method get_task_input (line 96) | def get_task_input(self) -> str | None: method get_working_dir_input (line 105) | def get_working_dir_input(self) -> str: method stop (line 114) | def stop(self): method set_lakeview (line 118) | def set_lakeview(self, lakeview_config: LakeviewConfig | None = None): function generate_agent_step_table (line 126) | def generate_agent_step_table(agent_step: AgentStep) -> Table: FILE: trae_agent/utils/cli/console_factory.py class ConsoleFactory (line 13) | class ConsoleFactory: method create_console (line 17) | def create_console( method get_recommended_console_type (line 42) | def get_recommended_console_type(mode: ConsoleMode) -> ConsoleType: FILE: trae_agent/utils/cli/rich_console.py class TokenDisplay (line 30) | class TokenDisplay(Static): method render (line 38) | def render(self) -> Text: method update_tokens (line 49) | def update_tokens(self, agent_execution: AgentExecution): class RichConsoleApp (line 57) | class RichConsoleApp(App[None]): method __init__ (line 67) | def __init__(self, console_impl: "RichCLIConsole"): method compose (line 80) | def compose(self) -> ComposeResult: method on_mount (line 106) | def on_mount(self) -> None: method handle_task_input (line 125) | def handle_task_input(self, event: Input.Submitted) -> None: method _execute_task (line 157) | async def _execute_task(self, task: str): method log_agent_step (line 203) | def log_agent_step(self, agent_step: AgentStep): method _help_handler (line 215) | def _help_handler(self, event: Input.Submitted): method _clear_handler (line 231) | def _clear_handler(self, event: Input.Submitted): method _status_handler (line 236) | def _status_handler(self, event: Input.Submitted): method _exit_handler (line 254) | def _exit_handler(self): method action_quit (line 257) | async def action_quit(self) -> None: class RichCLIConsole (line 263) | class RichCLIConsole(CLIConsole): method __init__ (line 266) | def __init__( method start (line 283) | async def start(self): method update_status (line 301) | def update_status( method print_task_details (line 323) | def print_task_details(self, details: dict[str, str]): method print (line 332) | def print(self, message: str, color: str = "blue", bold: bool = False): method get_task_input (line 340) | def get_task_input(self) -> str | None: method get_working_dir_input (line 346) | def get_working_dir_input(self) -> str: method stop (line 352) | def stop(self): method set_agent_context (line 358) | def set_agent_context(self, agent, trae_agent_config, config_file, tra... method set_initial_task (line 365) | def set_initial_task(self, task: str): FILE: trae_agent/utils/cli/simple_console.py class SimpleCLIConsole (line 25) | class SimpleCLIConsole(CLIConsole): method __init__ (line 28) | def __init__( method update_status (line 41) | def update_status( method start (line 73) | async def start(self): method _print_step_update (line 89) | def _print_step_update( method _print_lakeview_summary (line 110) | async def _print_lakeview_summary(self): method _print_execution_summary (line 122) | def _print_execution_summary(self): method print_task_details (line 168) | def print_task_details(self, details: dict[str, str]): method print (line 183) | def print(self, message: str, color: str = "blue", bold: bool = False): method get_task_input (line 190) | def get_task_input(self) -> str | None: method get_working_dir_input (line 205) | def get_working_dir_input(self) -> str: method stop (line 217) | def stop(self): method _create_lakeview_step_display (line 222) | async def _create_lakeview_step_display(self, agent_step: AgentStep) -... FILE: trae_agent/utils/config.py class ConfigError (line 12) | class ConfigError(Exception): class ModelProvider (line 17) | class ModelProvider: class ModelConfig (line 30) | class ModelConfig: method get_max_tokens_param (line 48) | def get_max_tokens_param(self) -> int: method should_use_max_completion_tokens (line 58) | def should_use_max_completion_tokens(self) -> bool: method resolve_config_values (line 66) | def resolve_config_values( class MCPServerConfig (line 120) | class MCPServerConfig: class AgentConfig (line 146) | class AgentConfig: class TraeAgentConfig (line 159) | class TraeAgentConfig(AgentConfig): method resolve_config_values (line 174) | def resolve_config_values( class LakeviewConfig (line 185) | class LakeviewConfig: class Config (line 194) | class Config: method create (line 206) | def create( method resolve_config_values (line 302) | def resolve_config_values( method create_from_legacy_config (line 325) | def create_from_legacy_config( function resolve_config_value (line 394) | def resolve_config_value( FILE: trae_agent/utils/lake_view.py class LakeViewStep (line 72) | class LakeViewStep: class LakeView (line 78) | class LakeView: method __init__ (line 79) | def __init__(self, lake_view_config: LakeviewConfig | None): method get_label (line 88) | def get_label(self, tags: None | list[str], emoji: bool = True) -> str: method extract_task_in_step (line 94) | async def extract_task_in_step(self, prev_step: str, this_step: str) -... method extract_tag_in_step (line 138) | async def extract_tag_in_step(self, step: str) -> list[str]: method _agent_step_str (line 177) | def _agent_step_str(self, agent_step: AgentStep) -> str | None: method create_lakeview_step (line 194) | async def create_lakeview_step(self, agent_step: AgentStep) -> LakeVie... FILE: trae_agent/utils/legacy_config.py class ModelParameters (line 19) | class ModelParameters: class LakeviewConfig (line 37) | class LakeviewConfig: class MCPServerConfig (line 45) | class MCPServerConfig: class LegacyConfig (line 71) | class LegacyConfig: method __init__ (line 82) | def __init__(self, config_or_config_file: str | dict = "trae_config.js... method __str__ (line 169) | def __str__(self) -> str: FILE: trae_agent/utils/llm_clients/anthropic_client.py class AnthropicClient (line 19) | class AnthropicClient(BaseLLMClient): method __init__ (line 22) | def __init__(self, model_config: ModelConfig): method set_chat_history (line 32) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method _create_anthropic_response (line 36) | def _create_anthropic_response( method chat (line 54) | def chat( method parse_messages (line 155) | def parse_messages(self, messages: list[LLMMessage]) -> list[anthropic... method parse_tool_call (line 190) | def parse_tool_call(self, tool_call: ToolCall) -> anthropic.types.Tool... method parse_tool_call_result (line 199) | def parse_tool_call_result( FILE: trae_agent/utils/llm_clients/azure_client.py class AzureProvider (line 15) | class AzureProvider(ProviderConfig): method create_client (line 18) | def create_client( method get_service_name (line 31) | def get_service_name(self) -> str: method get_provider_name (line 35) | def get_provider_name(self) -> str: method get_extra_headers (line 39) | def get_extra_headers(self) -> dict[str, str]: method supports_tool_calling (line 43) | def supports_tool_calling(self, model_name: str) -> bool: class AzureClient (line 49) | class AzureClient(OpenAICompatibleClient): method __init__ (line 52) | def __init__(self, model_config: ModelConfig): FILE: trae_agent/utils/llm_clients/base_client.py class BaseLLMClient (line 13) | class BaseLLMClient(ABC): method __init__ (line 16) | def __init__(self, model_config: ModelConfig): method set_trajectory_recorder (line 22) | def set_trajectory_recorder(self, recorder: TrajectoryRecorder | None)... method set_chat_history (line 27) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method chat (line 32) | def chat( method supports_tool_calling (line 42) | def supports_tool_calling(self, model_config: ModelConfig) -> bool: FILE: trae_agent/utils/llm_clients/doubao_client.py class DoubaoProvider (line 15) | class DoubaoProvider(ProviderConfig): method create_client (line 18) | def create_client( method get_service_name (line 24) | def get_service_name(self) -> str: method get_provider_name (line 28) | def get_provider_name(self) -> str: method get_extra_headers (line 32) | def get_extra_headers(self) -> dict[str, str]: method supports_tool_calling (line 36) | def supports_tool_calling(self, model_name: str) -> bool: class DoubaoClient (line 42) | class DoubaoClient(OpenAICompatibleClient): method __init__ (line 45) | def __init__(self, model_config: ModelConfig): FILE: trae_agent/utils/llm_clients/google_client.py class GoogleClient (line 21) | class GoogleClient(BaseLLMClient): method __init__ (line 24) | def __init__(self, model_config: ModelConfig): method set_chat_history (line 32) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method _create_google_response (line 36) | def _create_google_response( method chat (line 50) | def chat( method parse_messages (line 171) | def parse_messages(self, messages: list[LLMMessage]) -> tuple[list[typ... method parse_tool_call (line 199) | def parse_tool_call(self, tool_call: ToolCall) -> types.Part: method parse_tool_call_result (line 203) | def parse_tool_call_result(self, tool_result: ToolResult) -> types.Part: FILE: trae_agent/utils/llm_clients/llm_basics.py class LLMMessage (line 11) | class LLMMessage: class LLMUsage (line 21) | class LLMUsage: method __add__ (line 30) | def __add__(self, other: "LLMUsage") -> "LLMUsage": method __str__ (line 40) | def __str__(self) -> str: class LLMResponse (line 45) | class LLMResponse: FILE: trae_agent/utils/llm_clients/llm_client.py class LLMProvider (line 15) | class LLMProvider(Enum): class LLMClient (line 27) | class LLMClient: method __init__ (line 30) | def __init__(self, model_config: ModelConfig): method set_trajectory_recorder (line 64) | def set_trajectory_recorder(self, recorder: TrajectoryRecorder | None)... method set_chat_history (line 68) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method chat (line 72) | def chat( method supports_tool_calling (line 82) | def supports_tool_calling(self, model_config: ModelConfig) -> bool: FILE: trae_agent/utils/llm_clients/ollama_client.py class OllamaClient (line 28) | class OllamaClient(BaseLLMClient): method __init__ (line 29) | def __init__(self, model_config: ModelConfig): method set_chat_history (line 43) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method _create_ollama_response (line 46) | def _create_ollama_response( method chat (line 72) | def chat( method parse_messages (line 146) | def parse_messages(self, messages: list[LLMMessage]) -> ResponseInputP... method parse_tool_call (line 169) | def parse_tool_call(self, tool_call: ToolCall) -> ResponseFunctionTool... method parse_tool_call_result (line 178) | def parse_tool_call_result(self, tool_call_result: ToolResult) -> Func... method _id_generator (line 194) | def _id_generator(self) -> str: FILE: trae_agent/utils/llm_clients/openai_client.py class OpenAIClient (line 27) | class OpenAIClient(BaseLLMClient): method __init__ (line 30) | def __init__(self, model_config: ModelConfig): method set_chat_history (line 37) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method _create_openai_response (line 41) | def _create_openai_response( method chat (line 62) | def chat( method parse_messages (line 166) | def parse_messages(self, messages: list[LLMMessage]) -> ResponseInputP... method parse_tool_call (line 187) | def parse_tool_call(self, tool_call: ToolCall) -> ResponseFunctionTool... method parse_tool_call_result (line 196) | def parse_tool_call_result(self, tool_call_result: ToolResult) -> Func... FILE: trae_agent/utils/llm_clients/openai_compatible_base.py class ProviderConfig (line 34) | class ProviderConfig(ABC): method create_client (line 38) | def create_client( method get_service_name (line 45) | def get_service_name(self) -> str: method get_provider_name (line 50) | def get_provider_name(self) -> str: method get_extra_headers (line 55) | def get_extra_headers(self) -> dict[str, str]: method supports_tool_calling (line 60) | def supports_tool_calling(self, model_name: str) -> bool: class OpenAICompatibleClient (line 65) | class OpenAICompatibleClient(BaseLLMClient): method __init__ (line 68) | def __init__(self, model_config: ModelConfig, provider_config: Provide... method set_chat_history (line 75) | def set_chat_history(self, messages: list[LLMMessage]) -> None: method _create_response (line 79) | def _create_response( method chat (line 110) | def chat( method parse_messages (line 217) | def parse_messages(self, messages: list[LLMMessage]) -> list[ChatCompl... function _msg_tool_call_handler (line 232) | def _msg_tool_call_handler(messages: list[ChatCompletionMessageParam], m... function _msg_tool_result_handler (line 248) | def _msg_tool_result_handler(messages: list[ChatCompletionMessageParam],... function _msg_role_handler (line 266) | def _msg_role_handler(messages: list[ChatCompletionMessageParam], msg: L... FILE: trae_agent/utils/llm_clients/openrouter_client.py class OpenRouterProvider (line 17) | class OpenRouterProvider(ProviderConfig): method create_client (line 20) | def create_client( method get_service_name (line 26) | def get_service_name(self) -> str: method get_provider_name (line 30) | def get_provider_name(self) -> str: method get_extra_headers (line 34) | def get_extra_headers(self) -> dict[str, str]: method supports_tool_calling (line 48) | def supports_tool_calling(self, model_name: str) -> bool: class OpenRouterClient (line 65) | class OpenRouterClient(OpenAICompatibleClient): method __init__ (line 68) | def __init__(self, model_config: ModelConfig): FILE: trae_agent/utils/llm_clients/retry_utils.py function retry_with (line 13) | def retry_with( FILE: trae_agent/utils/mcp_client.py class MCPServerStatus (line 11) | class MCPServerStatus(Enum): class MCPDiscoveryState (line 17) | class MCPDiscoveryState(Enum): class MCPClient (line 26) | class MCPClient: method __init__ (line 27) | def __init__(self): method get_mcp_server_status (line 33) | def get_mcp_server_status(self, mcp_server_name: str) -> MCPServerStatus: method update_mcp_server_status (line 36) | def update_mcp_server_status(self, mcp_server_name, status: MCPServerS... method connect_and_discover (line 39) | async def connect_and_discover( method connect_to_server (line 74) | async def connect_to_server(self, mcp_server_name, transport): method call_tool (line 93) | async def call_tool(self, name, args): method list_tools (line 97) | async def list_tools(self): method cleanup (line 101) | async def cleanup(self, mcp_server_name): FILE: trae_agent/utils/trajectory_recorder.py class TrajectoryRecorder (line 20) | class TrajectoryRecorder: method __init__ (line 23) | def __init__(self, trajectory_path: str | None = None): method start_recording (line 54) | def start_recording(self, task: str, provider: str, model: str, max_st... method record_llm_interaction (line 77) | def record_llm_interaction( method record_agent_step (line 130) | def record_agent_step( method update_lakeview (line 191) | def update_lakeview(self, step_number: int, lakeview_summary: str): method finalize_recording (line 198) | def finalize_recording(self, success: bool, final_result: str | None =... method save_trajectory (line 220) | def save_trajectory(self) -> None: method _serialize_message (line 232) | def _serialize_message(self, message: LLMMessage) -> dict[str, Any]: method _serialize_tool_call (line 244) | def _serialize_tool_call(self, tool_call: ToolCall) -> dict[str, Any]: method _serialize_tool_result (line 253) | def _serialize_tool_result(self, tool_result: ToolResult) -> dict[str,... method get_trajectory_path (line 263) | def get_trajectory_path(self) -> str: