Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
788eb8e2ed
commit
92881b6b56
35 changed files with 1206 additions and 806 deletions
|
|
@ -3,7 +3,8 @@ from __future__ import annotations
|
|||
import re
|
||||
from dataclasses import dataclass
|
||||
|
||||
ADDRESS = re.compile(r"^[@#]([a-z0-9][a-z0-9._-]*):(?:[ \t]*)(.+)$", re.IGNORECASE)
|
||||
ADDRESS = re.compile(r"^To:([a-z0-9][a-z0-9._-]*):[ \t]*(.+)$")
|
||||
COMMAND = re.compile(r"^Cmd:[ \t]*(\S(?:.*\S)?)?[ \t]*$")
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
@ -18,3 +19,11 @@ def parse_address_line(line: str) -> RoutedMessage | None:
|
|||
if not match:
|
||||
return None
|
||||
return RoutedMessage(target_repo=match.group(1), body=match.group(2))
|
||||
|
||||
|
||||
def parse_command_line(line: str) -> str | None:
|
||||
"""Return an operator command body; worker output must never call this."""
|
||||
match = COMMAND.match(line.rstrip("\r\n"))
|
||||
if not match or not match.group(1):
|
||||
return None
|
||||
return match.group(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue