@denizokcu/haze 1.5.1 → 1.6.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.
- package/CHANGELOG.md +14 -0
- package/README.md +67 -3
- package/SECURITY.md +1 -1
- package/dist/buildInfo.json +3 -3
- package/dist/cli/chat/DynamicFrame.d.ts +0 -13
- package/dist/cli/chat/DynamicFrame.js +1 -1
- package/dist/cli/chat/inputSuggestions.js +2 -0
- package/dist/cli/chat/terminalControl.d.ts +4 -2
- package/dist/cli/chat/terminalControl.js +16 -5
- package/dist/cli/chat/wizard/pluginHandlers.d.ts +10 -0
- package/dist/cli/chat/wizard/pluginHandlers.js +156 -0
- package/dist/cli/chat/wizard/skillsHandlers.js +2 -2
- package/dist/cli/chat/wizard/types.d.ts +20 -0
- package/dist/cli/chat/wizard/uiState.d.ts +25 -1
- package/dist/cli/chat/wizard/uiState.js +3 -1
- package/dist/cli/chat/wizardDispatch.js +6 -0
- package/dist/cli/commands/chat.js +18 -3
- package/dist/cli/commands/commandHelp.js +7 -2
- package/dist/cli/commands/commands.d.ts +5 -0
- package/dist/cli/commands/commands.js +17 -3
- package/dist/cli/commands/initCommand.js +3 -2
- package/dist/cli/commands/pluginCommand.d.ts +16 -0
- package/dist/cli/commands/pluginCommand.js +127 -0
- package/dist/cli/commands/reasoningCommand.d.ts +0 -15
- package/dist/cli/commands/reasoningCommand.js +1 -3
- package/dist/cli/commands/skillsWizard.js +4 -0
- package/dist/cli/commands/streaming/agentAttempt.js +2 -1
- package/dist/cli/commands/streaming/attemptOutcome.d.ts +2 -0
- package/dist/cli/commands/streaming/attemptOutcome.js +4 -3
- package/dist/cli/commands/streaming/attemptSetup.d.ts +2 -0
- package/dist/cli/commands/streaming/attemptSetup.js +3 -2
- package/dist/cli/commands/streaming/stallRecovery.d.ts +6 -0
- package/dist/cli/commands/streaming/stallRecovery.js +6 -5
- package/dist/cli/commands/streaming/turnRuntime.js +2 -4
- package/dist/cli/commands/wizardFlow.d.ts +59 -0
- package/dist/cli/commands/wizardFlow.js +40 -0
- package/dist/cli/contextReportCli.js +4 -3
- package/dist/cli/index.js +19 -2
- package/dist/config/contextFiles.js +3 -2
- package/dist/config/inputHistory.js +3 -3
- package/dist/config/paths.d.ts +1 -0
- package/dist/config/paths.js +1 -0
- package/dist/config/providerAuth.js +3 -3
- package/dist/config/settings.d.ts +10 -1
- package/dist/config/settings.js +7 -4
- package/dist/config/updateCheck.js +3 -3
- package/dist/core/agent/budgets.d.ts +17 -0
- package/dist/core/agent/budgets.js +19 -0
- package/dist/core/agent/reasoningPolicy.js +1 -1
- package/dist/core/agent/workState.d.ts +0 -2
- package/dist/core/agent/workState.js +1 -1
- package/dist/core/log/llmLog.js +1 -1
- package/dist/core/session/sessionStore.js +4 -3
- package/dist/core/subagent/contracts.d.ts +1 -11
- package/dist/core/subagent/contracts.js +0 -22
- package/dist/llm/client.js +2 -2
- package/dist/llm/subagentRunner.d.ts +1 -6
- package/dist/llm/subagentRunner.js +11 -23
- package/dist/llm/tools/fileTools.js +2 -3
- package/dist/llm/tools/gitIgnore.js +1 -1
- package/dist/llm/tools/grepRunner.d.ts +10 -0
- package/dist/llm/tools/grepRunner.js +24 -0
- package/dist/llm/tools/toolContext.d.ts +2 -3
- package/dist/llm/tools/toolContext.js +2 -3
- package/dist/llm/tools/toolContextState.d.ts +0 -1
- package/dist/llm/tools/toolContextState.js +1 -4
- package/dist/llm/workerContext.d.ts +0 -7
- package/dist/llm/workerContext.js +0 -17
- package/dist/skills/SkillLoader.js +3 -2
- package/dist/skills/SkillRegistry.js +7 -4
- package/dist/skills/builder/SkillBuilder.js +11 -10
- package/dist/skills/plugins/installer.d.ts +25 -0
- package/dist/skills/plugins/installer.js +272 -0
- package/dist/skills/plugins/package.d.ts +41 -0
- package/dist/skills/plugins/package.js +275 -0
- package/dist/skills/plugins/runtime.d.ts +3 -0
- package/dist/skills/plugins/runtime.js +108 -0
- package/dist/skills/skillTools.js +10 -5
- package/dist/skills/types.d.ts +4 -0
- package/dist/ui/codeHighlight.d.ts +1 -1
- package/dist/ui/codeHighlight.js +112 -4
- package/dist/ui/components/StreamingMarkdownText.d.ts +0 -2
- package/dist/ui/components/StreamingMarkdownText.js +1 -1
- package/dist/ui/components/TextInput.d.ts +1 -1
- package/dist/utils/fs.d.ts +10 -0
- package/dist/utils/fs.js +37 -2
- package/package.json +17 -20
package/dist/utils/fs.js
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
|
-
import fs from 'fs
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
/** True when the path exists; false for any error (missing path, permissions, bad root). */
|
|
4
|
+
export async function pathExists(file) {
|
|
5
|
+
try {
|
|
6
|
+
await fs.access(file);
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** Parse a JSON file, tolerating a UTF-8 BOM; malformed JSON still throws loudly. */
|
|
14
|
+
export async function readJson(file) {
|
|
15
|
+
const raw = await fs.readFile(file, 'utf8');
|
|
16
|
+
return JSON.parse(raw.charCodeAt(0) === 0xfeff ? raw.slice(1) : raw);
|
|
17
|
+
}
|
|
18
|
+
/** Create a directory (and parents) if missing; never throws when it already exists. */
|
|
19
|
+
export async function ensureDir(dir) {
|
|
20
|
+
await fs.mkdir(dir, { recursive: true });
|
|
21
|
+
}
|
|
22
|
+
/** Remove a file or directory tree; a missing path is not an error. */
|
|
23
|
+
export function remove(target) {
|
|
24
|
+
return fs.rm(target, { recursive: true, force: true });
|
|
25
|
+
}
|
|
26
|
+
/** Rename, falling back to copy+delete across filesystems. Callers guard destination collisions. */
|
|
27
|
+
export async function move(src, dest) {
|
|
28
|
+
try {
|
|
29
|
+
await fs.rename(src, dest);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error.code !== 'EXDEV')
|
|
33
|
+
throw error;
|
|
34
|
+
await fs.cp(src, dest, { recursive: true });
|
|
35
|
+
await fs.rm(src, { recursive: true, force: true });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
3
38
|
// Repository metadata and dependency trees are never useful discovery targets.
|
|
4
39
|
// Skip both even when a project has no `.gitignore`: this keeps traversal bounded
|
|
5
40
|
// and prevents dependency contents from crowding out workspace source files.
|
|
@@ -16,7 +51,7 @@ export async function walkDir(root, options = {}) {
|
|
|
16
51
|
const cursor = typeof options.cursor === 'string' && options.cursor.trim() !== '' ? options.cursor : undefined;
|
|
17
52
|
const cursorSegments = cursor ? cursor.split(/[\\/]/).filter(Boolean) : [];
|
|
18
53
|
let collecting = cursor == null;
|
|
19
|
-
if (!(await
|
|
54
|
+
if (!(await pathExists(root)))
|
|
20
55
|
return result;
|
|
21
56
|
async function readSortedChildren(dir) {
|
|
22
57
|
const entries = await fs.readdir(dir, { withFileTypes: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@denizokcu/haze",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "A minimal LLM harness for your terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,44 +43,41 @@
|
|
|
43
43
|
"typecheck": "tsc --noEmit",
|
|
44
44
|
"context:report": "node --import tsx src/cli/contextReportCli.ts",
|
|
45
45
|
"eval": "node scripts/run-evals.mjs",
|
|
46
|
+
"bench:render": "node --expose-gc scripts/ink-render-benchmark.mjs .",
|
|
46
47
|
"release:verify": "node scripts/verify-release-metadata.mjs",
|
|
47
48
|
"haze": "tsx src/cli/index.ts",
|
|
48
49
|
"prepublishOnly": "npm run typecheck && npm test && npm run lint && npm run build && npm audit --audit-level=high && npm run release:verify"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@ai-sdk/mcp": "^2.0.
|
|
52
|
-
"@ai-sdk/openai": "4.0.
|
|
52
|
+
"@ai-sdk/mcp": "^2.0.83",
|
|
53
|
+
"@ai-sdk/openai": "4.0.101",
|
|
53
54
|
"@inkjs/ui": "2.0.0",
|
|
54
55
|
"@vscode/ripgrep": "1.18.0",
|
|
55
|
-
"ai": "7.0.
|
|
56
|
-
"cli-highlight": "2.1.11",
|
|
56
|
+
"ai": "7.0.152",
|
|
57
57
|
"commander": "15.0.0",
|
|
58
|
-
"defuddle": "^0.19.
|
|
59
|
-
"
|
|
60
|
-
"ignore": "^7.0.
|
|
58
|
+
"defuddle": "^0.19.5",
|
|
59
|
+
"highlight.js": "^11.12.0",
|
|
60
|
+
"ignore": "^7.0.14",
|
|
61
61
|
"ink": "8.0.0",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"react": "19.3.0",
|
|
62
|
+
"marked": "18.1.1",
|
|
63
|
+
"react": "19.3.1",
|
|
65
64
|
"string-width": "8.3.0",
|
|
66
|
-
"strip-ansi": "7.2.0",
|
|
67
|
-
"turndown": "^7.2.4",
|
|
68
65
|
"wrap-ansi": "10.0.2",
|
|
69
66
|
"yaml": "2.9.1",
|
|
70
|
-
"zod": "4.6.
|
|
67
|
+
"zod": "4.6.7"
|
|
71
68
|
},
|
|
72
69
|
"devDependencies": {
|
|
73
70
|
"@eslint/js": "^10.0.1",
|
|
74
|
-
"@types/
|
|
75
|
-
"@types/node": "26.6.4",
|
|
71
|
+
"@types/node": "26.6.5",
|
|
76
72
|
"@types/react": "19.3.0",
|
|
77
|
-
"eslint": "^10.
|
|
73
|
+
"eslint": "^10.13.0",
|
|
78
74
|
"ink-testing-library": "^4.0.0",
|
|
79
|
-
"knip": "6.
|
|
75
|
+
"knip": "6.42.1",
|
|
76
|
+
"strip-ansi": "7.2.0",
|
|
80
77
|
"tsx": "4.23.15",
|
|
81
78
|
"typescript": "6.0.3",
|
|
82
|
-
"typescript-eslint": "^8.
|
|
83
|
-
"vitest": "^5.0.
|
|
79
|
+
"typescript-eslint": "^8.72.0",
|
|
80
|
+
"vitest": "^5.0.5"
|
|
84
81
|
},
|
|
85
82
|
"allowScripts": {
|
|
86
83
|
"fsevents@2.3.3": true,
|