ReMe/reme/utils/__init__.py
jinliyl a9ec334adc
feat: simplify wikilink semantics and support line anchors (#412)
* feat: simplify local links and support line anchors

* fix: align line anchor tests with CI lint

* fix: preserve local links across file moves

* fix: encode markdown paths when rewriting links

* refactor(read): keep explicit line range parameters

* fix: simplify legacy link predicate compatibility

* docs: align local link behavior with implementation

* fix: skip unsupported markdown destination escapes

* fix: normalize workspace link paths across platforms

* fix: bound markdown link scanning

* fix: keep local link processing linear

* docs: clarify permissive markdown link parsing

* fix: handle local link processing failures

* refactor: limit file links to wikilink syntax

* docs: align wikilink contract with implementation

* fix: normalize dream and neighbor paths on Windows

* fix: resolve workspace path for neighbor expansion
2026-08-05 11:47:50 +08:00

55 lines
1.4 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 .line_anchor import format_line_anchor, parse_line_anchor
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_add_many,
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",
"format_line_anchor",
"parse_line_anchor",
"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_add_many",
"global_counter_get",
"global_counter_get_all",
"global_counter_inc",
]