INNER CODE UNIT · Python
p_post
ohdearquant/lionagi · lionagi/cli/main.py:236
p_head, p_post = rest[:i], rest[i + 1 :]
else:
p_head, p_post = rest, []
# Strip help tokens from the probe input only (argparse would print
# flow help and exit); the reconstruction below still sees them.
p_head_probe = [t for t in p_head if t not in ("--help", "-h")]
p_ns, p_extras = fl_probe.parse_known_args(p_head_probe)
unknown = [e for e in p_extras if e.startswith("-") and e != "-"]
if unknown:
log_error(f"unrecognized arguments: {' '.join(unknown)}")
return 1
bare = [*(p_ns.query or []), *p_extras, *p_post]
if not bare:
log_error(
"playbook NAME is required\n"
'Usage: li play <name> "<prompt>" [--bypass --team-mode TEAM --timeout N ...]\n'
"Flags may appear anywhere relative to NAME and the prompt."
)