Task configuration:
{"task_id": "03", "task_name": "switch_scene", "description": "Set obs-studio scene", "application_info": {"name": "obs-studio", "executable_path": "/workspace/PC-Canary/apps/obs-studio/build_ubuntu/rundir/Debug/bin/obs", "args": []}, "task_parameters": {"scene": "Scene"}, "instruction_template": "Please switch to scene ${scene} in obs-studio", "evaluation_setup": {"scripts": [{"role": "hook", "path": "hooker.js"}, {"role": "handler", "path": "handler.py"}], "timeout": 180}, "preconditions": {"obs_studio_running": true}, "total_key_steps": 1, "events": {"scene_match": {"description": "Scene matched successfully", "is_key_step": true, "key_step_index": 1, "key_step_name": "Current scene matched successfully"}}, "mcp_servers": [{"command": "node", "args": ["/home/agent/obs-mcp/build/index.js"]}]}

Hook script:
// OBS scene switching hook script
// Used to monitor OBS scene switching operations

(function () {
    // Script settings
    const FUNCTION_SetCurrentScene = "_ZN8OBSBasic15SetCurrentSceneE10OBSSafeRefIP10obs_sourceXadL_Z18obs_source_get_refEEXadL_Z18obs_source_releaseEEEb";

    // Send events to the evaluation system
    function sendEvent(eventType, data = {}) {
        const payload = {
            event: eventType,
            ...data,
            timestamp: new Date().getTime()
        };
        send(payload);
    }

    // Get function address
    function getFunctionAddress(functionName) {
        const funcAddr = DebugSymbol.getFunctionByName(functionName);
        if (!funcAddr) {
            sendEvent("error", {
                error_type: "function_not_found",
                message: `Cannot find function ${functionName}`
            });
            return null;
        }

        sendEvent("function_found", {
            address: funcAddr.toString(),
            message: `Found the actual address of function ${functionName}`
        });
        return funcAddr;
    }

    // Initialize recording update hooks
    function initSetCurrentSceneHook() {

        const SetCurrentSceneFuncAddr = getFunctionAddress(FUNCTION_SetCurrentScene);
        if (!SetCurrentSceneFuncAddr) {
            return;
        }

        Interceptor.attach(SetCurrentSceneFuncAddr, {
            onEnter: function(args) {
                sendEvent("setCurrentScene_called", {
                    message: "Intercepted the function call to switch the current scene"
                });
                const scene = new NativePointer(args[1]);
                console.log("scene pointer: ", scene);
                const scene_val = scene.readPointer();
                console.log("scene_val pointer: ", scene_val);
                const name_pointer = scene_val.readPointer();
                console.log("name pointer: ", name_pointer);
                const name = name_pointer.readCString(-1);
                console.log("name: ", name);
                this.name = name;
                this.force = args[2];
            },

            onLeave: function(retval) {
                sendEvent("setCurrentScene_returned", {
                    message: "Switch current scene function returned"
                });
                console.log("this.name: ", this.name);
                console.log("this.force: ", this.force);
                sendEvent("current_scene", {
                    scene: this.name,
                    message: `Current scene name: ${this.name}`
                })
            }
        });
    }

    // Initialize hooks
    function initHook() {
        sendEvent("script_initialized", {
            message: "OBS scene switching monitoring script has started"
        });

        // Initialize each hook
        initSetCurrentSceneHook();
        sendEvent("hook_installed", {
            message: "Scene switching monitoring hook installed, waiting for operation..."
        });
    }

    // Start script
    initHook();
})();

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

from typing import Dict, Any, Optional, List


def message_handler(
    message: Dict[str, Any], logger, task_parameter: Dict[str, Any]
) -> Optional[List[Dict[str, Any]]]:
    payload = message.get("payload")
    if not payload or not isinstance(payload, dict):
        logger.error(message)
        return None

    event_type = payload["event"]
    logger.debug(f"receive: {event_type}")

    if event_type == "current_scene":
        logger.info("get current scene")
        expected_scene = task_parameter.get("scene", "")
        scene = payload.get("scene", "")
        print(f"expected_scene: {expected_scene}, scene: {scene}")
        if expected_scene == scene:
            return [
                {"status": "key_step", "index": 1},
                {"status": "success", "reason": "successfully switch scene"},
            ]

    return None