@zhivex-ai/harness 0.7.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.
- package/CHANGELOG.md +45 -0
- package/README.md +31 -7
- package/ROADMAP.md +54 -9
- package/SECURITY.md +7 -1
- package/SUPPORT.md +2 -2
- package/dist/change-envelope.d.ts +271 -0
- package/dist/cli-stream.d.ts +14 -14
- package/dist/cli.d.ts +7 -1
- package/dist/cli.js +1457 -164
- package/dist/config.d.ts +1 -1
- package/dist/execution-environment.d.ts +49 -3
- package/dist/harness.d.ts +16 -1
- package/dist/hostile-repository-demo.js +812 -160
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1367 -188
- package/dist/workspace.d.ts +53 -0
- package/dist/zhx.js +1457 -164
- package/docs/CHANGE_ENVELOPES.md +116 -0
- package/docs/CLI.md +14 -4
- package/docs/DURABLE_OPERATIONS.md +14 -2
- package/docs/EXECUTION_ENVIRONMENTS.md +10 -4
- package/docs/EXTENSIBILITY.md +7 -3
- package/docs/LIVE_CERTIFICATION.md +17 -1
- package/docs/RELEASE.md +4 -4
- package/docs/REPOSITORY_EDITING.md +4 -0
- package/examples/change-envelope-input.json +26 -0
- package/examples/change.patch +6 -0
- package/package.json +14 -8
package/dist/workspace.d.ts
CHANGED
|
@@ -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;
|