data_juicer_agents.utils.runtime_helpers module#

Shared runtime helpers for session tools, adapters, and CLI surfaces.

data_juicer_agents.utils.runtime_helpers.normalize_line_idx(idx: int, total: int) int[源代码]#
data_juicer_agents.utils.runtime_helpers.parse_line_ranges(ranges: Any) tuple[list[int] | None, str | None][源代码]#
data_juicer_agents.utils.runtime_helpers.run_interruptible_subprocess(command: Any, *, timeout_sec: int, shell: bool) Dict[str, Any][源代码]#
data_juicer_agents.utils.runtime_helpers.short_log(text: str, max_lines: int = 30, max_chars: int = 6000) str[源代码]#
data_juicer_agents.utils.runtime_helpers.to_bool(value: Any, default: bool = False) bool[源代码]#
data_juicer_agents.utils.runtime_helpers.to_event_result_preview(value: Any, max_chars: int = 6000) str[源代码]#
data_juicer_agents.utils.runtime_helpers.to_int(value: Any, default: int) int[源代码]#
data_juicer_agents.utils.runtime_helpers.to_string_list(value: Any) List[str][源代码]#
data_juicer_agents.utils.runtime_helpers.to_text_response(payload: Dict[str, Any])[源代码]#
data_juicer_agents.utils.runtime_helpers.truncate_text(text: str, limit: int = 12000) str[源代码]#