export type TraceSelectionFlags = { trace?: string; last?: number; since?: string; all?: boolean; }; /** What the picker needs to know about a trace. `TraceSummary` has both * fields, so the commands pass their summaries straight in; start time * is computed in one place, `traceSummaries`, and never again. */ export type Pickable = { traceId: string; startedAt: number | undefined; }; export type TraceSelection = { kind: "selected"; picked: T[]; total: number; older: number; } | { kind: "refused"; reason: string; }; /** `30m`, `2h`, `3d`, or an ISO date, as a time in ms, or a refusal. */ export declare function parseSince(text: string, now: number): { at: number; } | { error: string; }; /** A flag's text as a positive whole number, or a refusal naming the flag. * Undefined text is an absent flag. */ export declare function parseCount(flag: string, text: string | undefined): { value: number | undefined; } | { error: string; }; /** * The traces the flags pick, newest first by start time, by the * combinations table above. `defaultLast` applies only when none of the * four flags is given. A trace with no timestamp sorts oldest and `since` * never picks it. `older` counts the traces `last` (or the default) left * out. */ export declare function selectTraces(traces: readonly T[], flags: TraceSelectionFlags, options: { defaultLast: number; now: number; }): TraceSelection;