TicketRow (tickets.py)

hermes-recipes · automation

Ticket handler-level operations — list / move / assign / dispatch / complete. Port of clawrecipes/src/handlers/tickets.ts plus the dispatch handler from clawrecipes/index.ts. OpenClaw-specific hooks (``api.runtime.system.enqueueSystemEvent``, ``scheduleManifestRegeneration``) are

"""Ticket handler-level operations — list / move / assign / dispatch / complete.

Port of clawrecipes/src/handlers/tickets.ts plus the dispatch handler from
clawrecipes/index.ts. OpenClaw-specific hooks (``api.runtime.system.enqueueSystemEvent``,
``scheduleManifestRegeneration``) are exposed as optional callbacks so the
file-first work is testable in isolation.
"""

import re
import shutil
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from typing import Callable, Iterable, Literal, Optional

from hermes_recipes.constants import VALID_ROLES, VALID_STAGES
from hermes_recipes.fs_utils import ensure_dir, write_file_safely
from hermes_recipes.lanes import ticket_stage_dir
from hermes_recipes.ticket_finder import (
    TICKET_FILENAME_RE,
    

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key