import type { BoardIssueCoherenceFlag } from './orient-coherence.js';
/** The `{ error }` envelope for an underivable section. The `error` key is the
 *  external JSON-API field name (same convention as `json-output.ts`). */
interface ErrorEnvelope {
    error: string;
}
/** A section is EITHER its derived value OR an `{ error }` envelope — never silently omitted. */
type Section<T> = T | ErrorEnvelope;
export interface OrientParkedEntry {
    subsystem: string;
    since?: string;
    reason?: string;
    tracking?: string;
}
export interface OrientPr {
    number: number;
    title: string;
    headRefName: string;
    isDraft: boolean;
}
export interface OrientBoardItem {
    status: string;
    title: string;
    contentNumber?: number;
}
export interface OrientEpic {
    number: number;
    title: string;
    labels: string[];
    subIssues: {
        number: number;
        title: string;
    }[];
}
export interface OrientOtherIssue {
    number: number;
    title: string;
    labels: string[];
}
/** Index-freshness pointer — either a derived staleness fact or an honest "not synced" absence. */
export interface OrientIndexFreshness {
    synced: boolean;
    /** Relative age of the registry `lastSync` (e.g. '2h ago'), when synced. */
    lastSync?: string;
    stale?: boolean;
}
export interface OrientReport {
    repo: Section<string>;
    derivedAt: string;
    indexFreshness: OrientIndexFreshness;
    parked: Section<OrientParkedEntry[]>;
    openPRs: Section<OrientPr[]>;
    board: Section<OrientBoardItem[]>;
    coherence: Section<BoardIssueCoherenceFlag[]>;
    epics: Section<OrientEpic[]>;
    otherOpenIssues: Section<OrientOtherIssue[]>;
    /** Whether a board project number is configured. Distinguishes the JSON's
     *  "no board configured" (false) from "board configured but empty" (true,
     *  `board: []`) — without it the two collapse to the same shape (Tenet 14). */
    boardConfigured: boolean;
}
/**
 * Programmatic entry: derive the full `OrientReport` for `cwd` WITHOUT writing
 * stdout. Identical report to `orient --json` (one derivation, two callers —
 * cannot diverge). Reused by `orientCommand` (the CLI surface) and the
 * SessionStart hook (`.claude/hooks/session-context.mjs`, mmnto-ai/totem#2044
 * PR-2), which dynamic-imports this from `packages/cli/dist/commands/orient.js`
 * — the workspace-dist pattern, deliberately NOT the global `totem` binary
 * (sidesteps the stale-resolve trap mmnto-ai/totem#2053).
 *
 * Latency note: orient's gh adapters are synchronous (`safeExec`/execFileSync),
 * so this runs ~4 sequential blocking gh calls (repo view + PRs + issues + board),
 * each bounded by the adapter's per-call timeout. Callers on a latency-sensitive
 * path (the hook) wrap it best-effort and degrade on failure.
 */
export declare function deriveOrientReport(cwd: string): Promise<OrientReport>;
export declare function renderReport(report: OrientReport): string;
/**
 * Compact projection of an `OrientReport` for auto-injection at session start.
 *
 * Emits ONLY high-signal state — parked/frozen subsystems, open PRs, and board↔
 * issue coherence drift — plus a one-line COUNTS pointer for epics/other-issues
 * (NOT the full enumeration: "pointers not bodies", mmnto-ai/totem-strategy#467
 * Tier-A discipline). An underivable section stays a `⚠ could not derive` line
 * (Tenet 4 — never a silent omit), so the projection inherits orient's fail-loud
 * contract. Hard-bounded by `SESSION_BLOCK_MAX_CHARS` (the guardrail above).
 *
 * Returns '' when there is nothing high-signal to surface (no parked, no PRs, no
 * drift, no derivable counts) so the hook can omit the block entirely rather than
 * inject an empty header.
 */
export declare function renderOrientForSession(report: OrientReport): string;
export declare function orientCommand(opts: {
    json?: boolean;
    session?: boolean;
}): Promise<void>;
export {};
//# sourceMappingURL=orient.d.ts.map