Multiplexer and Decorator¶
tether.multiplexer¶
Virtual CLI Multiplexer (act(cmd, stdin)) with 9B quirk normalization and JIT --help.
Multiplexer
¶
normalize_cmd(raw_cmd)
¶
Normalize common small-model CLI syntax quirks deterministically.
unescape_literal_newlines(stdin)
¶
Unescape literal \n/\t when a small model sent a whole payload on one line.
split_cli(cmd)
¶
Split a CLI command string using POSIX shlex with graceful fallback on unclosed quotes.
tether.decorator¶
@tool decorator introspection and ultra-compact JIT --help synthesis.
ToolSpec
dataclass
¶
build_tool_spec(fn, *, name=None, description=None, custom_help=None, raw_dispatch=False)
¶
Introspect a Python function into a ToolSpec.
tool(fn=None, *, name=None, namespace=None, description=None)
¶
Decorator to register a sync or async Python function as a Tether virtual CLI tool.