import type { DependencyArtifactBuildResultBody, DependencyArtifactBuildTaskInput, DependencyArtifactContentType, DependencyArtifactIdentity } from "./dependency-artifact-contracts.js"; import { type DependencyArtifactAsset } from "./dependency-artifact-graph.js"; export type { DependencyArtifactBuildResultBody, DependencyArtifactBuildTaskInput, DependencyArtifactContentType, DependencyArtifactIdentity, DependencyArtifactPolicyDecision, } from "./dependency-artifact-contracts.js"; export { DEPENDENCY_ARTIFACT_BUILD_CAPABILITY } from "./dependency-artifact-contracts.js"; export interface DependencyArtifactBuildClient { uploadAsset(input: { artifactId: string; attemptCount: number; contentHash: string; contentType: DependencyArtifactContentType; bytes: Uint8Array; }): Promise<{ stored: true; existed: boolean; }>; reportResult(input: { artifactId: string; attemptCount: number; result: DependencyArtifactBuildResultBody; }): Promise<{ accepted: true; state: "ready" | "failed"; }>; } export interface DependencyArtifactBuildLimits { maxAssetBytes: number; maxTotalBytes: number; maxModules: number; maxDepth: number; timeoutMs: number; } export interface DependencyArtifactBuildMetric { event: "claim" | "success" | "failure"; durationMs?: number; totalBytes?: number; assetCount?: number; remainingExternalImportCount?: number; failureCode?: string; } export interface DependencyArtifactBuilderDeps { fetch?: typeof fetch; limits?: Partial; now?: () => number; recordMetric?: (metric: DependencyArtifactBuildMetric) => void; } export declare class DependencyArtifactBuildError extends Error { readonly failureCode: string; constructor(failureCode: string, message: string); } export declare function parseDependencyArtifactBuildTaskInput(value: unknown): DependencyArtifactBuildTaskInput; export declare function dependencyArtifactUpstreamUrl(identity: DependencyArtifactIdentity): string; export declare function buildDependencyArtifactGraph(identity: DependencyArtifactIdentity, deps?: DependencyArtifactBuilderDeps): Promise<{ assets: DependencyArtifactAsset[]; rootContentHash: string; remainingExternalImportCount: number; }>; export declare function runDependencyArtifactBuild(input: DependencyArtifactBuildTaskInput, client: DependencyArtifactBuildClient, deps?: DependencyArtifactBuilderDeps): Promise<{ success: true; state: "ready"; rootContentHash: string; assetCount: number; totalBytes: number; remainingExternalImportCount: number; durationMs: number; } | { success: false; state: "failed"; failureCode: string; durationMs: number; }>; //# sourceMappingURL=dependency-artifact-builder.d.ts.map