Task configuration:
{"task_id": "05", "task_name": "execute_command_in_vscode_terminal", "description": "\u5728vscode\u4e2d\u6253\u5f00\u7ec8\u7aef, \u5e76\u4e14\u5728\u7ec8\u7aef\u6267\u884c\u547d\u4ee4", "application_info": {"name": "vscode", "executable_path": "/usr/share/code/code", "args": ["--no-sandbox", "--user-data-dir=/root/vscode_user_data_dir/"]}, "task_parameters": {"dir": "/root/C-Plus-Plus/data_structures", "cmd": "tree"}, "instruction_template": "\u5728vscode\u5f53\u524d\u5de5\u4f5c\u533a\u4e2d\u6253\u5f00\u7ec8\u7aef, \u5e76\u4e14\u5728\u7ec8\u7aef\u4e2d\u5207\u6362\u5230 ${dir} \u76ee\u5f55\u4e0b\u6267\u884c\u547d\u4ee4 ${cmd}", "evaluation_setup": {"scripts": [{"role": "hook", "path": "hooker.js"}, {"role": "handler", "path": "handler.py"}], "timeout": 120, "evaluator_type": "IpcInjector", "evaluate_on_completion": false}, "total_key_steps": 2, "preconditions": {"vscode_running": true}, "events": {"command_execute": {"description": "\u68c0\u6d4b\u5230\u7ec8\u7aef\u6267\u884c\u547d\u4ee4", "is_key_step": true, "key_step_index": 2, "key_step_name": "\u5728\u7ec8\u7aef\u6267\u884c\u547d\u4ee4"}, "create_terminal": {"description": "\u68c0\u6d4b\u5230\u521b\u5efa\u65b0\u7684\u7ec8\u7aef", "is_key_step": true, "key_step_index": 1, "key_step_name": "\u521b\u5efa\u7ec8\u7aef"}}, "mcp_servers": [{"command": "mcp-proxy", "args": ["http://127.0.0.1:6010/sse"]}], "context_data": [{"from": "tests/context_data/vscode/user_data", "to": "/root/vscode_user_data_dir"}, {"from": "tests/context_data/vscode/extensions", "to": "/root/.vscode/"}, {"from": "tests/context_data/vscode/C-Plus-Plus", "to": "/root/C-Plus-Plus"}]}

Hook script:
// 监听终端命令开始执行
vscode.window.onDidStartTerminalShellExecution((event) => {
    // console.log(event.execution.commandLine.value);
    // console.log(event.execution.cwd.path);
    socket.emit("send", {
        'event_type': "command_execute",
        'message': "检测到终端执行命令",
        "cmd": event.execution.commandLine.value,
        "dir": event.execution.cwd.path
    });
});

// Register a listener for when a terminal is opened
vscode.window.onDidOpenTerminal(async (terminal) => {
    // Emit terminal creation event via socket
    socket.emit('send', {
        'event_type': 'create_terminal',
        'message': '检测到终端创建'
    });
});

Evaluation handler:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from typing import Dict, Any, Optional, Callable, List

def message_handler(message: Dict[str, Any], logger, task_parameter: Dict[str, Any]) -> Optional[List[Dict[str, Any]]]:    
    event_type = message.get('event_type')
    logger.info(message)
    expected_dir = task_parameter.get("dir", "data_structures")
    expected_cmd = task_parameter.get("cmd", "tree")
    if event_type == "command_execute":
        c_dir = message.get("dir")
        c_cmd = message.get("cmd")
        if c_cmd == expected_cmd and c_dir == expected_dir:
            return [
                {"status": "key_step", "index": 2},
                {"status": "success", "reason": f"成功在终端执行命令"}
            ]
        elif c_cmd.split() == ['cd', '/root/C-Plus-Plus/data_structures', '&&', 'tree'] and c_dir == "/root/C-Plus-Plus":
            return [
                {"status": "key_step", "index": 2},
                {"status": "success", "reason": f"成功在终端执行命令"}
            ]
    elif event_type == "create_terminal":
        return [{"status": "key_step", "index": 1}]
    return None