Skip to main content

Module text_fence

Module text_fence 

Source
Expand description

Shared fenced-code-block scanning and tool-name hygiene.

Content-derived tool-call extraction must not treat markup inside fences (documentation, test fixtures) or mid-prose tag mentions as executable calls. This module is pure infrastructure used by the runloop text_tools parsers and the skill sub-LLM textual fallback.

Constants§

MAX_CLEAN_TOOL_NAME_LEN
Maximum accepted tool-name length for content-derived calls.

Functions§

fence_delimiter_line
Classify a line as a fenced-code-block delimiter.
find_unfenced_from
First byte offset of needle at or after from, outside fenced code blocks.
is_clean_tool_name
Whether raw is a clean tool identifier (not prose, not a fixture blob).
is_dispatchable_tool_name
Whether raw is safe to dispatch as a native tool name (not a prose blob).
unfenced_byte_ranges
Byte ranges of text outside fenced code blocks.