@denizokcu/haze 0.4.0 → 0.6.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +68 -36
  3. package/dist/cli/commands/chat.d.ts +1 -1
  4. package/dist/cli/commands/chat.js +789 -106
  5. package/dist/cli/commands/commands.d.ts +2 -1
  6. package/dist/cli/commands/commands.js +77 -102
  7. package/dist/cli/commands/formatters.d.ts +27 -0
  8. package/dist/cli/commands/formatters.js +137 -0
  9. package/dist/cli/commands/streaming.d.ts +14 -13
  10. package/dist/cli/commands/streaming.js +399 -665
  11. package/dist/config/contextFiles.d.ts +6 -0
  12. package/dist/config/contextFiles.js +47 -16
  13. package/dist/config/lspSettings.d.ts +16 -0
  14. package/dist/config/lspSettings.js +98 -0
  15. package/dist/config/mcpSettings.d.ts +24 -0
  16. package/dist/config/mcpSettings.js +100 -0
  17. package/dist/config/providers.d.ts +2 -5
  18. package/dist/config/providers.js +16 -12
  19. package/dist/config/settings.d.ts +34 -0
  20. package/dist/config/skillSettings.d.ts +15 -0
  21. package/dist/config/skillSettings.js +31 -0
  22. package/dist/config/updateCheck.d.ts +44 -0
  23. package/dist/config/updateCheck.js +83 -0
  24. package/dist/core/agent/requestAssembly.js +12 -1
  25. package/dist/core/agent/toolOutputStore.d.ts +6 -1
  26. package/dist/core/agent/toolOutputStore.js +33 -1
  27. package/dist/core/bashOutput/ansi.d.ts +1 -0
  28. package/dist/core/bashOutput/ansi.js +7 -0
  29. package/dist/core/bashOutput/command.d.ts +2 -0
  30. package/dist/core/bashOutput/command.js +62 -0
  31. package/dist/core/bashOutput/lineFilter.d.ts +25 -0
  32. package/dist/core/bashOutput/lineFilter.js +62 -0
  33. package/dist/core/bashOutput/reducers/content.d.ts +3 -0
  34. package/dist/core/bashOutput/reducers/content.js +134 -0
  35. package/dist/core/bashOutput/reducers/git.d.ts +1 -0
  36. package/dist/core/bashOutput/reducers/git.js +147 -0
  37. package/dist/core/bashOutput/reducers/search.d.ts +7 -0
  38. package/dist/core/bashOutput/reducers/search.js +76 -0
  39. package/dist/core/bashOutput/reducers/validation.d.ts +2 -0
  40. package/dist/core/bashOutput/reducers/validation.js +41 -0
  41. package/dist/core/bashOutput/registry.d.ts +4 -0
  42. package/dist/core/bashOutput/registry.js +126 -0
  43. package/dist/core/bashOutput/types.d.ts +46 -0
  44. package/dist/core/bashOutput/types.js +1 -0
  45. package/dist/core/goal/completionPolicy.d.ts +1 -0
  46. package/dist/core/goal/completionPolicy.js +4 -0
  47. package/dist/core/safety/urlGuard.d.ts +37 -0
  48. package/dist/core/safety/urlGuard.js +206 -0
  49. package/dist/core/subagent/subagentRunner.d.ts +1 -1
  50. package/dist/core/subagent/subagentRunner.js +2 -2
  51. package/dist/core/toolOutput/reduction.d.ts +25 -0
  52. package/dist/core/toolOutput/reduction.js +23 -0
  53. package/dist/llm/client.d.ts +2 -2
  54. package/dist/llm/client.js +6 -4
  55. package/dist/llm/hazeTools.d.ts +133 -16
  56. package/dist/llm/hazeTools.js +205 -31
  57. package/dist/llm/initPrompt.js +2 -1
  58. package/dist/llm/lsp.d.ts +64 -0
  59. package/dist/llm/lsp.js +241 -0
  60. package/dist/llm/lspTools.d.ts +122 -0
  61. package/dist/llm/lspTools.js +115 -0
  62. package/dist/llm/mcp.d.ts +19 -0
  63. package/dist/llm/mcp.js +64 -0
  64. package/dist/llm/requestContext.d.ts +28 -0
  65. package/dist/llm/requestContext.js +56 -0
  66. package/dist/llm/systemPrompt.d.ts +4 -1
  67. package/dist/llm/systemPrompt.js +11 -3
  68. package/dist/llm/toolResultTypes.d.ts +1 -1
  69. package/dist/llm/webFetch.d.ts +57 -0
  70. package/dist/llm/webFetch.js +270 -0
  71. package/dist/skills/builder/SkillBuilder.js +23 -44
  72. package/dist/ui/components/MarkdownText.d.ts +2 -0
  73. package/dist/ui/components/MarkdownText.js +116 -3
  74. package/dist/ui/components/TextInput.d.ts +1 -1
  75. package/dist/utils/version.d.ts +20 -0
  76. package/dist/utils/version.js +72 -0
  77. package/package.json +18 -10
  78. package/dist/cli/commands/skills.d.ts +0 -4
  79. package/dist/cli/commands/skills.js +0 -38
package/CHANGELOG.md CHANGED
@@ -1,6 +1,50 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.6.0 - 2026-06-21
4
+
5
+ ### Added
6
+
7
+ - **MCP server support.** Haze can now connect to [Model Context Protocol](https://modelcontextprotocol.io) servers and expose their tools to the agent alongside the built-in toolset. `/mcp` opens an interactive picker (like `/provider`) to add a server from a preset (Context7 ships built-in for up-to-date library docs) or custom `http`/`sse`/`stdio` details, then enable/disable/remove it or set a masked API key. Servers persist in `~/.haze/settings.json` under `mcpServers`. MCP clients open per agent turn and close when it ends; a failing server is isolated and MCP tools never shadow built-ins.
8
+ - Added optional configurable stdio LSP support through `/lsp`, with TypeScript, Rust, Python, Go, and PHP presets.
9
+ - Added read-only semantic navigation tools (`lspWorkspaceSymbols`, `lspSymbols`, `lspDefinition`, `lspReferences`) that are exposed to the model only when an enabled LSP command is installed on `PATH`.
10
+ - Added `/context`, a token breakdown of the current request (system prompt, project context, tools including MCP, and chat messages).
11
+ - Added `/settings open` to open `~/.haze/settings.json` with the OS default app.
12
+ - Added a non-blocking startup update check (throttled to once per 24 h via `~/.haze/updateCheck.json`) that surfaces a newer published version when one exists; every failure mode resolves silently.
13
+
14
+ ### Changed
15
+
16
+ - Switched the main agent turn to the AI SDK v6 `ToolLoopAgent` abstraction while preserving compact terminal tool/text rendering and key loop guardrails.
17
+ - Improved transcript segmentation so assistant text and tool blocks alternate cleanly during multi-step turns.
18
+ - Added LSP-aware prompt guidance only when LSP tools are actually available; otherwise Haze naturally falls back to `grep`, `listFiles`, and `readFile`.
19
+ - Made `/lsp` and `/mcp` interactive pickers matching the `/provider` flow (autocomplete lists, preset pickers, masked API-key entry), replacing the previous `/lsp`/`/mcp` subcommand syntax.
20
+ - Unified skill management into a single `/skills` interactive picker that mirrors `/provider`, `/lsp`, and `/mcp`; removed the legacy `/create-skill`, `/skill-info`, `/validate-skill`, and `/remove-skill` commands.
21
+ - Updated README, docs site, and project agent guidance for LSP setup and the 0.6.0 release.
22
+
23
+ ## 0.5.0 - 2026-06-19
24
+
25
+ ### Changed
26
+
27
+ - Removed all user-facing environment variables. `OPENAI_API_KEY`, `OPENAI_BASE_URL`, `HAZE_MODEL`, and `HAZE_CONTEXT_BUDGET_SHARE` are no longer read; configure providers, models, API keys, and base URLs through `~/.haze/settings.json` and the `/provider`, `/model`, `/settings` slash commands instead. This also removes the `OPENAI_*` env overrides from the startup provider info and the header.
28
+ - File LLM logging is now **off by default**. Previously Haze wrote a detailed JSONL log (full prompts, model messages, tool inputs/outputs, token usage) to `~/.haze/logs/<timestamp>.jsonl` on every session. Logging is now enabled solely with the `--debug` flag (`haze --debug`), which also turns on the on-screen debug panel. The `/logs` command still reviews historical log files.
29
+ - Bash results now pass through command-aware reducers before they enter the transcript/model context. Validation failures render focused diagnostics, successful validation stays short, git/diff/search/JSON/log-like output is compacted, noisy command families get line filters, and reduced raw output remains retrievable by `readToolOutput` when stored.
30
+ - `grep` now returns compact structured search output for long match sets/lines, with reduction metadata, omitted-result counts, and a raw-output handle when the rendered result was truncated.
31
+ - Tool activity rendering is quieter: live tool groups show elapsed timers, subagent child calls, capped group detail, and compact success/failure summaries instead of dumping large result objects.
32
+ - Assistant Markdown rendering in the CLI now supports styled headings, inline code/strong/emphasis/links, blockquotes, syntax-highlighted code fences, horizontal rules, and width-aware tables.
33
+ - Consecutive assistant messages in one turn now share a single visible `haze` header for a less noisy transcript.
34
+ - Completed task lists now clear automatically at the start of a new user turn so old successful todos do not linger in the task bar.
35
+ - Context loading now includes global `~/.claude/CLAUDE.md` while keeping `~/.haze/AGENTS.md` higher priority for Haze-specific global guidance.
36
+ - Nested `CLAUDE.md`/`AGENTS.md` files below the workspace are now scoped and loaded lazily when file tools operate inside their directory tree; mutating file tools stop before the first edit when newly scoped instructions are discovered.
37
+ - Repeated identical tool calls are now steered back to the model with an explicit correction instead of aborting the turn immediately, so Haze can reuse existing results or finish cleanly.
38
+ - `/init` now explicitly keeps `AGENTS.md` compact, reminds the model that context files are injected into every request, and references the current context-file truncation budget.
39
+
40
+ ### Added
41
+
42
+ - `fetch` tool: read public URLs as readable content (Markdown for HTML, pretty JSON for JSON, passthrough text), with SSRF protection (scheme allowlist + private/loopback/link-local/metadata blocking, re-validated per redirect and after DNS resolution), a 2 MB raw-download cap, and a 30 s timeout. Oversize output stays retrievable via `readToolOutput`. HTML→Markdown extraction uses `defuddle` (readability-grade, pure-JS DOM).
43
+ - Shared tool-output reduction metadata (`reducerName`, `contentKind`, `lossy`, `parseTier`, token/character savings, handles, omitted counts) for reduced tool results.
44
+
45
+ ### Removed
46
+
47
+ - Removed obsolete token-efficiency planning documents and the unused alternate docs-site HTML file from `docs/`.
4
48
 
5
49
  ## 0.4.0 - 2026-06-15
6
50
 
package/README.md CHANGED
@@ -2,18 +2,22 @@
2
2
 
3
3
  A minimal LLM harness for your terminal.
4
4
 
5
- ## What's new in 0.4.0
5
+ ## What's new in 0.6.0
6
6
 
7
- Haze 0.4.0 reworks skill creation and simplifies the command surface.
7
+ Haze 0.6.0 adds an AI SDK-native ToolLoopAgent core, optional LSP semantic navigation, MCP server support, and a unified config-picker UX.
8
8
 
9
- - **3-step skill wizard.** `/create-skill` is now an interactive wizard: name the skill, optionally give it a role, then describe what it does. The model writes the Markdown body. Your typed name and role are used verbatim — no LLM rename.
10
- - **Language-agnostic intent extraction.** Skill descriptions are interpreted by the model in any language. `"crée une compétence qui vérifie le style du code"` produces a skill that vérifies code style, not a skill about creating one.
11
- - **Tasks are model-managed.** The `/tasks` slash command is gone. The model tracks multi-step work via the `writeTasks` tool — you talk, it plans. `/clear` still wipes tasks as part of clearing the conversation.
12
- - **Leaner command surface.** Removed `/list-skills` (folded into `/skills`), the `/skill X` legacy subcommand forms, and the `/tasks rm` alias. Each operation now has exactly one way to be invoked.
13
- - **Docs site additions.** New §02 segment frames skill creation as the native superpower with copy-pasteable recipe cards; new §07 commands index lists all 16 commands grouped by category. §04 "Serviceable procedures" was removed and sections renumbered sequentially.
9
+ - **MCP servers.** Connect [Model Context Protocol](https://modelcontextprotocol.io) servers with `/mcp` and expose their tools alongside the built-ins. A Context7 preset ships built-in for up-to-date library docs; custom `http`/`sse`/`stdio` servers are supported too. Clients open per turn and close when it ends, a failing server is isolated, and MCP tools never shadow built-ins.
10
+ - **Optional LSP navigation.** Configure stdio language servers with `/lsp` (TypeScript, Rust, Python, Go, and PHP presets). Read-only `lspWorkspaceSymbols`, `lspSymbols`, `lspDefinition`, and `lspReferences` tools are exposed only when an enabled server command is on `PATH`; otherwise Haze falls back to `grep`, `listFiles`, and `readFile`.
11
+ - **Unified config pickers.** `/provider`, `/lsp`, `/mcp`, and `/skills` are now interactive pickers with autocomplete, presets, and masked API-key entry, replacing the old subcommand syntax.
12
+ - **ToolLoopAgent core.** The main turn runs on the AI SDK v6 `ToolLoopAgent` while preserving compact terminal tool/text rendering and the loop guardrails (idle timeout, tool-loop detection, edit recovery, context-overflow auto-compact).
13
+ - **Cleaner transcripts.** Assistant text and tool blocks alternate cleanly during multi-step turns.
14
+ - **Context breakdown.** `/context` shows estimated system-prompt, project-context, tool (including MCP), and message tokens for the current request.
15
+ - **Startup update check.** Haze quietly surfaces a newer published version when one exists.
14
16
 
15
17
  Previous releases:
16
18
 
19
+ - **0.5.0** — `fetch` tool for public URLs (Markdown/JSON/text, SSRF-protected), removed all provider env vars (config via `/provider`/`/model`/`/settings`), debug-only LLM logs, command-aware output reduction, Markdown rendering in the CLI, scoped nested context files, and auto-clearing completed tasks.
20
+ - **0.4.0** — 3-step skill wizard, language-agnostic skill intent extraction, model-managed tasks, leaner command surface, docs site additions.
17
21
  - **0.3.0** — Docs site redesign, task bar moves above the activity spinner, tasks auto-clear between sessions.
18
22
  - **0.2.0** — Reliability release: stronger continuation after failed edits and validation, structured bash classification, parsed validation summaries, multi-line chat input with vertical cursor movement.
19
23
  - **0.1.0** — Bundled ripgrep, subagent delegation, inline diff display.
@@ -64,18 +68,22 @@ On first run, create or choose a provider, then choose your first model:
64
68
  /model local:llama3.1
65
69
  ```
66
70
 
67
- Or use environment variables for any OpenAI-compatible endpoint:
71
+ ### MCP servers
68
72
 
69
- ```bash
70
- # e.g. OpenRouter, OpenAI, LM Studio, Ollama, or an OpenAI-compatible proxy
71
- export OPENAI_API_KEY=... # provider API key, if needed; local providers may not need one
72
- export OPENAI_BASE_URL=https://openrouter.ai/api/v1 # or http://localhost:1234/v1, http://localhost:11434/v1, ...
73
- export HAZE_MODEL=anthropic/claude-sonnet-4.6 # or gpt-4.1, llama3.1, qwen2.5-coder, ...
73
+ Use `/mcp` to connect [Model Context Protocol](https://modelcontextprotocol.io) servers and give the agent extra tools. It opens an interactive picker (like `/provider`): choose a server to enable, disable, remove, or set an API key for it, or choose **add server** to add one from a preset (Context7 ships built-in for up-to-date library docs) or enter custom details.
74
+
75
+ ```txt
76
+ /mcp # opens the server picker
77
+ # add server -> context7 (preset)
78
+ # add server -> custom -> name -> http -> url (custom remote)
79
+ # add server -> custom -> name -> stdio -> cmd (custom local)
74
80
  ```
75
81
 
76
- Saved settings live in `~/.haze/settings.json`. Providers can include API keys, base URLs, and model lists; local OpenAI-compatible providers can be configured without a key.
82
+ API keys are entered in a masked prompt and sent as `Authorization: Bearer <value>`. Servers persist in `~/.haze/settings.json` under `mcpServers` and support `http`, `sse`, and `stdio` transports. Their tools load at the start of each agent turn and the connections close when the turn ends. An unreachable server is isolated and never blocks the agent, and MCP tools never shadow built-in tools.
83
+
84
+ Saved settings live in `~/.haze/settings.json`. Providers can include API keys, base URLs, and model lists; local OpenAI-compatible providers can be configured without a key. Use `/provider`, `/model`, and `/settings` to configure everything from inside Haze — there are no environment variables to set.
77
85
 
78
- Haze is intentionally minimal: chat, local tools, context files, sessions, and Markdown skills. Any workflow beyond the core is meant to be grown with the LLM through `/create-skill` (a 3-step wizard: name, role, description). If you want reviews, release prep, deploy checks, debugging rituals, or your team's strange checklist, ask Haze to create a skill and then refine the Markdown.
86
+ Haze is intentionally minimal: chat, local tools, context files, sessions, and Markdown skills. Any workflow beyond the core is meant to be grown with the LLM through `/skills` (an interactive picker: generate a custom skill from a description, then enable/disable, validate, or remove it). If you want reviews, release prep, deploy checks, debugging rituals, or your team's strange checklist, ask Haze to create a skill and then refine the Markdown.
79
87
 
80
88
  ## Get productive immediately
81
89
 
@@ -85,7 +93,7 @@ Open a project and ask for work:
85
93
  create a calculator in calc-app in ruby with add subtract multiply divide
86
94
  ```
87
95
 
88
- Haze will inspect, search, write files, run commands, and show compact tool activity inline. Small file edits include a colorized line diff with one context line before and after the change; large diffs stay summarized so the transcript does not become a wall of noise. Bash validation output is summarized when possible so failures point at the relevant files, tests, or diagnostics. Sessions are saved by default so you can resume the latest workspace conversation with `haze --continue` or `/resume`.
96
+ Haze will inspect, search, write files, fetch public URLs, run commands, and show compact tool activity inline. Small file edits include a colorized line diff with one context line before and after the change; large diffs stay summarized so the transcript does not become a wall of noise. Bash output is reduced by command-aware filters for validation, git, search, JSON, diffs, and noisy logs; failures point at the relevant files, tests, or diagnostics, and raw output remains available by handle when it was omitted. Sessions are saved by default so you can resume the latest workspace conversation with `haze --continue` or `/resume`.
89
97
 
90
98
  Use `/` to discover commands and skills. `Tab` completes the top suggestion.
91
99
 
@@ -93,7 +101,7 @@ Useful starters:
93
101
 
94
102
  ```txt
95
103
  /init
96
- /create-skill # then the wizard asks for name, role, and a description like:
104
+ /skills # then add skill: name + a description like:
97
105
  # "review my current branch against main like a senior engineer"
98
106
  # "prepare clean git commits from my uncommitted changes"
99
107
  # "implement small features with tests and a concise summary"
@@ -103,14 +111,15 @@ Useful starters:
103
111
 
104
112
  ## Skills: your workflows, grown while working
105
113
 
106
- Skills are Markdown workflows that Haze creates with `/create-skill` and stores in `~/.haze/skills` so you can inspect or refine them later.
114
+ Skills are Markdown workflows that Haze creates with `/skills` and stores in `~/.haze/skills` so you can inspect or refine them later.
107
115
 
108
116
  If you do something for the second time, build a skill for it:
109
117
 
110
118
  ```txt
111
- /create-skill
112
- # Wizard: name=branch-diff-review, role="Senior engineer reviewing diffs",
113
- # description="review the diff between my current branch and main, focusing on bugs, tests, DRY and KISS"
119
+ /skills
120
+ # Picker → add skill
121
+ # Name: branch-diff-review
122
+ # Description: review the diff between my current branch and main, focusing on bugs, tests, DRY and KISS
114
123
  ```
115
124
 
116
125
  Haze uses the model to create the skill file for you:
@@ -170,7 +179,12 @@ This is the trick: do normal work, notice friction, create a skill, keep going.
170
179
  /model <name-or-provider:name>
171
180
  /model list
172
181
  /settings
182
+ /settings open
183
+ /logs [id]
184
+ /lsp
185
+ /mcp
173
186
  /init
187
+ /context
174
188
  /session
175
189
  /resume
176
190
  /new
@@ -178,38 +192,54 @@ This is the trick: do normal work, notice friction, create a skill, keep going.
178
192
  /clear
179
193
  /exit
180
194
 
181
- /create-skill
182
- /skill-info <name>
183
- /validate-skill <name-or-dir>
184
- /remove-skill <name> --yes
195
+ /skills
185
196
  ```
186
197
 
187
- Legacy `/skill ...` and `/skills ...` commands still work as aliases.
198
+ Skill management is a single interactive picker, mirroring `/provider`, `/lsp`, and `/mcp`: generate a custom skill from a description, then show info, enable/disable, validate, or remove. Disabled skills drop out of the model catalog and the `/<name>` command list until re-enabled.
188
199
 
189
200
  CLI flags:
190
201
 
191
202
  ```bash
192
- haze --debug # show model/tool debug logs
203
+ haze --debug # show model/tool debug logs and write detailed JSONL logs to ~/.haze/logs
193
204
  haze --continue # resume the latest saved session for this workspace
194
205
  haze --no-session # run without durable session storage
195
206
  ```
196
207
 
208
+ By default, Haze does **not** write the detailed LLM log files under `~/.haze/logs/` (they capture full prompts, messages, and tool I/O). File logging is only enabled with `haze --debug`, which also turns on the on-screen debug panel. Use the `/logs` command to review past log files once logging has been enabled.
209
+
197
210
  ## Agent tools
198
211
 
199
212
  Haze exposes a deliberately small toolset:
200
213
 
201
214
  - `listFiles` — structured discovery, recursive with cursor pagination when needed.
202
215
  - `readFile` — read numbered UTF-8 lines in bounded pages, with `nextOffset` when more remain.
203
- - `grep` — structured ripgrep search with a true global result cap.
216
+ - `grep` — structured ripgrep search with a true global result cap and compacted long lines/results.
204
217
  - `editFile` — unique text replacements, with line-number-prefix tolerance for common model mistakes.
205
218
  - `replaceLines` — line-range edits when exact replacements are awkward; slightly-too-large EOF ranges are clamped.
206
219
  - `writeFile` — create files and parent directories.
207
- - `bash` — run tests, builds, git commands, inspections, scripts, installs, and other shell workflows with compact validation output.
208
- - `readToolOutput` — page through full output omitted from an oversized tool result.
209
- - `writeTasks` — replace the task list at meaningful phase changes.
220
+ - `bash` — run tests, builds, git commands, inspections, scripts, installs, and other shell workflows with command-aware output reduction and compact validation output.
221
+ - `readToolOutput` — page through full/raw output omitted from an oversized or reduced tool result.
222
+ - `fetch` — read a public `http(s)` URL and return readable content (Markdown for docs, pretty JSON, or text). Private/loopback/metadata hosts and non-`http(s)` schemes are blocked; output is bounded and retrievable via `readToolOutput`.
223
+ - `writeTasks` — replace the task list at meaningful phase changes; completed lists auto-clear on the next user turn.
210
224
  - `skill` — load one installed Markdown workflow or one of its references.
225
+ - `lspWorkspaceSymbols`, `lspSymbols`, `lspDefinition`, `lspReferences` — optional read-only semantic navigation through user-configured language servers. These tools are exposed only when an enabled LSP command is installed.
226
+
227
+ Tool calls are grouped in the transcript so you can see what happened without reading a novella. Successful targeted file edits show a compact diff with colored additions/removals and one context line around the change when the diff is small; larger diffs are summarized with a pointer to `git diff`. File-tool failures return structured reason codes and recovery hints. Large bash/search/fetch output is kept behind an in-memory handle so later model calls carry only reduced validation, git, search, diff, JSON, log, or head/tail summaries.
228
+
229
+ ### Optional LSP navigation
230
+
231
+ Haze can use user-configured stdio Language Server Protocol servers for semantic code navigation. Configure them with `/lsp` (an interactive picker, like `/provider` and `/mcp`): add a preset or a custom command, then enable/disable/remove servers. Presets currently include TypeScript, Rust, Python, Go, and PHP. Haze does not install language servers for you, and it hides LSP tools from the model unless an enabled server command exists on `PATH`, so projects without LSP still use `grep`, `listFiles`, and `readFile` normally.
211
232
 
212
- Tool calls are grouped in the transcript so you can see what happened without reading a novella. Successful targeted file edits show a compact diff with colored additions/removals and one context line around the change when the diff is small; larger diffs are summarized with a pointer to `git diff`. File-tool failures return structured reason codes and recovery hints. Large bash output is kept behind an in-memory handle so later model calls carry only a bounded head/tail or validation summary.
233
+ Example TypeScript setup:
234
+
235
+ ```bash
236
+ npm install -g typescript typescript-language-server
237
+ ```
238
+
239
+ ```txt
240
+ /lsp
241
+ # -> add server -> typescript
242
+ ```
213
243
 
214
244
  ## Subagents
215
245
 
@@ -225,12 +255,13 @@ Long turns use bounded tool slices. Older successful tool results are compacted
225
255
 
226
256
  Haze loads project instructions from:
227
257
 
258
+ - `~/.claude/CLAUDE.md`
228
259
  - `~/.haze/AGENTS.md`
229
- - `~/.haze/CLAUDE.md`
230
- - `AGENTS.md` files from filesystem root to the current workspace
231
- - `CLAUDE.md` files from filesystem root to the current workspace
260
+ - `CLAUDE.md` / `AGENTS.md` files from filesystem root to the current workspace
261
+
262
+ At the same scope, `AGENTS.md` overrides `CLAUDE.md`; global Haze guidance in `~/.haze/AGENTS.md` overrides global Claude guidance in `~/.claude/CLAUDE.md`. Nested `CLAUDE.md` / `AGENTS.md` files below the workspace are scoped: Haze surfaces them only when file tools operate inside that directory or its subdirectories, and mutating tools stop once so the model can review newly discovered scoped instructions before editing.
232
263
 
233
- Use `AGENTS.md` for project conventions, commands, architecture notes, and things future-you does not want to re-explain.
264
+ Use `AGENTS.md` for project conventions, commands, architecture notes, and things future-you does not want to re-explain. `/init` is intentionally budget-aware: it does one small discovery pass, preserves useful existing guidance, and asks for a compact file because context files are injected into every request.
234
265
 
235
266
  ## Safety model
236
267
 
@@ -238,6 +269,7 @@ Use `AGENTS.md` for project conventions, commands, architecture notes, and thing
238
269
  - File tools follow `.gitignore` by default.
239
270
  - Ignored files require an explicit override.
240
271
  - Bash commands are classified and shown with working-directory metadata, but Haze does not use command confirmation gates.
272
+ - The `fetch` tool reads public `http(s)` URLs only; private, loopback, link-local, and cloud-metadata hosts and non-`http(s)` schemes are blocked, re-checked on every redirect and after DNS resolution.
241
273
  - Mutating and destructive commands can run when they are relevant to the user's request; this is intentional for expert users.
242
274
  - Haze is powerful enough to help and dumb enough to deserve supervision. Ideal software, basically.
243
275
 
@@ -1,4 +1,4 @@
1
- export type Mode = 'chat' | 'provider' | 'providerAction' | 'model' | 'providerAddPreset' | 'providerAddName' | 'providerAddUrl' | 'providerAddKey' | 'providerAddModels' | 'providerAppendModels' | 'providerSetKey' | 'providerRemoveModels' | 'providerConfirmRemove' | 'skillCreateName' | 'skillCreateRole' | 'skillCreateDescription';
1
+ export type Mode = 'chat' | 'provider' | 'providerAction' | 'model' | 'providerAddPreset' | 'providerAddName' | 'providerAddUrl' | 'providerAddKey' | 'providerAddModels' | 'providerAppendModels' | 'providerSetKey' | 'providerRemoveModels' | 'providerConfirmRemove' | 'skills' | 'skillsAction' | 'skillsAddName' | 'skillsAddDescription' | 'skillsConfirmRemove' | 'lsp' | 'lspAction' | 'lspAddPreset' | 'lspAddName' | 'lspAddCommand' | 'lspConfirmRemove' | 'mcp' | 'mcpAction' | 'mcpAddPreset' | 'mcpAddName' | 'mcpAddTransport' | 'mcpAddUrl' | 'mcpAddCommand' | 'mcpAddKey' | 'mcpSetKey' | 'mcpConfirmRemove';
2
2
  interface ChatOptions {
3
3
  debug?: boolean;
4
4
  version?: string;