import { type CodaliImprovementRelease, type CodaliImprovementReleaseLevel, type CodaliImprovementScope } from "./ImprovementPolicy.js"; import type { DatasetExportManifestReaderResult } from "./DatasetExportManifestReader.js"; import { CODALI_PATCH_CANDIDATE_SCHEMA_VERSION, type CodaliPatchCandidateBundle, type CodaliPatchProposalArtifact } from "./PromptSchemaToolMetadataCandidateBuilder.js"; export declare const CODALI_CANDIDATE_RELEASE_SCHEMA_VERSION: "codali.improvement.candidate_release.v1"; export declare const CODALI_CANDIDATE_RELEASE_PLAN_SCHEMA_VERSION: "codali.improvement.release_plan.v1"; export declare const DEFAULT_CODALI_CANDIDATE_RELEASE_APPROVED_PATHS: readonly [".codali/improvement/"]; export declare const DEFAULT_CODALI_CANDIDATE_RELEASE_DIRECTORIES: readonly [".codali/improvement/candidates"]; export type CodaliCandidateReleaseGeneratedArtifactKind = "candidate_release" | "package_version" | "release_manifest"; export type CodaliCandidateReleaseSemverBump = "patch" | "minor" | "major"; export type CodaliCandidateReleaseWriteStatus = "dry_run" | "ready" | "written" | "blocked"; export interface CodaliCandidateReleaseCommandResult { exitCode: number; stdout: string; stderr?: string; error?: string; } export type CodaliCandidateReleaseCommandRunner = (command: string, args: string[], options: { cwd: string; }) => CodaliCandidateReleaseCommandResult; export interface CodaliCandidateReleaseDirtyEntry { status: string; path: string; } export interface CodaliCandidateReleaseGeneratedArtifact { artifactId: string; artifactKind: CodaliCandidateReleaseGeneratedArtifactKind; schemaVersion: typeof CODALI_CANDIDATE_RELEASE_SCHEMA_VERSION; sourceExportIds: string[]; sourceSchemaVersions: { candidateRelease: typeof CODALI_CANDIDATE_RELEASE_SCHEMA_VERSION; patchCandidate: typeof CODALI_PATCH_CANDIDATE_SCHEMA_VERSION; storageManifest: string; }; relativePath: string; contentHash: string; byteSize: number; } export interface CodaliCandidateReleaseWriteTarget { relativePath: string; content: string; artifact: CodaliCandidateReleaseGeneratedArtifact; } export interface CodaliCandidateReleaseWritePlan { status: CodaliCandidateReleaseWriteStatus; dryRun: boolean; repoRoot: string; approvedPaths: string[]; targets: Array<{ relativePath: string; approved: boolean; dirty: boolean; contentHash: string; byteSize: number; }>; blockedReasons: string[]; } export interface CodaliCandidateReleaseWorkspace { workspaceId: string; branchName: string; branchPrefix: "codali/auto-improve"; candidateDate: string; runId: string; discardable: true; dryRunOnly: boolean; defaultApprovedPaths: readonly string[]; approvedPaths: string[]; targetDirectory: string; patchOutput: string; discardInstructions: string[]; } export interface CodaliCandidateReleaseDirtySummary { status: "clean" | "dirty" | "unavailable"; dirtyFileCount: number; targetDirtyFiles: string[]; unrelatedDirtyFileCount: number; unrelatedDirtyFilesSample: string[]; warning?: string; } export interface CodaliCandidateReleasePlanGate { gateId: string; status: "passed" | "blocked" | "warning" | "skipped"; reasons: string[]; } export interface CodaliCandidateReleasePackageVersionTarget { packageName: string; relativePath: string; currentVersion: string; plannedVersion: string; privatePackage: boolean; } export interface CodaliCandidateReleaseChangelogNotes { sourceExportIds: string[]; changedArtifactClasses: string[]; evalDeltas: { status: "provided" | "not_provided"; summary: string; metrics: Record; }; privacySummary: { status: "provided" | "not_provided"; recordCount?: number; containsCustomerData?: boolean; containsSecrets?: boolean; exportAllowedCount?: number; trainingAllowedCount?: number; policyTags?: string[]; }; rollback: string[]; notes: string[]; rawCustomerDataIncluded: false; } export interface CodaliCandidateReleasePlan { schemaVersion: typeof CODALI_CANDIDATE_RELEASE_PLAN_SCHEMA_VERSION; dryRun: boolean; candidateId: string; releaseId: string; storageServiceReleaseId: string; semverBump: CodaliCandidateReleaseSemverBump; version: string; futureTag: string; branch: { name: string; discardable: true; }; commit: { message: string; files: string[]; rawCustomerDataIncluded: false; }; tag: { name: string; message: string; matchesPackageVersions: boolean; rawCustomerDataIncluded: false; }; gates: CodaliCandidateReleasePlanGate[]; rollback: { commands: string[]; packageVersions: CodaliCandidateReleasePackageVersionTarget[]; }; packageVersions: { currentVersion: string; plannedVersion: string; futureTag: string; matchesFutureTag: boolean; targets: CodaliCandidateReleasePackageVersionTarget[]; }; changelog: CodaliCandidateReleaseChangelogNotes; } export interface CodaliCandidateReleaseBuild { schemaVersion: typeof CODALI_CANDIDATE_RELEASE_SCHEMA_VERSION; dryRun: boolean; release: CodaliImprovementRelease; releasePlan: CodaliCandidateReleasePlan; candidateWorkspace: CodaliCandidateReleaseWorkspace; writePlan: CodaliCandidateReleaseWritePlan; dirtyWorktree: CodaliCandidateReleaseDirtySummary; generatedArtifacts: CodaliCandidateReleaseGeneratedArtifact[]; proposals: CodaliPatchCandidateBundle[]; patchOutput: string; blockedReasons: string[]; } export interface BuildCodaliCandidateReleaseInput { inspection: DatasetExportManifestReaderResult; artifacts?: readonly CodaliPatchProposalArtifact[]; repoRoot?: string; scope?: CodaliImprovementScope; releaseLevel?: CodaliImprovementReleaseLevel; dryRun?: boolean; runId?: string; candidateDate?: string; candidateId?: string; candidatePath?: string; candidateDirectories?: readonly string[]; outputPath?: string; approvedPaths?: readonly string[]; now?: () => Date; dirtyEntries?: readonly CodaliCandidateReleaseDirtyEntry[]; commandRunner?: CodaliCandidateReleaseCommandRunner; } export interface BuildCodaliCandidateReleasePlanInput { candidateId: string; candidatePath?: string; candidateDirectories?: readonly string[]; repoRoot?: string; scope?: CodaliImprovementScope; releaseLevel?: CodaliImprovementReleaseLevel; dryRun?: boolean; runId?: string; candidateDate?: string; now?: () => Date; dirtyEntries?: readonly CodaliCandidateReleaseDirtyEntry[]; commandRunner?: CodaliCandidateReleaseCommandRunner; } export declare class CodaliCandidateReleaseBuilderError extends Error { readonly code: string; constructor(code: string, message: string); } export declare const buildCodaliCandidateRelease: (input: BuildCodaliCandidateReleaseInput) => Promise; export declare const buildCodaliCandidateReleasePlan: (input: BuildCodaliCandidateReleasePlanInput) => Promise; //# sourceMappingURL=CandidateReleaseBuilder.d.ts.map