ReMe/reme/utils/__init__.py
酱牛肉 f10a1c9935 feat(counter): extend counter tree utils and record job call statistics
- replace global_counter_next with fetch-and-add style global_counter_add/inc, plus read-only global_counter_get and global_counter_get_all
- record per-job call counts in app_context.metadata via BaseJob._record_call, covering background/cron/stream jobs
- update agentic_answer step and utils exports; add unit tests for job counting and counter utils
2026-07-29 22:45:53 +08:00

45 lines
1.3 KiB
Python

"""Utility modules."""
from .common_utils import (
hash_text,
execute_stream_task,
mock_reme_server,
call_action,
call_and_check,
)
from .env_utils import load_env, parse_env_file
from .link_expansion import expand_links, render_expansion_lines
from .logger_utils import get_logger
from .logo_utils import print_logo
from .service_utils import find_reme, locate_reme, precheck_start, cli_find_reme, running_service_config
from .similarity_utils import cosine_similarity, batch_cosine_similarity
from .token_utils import estimate_token_count
from .agent_state_io import AsStateHandler
from .counter import global_counter_add, global_counter_get, global_counter_get_all, global_counter_inc
__all__ = [
"hash_text",
"execute_stream_task",
"mock_reme_server",
"call_action",
"call_and_check",
"load_env",
"parse_env_file",
"expand_links",
"render_expansion_lines",
"get_logger",
"print_logo",
"find_reme",
"locate_reme",
"precheck_start",
"cli_find_reme",
"running_service_config",
"cosine_similarity",
"batch_cosine_similarity",
"estimate_token_count",
"AsStateHandler",
"global_counter_add",
"global_counter_get",
"global_counter_get_all",
"global_counter_inc",
]