/** * chat-markers.ts — shared, pure helpers for the resume-time status digest. * * Used by both the `SessionStart` branch of `hula session-hook` * (src/commands/session-hook.ts) and the manual `hula status` command * (src/commands/status.ts) so the two paths produce byte-for-byte identical * output. Everything here is cross-platform (no `bash`/`jq`; `os.homedir()` + * `node:path`) and never throws for expected "nothing to do" cases. * * Three concerns: * 1. parseTranscriptMarkers — pull tracking names out of the transcript's * `` markers (assistant text only). * 2. sessionTrackingNames — reverse-lookup the session-record files written * by the PreToolUse hook (sessionId → branch/key). * 3. collectTrackingNames + formatDigest — union/dedupe the two sources and * render the one-line-per-plan digest. */ /** Max tracking names resolved per digest (keeps output under the 10k cap). */ export declare const MAX_TRACKING_NAMES = 10; /** * Example/placeholder tracking names echoed from skill docs (SKILL.md examples) * into the transcript. These must never be treated as real tracking names. * Shared by the parser and its test so there is a single source of truth. */ export declare const PLACEHOLDER_TRACKING_NAMES: Set; /** * Extract tracking names from the `` * markers in a Claude Code transcript JSONL file. Only assistant `text` blocks * are scanned. Tolerant of a missing/partial file: returns `[]` on any read * error, and skips any individual line that fails to parse. Placeholder/example * values are dropped. Order is first-seen; de-duplication happens in * {@link collectTrackingNames}. */ export declare function parseTranscriptMarkers(transcriptPath: string): string[]; /** * Reverse-lookup the tracking names recorded by the PreToolUse session hook for * a given session id. Reads `~/.hublaunch-sessions//*.json` * (the same directory keying as `session-hook.ts` and `client-session.ts`), and * for every record whose `sessionId` matches, collects its `branch` (launch / * `hula plan start` / `draft-and-launch`) or `key` (backlog) field. * * Returns `[]` on a missing directory or any error — never throws. */ export declare function sessionTrackingNames(sessionId: string, repoRoot: string): string[]; /** * Union the two tracking-name sources (session-record reverse lookup + * transcript markers), de-duplicate preserving first-seen order, and cap at * {@link MAX_TRACKING_NAMES}. */ export declare function collectTrackingNames(opts: { sessionId?: string; transcriptPath?: string; repoRoot: string; }): string[]; /** * Minimal structural shape of a plan row the digest renders. Matches the * serialized `GET /api/v1/plans` row (which flows through `withLifecycle`): * every field beyond `id`/`trackingName` is optional so the formatter degrades * gracefully against older servers. */ export interface PlanDigestRow { id: string; trackingName: string; stage?: string | null; prNumber?: number | null; prMerged?: boolean | null; deploymentStatus?: string | null; archived?: boolean | null; archivedAt?: string | null; closedAt?: string | null; updatedAt?: string | null; } /** The header line printed above the per-plan digest rows. */ export declare const DIGEST_HEADER = "\uD83D\uDCCB HubLaunch resume digest \u2014 what changed since you last worked here (run /hula-status to refresh):"; /** * Render the full digest: one header line followed by one line per plan. Returns * the empty string when there are no plans (callers print nothing in that case). */ export declare function formatDigest(plans: PlanDigestRow[], projectUrl: string): string; //# sourceMappingURL=chat-markers.d.ts.map