@denizokcu/haze 0.3.0 → 0.5.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 +62 -0
- package/README.md +50 -36
- package/dist/cli/commands/chat.d.ts +1 -1
- package/dist/cli/commands/chat.js +244 -94
- package/dist/cli/commands/commands.js +119 -114
- package/dist/cli/commands/streaming.d.ts +37 -5
- package/dist/cli/commands/streaming.js +455 -192
- package/dist/cli/contextReport.d.ts +1 -0
- package/dist/cli/contextReport.js +47 -0
- package/dist/config/contextFiles.d.ts +31 -0
- package/dist/config/contextFiles.js +97 -13
- package/dist/config/providers.d.ts +2 -5
- package/dist/config/providers.js +16 -12
- package/dist/core/agent/compaction.d.ts +3 -0
- package/dist/core/agent/compaction.js +23 -3
- package/dist/core/agent/contextBudget.d.ts +33 -0
- package/dist/core/agent/contextBudget.js +88 -0
- package/dist/core/agent/requestAssembly.d.ts +22 -0
- package/dist/core/agent/requestAssembly.js +157 -0
- package/dist/core/agent/toolOutputStore.d.ts +16 -0
- package/dist/core/agent/toolOutputStore.js +65 -0
- package/dist/core/agent/workState.d.ts +38 -0
- package/dist/core/agent/workState.js +89 -0
- package/dist/core/bashOutput/ansi.d.ts +1 -0
- package/dist/core/bashOutput/ansi.js +7 -0
- package/dist/core/bashOutput/command.d.ts +2 -0
- package/dist/core/bashOutput/command.js +62 -0
- package/dist/core/bashOutput/lineFilter.d.ts +25 -0
- package/dist/core/bashOutput/lineFilter.js +62 -0
- package/dist/core/bashOutput/reducers/content.d.ts +3 -0
- package/dist/core/bashOutput/reducers/content.js +134 -0
- package/dist/core/bashOutput/reducers/git.d.ts +1 -0
- package/dist/core/bashOutput/reducers/git.js +147 -0
- package/dist/core/bashOutput/reducers/search.d.ts +7 -0
- package/dist/core/bashOutput/reducers/search.js +76 -0
- package/dist/core/bashOutput/reducers/validation.d.ts +2 -0
- package/dist/core/bashOutput/reducers/validation.js +41 -0
- package/dist/core/bashOutput/registry.d.ts +4 -0
- package/dist/core/bashOutput/registry.js +126 -0
- package/dist/core/bashOutput/types.d.ts +46 -0
- package/dist/core/bashOutput/types.js +1 -0
- package/dist/core/goal/completionPolicy.d.ts +1 -0
- package/dist/core/goal/completionPolicy.js +5 -1
- package/dist/core/goal/sessionGoal.d.ts +2 -0
- package/dist/core/goal/sessionGoal.js +8 -1
- package/dist/core/log/llmLog.d.ts +68 -0
- package/dist/core/log/llmLog.js +55 -0
- package/dist/core/safety/urlGuard.d.ts +37 -0
- package/dist/core/safety/urlGuard.js +206 -0
- package/dist/core/session/sessionStore.d.ts +6 -0
- package/dist/core/session/sessionStore.js +5 -0
- package/dist/core/subagent/subagentRunner.d.ts +4 -1
- package/dist/core/subagent/subagentRunner.js +5 -15
- package/dist/core/toolOutput/reduction.d.ts +25 -0
- package/dist/core/toolOutput/reduction.js +23 -0
- package/dist/core/validation/outputParser.js +15 -2
- package/dist/llm/client.d.ts +40 -1
- package/dist/llm/client.js +51 -5
- package/dist/llm/hazeTools.d.ts +165 -23
- package/dist/llm/hazeTools.js +317 -65
- package/dist/llm/initPrompt.js +2 -1
- package/dist/llm/systemPrompt.d.ts +6 -1
- package/dist/llm/systemPrompt.js +44 -81
- package/dist/llm/toolResultTypes.d.ts +1 -1
- package/dist/llm/webFetch.d.ts +57 -0
- package/dist/llm/webFetch.js +270 -0
- package/dist/skills/builder/SkillBuilder.d.ts +16 -2
- package/dist/skills/builder/SkillBuilder.js +68 -65
- package/dist/skills/skillTools.d.ts +2 -19
- package/dist/skills/skillTools.js +28 -19
- package/dist/ui/components/MarkdownText.d.ts +2 -0
- package/dist/ui/components/MarkdownText.js +116 -3
- package/package.json +18 -10
package/dist/llm/hazeTools.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ToolDiffLine, ToolFailureReasonCode } from './toolResultTypes.js';
|
|
2
|
+
import { type ContextFile } from '../config/contextFiles.js';
|
|
2
3
|
export declare const hazeTools: {
|
|
3
4
|
listFiles: import("ai").Tool<{
|
|
4
5
|
path: string;
|
|
5
6
|
recursive: boolean;
|
|
6
7
|
maxEntries: number;
|
|
7
8
|
includeIgnored: boolean;
|
|
9
|
+
includeSizes: boolean;
|
|
8
10
|
cursor?: string | undefined;
|
|
9
11
|
}, {
|
|
10
12
|
ok: boolean;
|
|
@@ -21,22 +23,23 @@ export declare const hazeTools: {
|
|
|
21
23
|
duplicateSkipped: true;
|
|
22
24
|
toolName: string;
|
|
23
25
|
reason: string;
|
|
24
|
-
} | {
|
|
26
|
+
} | ({
|
|
25
27
|
path: string;
|
|
26
28
|
recursive: boolean;
|
|
27
29
|
includeIgnored: boolean;
|
|
30
|
+
includeSizes: boolean;
|
|
28
31
|
cursor: string | undefined;
|
|
29
32
|
nextCursor: string | undefined;
|
|
30
33
|
ignoredSkipped: number;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: "file" | "directory";
|
|
34
|
-
size?: number;
|
|
35
|
-
}[];
|
|
34
|
+
entryFormat: string;
|
|
35
|
+
entries: string[];
|
|
36
36
|
truncated: boolean;
|
|
37
|
-
}
|
|
37
|
+
} & {
|
|
38
|
+
applicableProjectInstructions?: ContextFile[];
|
|
39
|
+
})>;
|
|
38
40
|
readFile: import("ai").Tool<{
|
|
39
41
|
path: string;
|
|
42
|
+
mode: "exact" | "outline";
|
|
40
43
|
allowIgnored: boolean;
|
|
41
44
|
offset?: number | undefined;
|
|
42
45
|
limit?: number | undefined;
|
|
@@ -55,25 +58,22 @@ export declare const hazeTools: {
|
|
|
55
58
|
duplicateSkipped: true;
|
|
56
59
|
toolName: string;
|
|
57
60
|
reason: string;
|
|
58
|
-
} | {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
} | ({
|
|
62
|
+
outline?: boolean | undefined;
|
|
63
|
+
outlineEntries?: number | undefined;
|
|
64
|
+
warning?: string | undefined;
|
|
62
65
|
path: string;
|
|
66
|
+
mode: "exact" | "outline";
|
|
63
67
|
startLine: number;
|
|
64
68
|
endLine: number;
|
|
65
69
|
totalLines: number;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
text: string;
|
|
70
|
+
content: string;
|
|
71
|
+
nextOffset: number | undefined;
|
|
69
72
|
truncated: boolean;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
totalLines: number;
|
|
75
|
-
lineNumberedText: string;
|
|
76
|
-
}>;
|
|
73
|
+
lineTruncated: boolean;
|
|
74
|
+
} & {
|
|
75
|
+
applicableProjectInstructions?: ContextFile[];
|
|
76
|
+
})>;
|
|
77
77
|
grep: import("ai").Tool<{
|
|
78
78
|
pattern: string;
|
|
79
79
|
path: string;
|
|
@@ -96,7 +96,25 @@ export declare const hazeTools: {
|
|
|
96
96
|
duplicateSkipped: true;
|
|
97
97
|
toolName: string;
|
|
98
98
|
reason: string;
|
|
99
|
-
} | {
|
|
99
|
+
} | ({
|
|
100
|
+
pattern: string;
|
|
101
|
+
path: string;
|
|
102
|
+
glob: string | null;
|
|
103
|
+
caseInsensitive: boolean;
|
|
104
|
+
matches: never[];
|
|
105
|
+
totalMatches: number;
|
|
106
|
+
truncated: boolean;
|
|
107
|
+
} & {
|
|
108
|
+
applicableProjectInstructions?: ContextFile[];
|
|
109
|
+
}) | ({
|
|
110
|
+
suggestion: string | undefined;
|
|
111
|
+
omittedChars: number;
|
|
112
|
+
rawChars: number;
|
|
113
|
+
returnedChars: number;
|
|
114
|
+
rawTokensEstimate: number;
|
|
115
|
+
returnedTokensEstimate: number;
|
|
116
|
+
estimatedSavedTokens: number;
|
|
117
|
+
savingsPct: number;
|
|
100
118
|
pattern: string;
|
|
101
119
|
path: string;
|
|
102
120
|
glob: string | null;
|
|
@@ -108,8 +126,18 @@ export declare const hazeTools: {
|
|
|
108
126
|
isContext: boolean;
|
|
109
127
|
}[];
|
|
110
128
|
totalMatches: number;
|
|
129
|
+
returnedMatches: number;
|
|
130
|
+
omittedMatches: number;
|
|
131
|
+
omittedResultLines: number;
|
|
132
|
+
lineTruncated: boolean;
|
|
111
133
|
truncated: boolean;
|
|
112
|
-
|
|
134
|
+
reducerName: string;
|
|
135
|
+
contentKind: string;
|
|
136
|
+
lossy: boolean;
|
|
137
|
+
parseTier: string;
|
|
138
|
+
} & {
|
|
139
|
+
applicableProjectInstructions?: ContextFile[];
|
|
140
|
+
})>;
|
|
113
141
|
replaceLines: import("ai").Tool<{
|
|
114
142
|
path: string;
|
|
115
143
|
startLine: number;
|
|
@@ -117,6 +145,15 @@ export declare const hazeTools: {
|
|
|
117
145
|
content: string;
|
|
118
146
|
allowIgnored: boolean;
|
|
119
147
|
}, {
|
|
148
|
+
ok: boolean;
|
|
149
|
+
toolName: string;
|
|
150
|
+
path: string;
|
|
151
|
+
error: string;
|
|
152
|
+
reasonCode: "scoped_instructions_discovered";
|
|
153
|
+
recoverable: boolean;
|
|
154
|
+
suggestedNextStep: string;
|
|
155
|
+
applicableProjectInstructions: ContextFile[];
|
|
156
|
+
} | {
|
|
120
157
|
ok: boolean;
|
|
121
158
|
toolName: string;
|
|
122
159
|
path: string | undefined;
|
|
@@ -151,6 +188,15 @@ export declare const hazeTools: {
|
|
|
151
188
|
overwriteExisting: boolean;
|
|
152
189
|
allowIgnored: boolean;
|
|
153
190
|
}, {
|
|
191
|
+
ok: boolean;
|
|
192
|
+
toolName: string;
|
|
193
|
+
path: string;
|
|
194
|
+
error: string;
|
|
195
|
+
reasonCode: "scoped_instructions_discovered";
|
|
196
|
+
recoverable: boolean;
|
|
197
|
+
suggestedNextStep: string;
|
|
198
|
+
applicableProjectInstructions: ContextFile[];
|
|
199
|
+
} | {
|
|
154
200
|
ok: boolean;
|
|
155
201
|
toolName: string;
|
|
156
202
|
path: string | undefined;
|
|
@@ -179,6 +225,15 @@ export declare const hazeTools: {
|
|
|
179
225
|
}[];
|
|
180
226
|
allowIgnored: boolean;
|
|
181
227
|
}, {
|
|
228
|
+
ok: boolean;
|
|
229
|
+
toolName: string;
|
|
230
|
+
path: string;
|
|
231
|
+
error: string;
|
|
232
|
+
reasonCode: "scoped_instructions_discovered";
|
|
233
|
+
recoverable: boolean;
|
|
234
|
+
suggestedNextStep: string;
|
|
235
|
+
applicableProjectInstructions: ContextFile[];
|
|
236
|
+
} | {
|
|
182
237
|
ok: boolean;
|
|
183
238
|
toolName: string;
|
|
184
239
|
path: string | undefined;
|
|
@@ -213,12 +268,99 @@ export declare const hazeTools: {
|
|
|
213
268
|
error: string;
|
|
214
269
|
taskCount?: undefined;
|
|
215
270
|
summary?: undefined;
|
|
271
|
+
counts?: undefined;
|
|
272
|
+
} | {
|
|
273
|
+
ok: boolean;
|
|
274
|
+
taskCount: number;
|
|
275
|
+
summary: string;
|
|
276
|
+
error?: undefined;
|
|
277
|
+
counts?: undefined;
|
|
216
278
|
} | {
|
|
217
279
|
ok: boolean;
|
|
218
280
|
taskCount: number;
|
|
281
|
+
counts: {
|
|
282
|
+
pending: number;
|
|
283
|
+
in_progress: number;
|
|
284
|
+
completed: number;
|
|
285
|
+
};
|
|
219
286
|
summary: string;
|
|
220
287
|
error?: undefined;
|
|
221
288
|
}>;
|
|
289
|
+
readToolOutput: import("ai").Tool<{
|
|
290
|
+
handle: string;
|
|
291
|
+
offset: number;
|
|
292
|
+
limit: number;
|
|
293
|
+
contextLines: number;
|
|
294
|
+
query?: string | undefined;
|
|
295
|
+
}, import("../core/agent/toolOutputStore.js").StoredToolOutputPage | {
|
|
296
|
+
ok: boolean;
|
|
297
|
+
error: string;
|
|
298
|
+
}>;
|
|
299
|
+
fetch: import("ai").Tool<{
|
|
300
|
+
url: string;
|
|
301
|
+
format: "text" | "auto";
|
|
302
|
+
}, {
|
|
303
|
+
ok: boolean;
|
|
304
|
+
toolName: string;
|
|
305
|
+
path: string | undefined;
|
|
306
|
+
error: string;
|
|
307
|
+
reasonCode: ToolFailureReasonCode | undefined;
|
|
308
|
+
recoverable: boolean;
|
|
309
|
+
suggestedNextStep: string;
|
|
310
|
+
recoveryTool: string | undefined;
|
|
311
|
+
recoveryInput: unknown;
|
|
312
|
+
} | {
|
|
313
|
+
ok: true;
|
|
314
|
+
duplicateSkipped: true;
|
|
315
|
+
toolName: string;
|
|
316
|
+
reason: string;
|
|
317
|
+
} | {
|
|
318
|
+
handle: string;
|
|
319
|
+
rawHandle: string;
|
|
320
|
+
omittedChars: number;
|
|
321
|
+
rawChars: number;
|
|
322
|
+
returnedChars: number;
|
|
323
|
+
rawTokensEstimate: number;
|
|
324
|
+
returnedTokensEstimate: number;
|
|
325
|
+
estimatedSavedTokens: number;
|
|
326
|
+
savingsPct: number;
|
|
327
|
+
ok: boolean;
|
|
328
|
+
url: string;
|
|
329
|
+
status: number;
|
|
330
|
+
statusText: string;
|
|
331
|
+
contentType: string;
|
|
332
|
+
bytes: number;
|
|
333
|
+
redirected: boolean;
|
|
334
|
+
extractionMethod: "json" | "text" | "markdown";
|
|
335
|
+
truncated: boolean;
|
|
336
|
+
content: string;
|
|
337
|
+
reducerName: string;
|
|
338
|
+
contentKind: string;
|
|
339
|
+
lossy: boolean;
|
|
340
|
+
parseTier: string;
|
|
341
|
+
} | {
|
|
342
|
+
omittedChars: number;
|
|
343
|
+
rawChars: number;
|
|
344
|
+
returnedChars: number;
|
|
345
|
+
rawTokensEstimate: number;
|
|
346
|
+
returnedTokensEstimate: number;
|
|
347
|
+
estimatedSavedTokens: number;
|
|
348
|
+
savingsPct: number;
|
|
349
|
+
ok: boolean;
|
|
350
|
+
url: string;
|
|
351
|
+
status: number;
|
|
352
|
+
statusText: string;
|
|
353
|
+
contentType: string;
|
|
354
|
+
bytes: number;
|
|
355
|
+
redirected: boolean;
|
|
356
|
+
extractionMethod: "json" | "text" | "markdown";
|
|
357
|
+
truncated: boolean;
|
|
358
|
+
content: string;
|
|
359
|
+
reducerName: string;
|
|
360
|
+
contentKind: string;
|
|
361
|
+
lossy: boolean;
|
|
362
|
+
parseTier: string;
|
|
363
|
+
}>;
|
|
222
364
|
bash: import("ai").Tool<{
|
|
223
365
|
command: string;
|
|
224
366
|
allowMutation: boolean;
|