Task configuration:
{"task_id": "01", "task_name": "\u6dfb\u52a0\u7b80\u5355\u5361\u7247", "description": "\u6dfb\u52a0\u4e00\u5f20\u95ee\u7b54\u9898\u5361\u7247\uff0c\u6b63\u9762\u4e3aHello\uff0c\u80cc\u9762\u4e3aWorld\uff0c\u6dfb\u52a0\u5230\u7cfb\u7edf\u9ed8\u8ba4\u4e2d", "application_info": {"name": "anki", "executable_path": "/home/agent/anki/out/pyenv/bin/python", "args": ["/home/agent/anki/tools/run.py"], "cwd": "/home/agent/anki"}, "task_parameters": {"first_field": "Hello", "second_field": "World"}, "instruction_template": "\u6dfb\u52a0\u4e00\u5f20\u95ee\u7b54\u9898\u5361\u7247\uff0c\u6b63\u9762\u4e3a${first_field}\uff0c\u80cc\u9762\u4e3a${second_field}\uff0c\u6dfb\u52a0\u5230\u7cfb\u7edf\u9ed8\u8ba4\u4e2d", "evaluation_setup": {"scripts": [{"role": "hook", "path": "hooker.js", "dependency": ["../common/hooker_common.js"]}, {"role": "handler", "path": "handler.py"}], "timeout": 60}, "events": {"card_added": {"description": "\u6570\u636e\u5e93\u4e2d\u51fa\u73b0\u5361\u7247", "is_key_step": true, "key_step_index": 1, "key_step_name": "\u6570\u636e\u5e93\u4e2d\u51fa\u73b0\u5361\u7247"}, "correct_field": {"description": "\u5361\u7247\u6570\u636e\u5339\u914d", "is_key_step": true, "key_step_index": 2, "key_step_name": "\u5361\u7247\u6570\u636e\u5339\u914d"}, "wrong_field": {"description": "\u5361\u7247\u6570\u636e\u4e0d\u5339\u914d", "is_key_step": false}, "correct_deck": {"description": "\u5361\u7247Deck\u6b63\u786e", "is_key_step": false}, "wrong_deck": {"description": "\u5361\u7247Deck\u4e0d\u5339\u914d", "is_key_step": false}}, "sql_path": "/home/agent/.local/share/Anki2/sam/collection.anki2", "total_key_steps": 2, "mcp_servers": [{"command": "/home/agent/anki-mcp-server/.venv/bin/python", "args": ["/home/agent/anki-mcp-server/run_server.py"]}]}

Hook script:
//! The script only tested in x86-64!
const TRACE_FUNCTION = {
        "storage_add_card": {
            "addr": 0x00000000007065a0,
        }
}
function initHooks() {
    // iterate function name and addr, init it.
    for (const [function_name, config] of Object.entries(TRACE_FUNCTION)) {
        initHook(function_name, config);
    }
}
initHooks();
sendLog("info", "add hooks done");

Evaluation handler:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
sys.path.append(os.path.dirname(__file__))
from common import *

def handle_storage_add_card(context: Context,message) -> Status:
    context.update_database()
    latest : Card = sorted(AnkiObjMap().array_by_type("card"),key=lambda x: x.mod,reverse=True)[0]
    note = latest.get_note()
    status = Status(status=StatusType.PROGRESS)
    status.emit(EventCardAdded())
    if len(note.fields) == 2 and note.fields[0] == tp.first_field and note.fields[1] == tp.second_field:
        status.emit(EventCorrectField())
    else:
        status.emit(EventWrongField(note.fields,f"[{tp.first_field} {tp.second_field}]"))
    deck = latest.get_deck()
    if deck and deck.name == "系统默认":
        status.emit(EventCorrectDeck())
    else:
        status.emit(EventWrongDeck("系统默认",deck.name))

    return status
      
TRACE_HANDLERS = {
    "storage_add_card": handle_storage_add_card
}   
dependency_graph = {
    "card_added" : [],
    "correct_field" : ["card_added"],
    "correct_deck" : ["card_added"]
}
finished_list = [
    "correct_field","correct_deck"
]

bind_handlers(TRACE_HANDLERS,dependency_graph,finished_list)