/** * Friendly display names for background jobs and subagent chips. * * Background `job_*` cards otherwise read as the raw tool vocabulary * (`job_output`, `job_id: bash-1`). Each job id gets a two-token alias * (hour + weather: 昏风 / twilight wind) derived from the id itself rather * than from a random draw, so the same * job keeps one name across its call card, its result card, and every later * `job_output` / `job_kill` mention. The model-facing id stays authoritative; * the alias is presentation only. * * Subagent chips use a different scheme: a role distilled from the parent * spawn description, joined to one of the four directional beasts * (青龙 / 白虎 / 朱雀 / 玄武) hashed from the child session id. * * @module dsh-ssh-tui/job-label */ /** FNV-1a over the job id: stable, dependency-free, and well spread for short ids. */ export declare function hashJobId(id: string): number; /** * One stable alias for a background job, or `undefined` when the id is empty * or the locale carries no vocabulary. * @param jobId - the native job id (`bash-1`, `pwsh-2`, …). * @returns the locale-formatted alias, e.g. `昏风` / `twilight wind`. */ export declare function jobAlias(jobId: string): string | undefined; /** The four directional beasts, hashed from the child session id. */ export declare const SUBAGENT_BEASTS: readonly ["azure-dragon", "white-tiger", "vermilion-bird", "black-tortoise"]; export type SubagentBeastId = (typeof SUBAGENT_BEASTS)[number]; export type SubagentRoleId = 'scout' | 'scribe' | 'artisan' | 'envoy' | 'inquirer' | 'sentinel' | 'steward' | 'courier'; /** Distill a parent spawn description into one role id. */ export declare function subagentRoleId(task: string): SubagentRoleId; /** Hash the child session onto one of the four beasts. */ export declare function subagentBeastId(sessionId: string): SubagentBeastId; /** Localized role label (`探路` / `scout`). */ export declare function subagentRoleLabel(role: SubagentRoleId): string; /** Localized beast label (`青龙` / `Azure Dragon`). */ export declare function subagentBeastLabel(beast: SubagentBeastId): string; /** * Chip title: `探路·青龙` / `Scout · Azure Dragon`. * Falls back to the spawn-time label when neither task nor id can be named. */ export declare function subagentCourtesyName(input: { sessionId: string; task?: string; fallback: string; }): string; /** True when a string looks like a session / tool-call id, not a display name. */ export declare function looksLikeOpaqueId(value: string): boolean; /** Prefer a recorded tool name; never surface `call-` as a title. */ export declare function displayToolName(name: string | undefined): string;