@denizokcu/haze 1.7.10 → 1.7.12

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.
Files changed (142) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +125 -99
  3. package/assets/graph-grammars/NOTICE.md +21 -0
  4. package/assets/graph-grammars/tree-sitter-javascript.wasm +0 -0
  5. package/assets/graph-grammars/tree-sitter-tsx.wasm +0 -0
  6. package/assets/graph-grammars/tree-sitter-typescript.wasm +0 -0
  7. package/assets/graph-grammars/web-tree-sitter.cjs +4116 -0
  8. package/assets/graph-grammars/web-tree-sitter.cjs.map +7 -0
  9. package/assets/graph-grammars/web-tree-sitter.js +4056 -0
  10. package/assets/graph-grammars/web-tree-sitter.js.map +7 -0
  11. package/assets/graph-grammars/web-tree-sitter.wasm +0 -0
  12. package/assets/graph-grammars/web-tree-sitter.wasm.map +55 -0
  13. package/dist/buildInfo.json +3 -3
  14. package/dist/cli/chat/BusyBar.d.ts +2 -1
  15. package/dist/cli/chat/BusyBar.js +2 -2
  16. package/dist/cli/chat/chatMetrics.d.ts +25 -0
  17. package/dist/cli/chat/chatMetrics.js +36 -0
  18. package/dist/cli/chat/inputSuggestions.js +1 -0
  19. package/dist/cli/chat/sessionLifecycle.d.ts +2 -0
  20. package/dist/cli/chat/sessionLifecycle.js +29 -19
  21. package/dist/cli/chat/sessionRecorder.d.ts +2 -1
  22. package/dist/cli/chat/sessionRecorder.js +29 -9
  23. package/dist/cli/chat/startupSequence.d.ts +2 -0
  24. package/dist/cli/chat/startupSequence.js +6 -0
  25. package/dist/cli/chat/transcriptPartition.js +10 -4
  26. package/dist/cli/chat/wizard/providerHandlers.js +57 -9
  27. package/dist/cli/chat/wizard/sessionThemeHandlers.js +5 -1
  28. package/dist/cli/commands/chat.js +44 -9
  29. package/dist/cli/commands/commandHelp.js +6 -3
  30. package/dist/cli/commands/commands.js +2 -0
  31. package/dist/cli/commands/formatters.js +28 -0
  32. package/dist/cli/commands/graphCommand.d.ts +2 -0
  33. package/dist/cli/commands/graphCommand.js +60 -0
  34. package/dist/cli/commands/initCommand.js +14 -0
  35. package/dist/cli/commands/providerWizard.js +9 -17
  36. package/dist/cli/commands/reasoningCommand.d.ts +1 -0
  37. package/dist/cli/commands/reasoningCommand.js +32 -4
  38. package/dist/cli/commands/runCommand.js +7 -1
  39. package/dist/cli/commands/streaming/agentAttempt.js +11 -1
  40. package/dist/cli/commands/streaming/attemptLifecycle.js +1 -0
  41. package/dist/cli/commands/streaming/attemptOutcome.js +6 -2
  42. package/dist/cli/commands/streaming/attemptSetup.d.ts +3 -0
  43. package/dist/cli/commands/streaming/attemptSetup.js +13 -6
  44. package/dist/cli/commands/streaming/goalSupervisor.d.ts +1 -1
  45. package/dist/cli/commands/streaming/goalSupervisor.js +22 -1
  46. package/dist/cli/commands/streaming/prepareStep.js +1 -0
  47. package/dist/cli/commands/streaming/streamLoop.d.ts +2 -0
  48. package/dist/cli/commands/streaming/streamLoop.js +14 -10
  49. package/dist/cli/commands/streaming/toolPartHandlers.js +7 -1
  50. package/dist/cli/commands/streaming.d.ts +2 -0
  51. package/dist/cli/commands/streaming.js +5 -0
  52. package/dist/cli/commands/wizardFlow.d.ts +1 -0
  53. package/dist/cli/commands/wizardFlow.js +10 -4
  54. package/dist/cli/index.js +5 -3
  55. package/dist/config/hazeBuild.d.ts +2 -2
  56. package/dist/config/hazeBuild.js +2 -2
  57. package/dist/config/modelDiscovery.d.ts +1 -1
  58. package/dist/config/modelDiscovery.js +8 -8
  59. package/dist/config/{modelCatalog.d.ts → providerModelFacts.d.ts} +13 -2
  60. package/dist/config/{modelCatalog.js → providerModelFacts.js} +145 -21
  61. package/dist/config/providerPresets.d.ts +8 -19
  62. package/dist/config/providerPresets.js +86 -555
  63. package/dist/config/providerReasoning.d.ts +16 -0
  64. package/dist/config/providerReasoning.js +56 -0
  65. package/dist/config/providers.d.ts +4 -0
  66. package/dist/config/providers.js +19 -2
  67. package/dist/config/settings.d.ts +14 -0
  68. package/dist/config/settings.js +5 -0
  69. package/dist/core/agent/compaction.d.ts +1 -0
  70. package/dist/core/agent/compaction.js +3 -0
  71. package/dist/core/agent/events.d.ts +1 -1
  72. package/dist/core/agent/providerTransition.d.ts +8 -0
  73. package/dist/core/agent/providerTransition.js +47 -0
  74. package/dist/core/agent/reasoningPolicy.d.ts +1 -1
  75. package/dist/core/agent/reasoningPolicy.js +4 -2
  76. package/dist/core/graph/analyze.d.ts +61 -0
  77. package/dist/core/graph/analyze.js +274 -0
  78. package/dist/core/graph/buildGraph.d.ts +44 -0
  79. package/dist/core/graph/buildGraph.js +290 -0
  80. package/dist/core/graph/digest.d.ts +2 -0
  81. package/dist/core/graph/digest.js +40 -0
  82. package/dist/core/graph/extract.d.ts +58 -0
  83. package/dist/core/graph/extract.js +394 -0
  84. package/dist/core/graph/model.d.ts +63 -0
  85. package/dist/core/graph/model.js +96 -0
  86. package/dist/core/graph/query.d.ts +69 -0
  87. package/dist/core/graph/query.js +391 -0
  88. package/dist/core/graph/store.d.ts +64 -0
  89. package/dist/core/graph/store.js +171 -0
  90. package/dist/core/limits.d.ts +0 -2
  91. package/dist/core/limits.js +0 -2
  92. package/dist/core/process/runBoundedProcess.js +12 -6
  93. package/dist/core/providerContracts.d.ts +9 -8
  94. package/dist/core/providerContracts.js +21 -1
  95. package/dist/core/safety/redaction.js +12 -2
  96. package/dist/core/safety/untrustedEnvelopes.d.ts +6 -0
  97. package/dist/core/safety/untrustedEnvelopes.js +17 -2
  98. package/dist/core/session/sessionSlimming.js +5 -59
  99. package/dist/core/session/sessionStore.d.ts +4 -0
  100. package/dist/core/session/sessionStore.js +149 -9
  101. package/dist/core/session/snapshotCodec.d.ts +5 -0
  102. package/dist/core/session/snapshotCodec.js +47 -0
  103. package/dist/core/shellOutput/registry.js +2 -46
  104. package/dist/core/subagent/executionProfiles.js +8 -5
  105. package/dist/core/tasks/taskStorage.js +11 -1
  106. package/dist/core/toolOutput/reduction.d.ts +55 -2
  107. package/dist/core/toolOutput/reduction.js +77 -2
  108. package/dist/core/validation/outputParser.js +16 -8
  109. package/dist/llm/client.d.ts +4 -2
  110. package/dist/llm/client.js +104 -55
  111. package/dist/llm/hazeTools.d.ts +2 -12426
  112. package/dist/llm/hazeTools.js +2 -0
  113. package/dist/llm/lspTools.d.ts +3 -12622
  114. package/dist/llm/mistralReasoning.d.ts +2 -0
  115. package/dist/llm/mistralReasoning.js +17 -0
  116. package/dist/llm/mistralVibeAuth.d.ts +5 -0
  117. package/dist/llm/mistralVibeAuth.js +63 -0
  118. package/dist/llm/requestContext.d.ts +3 -0
  119. package/dist/llm/requestContext.js +21 -11
  120. package/dist/llm/subagentRunner.d.ts +2 -308
  121. package/dist/llm/subagentRunner.js +15 -7
  122. package/dist/llm/systemPrompt.js +7 -4
  123. package/dist/llm/toolResultTypes.d.ts +1 -1
  124. package/dist/llm/toolResultTypes.js +7 -1
  125. package/dist/llm/tools/fetchTool.d.ts +2 -1221
  126. package/dist/llm/tools/fileTools.d.ts +2 -7768
  127. package/dist/llm/tools/graphAdvisory.d.ts +22 -0
  128. package/dist/llm/tools/graphAdvisory.js +68 -0
  129. package/dist/llm/tools/graphTools.d.ts +13 -0
  130. package/dist/llm/tools/graphTools.js +195 -0
  131. package/dist/llm/tools/outputCap.d.ts +2 -7
  132. package/dist/llm/tools/outputCap.js +3 -11
  133. package/dist/llm/tools/processTool.d.ts +2 -1081
  134. package/dist/llm/tools/replaceInFiles.js +5 -0
  135. package/dist/llm/tools/shellTool.d.ts +2 -1513
  136. package/dist/llm/tools/storedOutputTool.d.ts +2 -355
  137. package/dist/llm/tools/taskTool.d.ts +2 -489
  138. package/dist/llm/tools/toolContext.js +24 -9
  139. package/dist/llm/tools/toolContextState.d.ts +3 -0
  140. package/dist/llm/tools/toolContextState.js +2 -1
  141. package/dist/skills/skillTools.js +4 -1
  142. package/package.json +24 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.12 - 2026-11-20
4
+
5
+ ### Added
6
+
7
+ - Deterministic workspace code graph built with vendored tree-sitter WASM grammars, queried through `graph*` tools (also available to subagent workers), the `/graph` command, and compaction digests; file mutations attach a bounded reverse-dependency advisory.
8
+
9
+ ### Changed
10
+
11
+ - LSP and graph tools are gated on request intent and prompt/schema duplication is trimmed to reduce per-request context.
12
+
13
+ ### Fixed
14
+
15
+ - Bounded processes settle on child exit even when escaped descendants hold stdio pipes.
16
+ - Project skill envelope closers are escaped variant-tolerantly.
17
+ - Only error diagnostics count as validation failure evidence.
18
+ - Durable-write failures surface once, and workspace tasks are written atomically.
19
+ - Epoch-boundary aborts are classified by cause and turn budgets stay honest.
20
+
21
+ ## 1.7.11 - 2026-11-06
22
+
23
+ ### Changed
24
+
25
+ - Native fleet size follows the deployment manifest's worker allowance instead of a hardcoded two; deployments that advertise nothing stay conservative at two workers.
26
+ - The busy bar shows live progress for long turns: estimated generation tok/s and fleet workers running or queued.
27
+
3
28
  ## 1.7.10 - 2026-11-05
4
29
 
5
30
  ### Fixed
package/README.md CHANGED
@@ -1,108 +1,26 @@
1
1
  # haze
2
2
 
3
- A minimal LLM harness for your terminal.
3
+ haze is an open-source coding agent for your terminal. It works with local models and hosted providers.
4
4
 
5
- [![Known Vulnerabilities](https://snyk.io/test/github/DenizOkcu/haze/badge.svg)](https://snyk.io/test/github/DenizOkcu/haze)
6
-
7
- ## What's new in 1.7.10
8
-
9
- This patch rebuilds the npm package with matching version and build metadata.
10
-
11
- ### Changes in 1.7.9
12
-
13
- This release improves model deployment discovery for configured workers.
14
-
15
- ### Changes in 1.7.8
16
-
17
- This release improves compatibility with updated model deployments and preserves explicitly configured deployment trust.
18
-
19
- ### Changes in 1.7.5
20
-
21
- Improved recovery from malformed tool calls and more resilient retry handling for temporary provider errors.
22
-
23
- ### Changes in 1.7.2
24
-
25
- This patch updates the AI SDK and development tooling, and moves the public website and documentation to maintainable Astro components.
26
-
27
- ### Changes in 1.7.1
28
-
29
- This patch updates a provider preset's default endpoint.
30
-
31
- ### Changes in 1.7.0
32
-
33
- haze 1.7.0 hardens the untrusted-content boundary: MCP tool results of every size now arrive inside escaped untrusted envelopes, one variant-tolerant escaper guards all untrusted container closers (including compaction summaries), project instructions discovered mid-turn no longer ride the engine control channel, terminal control sequences (including OSC 52 clipboard writes) are stripped from the Markdown transcript path, and the protected secret-file list extends to database/CLI credential stores, browser profiles, and `~/.haze/settings.json`/`auth.json` — with the shell-side prompt rule derived from the same list. It also fixes validation-evidence edge cases around trailing stderr redirects and repeated tool-call redirects.
34
-
35
- ### Highlights from 1.6.0
36
-
37
- haze 1.6.0 stops mistaking patient local models for dead streams:
38
-
39
- - Idle-stream stall windows are now class-aware: hosted endpoints keep the 5-minute window, while loopback/local inference servers (LM Studio, Ollama) get 30 minutes — their prompt ingestion and hidden reasoning emit no stream output at all, so the old fixed window aborted healthy models mid-work and burned the retry pool re-doing prefill.
40
- - The new `streamIdleTimeoutMs` setting overrides the window explicitly (integer milliseconds, 1s–24h). The `timeout`/`retry` events and the stall system messages report the effective window.
41
-
42
- ### Highlights from 1.5.1
43
-
44
- haze 1.5.1 improves terminal resizing and reasoning-effort compatibility:
45
-
46
- - On terminal width changes, haze replays the full settled transcript, including formatted Markdown, at the new width. The input draft and active turn stay mounted. Terminal scrollback is preserved, so older transcript copies can remain there after a replay.
47
- - Local inference endpoints omit reasoning effort by default; providers can explicitly enable or disable it with `capabilities.reasoningEffort`. Hosted OpenAI-compatible endpoints retain pass-through behavior.
48
- - Unsupported `none`/`minimal` choices for GPT-6+ model names are omitted rather than promoted to a different effort; the provider default applies.
49
-
50
- ### Highlights from 1.5.0
51
-
52
- haze 1.5.0 modernizes the terminal experience on Ink 8 — formatted streamed Markdown, native spinners and busy indicators, `$EDITOR`/`$PAGER` handoffs, and IME-aware cursor placement — and adds model steering for compact models, per-model session-scoped `/reasoning` (with the `/thinking` alias), pinned session model selections, and a metadata-only `haze report`.
53
-
54
- - Formatted streaming: assistant Markdown renders as formatted terminal rows while it streams, clamped to the viewport budget; clamped rows settle into the transcript verbatim, never lost.
55
- - Model steering: `steeringProfile: "compact"` lists nearby package-script names, asks for smaller working slices, reminds about validation earlier, and compacts history at 70% of the usual budget — completion evidence stays just as strict. `escalationModel` hands a stuck goal to one explicitly configured model, once, with the conversation and evidence intact.
56
- - Reasoning control: `/reasoning` (alias `/thinking`) keeps a per-model level for the session — `unset` sends no parameter, `reset` drops the override — and the status bar shows the effective level. Headless runs keep `--reasoning <level|unset>` as a run-scoped override.
57
- - Session model pinning: each session remembers its model selection on resume, continue, and fork; changing the global default never rewrites an active session. Headless `--resume` follows the saved selection unless `--model` is explicit.
58
- - `haze report [id] [--json]`: goal outcomes, tool/validation counts, context size, and evidence mismatches from session metadata — never prompts, commands, paths, or tool output.
59
- - Terminal modernization: Ink 8 with native bracketed paste, grapheme/cell-aware editing, one bounded shutdown path, suspended-terminal `$EDITOR`/`$PAGER` handoffs, and screen-reader-aware indicators. The implicit 30-minute per-turn cap is gone; `--timeout` remains the explicit opt-in goal budget.
60
-
61
- Previous releases:
5
+ Run it in your project and ask it to fix a bug, add a feature, or explain the code. haze can read and edit files, run commands, and check the results. Connect Ollama, LM Studio, OpenRouter, OpenAI, or another OpenAI-compatible endpoint, then pick the model you want to use.
62
6
 
63
- - `1.4.0`: per-run reasoning control (`--reasoning` for headless runs and a live status-bar indicator) on top of the 1.3.0 hardening pass — uniform secret/file boundaries, evidence that survives failed exits, durable session lifecycle fixes, credential-safe provider discovery, and honest output reduction.
64
- - `1.2.1`: edit-recovery instructs instead of restricting — the model is told which path to read and why, while the execution-time gate enforces the fresh read.
65
- - `1.2.0`: provider-usage context accounting, recoverable compact-and-retry overflow handling, model-written split-turn-aware compaction, `pipefail` validation truthfulness, and a configurable retry pool.
66
- - `1.1.1`: durable goal ledgers and crash-resume frontiers; headless `--until-done` relaunches with bounded notices and a no-progress guard; proportional task/validation completion gates; and smaller orchestration internals.
67
- - `1.1.0`: terminal theming with 14 built-in palettes and live `/themes` switching; hard secret-file protection across every file tool, including symlink, read-blessing, ignore-override, and grep-traversal defenses.
68
- - `1.0.0`: first stable release — the CLI flags, settings schema, `stream-json` event contract, session format, skill layout, and structured tool-result shape under the 1.x compatibility promise; a configurable model-retry pool; and four benchmark-driven reliability fixes (validated with the Harbor differential benchmark: 17/17 verifier tests, fewest input tokens of the reporting harnesses, zero stalls).
69
- - `0.11.0`: goal-level autonomy across physical-turn budgets (logical-goal supervisor, evidence-gated completion, `goal_*` stream events, cumulative goal envelope), runtime provenance and `haze doctor` (embedded build info, stale-build refusal, session build headers), model-aware context budgeting (per-preset limits, live discovery, 128K fallback, self-healing context overflow), headless `--timeout` with per-tool deadlines and abort-cause typing, performance work (batched ignore checks, LSP reuse, coalesced/vacuumed sessions, memoized estimates, incremental streaming, viewport-clamped live region), and model-written `/compact` summaries with a heuristic fallback.
70
- - `0.10.1`: OpenAI Subscription OAuth preset, SECURITY.md and the attended-use threat model, bounded completion recovery, compact colorized diffs, prompt-injection framing, hardened fetch/stdin/sessions, and a multi-page docs site.
7
+ [Quickstart](https://haze.build/quickstart.html) · [Documentation](https://haze.build/) · [Commands](https://haze.build/commands.html) · [Changelog](https://github.com/DenizOkcu/haze/blob/main/CHANGELOG.md)
71
8
 
72
- - `0.10.0`: image input, read-only path blessings, isolated fleet workers, managed background processes, session browsing and forking, model discovery, project skills, and rotating tips.
73
- - `0.9.0`: private home-state storage, authoritative turn status, collection-time byte bounds, hardened process teardown, stronger real-path and network boundaries, and ordered persistence.
74
- - `0.8.0`: AI SDK v7 runtime, live status with model, elapsed time, and tool labels; bounded bash output processing; lowercase `haze` naming.
75
- - `0.7.0`: headless `-p`, `--output json`, and `--output stream-json`; pinned-connection `fetch` safety; scoped instruction refresh; smaller sessions; startup context visibility.
76
- - `0.6.0`: AI SDK-native ToolLoopAgent core, optional LSP navigation, MCP support, unified configuration pickers, cleaner transcripts, `/context`, and startup update checks.
77
- - `0.5.0`: SSRF-protected public URL fetching, no provider environment variables, debug-only LLM logs, command-aware output reduction, CLI Markdown rendering, scoped nested context files, and automatic cleanup of completed tasks.
78
- - `0.4.0`: three-step skill wizard, language-agnostic skill intent extraction, model-managed tasks, a smaller command surface, and docs site additions.
79
- - `0.3.0`: redesigned docs site, a relocated task bar, and automatic task cleanup between sessions.
80
- - `0.2.0`: more reliable recovery from failed edits and validation, structured bash classification, parsed validation summaries, and multiline input with vertical cursor movement.
81
- - `0.1.0`: bundled ripgrep, subagent delegation, and inline diffs.
82
- - `0.0.3`: durable sessions, context compaction, and provider management.
83
- - `0.0.2`: Markdown skills, autocomplete, and `listFiles` pagination.
84
- - `0.0.1`: initial release.
9
+ [![Known Vulnerabilities](https://snyk.io/test/github/DenizOkcu/haze/badge.svg)](https://snyk.io/test/github/DenizOkcu/haze)
85
10
 
86
- haze works with OpenAI-compatible providers, including OpenRouter and local endpoints. Use `/provider` to choose or add one, then `/model` to select a model.
11
+ ## What haze does
87
12
 
88
- ```txt
89
- _
90
- | |
91
- | |__ __ _ _______
92
- | '_ \ / _` |_ / _ \
93
- | | | | (_| |/ / __/
94
- |_| |_|\__,_/___\___|
95
- ```
13
+ haze manages context, retries, and continuation during longer tasks. For implementation work, it tracks validation results and can continue when tasks or checks are incomplete. You can follow its tool calls and edits in the terminal.
96
14
 
97
- haze keeps guardrails light. The LLM can work from the terminal with access close to yours while staying scoped to the current project where possible. It is for developers who would rather supervise tool calls than work through a stack of permission dialogs. Keep an eye on what it does.
15
+ Sessions can be resumed later. For work you do often, save instructions as a Markdown skill. haze also supports MCP and LSP servers.
98
16
 
99
- ### Supervision model
17
+ In one [Harbor differential benchmark](https://github.com/DenizOkcu/haze/blob/main/benchmarks/harbor/results/20260816-224944-glm53-differential.html), haze 1.0.0 and three other harnesses each passed all 17 verifier tests using the same task, model, and backend. The report includes the runs and measurements. It covers one task and isn't a general ranking.
100
18
 
101
- There is **no sandbox and no permission layer**: the shell tool runs unsupervised in your login shell (its classification is informational only), and only the file tools are confined to the workspace. Claude Code gates tools behind permissions, plan mode, and hooks; Codex CLI runs in an OS sandbox with approval modes; haze, like pi, replaces those mechanisms with your supervision. That trade-off is deliberate and keeps the agent fast and transparent, but it also means haze is **not an unattended automation runtime** — run it where you would run a shell session yourself. If a CI job runs haze headless, treat the job the way you would treat any script with shell access. SECURITY.md documents the attended-use threat model in full.
19
+ > **Supervise haze as you would a shell session.** haze has no sandbox or command approval layer. Shell commands run with your user permissions and can reach outside the project. File tools are scoped to the workspace. See the [safety model](#safety-model) and [SECURITY.md](https://github.com/DenizOkcu/haze/blob/main/SECURITY.md).
102
20
 
103
21
  ## Getting started
104
22
 
105
- haze runs on macOS and Linux with Node.js 22 or newer. Windows is not yet a supported platform (the toolchain assumes a POSIX shell); it is on the 1.x roadmap.
23
+ haze requires Node.js 22.13 or newer and runs on macOS and Linux. Native Windows support is on the 1.x roadmap; the current toolchain assumes a POSIX shell.
106
24
 
107
25
  Install haze:
108
26
 
@@ -123,8 +41,22 @@ On first run, create or choose a provider, then choose your first model:
123
41
  /model
124
42
  ```
125
43
 
44
+ To use a local model, start Ollama or LM Studio and load a model. Choose the matching preset in `/provider`, then discover or enter the model in `/model`. You do not need an API key for a local server. For a hosted model, choose a provider preset and follow the sign-in or API-key prompts. The [quickstart](https://haze.build/quickstart.html) has setup examples.
45
+
46
+ Then try a task in your project:
47
+
48
+ ```txt
49
+ find a failing test, fix the cause, and run the relevant tests
50
+ ```
51
+
52
+ Review the tool calls, changes, and test results as haze works. Results depend on the model, task, and available tools.
53
+
126
54
  `/provider` sets up any OpenAI-compatible endpoint, such as OpenRouter, OpenAI, LM Studio, Ollama, or a proxy. haze asks for a provider name, base URL, optional API key, and model names. The **OpenAI API Key** preset uses platform API billing. The **OpenAI Subscription** preset instead opens a ChatGPT browser login and uses the Codex Responses endpoint; no pasted session token is required. Its sign-in callback listens on a fixed localhost port (1455) required by the registered client, so a lingering process holding that port blocks sign-in until it exits; retry after freeing the port.
127
55
 
56
+ Cloud presets include a small set of current models; account discovery can expose more. The Ollama, LM Studio, llama.cpp, MLX Server, and vLLM presets do not suggest model names: use the models discovered from your own server, or enter them manually. Custom providers remain available. Preset changes do not modify previously saved providers or their models.
57
+
58
+ The **Mistral Vibe Subscription** preset opens Mistral's browser sign-in and stores the issued API key in Haze's private settings. It uses the regular Mistral API with Vibe's model alias; available models, quota, and any pay-as-you-go charges depend on the selected Mistral account and plan. Existing direct Mistral providers can use **sign in with Mistral Vibe** from their `/provider` actions to replace their key.
59
+
128
60
  `/model` selects the model haze should use. The picker also offers `add models`, which fetches a provider's model list from its OpenAI-compatible `/models` endpoint so you can pick instead of typing; if the endpoint is unavailable you can still type model names. You can also set one directly:
129
61
 
130
62
  ```txt
@@ -147,13 +79,15 @@ Use `/mcp` to connect [Model Context Protocol](https://modelcontextprotocol.io)
147
79
 
148
80
  API keys for HTTP/SSE servers are entered in a masked prompt and sent as `Authorization: Bearer <value>`. Stdio authentication belongs in the command or wrapper; haze does not attach HTTP headers to stdio. Servers persist in `~/.haze/settings.json` under `mcpServers`. Discovery and cleanup have bounded deadlines, failures are isolated, and MCP tools never shadow built-ins.
149
81
 
150
- Saved settings live in `~/.haze/settings.json`. ChatGPT OAuth credentials live separately in `~/.haze/auth.json`; both files use private permissions. Provider keys and MCP headers require HTTPS unless the endpoint uses loopback HTTP (`localhost`, `*.localhost`, `127/8`, or `::1`). Keyless HTTP remains available, and local OpenAI-compatible providers do not need a key. If a settings or authentication file is malformed, haze shows an actionable error instead of treating it as empty. Configure everything inside haze with `/provider`, `/model`, and `/settings`; there are no environment variables to set. Provider presets carry curated per-model metadata (context window and output cap from the models.dev catalog) which the wizard writes into `modelLimits`.
82
+ Saved settings live in `~/.haze/settings.json`. ChatGPT OAuth credentials live separately in `~/.haze/auth.json`; both files use private permissions. Provider keys and MCP headers require HTTPS unless the endpoint uses loopback HTTP (`localhost`, `*.localhost`, `127/8`, or `::1`). Keyless HTTP remains available, and local OpenAI-compatible providers do not need a key. If a settings or authentication file is malformed, haze shows an actionable error instead of treating it as empty. Configure everything inside haze with `/provider`, `/model`, and `/settings`; there are no environment variables to set. Provider presets may carry per-model context and output limits. Live discovery is saved separately as `discoveredModelLimits`, so it can be refreshed without overwriting explicit `modelLimits`; each limit uses the user setting, then discovery, then the preset and catalog. Moving aliases without reliable limits are left unspecified. Previously saved `modelLimits` remain explicit overrides, including limits saved by earlier versions; remove an outdated value to allow discovery to take effect. Private-network endpoints default to local budgeting; set `providers[].location` to `"local"` or `"hosted"` to override detection. Credentialed remote HTTP is still refused.
151
83
 
152
84
  Switch the interface palette with `/themes`. The picker lists every built-in theme — light palettes and oh-my-zsh ports like `robbyrussell`, `af-magic`, and `solarized-dark` — and applies the choice immediately; `/themes <name>` sets one directly. The selection persists as `theme` in `~/.haze/settings.json`, and text already on screen keeps its old colors.
153
85
 
154
- Control reasoning effort with `/reasoning` (alias `/thinking`). The picker or `/reasoning <level>` sets `none`, `minimal`, `low`, `medium`, `high`, or `xhigh` for the active model in this session; it never writes settings. `/reasoning unset` omits the parameter, `/reasoning reset` drops the session override, and `/reasoning status` explains the current choice. Resolution follows run-scoped `--reasoning` → per-model session override → saved global `reasoning` setting → built-in default `low`. The level travels as the AI SDK's portable `reasoning` parameter from the next turn and appears beside the model in the status bar.
86
+ Control reasoning effort with `/reasoning` (alias `/thinking`). The picker and `/reasoning <level>` set a per-model session override, and show only levels known for the active provider and model. `/reasoning off` requests `none` (where supported); `/reasoning unset` omits the parameter and leaves the provider default in control; `/reasoning reset` removes the session override. `/reasoning status` reports the current choice. Resolution follows run-scoped `--reasoning` → per-model session override → saved global `reasoning` setting → built-in `low`. An unsupported explicit setting is reported and omitted, not silently mapped to another level. Mistral Large 4 offers `low`, `medium`, and `high`.
87
+
88
+ For unknown custom endpoints, reasoning is omitted until configured. Set `providers[].reasoningLevels` to an array such as `["none", "low", "high"]`, or set exact-model overrides in `providers[].modelReasoningLevels`, for example `{"my-model": ["low", "high"]}`. An empty array disables the option. `capabilities.reasoningEffort: false` disables it; `true` explicitly enables the standard portable levels. For binary custom servers, set `reasoningFormat` to `"thinking"` (sends `thinking.type` as `enabled` or `disabled`) or `"enable-thinking"` (sends `enable_thinking` as a boolean). The picker shows `none` and `high` as off and on for these formats. Provider defaults are not equivalent to off.
155
89
 
156
- Reasoning effort is capability-gated: `capabilities.reasoningEffort: true|false` on a provider explicitly enables or disables sending it. Without an override, local inference endpoints recognized by haze (`localhost`, `127.0.0.1`, `::1`, `0.0.0.0`, and `.local` hosts) omit it; hosted endpoints retain pass-through behavior. This avoids local servers interpreting unsupported levels as reasoning being enabled. Omission leaves the server's own default in control; it does not guarantee reasoning is off. For bare GPT-6+ model names, `minimal` is omitted, and `none` is omitted except for exactly `gpt-6-sol` and `gpt-6-luna`; unsupported choices are never silently promoted. The `reasoning_policy` stream event reports the effective policy.
90
+ Workers use the lowest known supported level, or the provider default when it is unknown. Compaction follows the active model's policy. OpenRouter uses its provider adapter to preserve structured reasoning data across tool calls. Session snapshots retain conversation content, tool outputs, attached file bytes, and provider continuation metadata in private session files; optional session secret redaction can still modify saved strings. Large snapshots use checksummed chunks, with a 64 MiB maximum per snapshot. When switching models or provider endpoints, haze converts previous tool calls and results to labeled conversation text and clears provider-specific reasoning and signatures before the new model sees the history. Resuming an older session without an endpoint fingerprint also establishes this boundary.
157
91
 
158
92
  haze focuses on chat, local tools, context files, sessions, and Markdown skills. Use `/skills` for workflows outside that core. Its interactive picker can generate a skill from a description, then enable, disable, validate, or remove it. For reviews, release prep, deploy checks, debugging routines, or a team-specific checklist, ask haze to create a skill and edit the resulting Markdown as needed.
159
93
 
@@ -478,7 +412,7 @@ haze saves durable workspace sessions in `~/.haze/sessions`. It writes a session
478
412
 
479
413
  Snapshots are written at turn boundaries, not per tool call. If haze crashes or is killed mid-turn, the session resumes from the last completed turn: work already on disk (file edits, command side effects) is not reflected in the session record, so after a crash verify the working tree (`git status`, `git diff`) before continuing. To keep long sessions from growing quadratically — every turn appends the full history again — session files are automatically compacted once superseded snapshots dominate the file: only the newest conversation and work-state snapshots are kept and the file is rewritten atomically.
480
414
 
481
- Session files are optimized for resume and audit, not token-by-token playback: completed user/assistant messages, tool lifecycle events, conversation snapshots, and work-state snapshots are persisted, but streaming `message_update` events are skipped. Large persisted tool outputs are replaced with previews and byte counts so a resumed model can reread current files instead of carrying stale megabytes forward.
415
+ Session files are optimized for resume and audit, not token-by-token playback: completed user/assistant messages, tool lifecycle events, conversation snapshots, and work-state snapshots are persisted, but streaming `message_update` events are skipped. Conversation snapshots preserve tool outputs and attachments; separate tool lifecycle events use bounded previews and byte counts.
482
416
 
483
417
  Long turns use bounded tool slices. Older successful tool results are compacted while failures and recent evidence remain verbatim, synthetic haze control nudges are not persisted as user requests, and token-pressure compaction preserves the structured work state.
484
418
 
@@ -503,8 +437,8 @@ Most haze behaviour needs no configuration; a few optional keys in `~/.haze/sett
503
437
  - `contextWindowFallbackTokens` / `localContextWindowFallbackTokens` (default 128K hosted / 32K local): context-window guess for models without limits metadata or a curated catalog entry. Every turn emits a `context_budget` event naming the window and its source, and the interactive warning fires once per model per session when the built-in default was used.
504
438
  - `manualCompaction` (`"llm-summary"` default, or `"heuristic"`): whether manual `/compact` asks the active model for a continuity summary or keeps the model-free bounded excerpt.
505
439
  - `theme` (string, default `purple`): name of a built-in palette (`/themes` lists and sets them, with `light` and oh-my-zsh ports like `robbyrussell` included). Unknown names fail loudly at startup with the valid names listed.
506
- - `reasoning` (`"none"` | `"minimal"` | `"low"` | `"medium"` | `"high"` | `"xhigh"` | `"provider-default"`, default `low`): saved global fallback for the portable reasoning parameter. Run-scoped and per-model session choices take precedence. The `provider-default` sentinel omits the parameter; `/reasoning` changes only the in-memory session choice.
507
- - `providers[].capabilities.reasoningEffort` (optional boolean): explicitly allow or omit reasoning effort for that provider. Without it, local inference endpoints omit the parameter and hosted OpenAI-compatible endpoints pass it through, subject to model-specific restrictions.
440
+ - `reasoning` (`"none"` | `"minimal"` | `"low"` | `"medium"` | `"high"` | `"xhigh"` | `"max"` | `"provider-default"`, default `low`): saved global fallback for the portable reasoning parameter. Run-scoped and per-model session choices take precedence. The `provider-default` sentinel omits the parameter; `/reasoning` changes only the in-memory session choice.
441
+ - `providers[].capabilities.reasoningEffort` (optional boolean): explicitly allow standard levels or omit reasoning effort. Unknown providers omit the parameter unless configured. `reasoningLevels`, `modelReasoningLevels`, and `reasoningFormat` configure custom endpoints as described above.
508
442
 
509
443
  ## Safety model
510
444
 
@@ -523,7 +457,7 @@ Shell classification is informational. haze does not ask for confirmation before
523
457
 
524
458
  With `--debug`, haze writes full request and message payloads to `~/.haze/logs/`. The files use private `0600` permissions on POSIX, but they can contain secrets and file contents. Do not share debug logs without reviewing and redacting them.
525
459
 
526
- See [SECURITY.md](SECURITY.md) for supported versions and private vulnerability reporting.
460
+ See [SECURITY.md](https://github.com/DenizOkcu/haze/blob/main/SECURITY.md) for supported versions and private vulnerability reporting.
527
461
 
528
462
  ## Local development
529
463
 
@@ -586,6 +520,98 @@ git push origin main --tags
586
520
  npm publish --access public --provenance
587
521
  ```
588
522
 
523
+ <details>
524
+ <summary>Previous release highlights</summary>
525
+
526
+ ## What's new in 1.7.12
527
+
528
+ A deterministic workspace code graph (tree-sitter WASM) powers the new `graph*` tools and `/graph` command, with bounded reverse-dependency advisories after file edits; LSP/graph tools are now gated on request intent to cut context, plus several reliability fixes.
529
+
530
+ ### Changes in 1.7.11
531
+
532
+ Fleet size now follows the deployment manifest's worker allowance, and long turns show live generation speed and fleet depth in the busy bar.
533
+
534
+ ### Changes in 1.7.10
535
+
536
+ This patch rebuilds the npm package with matching version and build metadata.
537
+
538
+ ### Changes in 1.7.9
539
+
540
+ This release improves model deployment discovery for configured workers.
541
+
542
+ ### Changes in 1.7.8
543
+
544
+ This release improves compatibility with updated model deployments and preserves explicitly configured deployment trust.
545
+
546
+ ### Changes in 1.7.5
547
+
548
+ Improved recovery from malformed tool calls and more resilient retry handling for temporary provider errors.
549
+
550
+ ### Changes in 1.7.2
551
+
552
+ This patch updates the AI SDK and development tooling, and moves the public website and documentation to maintainable Astro components.
553
+
554
+ ### Changes in 1.7.1
555
+
556
+ This patch updates a provider preset's default endpoint.
557
+
558
+ ### Changes in 1.7.0
559
+
560
+ haze 1.7.0 hardens the untrusted-content boundary: MCP tool results of every size now arrive inside escaped untrusted envelopes, one variant-tolerant escaper guards all untrusted container closers (including compaction summaries), project instructions discovered mid-turn no longer ride the engine control channel, terminal control sequences (including OSC 52 clipboard writes) are stripped from the Markdown transcript path, and the protected secret-file list extends to database/CLI credential stores, browser profiles, and `~/.haze/settings.json`/`auth.json` — with the shell-side prompt rule derived from the same list. It also fixes validation-evidence edge cases around trailing stderr redirects and repeated tool-call redirects.
561
+
562
+ ### Highlights from 1.6.0
563
+
564
+ haze 1.6.0 stops mistaking patient local models for dead streams:
565
+
566
+ - Idle-stream stall windows are now class-aware: hosted endpoints keep the 5-minute window, while loopback/local inference servers (LM Studio, Ollama) get 30 minutes — their prompt ingestion and hidden reasoning emit no stream output at all, so the old fixed window aborted healthy models mid-work and burned the retry pool re-doing prefill.
567
+ - The new `streamIdleTimeoutMs` setting overrides the window explicitly (integer milliseconds, 1s–24h). The `timeout`/`retry` events and the stall system messages report the effective window.
568
+
569
+ ### Highlights from 1.5.1
570
+
571
+ haze 1.5.1 improves terminal resizing and reasoning-effort compatibility:
572
+
573
+ - On terminal width changes, haze replays the full settled transcript, including formatted Markdown, at the new width. The input draft and active turn stay mounted. Terminal scrollback is preserved, so older transcript copies can remain there after a replay.
574
+ - Unknown local and hosted endpoints omit reasoning effort by default. Providers can configure their supported reasoning levels explicitly.
575
+ - Unsupported `none`/`minimal` choices for GPT-6+ model names are omitted rather than promoted to a different effort; the provider default applies.
576
+
577
+ ### Highlights from 1.5.0
578
+
579
+ haze 1.5.0 modernizes the terminal experience on Ink 8 — formatted streamed Markdown, native spinners and busy indicators, `$EDITOR`/`$PAGER` handoffs, and IME-aware cursor placement — and adds model steering for compact models, per-model session-scoped `/reasoning` (with the `/thinking` alias), pinned session model selections, and a metadata-only `haze report`.
580
+
581
+ - Formatted streaming: assistant Markdown renders as formatted terminal rows while it streams, clamped to the viewport budget; clamped rows settle into the transcript verbatim, never lost.
582
+ - Model steering: `steeringProfile: "compact"` lists nearby package-script names, asks for smaller working slices, reminds about validation earlier, and compacts history at 70% of the usual budget — completion evidence stays just as strict. `escalationModel` hands a stuck goal to one explicitly configured model, once, with the conversation and evidence intact.
583
+ - Reasoning control: `/reasoning` (alias `/thinking`) keeps a per-model level for the session — `unset` sends no parameter, `reset` drops the override — and the status bar shows the effective level. Headless runs keep `--reasoning <level|unset>` as a run-scoped override.
584
+ - Session model pinning: each session remembers its model selection on resume, continue, and fork; changing the global default never rewrites an active session. Headless `--resume` follows the saved selection unless `--model` is explicit.
585
+ - `haze report [id] [--json]`: goal outcomes, tool/validation counts, context size, and evidence mismatches from session metadata — never prompts, commands, paths, or tool output.
586
+ - Terminal modernization: Ink 8 with native bracketed paste, grapheme/cell-aware editing, one bounded shutdown path, suspended-terminal `$EDITOR`/`$PAGER` handoffs, and screen-reader-aware indicators. The implicit 30-minute per-turn cap is gone; `--timeout` remains the explicit opt-in goal budget.
587
+
588
+ Previous releases:
589
+
590
+ - `1.4.0`: per-run reasoning control (`--reasoning` for headless runs and a live status-bar indicator) on top of the 1.3.0 hardening pass — uniform secret/file boundaries, evidence that survives failed exits, durable session lifecycle fixes, credential-safe provider discovery, and honest output reduction.
591
+ - `1.2.1`: edit-recovery instructs instead of restricting — the model is told which path to read and why, while the execution-time gate enforces the fresh read.
592
+ - `1.2.0`: provider-usage context accounting, recoverable compact-and-retry overflow handling, model-written split-turn-aware compaction, `pipefail` validation truthfulness, and a configurable retry pool.
593
+ - `1.1.1`: durable goal ledgers and crash-resume frontiers; headless `--until-done` relaunches with bounded notices and a no-progress guard; proportional task/validation completion gates; and smaller orchestration internals.
594
+ - `1.1.0`: terminal theming with 14 built-in palettes and live `/themes` switching; hard secret-file protection across every file tool, including symlink, read-blessing, ignore-override, and grep-traversal defenses.
595
+ - `1.0.0`: first stable release — the CLI flags, settings schema, `stream-json` event contract, session format, skill layout, and structured tool-result shape under the 1.x compatibility promise; a configurable model-retry pool; and four benchmark-driven reliability fixes (validated with the Harbor differential benchmark: 17/17 verifier tests, fewest input tokens of the reporting harnesses, zero stalls).
596
+ - `0.11.0`: goal-level autonomy across physical-turn budgets (logical-goal supervisor, evidence-gated completion, `goal_*` stream events, cumulative goal envelope), runtime provenance and `haze doctor` (embedded build info, stale-build refusal, session build headers), model-aware context budgeting (per-preset limits, live discovery, 128K fallback, self-healing context overflow), headless `--timeout` with per-tool deadlines and abort-cause typing, performance work (batched ignore checks, LSP reuse, coalesced/vacuumed sessions, memoized estimates, incremental streaming, viewport-clamped live region), and model-written `/compact` summaries with a heuristic fallback.
597
+ - `0.10.1`: OpenAI Subscription OAuth preset, SECURITY.md and the attended-use threat model, bounded completion recovery, compact colorized diffs, prompt-injection framing, hardened fetch/stdin/sessions, and a multi-page docs site.
598
+
599
+ - `0.10.0`: image input, read-only path blessings, isolated fleet workers, managed background processes, session browsing and forking, model discovery, project skills, and rotating tips.
600
+ - `0.9.0`: private home-state storage, authoritative turn status, collection-time byte bounds, hardened process teardown, stronger real-path and network boundaries, and ordered persistence.
601
+ - `0.8.0`: AI SDK v7 runtime, live status with model, elapsed time, and tool labels; bounded bash output processing; lowercase `haze` naming.
602
+ - `0.7.0`: headless `-p`, `--output json`, and `--output stream-json`; pinned-connection `fetch` safety; scoped instruction refresh; smaller sessions; startup context visibility.
603
+ - `0.6.0`: AI SDK-native ToolLoopAgent core, optional LSP navigation, MCP support, unified configuration pickers, cleaner transcripts, `/context`, and startup update checks.
604
+ - `0.5.0`: SSRF-protected public URL fetching, no provider environment variables, debug-only LLM logs, command-aware output reduction, CLI Markdown rendering, scoped nested context files, and automatic cleanup of completed tasks.
605
+ - `0.4.0`: three-step skill wizard, language-agnostic skill intent extraction, model-managed tasks, a smaller command surface, and docs site additions.
606
+ - `0.3.0`: redesigned docs site, a relocated task bar, and automatic task cleanup between sessions.
607
+ - `0.2.0`: more reliable recovery from failed edits and validation, structured bash classification, parsed validation summaries, and multiline input with vertical cursor movement.
608
+ - `0.1.0`: bundled ripgrep, subagent delegation, and inline diffs.
609
+ - `0.0.3`: durable sessions, context compaction, and provider management.
610
+ - `0.0.2`: Markdown skills, autocomplete, and `listFiles` pagination.
611
+ - `0.0.1`: initial release.
612
+
613
+ </details>
614
+
589
615
  ## License
590
616
 
591
617
  MIT
@@ -0,0 +1,21 @@
1
+ # Vendored grammar assets
2
+
3
+ - `web-tree-sitter.wasm` — core runtime from the npm package `web-tree-sitter` (MIT).
4
+ - `tree-sitter-typescript.wasm`, `tree-sitter-tsx.wasm`, `tree-sitter-javascript.wasm`
5
+ — prebuilt grammars from the npm package `tree-sitter-wasms` (Unlicense);
6
+ the underlying grammars are from the tree-sitter org projects (MIT).
7
+
8
+ Refresh by reinstalling `tree-sitter-wasms` and `web-tree-sitter` and copying
9
+ the files over. The runtime (`src/core/graph/extract.ts`) pairs with
10
+ `web-tree-sitter@0.27.x`. Grammar WASMs must be rebuilt against 0.27.x:
11
+
12
+ 1. Install the wasm-pack toolchain (`cargo install wasm-pack`).
13
+ 2. For each grammar repo (tree-sitter-javascript, tree-sitter-typescript,
14
+ tree-sitter-tsx) run: `cargo xtask build-wasm --lib --release` from the
15
+ monorepo root (or `cargo xtask build-wasm` in a single-grammar checkout).
16
+ 3. Copy the resulting `.wasm` files from `target/wasm32-wasip1/release/` into
17
+ `assets/graph-grammars/`.
18
+
19
+ The 0.23.x runtime ABI is incompatible with 0.27.x — previously vendored
20
+ grammar builds cannot load on the newer runtime.
21
+