@zhivex-ai/harness 0.8.0 → 0.9.0

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.
@@ -29,21 +29,54 @@ export interface CommandResult {
29
29
  stderr: string;
30
30
  timedOut: boolean;
31
31
  }
32
+ export interface ReadFilesRequest {
33
+ path: string;
34
+ startLine?: number;
35
+ endLine?: number;
36
+ }
37
+ export interface SearchManyQuery {
38
+ query: string;
39
+ caseSensitive?: boolean;
40
+ }
41
+ export interface SearchManyOptions {
42
+ limitPerQuery?: number;
43
+ }
44
+ export interface WorkspaceIndexDiagnostics {
45
+ builds: number;
46
+ reuses: number;
47
+ stableFileReads: number;
48
+ version?: string;
49
+ files: number;
50
+ directories: number;
51
+ }
32
52
  export declare class Workspace {
33
53
  readonly root: string;
34
54
  private readonly auditEntries;
55
+ private readonly indexIdentity;
56
+ private indexRevision;
57
+ private workspaceIndex;
58
+ private indexBuild;
59
+ private readonly indexMetrics;
35
60
  private constructor();
36
61
  static open(root: string): Promise<Workspace>;
37
62
  private lexicalPath;
38
63
  private safePath;
39
64
  private readStableFile;
65
+ private fingerprint;
66
+ private sameFingerprint;
40
67
  private rulesForDirectory;
41
68
  private collectFiles;
69
+ private isWorkspaceIndexFresh;
70
+ private invalidateWorkspaceIndex;
71
+ private buildWorkspaceIndex;
72
+ private getWorkspaceIndex;
73
+ workspaceIndexDiagnostics(): WorkspaceIndexDiagnostics;
42
74
  listFiles(relativePath?: string, options?: number | ListFilesOptions): Promise<{
43
75
  nextCursor?: string;
44
76
  files: WorkspaceFile[];
45
77
  truncated: boolean;
46
78
  }>;
79
+ private renderReadFile;
47
80
  readFile(relativePath: string, startLine?: number, endLine?: number): Promise<{
48
81
  path: string;
49
82
  digest: string;
@@ -53,6 +86,18 @@ export declare class Workspace {
53
86
  content: string;
54
87
  truncated: boolean;
55
88
  }>;
89
+ readFiles(requests: readonly ReadFilesRequest[]): Promise<{
90
+ files: {
91
+ path: string;
92
+ digest: string;
93
+ startLine: number;
94
+ endLine: number;
95
+ totalLines: number;
96
+ content: string;
97
+ truncated: boolean;
98
+ }[];
99
+ sourceBytes: number;
100
+ }>;
56
101
  inspectFile(relativePath: string): Promise<{
57
102
  path: string;
58
103
  digest: string;
@@ -64,6 +109,14 @@ export declare class Workspace {
64
109
  matches: SearchMatch[];
65
110
  truncated: boolean;
66
111
  }>;
112
+ searchMany(queries: readonly SearchManyQuery[], relativePath?: string, options?: SearchManyOptions): Promise<{
113
+ results: {
114
+ query: any;
115
+ caseSensitive: any;
116
+ matches: SearchMatch[];
117
+ truncated: boolean;
118
+ }[];
119
+ }>;
67
120
  private audit;
68
121
  mutationAudit(): readonly MutationAuditEntry[];
69
122
  private secureWorkspaceDirectory;