/** * Account identifiers never reach the wire (DES-seats-page A8 and A2). * * A seat's own words ride `GET /roster` as `auth_evidence` and inside `login_note`, and those are * the CLI's status output. Signed in, `claude auth status --json` prints the account (`email`, * `orgId`, `orgName`) beside the fields the roster needs (`loggedIn`, `authMethod`). `codex login * status` prints a masked key prefix ("Logged in using an API key - sk-proj-***"). This module is * the one place that turns that output into something the roster may carry: * * - {@link scrubStatusOutput} reads a JSON status object for its ALLOWLISTED fields only, so an * account field that a newer CLI adds is dropped too, and a field this module does not know is * never carried; * - {@link scrubEvidence} is the second guard for free text: email-like, UUID-like and key-shaped * strings are masked, wherever they appear; * - {@link accountFromStatus} reads the account KIND (and a provider-public plan name) from the * raw output BEFORE the scrub. It never returns an identifier. * * The roster's evidence fields carry ONLY crew's own vocabulary (codex r2 on #996: no mask can know * every shape an identifier takes in a CLI's prose): {@link statusSummary} for a status command, * {@link liveSummary} for the live check, `refusalSummary` (seat-health.ts) for a seat's refusal. * {@link scrubEvidence} stays as the second guard over all of them. * * Pure: no IO, no clock. */ /** Mask every account identifier in free text (the second guard; see the module doc). */ export declare function scrubEvidence(text: string): string; /** * A CLI's status output reduced to what the roster may carry. JSON objects (claude) keep only the * {@link STATUS_ALLOWLIST} fields, re-serialized compactly; anything else goes through * {@link scrubEvidence}. */ export declare function scrubStatusOutput(text: string): string; /** `RosterSeat.account.kind` (api-types 0.115.0). */ export type SeatAccountKind = 'subscription' | 'api_key' | 'free' | 'unknown'; export interface SeatAccount { kind: SeatAccountKind; /** A provider-public plan name ("Max", "Pro"), only from the fixed table below. */ plan?: string; } /** * The account kind a seat's auth-status output states, or `undefined` when it states none (the * caller then says `unknown`). Read from the RAW output; returns no identifier. * * - claude (`auth status --json`): `authMethod: "claude.ai"` is a subscription (plan from * `subscriptionType`), `"api_key"` an API key; * - codex (`login status`): "Logged in using ChatGPT" is a subscription; an API key, an access * token or a Bedrock key is `api_key`. */ export declare function accountFromStatus(seatKey: string, stdout: string, stderr?: string): SeatAccount | undefined; /** A probe process's outcome, as `seat-probe.ts` reports it (structural). */ export interface ProbeOutputLike { code: number | null; stdout: string; stderr: string; error?: string; } /** * A status command's answer, in crew's words only: claude's JSON reduced to its allowlisted * fields (stdout alone — a stderr warning never turns the allowlist off; malformed JSON is * withheld, never echoed), codex's known phrase, plus any refusal phrase stderr carried. */ export declare function statusSummary(seatKey: string, out: ProbeOutputLike): string; /** The live check's answer, in crew's words only: the refusal phrase, a known blocker, or the exit. */ export declare function liveSummary(out: ProbeOutputLike): string; //# sourceMappingURL=seat-scrub.d.ts.map