@zhivex-ai/harness 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ import { type Stats } from "node:fs";
2
+ export interface StableRegularFile {
3
+ contents: Buffer;
4
+ stat: Stats;
5
+ }
6
+ export interface ReadRegularFileNoFollowOptions {
7
+ label: string;
8
+ maxBytes: number;
9
+ requireSingleLink?: boolean;
10
+ }
11
+ export declare class UnsafeFileTypeError extends Error {
12
+ constructor(label: string);
13
+ }
14
+ export declare class FileSizeLimitError extends Error {
15
+ readonly label: string;
16
+ readonly maxBytes: number;
17
+ constructor(label: string, maxBytes: number);
18
+ }
19
+ export declare class FileChangedWhileReadingError extends Error {
20
+ constructor(label: string);
21
+ }
22
+ export declare const statRegularFileNoFollow: (target: string, options: Pick<ReadRegularFileNoFollowOptions, "label" | "requireSingleLink">) => Promise<Stats>;
23
+ /**
24
+ * Opens the leaf without following a symbolic link and performs every content
25
+ * and identity check through the resulting descriptor. Positional reads bind
26
+ * the returned bytes to the exact inode that was opened, avoiding path-based
27
+ * time-of-check/time-of-use windows.
28
+ */
29
+ export declare const readRegularFileNoFollow: (target: string, options: ReadRegularFileNoFollowOptions) => Promise<StableRegularFile>;