import { type Stats } from "node:fs"; import { type FileHandle } from "node:fs/promises"; import type { FileSnapshot, InputKind, PhysicalIdentity, SourceClaim, SourceKind, StageMetadata, TreeSnapshot, VaultPathsLike } from "./source-service.js"; export declare const ENVELOPE_NAME = ".pi-scholar-source.json"; export declare const SOURCE_KINDS: readonly SourceKind[]; export declare const INPUT_KINDS: readonly InputKind[]; declare function writeFully(handle: FileHandle, buffer: Uint8Array, offset?: number, length?: number, position?: number): Promise; declare function provenanceUrl(url: URL): string; declare function sanitizedSourceUri(value: string): string; declare function publicSourceUri(value: unknown): unknown; declare function digestBytes(bytes: Uint8Array): string; declare function canonical(value: unknown): string; declare function validRelativePath(value: string): string; declare function pathFor(paths: VaultPathsLike, name: "inbox" | "sources" | "work" | "quizzes"): string; declare function wikiPathFor(paths: VaultPathsLike): string; declare function workArtifactRelative(paths: VaultPathsLike, target: string): string; declare function resolveWorkArtifact(paths: VaultPathsLike, requested: string): string; declare function deterministicUuid(seed: string): string; declare function statIdentity(stat: Stats): PhysicalIdentity; declare function lstatNoFollow(path: string): Promise; declare function lstatNoFollowSync(path: string): Stats; declare function readNoFollow(path: string): Promise; declare function hashFile(path: string): Promise<{ size: number; digest: string; }>; declare function hashFileSync(path: string): { size: number; digest: string; }; declare function copyFileNoFollow(source: string, target: string): Promise; declare function copyFileRangeNoFollow(source: string, target: string, startByte: number, endByte: number): Promise; declare function compareFileRange(source: string, startByte: number, endByte: number, target: string): Promise; declare function measurePath(path: string): Promise; declare function walkFiles(root: string, current?: string, skipGit?: boolean): Promise; declare function repositoryRevision(root: string): Promise; declare function repositoryFiles(root: string): Promise; declare function sameIdentity(a: PhysicalIdentity, b: PhysicalIdentity): boolean; declare function ensureWithin(root: string, target: string): string; declare function safeChildPath(root: string, target: string): string; declare function inferKind(path: string, stat?: Stats): SourceKind; declare function textualUrl(claim: SourceClaim, mediaType?: string): boolean; declare function treeDigest(files: FileSnapshot[], revision?: string): string; declare function requiredString(record: Record, key: string): string; declare function parseMetadata(raw: string): StageMetadata; declare function stagedMetadata(path: string): Promise; declare function snapshotPath(path: string, relativePath: string, kind?: SourceKind, revision?: string, metadata?: StageMetadata): Promise; declare function writeTree(root: string, files: FileSnapshot[]): Promise; declare function copyPathNoFollow(source: string, target: string): Promise; declare function copyRepositoryNoSecrets(target: string, files: FileSnapshot[], metadata: StageMetadata): Promise; export { canonical, compareFileRange, copyFileNoFollow, copyFileRangeNoFollow, copyPathNoFollow, copyRepositoryNoSecrets, deterministicUuid, digestBytes, ensureWithin, hashFile, hashFileSync, inferKind, lstatNoFollow, lstatNoFollowSync, measurePath, parseMetadata, pathFor, provenanceUrl, publicSourceUri, readNoFollow, repositoryFiles, repositoryRevision, requiredString, resolveWorkArtifact, safeChildPath, sameIdentity, sanitizedSourceUri, snapshotPath, stagedMetadata, statIdentity, textualUrl, treeDigest, validRelativePath, walkFiles, wikiPathFor, workArtifactRelative, writeFully, writeTree, }; //# sourceMappingURL=source-files.d.ts.map