Eai.Task (eai v0.1.11)

Copy Markdown

Task result management — the engine behind get_task_result / force_complete_task tools.

Manages per-task buffers (sentinel-based stream collection), interrupt flags, and timeout windows via the Cache. Lives at the tool layer, not in the sandbox.

Summary

Functions

check_and_clear_interrupt_flag(pty_session_id)

check_timeout_window(pty_session_id)

collect(task_id, data)

流式收集 PTY 输出,哨兵匹配截取纯净结果

force_complete(task_id)

超时强制收集:从 buffer 尽力提取有效内容

get(task_id)

查询任务结果

init_task(task_id)

sentinel_left()

sentinel_right()

set_interrupt_flag(pty_session_id)

trigger_timeout_window(pty_session_id, depth \\ 1)