@denizokcu/haze 0.2.0 → 0.4.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 +41 -0
- package/README.md +38 -22
- package/dist/cli/commands/chat.d.ts +1 -1
- package/dist/cli/commands/chat.js +411 -74
- package/dist/cli/commands/commands.js +122 -54
- package/dist/cli/commands/formatters.d.ts +2 -0
- package/dist/cli/commands/formatters.js +34 -0
- package/dist/cli/commands/streaming.d.ts +36 -1
- package/dist/cli/commands/streaming.js +312 -103
- package/dist/cli/contextReport.d.ts +1 -0
- package/dist/cli/contextReport.js +47 -0
- package/dist/config/contextFiles.d.ts +25 -0
- package/dist/config/contextFiles.js +53 -0
- package/dist/config/providerPresets.d.ts +23 -0
- package/dist/config/providerPresets.js +230 -0
- package/dist/core/agent/compaction.d.ts +3 -0
- package/dist/core/agent/compaction.js +23 -3
- package/dist/core/agent/contextBudget.d.ts +33 -0
- package/dist/core/agent/contextBudget.js +88 -0
- package/dist/core/agent/requestAssembly.d.ts +22 -0
- package/dist/core/agent/requestAssembly.js +146 -0
- package/dist/core/agent/toolOutputStore.d.ts +11 -0
- package/dist/core/agent/toolOutputStore.js +33 -0
- package/dist/core/agent/workState.d.ts +38 -0
- package/dist/core/agent/workState.js +89 -0
- package/dist/core/goal/completionPolicy.js +1 -1
- package/dist/core/goal/sessionGoal.d.ts +2 -0
- package/dist/core/goal/sessionGoal.js +8 -1
- package/dist/core/log/llmLog.d.ts +68 -0
- package/dist/core/log/llmLog.js +55 -0
- package/dist/core/session/sessionStore.d.ts +6 -0
- package/dist/core/session/sessionStore.js +5 -0
- package/dist/core/subagent/subagentRunner.d.ts +4 -1
- package/dist/core/subagent/subagentRunner.js +5 -15
- package/dist/core/tasks/taskStorage.d.ts +13 -0
- package/dist/core/tasks/taskStorage.js +29 -0
- package/dist/core/validation/outputParser.js +15 -2
- package/dist/llm/client.d.ts +39 -0
- package/dist/llm/client.js +46 -2
- package/dist/llm/hazeTools.d.ts +53 -12
- package/dist/llm/hazeTools.js +170 -46
- package/dist/llm/systemPrompt.d.ts +6 -1
- package/dist/llm/systemPrompt.js +42 -79
- package/dist/skills/builder/SkillBuilder.d.ts +16 -2
- package/dist/skills/builder/SkillBuilder.js +68 -65
- package/dist/skills/skillTools.d.ts +2 -19
- package/dist/skills/skillTools.js +28 -19
- package/dist/ui/components/TextInput.d.ts +2 -1
- package/dist/ui/components/TextInput.js +6 -2
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.4.0 - 2026-06-15
|
|
6
|
+
|
|
7
|
+
### Skills
|
|
8
|
+
|
|
9
|
+
- Replaced single-shot `/create-skill <description>` with a 3-step interactive wizard: name → optional role → description. The user-supplied name and role are used verbatim — the model no longer renames them.
|
|
10
|
+
- Added language-agnostic intent extraction. Skill descriptions are interpreted by the model in any language, replacing the previous English-only regex strip. `"crée une compétence qui vérifie le style du code"` now produces a skill that vérifies code style, not a skill about creating something.
|
|
11
|
+
- Added `toSkillDirName` for kebab-casing user-typed skill names without stop-word stripping (so `"create a skill"` stays `create-a-skill`, not `skill`).
|
|
12
|
+
|
|
13
|
+
### Commands
|
|
14
|
+
|
|
15
|
+
- Removed the `/tasks` slash command. Tasks are now managed exclusively by the model via the `writeTasks` tool — `/clear` still wipes them as a side effect of clearing the conversation.
|
|
16
|
+
- Removed the `/list-skills` alias; `/skills` now shows the overview and the installed list.
|
|
17
|
+
- Removed the `/skill <subcommand>` and `/skills <subcommand>` legacy routing forms. Each skill operation now has exactly one user-facing form: `/skills`, `/create-skill`, `/skill-info`, `/validate-skill`, `/remove-skill`.
|
|
18
|
+
- Removed the `/tasks rm` alias for `/tasks remove`.
|
|
19
|
+
- Refactored `handleSkillCommand` from stringly-typed `value` parsing to a typed `SkillSubcommand` union argument.
|
|
20
|
+
|
|
21
|
+
### Docs site
|
|
22
|
+
|
|
23
|
+
- Added §02 "Native skill creation" segment that frames the 3-step wizard as the haze superpower, with a live transcript of the wizard prompts, superpower bullets, and copy-pasteable recipe cards for `/code-review`, `/deploy-check`, `/release-prep`, `/security-review`.
|
|
24
|
+
- Added §07 "Commands index" — a categorized reference of all 16 slash commands plus the `/<skill-name>` dynamic invocations.
|
|
25
|
+
- Removed §04 "Serviceable procedures" (folded into §02).
|
|
26
|
+
- Renumbered sections sequentially (§01 Operation → §02 Native skill creation → §03 Field behavior → §04 Components → §05 Compatibility → §06 Install → §07 Commands index).
|
|
27
|
+
- Fixed §01 layout: switched from `.container-prose` (narrow, visually centered) to `.container` so it aligns with every other section.
|
|
28
|
+
- Updated all `/create-skill <description>` references to reflect the wizard.
|
|
29
|
+
|
|
30
|
+
### Internal
|
|
31
|
+
|
|
32
|
+
- Added request-level context accounting, cache/no-cache usage metrics, a debug token breakdown, and an offline `context:report` command.
|
|
33
|
+
- Bounded `readFile`, structured and globally capped `grep`, and compacted large bash output behind paginated `readToolOutput` handles.
|
|
34
|
+
- Added structured `WorkState` snapshots, token-aware compaction, conservative old-tool-result pruning, bounded continuation slices, and no-progress termination for long agent workflows.
|
|
35
|
+
- Made Haze control nudges ephemeral, omitted tool schemas from text-only follow-ups, and replaced duplicated subagent prompting with a concise dedicated prompt.
|
|
36
|
+
- Consolidated installed workflows into one progressive `skill` catalog tool and added provider capability-gated cache keys, sticky session hints, and low-verbosity options.
|
|
37
|
+
- Shortened the model operating contract and final-response guidance while preserving edit recovery, validation evidence, and blocked/partial reporting.
|
|
38
|
+
|
|
39
|
+
## 0.3.0 - 2026-06-10
|
|
40
|
+
|
|
41
|
+
- Redesigned docs site with cleaner layout, improved typography, better mobile responsiveness, scroll-reveal animations, skip-link accessibility, and refreshed content structure.
|
|
42
|
+
- Moved the task bar above the activity spinner so in-progress and pending tasks are visible during active agent turns.
|
|
43
|
+
- Tasks are now automatically cleared when starting or exiting a session, preventing stale task state across sessions.
|
|
44
|
+
- Renamed internal `TaskBar` component to `TaskBarContent` for clarity.
|
|
45
|
+
|
|
5
46
|
## 0.2.0 - 2026-06-07
|
|
6
47
|
|
|
7
48
|
- Improved coding-loop reliability with stronger continuation behavior after failed edits, failed validation, missing validation, tool-budget interruptions, and incomplete assistant responses.
|
package/README.md
CHANGED
|
@@ -2,17 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
A minimal LLM harness for your terminal.
|
|
4
4
|
|
|
5
|
-
## What's new in 0.
|
|
5
|
+
## What's new in 0.4.0
|
|
6
6
|
|
|
7
|
-
Haze 0.
|
|
7
|
+
Haze 0.4.0 reworks skill creation and simplifies the command surface.
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
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.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Previous releases:
|
|
16
|
+
|
|
17
|
+
- **0.3.0** — Docs site redesign, task bar moves above the activity spinner, tasks auto-clear between sessions.
|
|
18
|
+
- **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
|
+
- **0.1.0** — Bundled ripgrep, subagent delegation, inline diff display.
|
|
20
|
+
- **0.0.3** — Durable sessions, context compaction, provider management.
|
|
21
|
+
- **0.0.2** — Markdown skills, autocomplete, listFiles pagination.
|
|
22
|
+
- **0.0.1** — Initial release.
|
|
16
23
|
|
|
17
24
|
Haze works with OpenAI-compatible providers, including OpenRouter and local endpoints. Use `/provider` to choose or add one, then `/model` to select a model.
|
|
18
25
|
|
|
@@ -68,7 +75,7 @@ export HAZE_MODEL=anthropic/claude-sonnet-4.6 # or gpt-4.1, llama3.1, qwen2.5-co
|
|
|
68
75
|
|
|
69
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.
|
|
70
77
|
|
|
71
|
-
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
|
|
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.
|
|
72
79
|
|
|
73
80
|
## Get productive immediately
|
|
74
81
|
|
|
@@ -86,9 +93,10 @@ Useful starters:
|
|
|
86
93
|
|
|
87
94
|
```txt
|
|
88
95
|
/init
|
|
89
|
-
/create-skill
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
/create-skill # then the wizard asks for name, role, and a description like:
|
|
97
|
+
# "review my current branch against main like a senior engineer"
|
|
98
|
+
# "prepare clean git commits from my uncommitted changes"
|
|
99
|
+
# "implement small features with tests and a concise summary"
|
|
92
100
|
```
|
|
93
101
|
|
|
94
102
|
`/init` creates or updates `AGENTS.md` so future sessions understand the project.
|
|
@@ -100,7 +108,9 @@ Skills are Markdown workflows that Haze creates with `/create-skill` and stores
|
|
|
100
108
|
If you do something for the second time, build a skill for it:
|
|
101
109
|
|
|
102
110
|
```txt
|
|
103
|
-
/create-skill
|
|
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"
|
|
104
114
|
```
|
|
105
115
|
|
|
106
116
|
Haze uses the model to create the skill file for you:
|
|
@@ -147,7 +157,7 @@ Installed skills appear as slash commands like:
|
|
|
147
157
|
/code-review-diff-main
|
|
148
158
|
```
|
|
149
159
|
|
|
150
|
-
They are also
|
|
160
|
+
They are also available through one `skill` catalog tool. Haze loads one workflow body first and fetches large references only when needed. Skills provide instructions; they do not execute code.
|
|
151
161
|
|
|
152
162
|
This is the trick: do normal work, notice friction, create a skill, keep going. Your workflow adapts instead of asking you to adapt to the tool. Rude, but in a good way.
|
|
153
163
|
|
|
@@ -168,8 +178,7 @@ This is the trick: do normal work, notice friction, create a skill, keep going.
|
|
|
168
178
|
/clear
|
|
169
179
|
/exit
|
|
170
180
|
|
|
171
|
-
/create-skill
|
|
172
|
-
/list-skills
|
|
181
|
+
/create-skill
|
|
173
182
|
/skill-info <name>
|
|
174
183
|
/validate-skill <name-or-dir>
|
|
175
184
|
/remove-skill <name> --yes
|
|
@@ -190,15 +199,17 @@ haze --no-session # run without durable session storage
|
|
|
190
199
|
Haze exposes a deliberately small toolset:
|
|
191
200
|
|
|
192
201
|
- `listFiles` — structured discovery, recursive with cursor pagination when needed.
|
|
193
|
-
- `readFile` — read UTF-8
|
|
194
|
-
- `grep` — ripgrep
|
|
202
|
+
- `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.
|
|
195
204
|
- `editFile` — unique text replacements, with line-number-prefix tolerance for common model mistakes.
|
|
196
205
|
- `replaceLines` — line-range edits when exact replacements are awkward; slightly-too-large EOF ranges are clamped.
|
|
197
206
|
- `writeFile` — create files and parent directories.
|
|
198
|
-
- `bash` — run tests, builds, git commands, inspections, scripts, installs, and other shell workflows with
|
|
199
|
-
- `
|
|
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.
|
|
210
|
+
- `skill` — load one installed Markdown workflow or one of its references.
|
|
200
211
|
|
|
201
|
-
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
|
|
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.
|
|
202
213
|
|
|
203
214
|
## Subagents
|
|
204
215
|
|
|
@@ -208,7 +219,9 @@ Use them for parallel investigation across separate areas of a codebase. Do not
|
|
|
208
219
|
|
|
209
220
|
## Context files
|
|
210
221
|
|
|
211
|
-
Haze saves durable workspace sessions in `~/.haze/sessions`. Use `/session` to see the current file, `/new` to start fresh, `/resume` to restore the latest session, and `/compact` to summarize older model context
|
|
222
|
+
Haze saves durable workspace sessions in `~/.haze/sessions`. Use `/session` to see the current file, `/new` to start fresh, `/resume` to restore the latest session, and `/compact` to summarize older model context. Sessions also persist compact structured work state: the active goal, touched files, validation evidence, blockers, and next action.
|
|
223
|
+
|
|
224
|
+
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.
|
|
212
225
|
|
|
213
226
|
Haze loads project instructions from:
|
|
214
227
|
|
|
@@ -237,8 +250,11 @@ npm run typecheck
|
|
|
237
250
|
npm test
|
|
238
251
|
npm run lint
|
|
239
252
|
npm run build
|
|
253
|
+
npm run context:report
|
|
240
254
|
```
|
|
241
255
|
|
|
256
|
+
`npm run context:report` prints estimated system, project-context, and tool-schema tokens without reading `~/.haze`. Pass explicit context-file paths, or use `npm run context:report -- --trace tests/fixtures/agent-traces/long-workflow.json` for offline trace accounting.
|
|
257
|
+
|
|
242
258
|
Package check:
|
|
243
259
|
|
|
244
260
|
```bash
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Mode = 'chat' | 'provider' | 'providerAction' | 'model' | 'providerAddName' | 'providerAddUrl' | 'providerAddKey' | 'providerAddModels' | 'providerAppendModels';
|
|
1
|
+
export type Mode = 'chat' | 'provider' | 'providerAction' | 'model' | 'providerAddPreset' | 'providerAddName' | 'providerAddUrl' | 'providerAddKey' | 'providerAddModels' | 'providerAppendModels' | 'providerSetKey' | 'providerRemoveModels' | 'providerConfirmRemove' | 'skillCreateName' | 'skillCreateRole' | 'skillCreateDescription';
|
|
2
2
|
interface ChatOptions {
|
|
3
3
|
debug?: boolean;
|
|
4
4
|
version?: string;
|