import type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/artifact_pb";
/**
 * Extracts the lowercase file extension from an artifact's name.
 *
 * Returns `null` when the name has no extension or is empty.
 * Delegates to {@link getFileExtension} for the actual parsing.
 *
 * @example
 * ```ts
 * getArtifactExtension(artifact); // "yaml"
 * getArtifactExtension(noExtArtifact); // null
 * ```
 */
export declare function getArtifactExtension(artifact: ExecutionArtifact): string | null;
/**
 * Determines whether an artifact likely contains human-readable text.
 *
 * Returns `false` for directory artifacts (which are stored as ZIP files)
 * regardless of name. For file artifacts, checks whether the file
 * extension is in the {@link TEXT_EXTENSIONS} set.
 *
 * Use this to decide whether to call {@link useArtifactContent} for
 * a given artifact. Binary or unknown-extension artifacts should use
 * the download URL instead.
 *
 * @example
 * ```ts
 * const shouldFetch = isTextArtifact(artifact) && Number(artifact.sizeBytes) < MAX_SIZE;
 * ```
 */
export declare function isTextArtifact(artifact: ExecutionArtifact): boolean;
/**
 * Checks whether an artifact's pre-signed download URL has expired.
 *
 * Returns `true` when:
 * - `expiresAt` is empty or cannot be parsed as a valid date
 * - The current time is past the expiration timestamp
 *
 * Expired URLs can be refreshed via `stigmer.agentExecution.getArtifactDownloadUrl()`.
 */
export declare function isArtifactExpired(artifact: ExecutionArtifact): boolean;
/**
 * Content rendering strategy for artifact file preview.
 *
 * Used by {@link ArtifactContentRenderer} to dispatch to the correct
 * renderer, and by platform builders who want to implement custom
 * rendering logic based on file type.
 *
 * - `"markdown"` — rendered HTML via `react-markdown` with themed components
 * - `"yaml"` — CSS-only YAML syntax highlighting
 * - `"json"` — pretty-printed JSON with key/value coloring
 * - `"text"` — monospace plain text with line numbers
 */
export type ArtifactRenderMode = "markdown" | "yaml" | "json" | "text";
/**
 * Extracts the lowercase file extension from a file name string.
 *
 * Returns `null` when the name has no extension or is empty.
 * Unlike {@link getArtifactExtension}, this operates on a plain
 * string — usable without a full `ExecutionArtifact` object.
 *
 * @example
 * ```ts
 * getFileExtension("agent.yaml");      // "yaml"
 * getFileExtension("README.md");       // "md"
 * getFileExtension("Makefile");        // null
 * ```
 */
export declare function getFileExtension(fileName: string): string | null;
/**
 * Determines the optimal rendering strategy for a text artifact.
 *
 * Inspects the file extension first, then falls back to the optional
 * `contentType` MIME string returned by the server. Platform builders
 * can use this to implement custom rendering or to display a mode
 * indicator in their UI.
 *
 * @param fileName - Artifact file name (e.g., `"README.md"`, `"config.yaml"`)
 * @param contentType - Optional MIME content type from the server response
 *
 * @example
 * ```ts
 * getArtifactRenderMode("README.md");                   // "markdown"
 * getArtifactRenderMode("config.yaml");                 // "yaml"
 * getArtifactRenderMode("data.json");                   // "json"
 * getArtifactRenderMode("script.py");                   // "text"
 * getArtifactRenderMode("unknown", "application/json"); // "json"
 * ```
 */
export declare function getArtifactRenderMode(fileName: string, contentType?: string | null): ArtifactRenderMode;
/**
 * Formats a byte count as a human-readable file size string.
 *
 * Accepts both `bigint` (from protobuf `int64` fields like
 * `ExecutionArtifact.sizeBytes`) and `number`.
 *
 * Uses base-1024 (binary) units with one decimal place.
 *
 * @example
 * ```ts
 * formatArtifactSize(0n);       // "0 B"
 * formatArtifactSize(1024);     // "1.0 KB"
 * formatArtifactSize(1536n);    // "1.5 KB"
 * formatArtifactSize(2621440n); // "2.5 MB"
 * ```
 */
export declare function formatArtifactSize(sizeBytes: bigint | number): string;
//# sourceMappingURL=artifact-utils.d.ts.map