/** * Parsed Heroku platform log events emitted by the runtime as * plain-text lines on the `heroku` source. The event shapes are * derived from the line patterns in {@link parseHerokuLogLine}. * * Each variant has a `kind` discriminator. Consumers should * switch on `kind` to narrow. */ export type HerokuLogEvent = AttachmentAttachedEvent | AttachmentDetachedEvent | AttachmentUpdatedEvent | ProvisioningCompletedEvent | ScaledToEvent | StartingProcessEvent | StateChangedEvent; export type StateChangedEvent = { /** Dyno or process token (e.g. `web.1` on Cedar, `web-abc-123` on Fir). */ dynoName: string; from: string; kind: 'state-changed'; /** Source token from the line prefix (e.g. `app`, `heroku`). */ source: string; to: string; }; export type AttachmentAttachedEvent = { /** Config var name the attachment was bound to (e.g. `LOGDNA`). */ configVar: string; kind: 'attachment-attached'; /** Stable platform reference (e.g. `logdna-deep-31633`). */ ref: string; }; export type AttachmentDetachedEvent = { configVar: string; kind: 'attachment-detached'; ref: string; }; export type AttachmentUpdatedEvent = { /** Config var that was updated (e.g. `DATABASE`). */ configVar: string; kind: 'attachment-updated'; /** Add-on service name from the line bracket (e.g. `heroku-postgres`). */ service: string; }; export type ProvisioningCompletedEvent = { kind: 'provisioning-completed'; ref: string; }; /** * A single `Scaled to ...` line can list multiple dyno types in one * shot (e.g. `Scaled to web@2:Standard-1X worker@1:Standard-2X`). * Each entry in `entries` is one dyno type from that line. */ export type ScaledToEvent = { entries: ScaledToEntry[]; kind: 'scaled-to'; }; export type ScaledToEntry = { /** Dyno type (e.g. `web`). */ dynoType: string; /** Resulting dyno count. */ quantity: number; /** Dyno size (e.g. `Standard-1X`). */ size: string; }; export type StartingProcessEvent = { /** Command without surrounding backticks (e.g. `npm start`). */ command: string; dynoName: string; kind: 'starting-process'; source: string; }; /** * Parse a single log line into a structured Heroku platform event, * or `undefined` if the line does not match any known event pattern. * * Pure function — no I/O, no side effects. Compose with * {@link streamLogs} to react to runtime events while still * forwarding raw lines to a UI. */ export declare function parseHerokuLogLine(line: string): HerokuLogEvent | undefined;