import type { FileFindings } from "./classify.js"; import type { BoundViolation } from "./bounds.js"; export declare function truncate(value: string, max?: number): string; /** Bytes as the creator reads them. Decimal MB, matching what a build tool prints. */ export declare function formatBytes(bytes: number): string; /** The limit, printed as a plain number and never as policy. */ export declare function formatLimit(bytes: number): string; export declare function relativeTime(iso: string, now: number): string; /** * Flow L25. Three registers of copy because the platform's confidence genuinely * differs: * - TEMPLATE-DEFAULT is flat and assertive. The CLI matched a string in a * corpus it ships; it knows. * - LIKELY-DEFAULT is hedged. The heuristic will be wrong sometimes, and a * creator whose experience is genuinely called "AR" must not be told they * made a mistake. * - The dead og:image is the only ✗ the checklist ever emits, and it earns it: * the manifest either contains the path or it does not. * * BOTH default tiers print the offending value. "Still the template default" * without the string is a claim the creator has to go and verify; with it they * either recognise it instantly or spot that we are wrong. * * A FINDING IS NEVER A COUNT. No "2 issues found", no summary line, and no exit * code that varies with findings. */ export declare function findingLines(byFile: FileFindings[], withSubtitle: boolean): string[]; /** * Mandatory and always present. A screen with a red ✗ on it reads as a gate * unless it explicitly says otherwise, and a creator who believes the platform * is gating their publish on our opinion of their tags has learned * something false about who owns the dist. */ export declare function nothingBlocksYou(): string[]; export interface ChecklistInput { projectName: string; orgName: string; address: string; fileCount: number; totalBytes: number; nextVersion: number; findings: FileFindings[]; } export declare function readingLine(fileCount: number, totalBytes: number): string; export declare function headerLine(projectName: string, orgName: string): string; /** * Flow L22 — the single most consequential screen in the product, and its ORDER * is the design. * * The address block is FIRST and it is fenced: a creator who reads nothing else * reads the address and the sentence under it. The findings come AFTER, never * before — the address is the irreversible thing and the metadata is fixable * forever, so putting a red ✗ above the permanence block would make the eye land * on the recoverable problem and skim the unrecoverable one. */ export declare function firstPublishChecklist(i: ChecklistInput): string[]; /** The prompt line restates the address AND the version. `[y/N]` — an accidental Enter does nothing. */ export declare function firstPublishPrompt(address: string, version: number): string; /** * Declining. Glyphless, exit 0, zero network calls beyond the project read. * Declining is not a failure and is not an error; it is the prompt working. * * The second line is the one that matters — a creator who backed out because the * address was wrong needs to know the address is still theirs to change. */ export declare function declined(): string[]; export interface RepublishInput extends ChecklistInput { liveVersion: number; /** ISO8601 from the SAME project read — no second call to render one parenthetical. */ livePublishedAt?: string; now: number; } /** * Flow L24. No fence, no permanence block, no disclosure: the address is already * permanent and the creator already knows, and presenting a frozen fact as a * choice is worse than not presenting it at all. * * `(v5, published 3 days ago)` is rendered from the project read ALONE — * liveVersion and livePublishedAt both ride GET /projects/{id}. */ export declare function republishChecklist(i: RepublishInput): string[]; /** `[Y/n]` — on a republish an accidental Enter does the thing the creator typed the command to do. */ export declare function republishPrompt(version: number): string; /** * A publish onto an offline address brings it online, because publish always * goes live. The creator must be told: they took it offline on purpose and might * not intend to reverse that, so the default reverts to [y/N]. */ export declare function offlineChecklist(i: ChecklistInput): string[]; export declare function offlinePrompt(version: number): string; /** * f1's line verbatim, with f4's reason. Note what is ABSENT, deliberately: f3's * "your local dev loop doesn't need one" paragraph. It is the right copy for * preview and the wrong copy here — a creator trying to publish is not looking * for a smaller room, and offering one at this gate reads as a deflection. */ export declare function notSignedIn(): string[]; /** * Loud, local, instant, and it carries the real number. This fires before a * single byte moves and before a single request is made. * * The two numbers are STACKED AND ALIGNED — the judgement the creator must make * is a comparison, and prose defeats it. The three largest files are named * because that is almost always the entire diagnosis: one uncompressed asset is * nearly always the cause. * * The limit is printed as a number, never as policy. No "on your plan", no * "upgrade" — it is a correctness limit and not a quota, and copy implying * otherwise would be the first sentence of a billing model this feature does not * have. */ export declare function tooLarge(v: BoundViolation): string[]; /** No dist at all, or no index.html at its root. Zero network calls. */ export declare function noDist(distDir: string): string[]; export declare function noIndexHtml(distDir: string): string[]; /** A local path rule the creator's own build broke. Local, before any request. */ export declare function badPath(reason: string, offending: string): string[]; /** The one redrawn line in f4. A bounded progress bar with a known total is not a stream. */ export declare function progressBar(done: number, total: number, bytesDone: number, bytesTotal: number): string; /** The non-TTY degrade: periodic plain lines, at most one per 2s. */ export declare function progressPlain(done: number, total: number, bytesDone: number): string; export declare function uploadStart(fileCount: number): string; export declare function uploadDone(fileCount: number, totalBytes: number, ms: number): string; /** Covers the commit. The pause between the last byte and the live URL is real. */ export declare function finishing(): string; /** * The payload of the entire command: the live URL, full and clickable, with the * version in parentheses. The caching sentence is one line and ALWAYS present — * a creator refreshing a phone that has the old page in memory will see the old * page, decide publish is broken, and publish again. */ export declare function liveAt(liveUrl: string, version: number): string[]; /** Prints only if a retry is needed. It says nothing about a failure, because nothing has failed yet. */ export declare function takingLonger(): string; /** * The cause is NOT named. Every non-healing arm of the commit state machine * returns this identically by design, and the CLI must not invent a distinction * the wire does not carry. "Had to be restarted" is honest about what happened * and is correct for all three arms. */ export declare function publishExpired(address: string, liveVersion?: number): string[]; /** All three retries failed. "Nothing was lost" is the true and load-bearing sentence. */ export declare function flipFailed(address: string, liveVersion?: number): string[]; /** * Two sentences, no explanation of version allocation. The real case is a * teammate and an agent publishing in the same second, and "someone else * published this project" tells the creator to check with a person before * re-running — the correct next action, and not something a retry loop can do * for them. */ export declare function publishContended(): string[]; /** * The commit found fewer objects than the manifest declared. The response * carries COUNTS, never paths, so the CLI diffs against its OWN manifest and * prints its own strings. */ export declare function publishIncomplete(address: string, counts: { missing?: number; mismatched?: number; }, liveVersion?: number): string[]; /** A file's bytes changed under the CLI between hashing and PUT. Names the file. */ export declare function badDigest(filePath: string, address: string, liveVersion?: number): string[]; export declare function tooLargeFromServer(observed: number, limit: number): string[]; export declare function rateLimited(retryAfterSec: number): string[]; /** * The same block serves rollback, unpublish, republish, versions, revert and * take-offline. These are the words a creator will actually type, and every one * of them lands on one screen that names the real home. A bare "unknown command" * here would be the product failing to answer a question it knows the answer to. * * The reason is given in one clause and it is the honest one. Not "not * supported", not "coming soon" — neither is true. * * IF THE FOLDER IS NOT LINKED THE LAST TWO LINES ARE DROPPED. The CLI does not * know which project they meant, and guessing a console URL would be worse than * none. */ export declare function consoleVerb(verb: string, versionsUrl?: string): string[]; /** The six verbs that land on that block. */ export declare const CONSOLE_ONLY_VERBS: readonly string[];