System-level exporter for HotMesh job data. Decodes the flat, symbolized hash stored in Redis/Postgres into a human-readable JobExport with three sections:

  • process — a nested object reflecting the activity execution tree. Each activity's input, output, and metadata are organized by their dimensional path (e.g., 0/0/worker/output/data).
  • dependencies — list of dependent jobs (child workflows, hooks, signals) spawned during execution.
  • status — the raw semaphore value from the job hash.

Optionally, set enrich_inputs: true to produce a flat activities array (ActivityDetail[]) that merges stream message history (inputs, timing, retries) with process outputs — useful for dashboards and debugging views.

This is the lower-level exporter used by the HotMesh engine directly. For durable workflow exports, use the ExporterService in services/durable/exporter which produces structured timeline and execution history formats.

Properties

appId: string
logger: ILogger
symbols: Symbols | Promise<Symbols>

Methods

  • Build structured activity details by correlating stream messages (inputs, timing, retries) with the process hierarchy (outputs).

    Stream messages carry the raw data that flowed through each activity:

    • data contains the activity input arguments
    • dad (dimensional address) reveals cycle iterations (e.g., ,0,1,0 = 2nd cycle)
    • created_at / expired_at give precise timing
    • retry_attempt tracks retries

    The process hierarchy carries activity outputs organized by dimension. This method merges both into a flat, dashboard-friendly list.

    Parameters

    Returns ActivityDetail[]

  • Export a job as a structured JobExport.

    Reads the raw job hash from the store, inflates symbolized keys into readable paths, and organizes data into process, dependencies, and status sections.

    When enrich_inputs is true, also fetches stream message history and produces a flat activities array with per-activity input/output, timing, retry attempts, and cycle iteration info.

    Parameters

    • jobId: string

      the job ID to export

    • options: ExportOptions = {}

      controls enrichment behavior

    Returns Promise<JobExport>

  • Decode a raw job hash into a structured JobExport.

    Walks every key in the flat hash and classifies it:

    • 3-char + dimension (aBC,0,0) — activity process state, organized into a nested hierarchy by dimension path and symbolized key
    • 3-char only (aBC) — top-level job state (done, response, error, etc.)

    The process result is a nested tree where dimensions are path segments (e.g., { "0": { "0": { "worker": { "output": { "data": ... } } } } }).

    Parameters

    • jobHash: StringStringType

      the raw key-value hash from the store

    • dependencyList: string[]

      raw dependency strings from the store

    Returns JobExport

    structured export with process tree, dependencies, and status

  • Parse raw dependency strings into structured DependencyExport entries.

    Each dependency string encodes the action type, topic, group ID, and job ID of a spawned sub-job (child workflow, hook, or signal cleanup). The job ID suffix reveals whether it originated from a hook (dimensional address + counter) or the main flow (counter only).

    Parameters

    • data: string[]

      raw dependency strings from the store

    • actions: JobActionExport

      accumulator for action tracking (hooks vs main flow)

    Returns DependencyExport[]

    structured dependency list

  • Resolve a 3-character symbol key to its full path (e.g., aBCworker/output/data). Returns the key unchanged if no symbol mapping exists.

    Parameters

    • key: string

    Returns string