import type { ExternalWorkItemSource } from './storage/domains/work-items/base.js'; /** * Where a card came from, in the vocabulary branch naming reads. Server rows * map their `externalSource` into this with {@link workItemBranchSource}; the * board's own `WorkItem['source']` is already this union. */ export type WorkItemBranchSource = 'github-issue' | 'github-pr' | 'linear-issue' | 'slack-thread' | 'manual'; export interface WorkItemBranchInput { id: string; source: WorkItemBranchSource; metadata?: Record | null; } /** Map a stored item's provenance onto the source vocabulary branch naming reads. */ export declare function workItemBranchSource(externalSource: ExternalWorkItemSource | null | undefined): WorkItemBranchSource; /** The provider number a GitHub card carries — the `#12` its runs and thread titles name it by. */ export declare function workItemNumber(item: Pick): number | undefined; /** How a card names its thread: a Linear title already opens with its identifier, a GitHub card gets its number here. */ export declare function workItemThreadTitle(item: Pick & { title: string; }): string; /** * The git branch an item's runs and sessions share, one grammar for both sides * of the wire: the dispatcher names autonomous run branches with it and the * board opens card sessions on it, so both converge on one checkout per item. * Cards without a provider identity (manual, Slack) and cards whose metadata * lost their identifier fall back to the id-derived branch. */ export declare function workItemBranch(item: WorkItemBranchInput): string; /** The pull request a `factory/pr-` branch was named after, the inverse of {@link workItemBranch}. */ export declare function pullRequestNumberFromBranch(branch: string): number | undefined; //# sourceMappingURL=work-item-branch.d.ts.map