@denizokcu/haze 0.9.0 → 0.11.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 +133 -17
- package/README.md +164 -68
- package/SECURITY.md +22 -0
- package/bin/haze.js +102 -1
- package/dist/buildInfo.json +7 -0
- package/dist/cli/chat/TaskBar.d.ts +2 -1
- package/dist/cli/chat/TaskBar.js +7 -4
- package/dist/cli/chat/chatMetrics.d.ts +17 -1
- package/dist/cli/chat/chatMetrics.js +22 -5
- package/dist/cli/chat/contextReport.d.ts +11 -0
- package/dist/cli/chat/contextReport.js +46 -0
- package/dist/cli/chat/fileMentionSuggestions.d.ts +29 -0
- package/dist/cli/chat/fileMentionSuggestions.js +92 -0
- package/dist/cli/chat/inputSuggestions.d.ts +5 -0
- package/dist/cli/chat/inputSuggestions.js +17 -3
- package/dist/cli/chat/liveRegion.d.ts +25 -0
- package/dist/cli/chat/liveRegion.js +48 -0
- package/dist/cli/chat/messages.d.ts +33 -2
- package/dist/cli/chat/messages.js +216 -33
- package/dist/cli/chat/sessionLifecycle.d.ts +67 -0
- package/dist/cli/chat/sessionLifecycle.js +205 -0
- package/dist/cli/chat/sessionRecorder.js +80 -14
- package/dist/cli/chat/startupInfo.js +11 -4
- package/dist/cli/chat/tips.d.ts +21 -0
- package/dist/cli/chat/tips.js +43 -0
- package/dist/cli/chat/wizardDispatch.d.ts +64 -0
- package/dist/cli/chat/wizardDispatch.js +744 -0
- package/dist/cli/commands/chat.d.ts +6 -0
- package/dist/cli/commands/chat.js +373 -790
- package/dist/cli/commands/chatModes.d.ts +1 -1
- package/dist/cli/commands/chatModes.js +7 -2
- package/dist/cli/commands/commandHelp.js +5 -3
- package/dist/cli/commands/commands.d.ts +5 -2
- package/dist/cli/commands/commands.js +22 -18
- package/dist/cli/commands/doctor.d.ts +19 -0
- package/dist/cli/commands/doctor.js +76 -0
- package/dist/cli/commands/fleetCommand.d.ts +14 -0
- package/dist/cli/commands/fleetCommand.js +46 -0
- package/dist/cli/commands/formatters.d.ts +5 -0
- package/dist/cli/commands/formatters.js +35 -6
- package/dist/cli/commands/logsCommand.js +1 -7
- package/dist/cli/commands/modelCommand.js +1 -1
- package/dist/cli/commands/ndjsonSink.d.ts +23 -0
- package/dist/cli/commands/ndjsonSink.js +38 -0
- package/dist/cli/commands/providerWizard.d.ts +10 -2
- package/dist/cli/commands/providerWizard.js +50 -4
- package/dist/cli/commands/runCommand.d.ts +4 -0
- package/dist/cli/commands/runCommand.js +142 -16
- package/dist/cli/commands/sessionPicker.d.ts +9 -0
- package/dist/cli/commands/sessionPicker.js +29 -0
- package/dist/cli/commands/settingsSummary.js +6 -4
- package/dist/cli/commands/skillConfirmRemove.js +4 -3
- package/dist/cli/commands/skillWizard.d.ts +2 -0
- package/dist/cli/commands/skillWizard.js +16 -6
- package/dist/cli/commands/streaming/abortCause.d.ts +24 -0
- package/dist/cli/commands/streaming/abortCause.js +16 -0
- package/dist/cli/commands/streaming/assistantText.js +9 -2
- package/dist/cli/commands/streaming/goalCheckpoint.d.ts +65 -0
- package/dist/cli/commands/streaming/goalCheckpoint.js +23 -0
- package/dist/cli/commands/streaming/goalSupervisor.d.ts +64 -0
- package/dist/cli/commands/streaming/goalSupervisor.js +127 -0
- package/dist/cli/commands/streaming/idleTimer.d.ts +26 -0
- package/dist/cli/commands/streaming/idleTimer.js +24 -0
- package/dist/cli/commands/streaming/toolCallRecovery.d.ts +2 -0
- package/dist/cli/commands/streaming/toolCallRecovery.js +24 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.d.ts +31 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.js +50 -2
- package/dist/cli/commands/streaming/toolResultState.d.ts +6 -1
- package/dist/cli/commands/streaming/toolResultState.js +29 -7
- package/dist/cli/commands/streaming/turnOutcome.d.ts +17 -0
- package/dist/cli/commands/streaming/turnOutcome.js +27 -11
- package/dist/cli/commands/streaming/turnRuntime.js +6 -4
- package/dist/cli/commands/streaming.d.ts +82 -3
- package/dist/cli/commands/streaming.js +528 -91
- package/dist/cli/commands/wizardActions.d.ts +7 -0
- package/dist/cli/commands/wizardActions.js +7 -0
- package/dist/cli/commands/wizardPrompts.js +7 -1
- package/dist/cli/commands/wizardSuggestions.d.ts +8 -0
- package/dist/cli/commands/wizardSuggestions.js +64 -14
- package/dist/cli/commands/wizardTransition.d.ts +4 -0
- package/dist/cli/commands/wizardTransition.js +1 -2
- package/dist/cli/index.js +82 -22
- package/dist/cli/terminalTitle.d.ts +6 -0
- package/dist/cli/terminalTitle.js +36 -0
- package/dist/config/inputHistory.d.ts +3 -3
- package/dist/config/inputHistory.js +12 -18
- package/dist/config/modelDiscovery.d.ts +71 -0
- package/dist/config/modelDiscovery.js +214 -0
- package/dist/config/privateStorage.js +28 -2
- package/dist/config/providerAuth.d.ts +14 -0
- package/dist/config/providerAuth.js +49 -0
- package/dist/config/providerPresets.d.ts +49 -5
- package/dist/config/providerPresets.js +573 -73
- package/dist/config/providers.d.ts +2 -0
- package/dist/config/providers.js +9 -0
- package/dist/config/settings.d.ts +58 -0
- package/dist/config/settings.js +38 -1
- package/dist/config/skillSettings.d.ts +6 -13
- package/dist/config/skillSettings.js +20 -19
- package/dist/core/agent/budgets.d.ts +36 -0
- package/dist/core/agent/budgets.js +44 -0
- package/dist/core/agent/compaction.d.ts +38 -0
- package/dist/core/agent/compaction.js +108 -19
- package/dist/core/agent/completionController.d.ts +230 -0
- package/dist/core/agent/completionController.js +287 -0
- package/dist/core/agent/contextBudget.d.ts +46 -0
- package/dist/core/agent/contextBudget.js +89 -7
- package/dist/core/agent/errors.js +6 -2
- package/dist/core/agent/events.d.ts +86 -0
- package/dist/core/agent/reasoningPolicy.d.ts +31 -0
- package/dist/core/agent/reasoningPolicy.js +27 -0
- package/dist/core/agent/toolCapabilities.d.ts +27 -0
- package/dist/core/agent/toolCapabilities.js +58 -0
- package/dist/core/agent/toolExecutionBudget.d.ts +35 -0
- package/dist/core/agent/toolExecutionBudget.js +49 -0
- package/dist/core/agent/toolOutputStore.d.ts +13 -0
- package/dist/core/agent/toolOutputStore.js +27 -10
- package/dist/core/agent/toolResults.d.ts +12 -0
- package/dist/core/agent/toolResults.js +38 -0
- package/dist/core/agent/turnBudget.d.ts +35 -0
- package/dist/core/agent/turnBudget.js +27 -0
- package/dist/core/agent/turnPolicy.d.ts +11 -0
- package/dist/core/agent/turnPolicy.js +19 -0
- package/dist/core/agent/workState.d.ts +76 -1
- package/dist/core/agent/workState.js +120 -13
- package/dist/core/attachments/imageAttachments.d.ts +90 -0
- package/dist/core/attachments/imageAttachments.js +245 -0
- package/dist/core/attachments/readBlessings.d.ts +37 -0
- package/dist/core/attachments/readBlessings.js +79 -0
- package/dist/core/deadline.d.ts +33 -0
- package/dist/core/deadline.js +74 -0
- package/dist/core/goal/completionPolicy.d.ts +27 -0
- package/dist/core/goal/completionPolicy.js +37 -1
- package/dist/core/goal/requestClassifier.d.ts +0 -3
- package/dist/core/goal/requestClassifier.js +0 -13
- package/dist/core/io/boundedRead.js +76 -29
- package/dist/core/limits/byteBudgets.d.ts +7 -0
- package/dist/core/limits/byteBudgets.js +7 -0
- package/dist/core/limits/textBudgets.d.ts +25 -0
- package/dist/core/limits/textBudgets.js +25 -0
- package/dist/core/log/llmLog.js +7 -0
- package/dist/core/persistence/orderedFileWriter.d.ts +10 -0
- package/dist/core/persistence/orderedFileWriter.js +16 -2
- package/dist/core/process/backgroundRegistry.d.ts +35 -0
- package/dist/core/process/backgroundRegistry.js +195 -0
- package/dist/core/process/runBoundedProcess.d.ts +9 -0
- package/dist/core/process/runBoundedProcess.js +74 -29
- package/dist/core/safety/missingExecutable.d.ts +42 -0
- package/dist/core/safety/missingExecutable.js +77 -0
- package/dist/core/safety/urlGuard.d.ts +2 -1
- package/dist/core/safety/urlGuard.js +3 -2
- package/dist/core/session/sessionSlimming.js +47 -4
- package/dist/core/session/sessionStore.d.ts +74 -0
- package/dist/core/session/sessionStore.js +268 -18
- package/dist/core/subagent/contracts.d.ts +120 -0
- package/dist/core/subagent/contracts.js +55 -0
- package/dist/core/subagent/executionProfiles.d.ts +28 -0
- package/dist/core/subagent/executionProfiles.js +45 -0
- package/dist/core/subagent/subagentCoordinator.d.ts +78 -0
- package/dist/core/subagent/subagentCoordinator.js +164 -0
- package/dist/core/subagent/subagentRunner.d.ts +211 -145
- package/dist/core/subagent/subagentRunner.js +208 -98
- package/dist/core/subagent/workspaceMutationPolicy.d.ts +11 -0
- package/dist/core/subagent/workspaceMutationPolicy.js +52 -0
- package/dist/core/tasks/taskStorage.js +12 -1
- package/dist/llm/client.d.ts +36 -29
- package/dist/llm/client.js +102 -33
- package/dist/llm/hazeTools.d.ts +2559 -150
- package/dist/llm/hazeTools.js +119 -31
- package/dist/llm/lsp.d.ts +26 -4
- package/dist/llm/lsp.js +90 -14
- package/dist/llm/lspTools.d.ts +2366 -0
- package/dist/llm/lspTools.js +87 -79
- package/dist/llm/openaiCodex.d.ts +3 -0
- package/dist/llm/openaiCodex.js +47 -0
- package/dist/llm/openaiCodexOAuth.d.ts +54 -0
- package/dist/llm/openaiCodexOAuth.js +214 -0
- package/dist/llm/requestContext.d.ts +25 -1
- package/dist/llm/requestContext.js +51 -8
- package/dist/llm/systemPrompt.d.ts +15 -1
- package/dist/llm/systemPrompt.js +24 -8
- package/dist/llm/toolResultTypes.d.ts +8 -1
- package/dist/llm/tools/bashTool.d.ts +906 -32
- package/dist/llm/tools/bashTool.js +30 -4
- package/dist/llm/tools/editMatch.d.ts +14 -0
- package/dist/llm/tools/editMatch.js +72 -0
- package/dist/llm/tools/failures.d.ts +2 -0
- package/dist/llm/tools/failures.js +1 -0
- package/dist/llm/tools/fetchTool.d.ts +42 -26
- package/dist/llm/tools/fetchTool.js +1 -1
- package/dist/llm/tools/fileToolShared.d.ts +6 -4
- package/dist/llm/tools/fileToolShared.js +18 -23
- package/dist/llm/tools/gitIgnore.d.ts +49 -0
- package/dist/llm/tools/gitIgnore.js +129 -0
- package/dist/llm/tools/grepRunner.d.ts +5 -0
- package/dist/llm/tools/grepRunner.js +52 -71
- package/dist/llm/tools/outputCap.d.ts +2 -6
- package/dist/llm/tools/outputCap.js +2 -6
- package/dist/llm/tools/processTool.d.ts +1077 -0
- package/dist/llm/tools/processTool.js +41 -0
- package/dist/llm/tools/readRecovery.d.ts +10 -0
- package/dist/llm/tools/readRecovery.js +135 -0
- package/dist/llm/tools/toolContext.d.ts +9 -1
- package/dist/llm/tools/toolContext.js +83 -43
- package/dist/llm/tools/workspaceFile.d.ts +9 -1
- package/dist/llm/tools/workspaceFile.js +33 -4
- package/dist/llm/webFetch.d.ts +17 -0
- package/dist/llm/webFetch.js +66 -86
- package/dist/llm/workerContext.d.ts +18 -0
- package/dist/llm/workerContext.js +55 -0
- package/dist/skills/SkillLoader.d.ts +2 -2
- package/dist/skills/SkillRegistry.d.ts +3 -2
- package/dist/skills/SkillRegistry.js +43 -13
- package/dist/skills/builder/SkillBuilder.d.ts +3 -0
- package/dist/skills/builder/SkillBuilder.js +23 -5
- package/dist/skills/skillTools.js +11 -4
- package/dist/skills/types.d.ts +6 -1
- package/dist/ui/codeHighlight.d.ts +4 -0
- package/dist/ui/codeHighlight.js +31 -0
- package/dist/ui/components/Header.d.ts +1 -1
- package/dist/ui/components/MarkdownText.d.ts +16 -2
- package/dist/ui/components/MarkdownText.js +244 -34
- package/dist/ui/components/TextInput.d.ts +12 -2
- package/dist/ui/components/TextInput.js +80 -8
- package/dist/ui/theme.d.ts +4 -3
- package/dist/ui/theme.js +5 -4
- package/dist/utils/buildInfo.d.ts +104 -0
- package/dist/utils/buildInfo.js +253 -0
- package/dist/utils/format.d.ts +2 -0
- package/dist/utils/format.js +8 -0
- package/dist/utils/fs.d.ts +9 -1
- package/dist/utils/fs.js +87 -29
- package/dist/utils/openPath.d.ts +2 -0
- package/dist/utils/openPath.js +22 -0
- package/dist/utils/path.d.ts +2 -0
- package/dist/utils/path.js +5 -1
- package/dist/utils/utf8.d.ts +22 -0
- package/dist/utils/utf8.js +54 -0
- package/dist/utils/version.d.ts +9 -3
- package/dist/utils/version.js +28 -2
- package/package.json +24 -19
package/dist/utils/version.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/** Read the installed package version once, returning undefined if metadata is unavailable. */
|
|
2
|
+
export declare function readPackageVersion(): string | undefined;
|
|
1
3
|
/**
|
|
2
4
|
* Minimal, dependency-free version comparison for the update check.
|
|
3
5
|
*
|
|
4
6
|
* Handles npm package versions like `0.6.0`, `1.2.3`, with optional leading
|
|
5
7
|
* `v` and optional pre-release suffix (`1.0.0-beta.1`). Numeric release
|
|
6
|
-
* segments are compared numerically;
|
|
7
|
-
* (
|
|
8
|
-
*
|
|
8
|
+
* segments are compared numerically; non-numeric trailing chars in a release
|
|
9
|
+
* segment are silently stripped (`1.2.0a` → `1.2.0`), since semver does not
|
|
10
|
+
* define them. Pre-release sorts *below* its release (so `1.0.0-beta.1` is
|
|
11
|
+
* older than `1.0.0`), and within a pre-release, numeric identifiers always
|
|
12
|
+
* have lower precedence than alphanumeric ones (semver rule). Malformed input
|
|
13
|
+
* is treated as `0.0.0` so the check degrades to "no update" rather than
|
|
14
|
+
* throwing.
|
|
9
15
|
*
|
|
10
16
|
* Kept small on purpose: no `semver` dependency for a single comparison.
|
|
11
17
|
*/
|
package/dist/utils/version.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
const PACKAGE_JSON_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'package.json');
|
|
5
|
+
let packageVersionLoaded = false;
|
|
6
|
+
let cachedPackageVersion;
|
|
7
|
+
/** Read the installed package version once, returning undefined if metadata is unavailable. */
|
|
8
|
+
export function readPackageVersion() {
|
|
9
|
+
if (packageVersionLoaded)
|
|
10
|
+
return cachedPackageVersion;
|
|
11
|
+
packageVersionLoaded = true;
|
|
12
|
+
try {
|
|
13
|
+
const parsed = JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8'));
|
|
14
|
+
cachedPackageVersion = typeof parsed.version === 'string' ? parsed.version : undefined;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
cachedPackageVersion = undefined;
|
|
18
|
+
}
|
|
19
|
+
return cachedPackageVersion;
|
|
20
|
+
}
|
|
1
21
|
export function parseVersion(input) {
|
|
2
22
|
const cleaned = input.trim().replace(/^v/i, '');
|
|
3
23
|
// Drop build metadata: everything from the first '+' onward is ignored.
|
|
@@ -11,6 +31,7 @@ export function parseVersion(input) {
|
|
|
11
31
|
const segments = releasePart.split('.');
|
|
12
32
|
const nums = [0, 0, 0];
|
|
13
33
|
for (let index = 0; index < 3; index++) {
|
|
34
|
+
// Non-numeric trailing chars (e.g., `1.2.0a`) are dropped, not rejected.
|
|
14
35
|
const parsed = Number.parseInt((segments[index] ?? '').replace(/[^0-9]/g, ''), 10);
|
|
15
36
|
nums[index] = Number.isFinite(parsed) ? parsed : 0;
|
|
16
37
|
}
|
|
@@ -30,13 +51,18 @@ function comparePrerelease(a, b) {
|
|
|
30
51
|
const bb = b[index];
|
|
31
52
|
const anum = Number(aa);
|
|
32
53
|
const bnum = Number(bb);
|
|
33
|
-
const
|
|
34
|
-
|
|
54
|
+
const aNumeric = Number.isFinite(anum);
|
|
55
|
+
const bNumeric = Number.isFinite(bnum);
|
|
56
|
+
// Semver: numeric identifiers always have lower precedence than alphanumeric.
|
|
57
|
+
if (aNumeric && bNumeric) {
|
|
35
58
|
if (anum < bnum)
|
|
36
59
|
return -1;
|
|
37
60
|
if (anum > bnum)
|
|
38
61
|
return 1;
|
|
39
62
|
}
|
|
63
|
+
else if (aNumeric !== bNumeric) {
|
|
64
|
+
return aNumeric ? -1 : 1;
|
|
65
|
+
}
|
|
40
66
|
else {
|
|
41
67
|
if (aa < bb)
|
|
42
68
|
return -1;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@denizokcu/haze",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"description": "A minimal LLM harness for your terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"bin",
|
|
26
26
|
"dist",
|
|
27
27
|
"README.md",
|
|
28
|
+
"SECURITY.md",
|
|
28
29
|
"LICENSE",
|
|
29
30
|
"CHANGELOG.md",
|
|
30
31
|
"examples"
|
|
@@ -32,7 +33,8 @@
|
|
|
32
33
|
"scripts": {
|
|
33
34
|
"dev": "tsx src/cli/index.ts",
|
|
34
35
|
"clean": "node -e \"require('node:fs').rmSync('dist', {recursive: true, force: true})\"",
|
|
35
|
-
"build": "npm run clean && tsc",
|
|
36
|
+
"build": "npm run clean && tsc && node scripts/write-build-info.mjs",
|
|
37
|
+
"dev:link": "node scripts/dev-link.mjs",
|
|
36
38
|
"start": "node dist/cli/index.js",
|
|
37
39
|
"test": "vitest run",
|
|
38
40
|
"test:watch": "vitest",
|
|
@@ -40,23 +42,25 @@
|
|
|
40
42
|
"lint:fix": "eslint src/ --fix",
|
|
41
43
|
"typecheck": "tsc --noEmit",
|
|
42
44
|
"context:report": "node --import tsx src/cli/contextReport.ts",
|
|
45
|
+
"release:verify": "node scripts/verify-release-metadata.mjs",
|
|
43
46
|
"haze": "tsx src/cli/index.ts",
|
|
44
|
-
"prepublishOnly": "npm run typecheck && npm run build"
|
|
47
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run lint && npm run build && npm audit --audit-level=high && npm run release:verify"
|
|
45
48
|
},
|
|
46
49
|
"dependencies": {
|
|
47
|
-
"@ai-sdk/mcp": "^2.0.
|
|
48
|
-
"@ai-sdk/openai": "4.0.
|
|
50
|
+
"@ai-sdk/mcp": "^2.0.31",
|
|
51
|
+
"@ai-sdk/openai": "4.0.41",
|
|
49
52
|
"@vscode/ripgrep": "1.18.0",
|
|
50
|
-
"ai": "7.0.
|
|
53
|
+
"ai": "7.0.64",
|
|
51
54
|
"cli-highlight": "2.1.11",
|
|
52
55
|
"commander": "15.0.0",
|
|
53
|
-
"defuddle": "^0.19.
|
|
54
|
-
"fs-extra": "11.
|
|
55
|
-
"ink": "7.1.
|
|
56
|
+
"defuddle": "^0.19.2",
|
|
57
|
+
"fs-extra": "11.4.0",
|
|
58
|
+
"ink": "7.1.1",
|
|
56
59
|
"ink-spinner": "5.0.0",
|
|
57
60
|
"linkedom": "^0.18.13",
|
|
58
|
-
"marked": "18.0.
|
|
59
|
-
"
|
|
61
|
+
"marked": "18.0.9",
|
|
62
|
+
"wrap-ansi": "10.0.0",
|
|
63
|
+
"react": "19.2.8",
|
|
60
64
|
"strip-ansi": "7.2.0",
|
|
61
65
|
"turndown": "^7.2.4",
|
|
62
66
|
"yaml": "2.9.0",
|
|
@@ -65,16 +69,17 @@
|
|
|
65
69
|
"devDependencies": {
|
|
66
70
|
"@eslint/js": "^10.0.1",
|
|
67
71
|
"@types/fs-extra": "11.0.4",
|
|
68
|
-
"@types/node": "26.
|
|
69
|
-
"@types/react": "19.2.
|
|
70
|
-
"eslint": "^10.
|
|
71
|
-
"
|
|
72
|
+
"@types/node": "26.2.0",
|
|
73
|
+
"@types/react": "19.2.18",
|
|
74
|
+
"eslint": "^10.8.1",
|
|
75
|
+
"ink-testing-library": "^4.0.0",
|
|
76
|
+
"tsx": "4.23.12",
|
|
72
77
|
"typescript": "6.0.3",
|
|
73
|
-
"typescript-eslint": "^8.
|
|
78
|
+
"typescript-eslint": "^8.67.0",
|
|
74
79
|
"vitest": "^4.1.10"
|
|
75
80
|
},
|
|
76
81
|
"allowScripts": {
|
|
77
|
-
"
|
|
78
|
-
"
|
|
82
|
+
"fsevents@2.3.3": true,
|
|
83
|
+
"esbuild@0.28.2": true
|
|
79
84
|
}
|
|
80
85
|
}
|