Task configuration:
{"task_id": "01", "task_name": "start_recording", "description": "Start recording in obs-studio", "application_info": {"name": "obs-studio", "executable_path": "/workspace/PC-Canary/apps/obs-studio/build_ubuntu/rundir/Debug/bin/obs", "args": []}, "instruction_template": "Please start recording 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": {"script_initialized": {"description": "Hook script initialized", "is_key_step": false}, "start_recording_called": {"description": "Intercepted start recording function call", "is_key_step": false}, "is_recording_active": {"description": "Recording has started", "is_key_step": true, "key_step_index": 1, "key_step_name": "Recording in progress"}, "error": "Error event"}, "mcp_servers": [{"command": "node", "args": ["/home/agent/obs-mcp/build/index.js"]}]}

Hook script:
// OBS Recording Update Monitor Hook Script
// Used to monitor OBS recording update operations

(function () {
    // Script settings
    const FUNCTION_NAME_StartRecording = "_ZN12SimpleOutput14StartRecordingEv";

    // 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: `Unable to find function ${functionName}`
            });
            return null;
        }

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

    // Initialize recording update hook
    function initStartRecordingHook() {
        const startRecrodingFuncAddr = getFunctionAddress(FUNCTION_NAME_StartRecording);
        if (!startRecrodingFuncAddr) {
            return;
        }

        Interceptor.attach(startRecrodingFuncAddr, {
            onEnter: function(args) {
                sendEvent("start_recording_called", {
                    message: "Intercepted call to recording update function"
                });
            },

            onLeave: function(retval) {
                sendEvent("start_recording_returned", {
                    message: "Recording update function returned"
                });
                
                sendEvent("is_recording_active", {
                    recording: retval,
                    message: `Current recording status: ${retval}`
                });
            }
        });
    }

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

        // Initialize individual hooks
        initStartRecordingHook();
        sendEvent("hook_installed", {
            message: "Recording update monitoring hook installed, waiting for operations..."
        });
    }

    // 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.get("event")
    logger.info(payload.get("message", ""))

    if event_type == "is_recording_active":
        recording = payload.get("recording", False)
        logger.info(f"The recording state of obs is {recording}")

        if recording:
            return [
                {"status": "key_step", "index": 1},
                {"status": "success", "reason": "start recording success"},
            ]

    return None