@denizokcu/haze 1.7.12 → 1.8.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 +38 -0
- package/README.md +30 -6
- package/SECURITY.md +1 -1
- package/bin/haze.js +47 -19
- package/dist/buildInfo.json +3 -3
- package/dist/cli/chat/BusyBar.d.ts +1 -2
- package/dist/cli/chat/ChatHeader.d.ts +6 -0
- package/dist/cli/chat/ChatHeader.js +11 -0
- package/dist/cli/chat/ChatScreen.d.ts +16 -0
- package/dist/cli/chat/ChatScreen.js +399 -0
- package/dist/cli/chat/ChatScreenView.d.ts +68 -0
- package/dist/cli/chat/ChatScreenView.js +47 -0
- package/dist/cli/chat/LiveTail.d.ts +11 -0
- package/dist/cli/chat/LiveTail.js +26 -0
- package/dist/cli/chat/TaskBar.d.ts +3 -2
- package/dist/cli/chat/TaskBar.js +4 -0
- package/dist/cli/chat/agentTurnRunner.d.ts +12 -0
- package/dist/cli/chat/agentTurnRunner.js +177 -0
- package/dist/cli/chat/busyIndicator.js +9 -5
- package/dist/cli/chat/chatMetrics.d.ts +7 -0
- package/dist/cli/chat/chatMetrics.js +15 -1
- package/dist/cli/chat/chatViewModel.d.ts +85 -0
- package/dist/cli/chat/chatViewModel.js +66 -0
- package/dist/cli/chat/fileMentionSuggestions.d.ts +0 -14
- package/dist/cli/chat/fileMentionSuggestions.js +4 -21
- package/dist/cli/chat/liveTheme.d.ts +11 -0
- package/dist/cli/chat/liveTheme.js +26 -0
- package/dist/cli/chat/messageFinalize.d.ts +4 -0
- package/dist/cli/chat/messageFinalize.js +8 -0
- package/dist/cli/chat/messages.js +1 -1
- package/dist/cli/chat/pickerOpeners.d.ts +23 -0
- package/dist/cli/chat/pickerOpeners.js +36 -0
- package/dist/cli/chat/promptSessionState.d.ts +11 -0
- package/dist/cli/chat/promptSessionState.js +39 -0
- package/dist/cli/chat/renderMetrics.d.ts +8 -0
- package/dist/cli/chat/renderMetrics.js +14 -0
- package/dist/cli/chat/resizeGuard.d.ts +11 -0
- package/dist/cli/chat/resizeGuard.js +25 -0
- package/dist/cli/chat/screenDeps.d.ts +116 -0
- package/dist/cli/chat/screenDeps.js +1 -0
- package/dist/cli/chat/sessionLifecycle.d.ts +2 -0
- package/dist/cli/chat/sessionLifecycle.js +4 -1
- package/dist/cli/chat/settingsSelection.d.ts +33 -0
- package/dist/cli/chat/settingsSelection.js +46 -0
- package/dist/cli/chat/skillNotices.d.ts +18 -0
- package/dist/cli/chat/skillNotices.js +26 -0
- package/dist/cli/chat/startupInfo.js +1 -1
- package/dist/cli/chat/submitPipeline.d.ts +8 -0
- package/dist/cli/chat/submitPipeline.js +141 -0
- package/dist/cli/chat/terminalControl.js +1 -1
- package/dist/cli/chat/toolSummaries.d.ts +29 -0
- package/dist/cli/chat/toolSummaries.js +268 -0
- package/dist/cli/chat/turnState.d.ts +8 -0
- package/dist/cli/chat/turnState.js +1 -0
- package/dist/cli/chat/userCommandFlow.d.ts +21 -0
- package/dist/cli/chat/userCommandFlow.js +66 -0
- package/dist/cli/chat/userCommandRunner.d.ts +14 -0
- package/dist/cli/chat/userCommandRunner.js +56 -0
- package/dist/cli/chat/wizard/providerHandlers.js +19 -2
- package/dist/cli/chat/wizardTrail.d.ts +22 -0
- package/dist/cli/chat/wizardTrail.js +55 -0
- package/dist/cli/commands/chat.d.ts +1 -13
- package/dist/cli/commands/chat.js +10 -798
- package/dist/cli/commands/commandHelp.js +7 -5
- package/dist/cli/commands/commandSuggest.d.ts +2 -0
- package/dist/cli/commands/commandSuggest.js +35 -0
- package/dist/cli/commands/commands.js +10 -3
- package/dist/cli/commands/formatters.d.ts +1 -23
- package/dist/cli/commands/formatters.js +3 -252
- package/dist/cli/commands/modelCommand.js +11 -7
- package/dist/cli/commands/reasoningCommand.js +3 -3
- package/dist/cli/commands/runCommand.js +6 -2
- package/dist/cli/commands/streaming/attemptLifecycle.js +1 -0
- package/dist/cli/commands/streaming/attemptOutcome.js +7 -2
- package/dist/cli/commands/streaming/attemptSetup.d.ts +1 -0
- package/dist/cli/commands/streaming/attemptSetup.js +26 -2
- package/dist/cli/commands/streaming/goalCheckpoint.d.ts +1 -1
- package/dist/cli/commands/streaming/stepProjection.d.ts +59 -0
- package/dist/cli/commands/streaming/stepProjection.js +54 -0
- package/dist/cli/commands/streaming/streamLoop.js +31 -23
- package/dist/cli/commands/streaming/toolGroupRenderer.js +1 -1
- package/dist/cli/commands/streaming/toolPartHandlers.js +1 -1
- package/dist/cli/commands/streaming.d.ts +3 -1
- package/dist/cli/commands/wizardFlow.d.ts +2 -0
- package/dist/cli/commands/wizardFlow.js +3 -0
- package/dist/cli/index.js +8 -4
- package/dist/cli/terminalTitle.js +9 -3
- package/dist/config/contextFiles.d.ts +2 -5
- package/dist/config/contextFiles.js +1 -1
- package/dist/config/inputHistory.js +2 -2
- package/dist/config/providerAuth.js +2 -2
- package/dist/config/providerModelFacts.js +5 -0
- package/dist/config/providerPresets.js +1 -1
- package/dist/config/settings.d.ts +7 -0
- package/dist/config/settings.js +9 -2
- package/dist/config/updateCheck.js +2 -2
- package/dist/core/agent/completionController.d.ts +1 -1
- package/dist/core/agent/contextBudget.d.ts +1 -1
- package/dist/core/agent/goalPolicy.js +8 -2
- package/dist/core/agent/overflow.js +5 -0
- package/dist/core/agent/toolCapabilities.js +14 -0
- package/dist/core/agent/userCommands.d.ts +53 -0
- package/dist/core/agent/userCommands.js +116 -0
- package/dist/core/agent/workState.d.ts +3 -1
- package/dist/core/agent/workState.js +57 -26
- package/dist/core/contextFileTypes.d.ts +12 -0
- package/dist/core/contextFileTypes.js +1 -0
- package/dist/core/graph/buildGraph.js +1 -1
- package/dist/core/graph/store.js +1 -1
- package/dist/core/limits.d.ts +2 -0
- package/dist/core/limits.js +2 -0
- package/dist/core/log/llmLog.js +2 -2
- package/dist/{config → core/persistence}/privateStorage.js +1 -1
- package/dist/core/process/runBoundedProcess.d.ts +7 -4
- package/dist/core/process/runBoundedProcess.js +10 -5
- package/dist/core/safety/redaction.d.ts +2 -0
- package/dist/core/safety/redaction.js +26 -5
- package/dist/core/safety/secretPaths.js +12 -3
- package/dist/core/safety/urlGuard.js +2 -0
- package/dist/core/session/sessionStore.d.ts +8 -1
- package/dist/core/session/sessionStore.js +15 -4
- package/dist/core/shellOutput/reducers/validation.d.ts +1 -1
- package/dist/core/shellOutput/types.d.ts +1 -1
- package/dist/{llm → core}/toolResultTypes.d.ts +1 -1
- package/dist/core/validation/outputParser.d.ts +1 -1
- package/dist/llm/hazeTools.js +2 -0
- package/dist/llm/lsp/pool.js +1 -1
- package/dist/llm/lsp/workspaceEdit.d.ts +1 -1
- package/dist/llm/requestContext.d.ts +3 -0
- package/dist/llm/requestContext.js +20 -8
- package/dist/llm/systemPrompt.js +10 -3
- package/dist/llm/toolGroups.d.ts +534 -0
- package/dist/llm/toolGroups.js +57 -0
- package/dist/llm/tools/editMatch.d.ts +1 -1
- package/dist/llm/tools/failures.d.ts +1 -1
- package/dist/llm/tools/fileToolShared.d.ts +1 -1
- package/dist/llm/tools/fileToolShared.js +1 -1
- package/dist/llm/tools/fileTools.js +1 -1
- package/dist/llm/tools/gitTools.d.ts +12 -0
- package/dist/llm/tools/gitTools.js +527 -0
- package/dist/llm/tools/readRecovery.d.ts +1 -1
- package/dist/llm/tools/replaceInFiles.d.ts +1 -1
- package/dist/llm/tools/replaceInFiles.js +1 -1
- package/dist/llm/tools/taskTool.js +4 -1
- package/dist/llm/tools/toolContext.js +5 -2
- package/dist/llm/tools/toolContextState.d.ts +1 -1
- package/dist/llm/tools/workspaceFile.d.ts +2 -2
- package/dist/llm/tools/workspaceFile.js +10 -5
- package/dist/skills/SkillRegistry.js +1 -1
- package/dist/skills/builder/SkillBuilder.js +1 -1
- package/dist/skills/plugins/installer.js +1 -1
- package/dist/skills/plugins/runtime.js +1 -1
- package/dist/ui/components/MarkdownText.d.ts +14 -0
- package/dist/ui/components/MarkdownText.js +77 -12
- package/dist/ui/components/NativeIndicators.js +5 -1
- package/dist/ui/components/StreamingMarkdownText.d.ts +3 -1
- package/dist/ui/components/StreamingMarkdownText.js +39 -11
- package/dist/ui/components/TextInput.d.ts +1 -2
- package/dist/ui/components/TextInput.js +79 -9
- package/dist/ui/components/WizardChoices.d.ts +1 -2
- package/dist/ui/components/useInputSuggestions.d.ts +1 -1
- package/dist/ui/components/useInputSuggestions.js +1 -1
- package/dist/ui/mentionDetection.d.ts +20 -0
- package/dist/ui/mentionDetection.js +24 -0
- package/dist/ui/terminalColors.d.ts +4 -4
- package/dist/ui/terminalColors.js +23 -6
- package/dist/ui/terminalSanitize.js +8 -3
- package/dist/ui/textGeometry.d.ts +2 -0
- package/dist/ui/textGeometry.js +6 -0
- package/dist/ui/themes/registry.js +33 -33
- package/dist/utils/openPath.js +7 -0
- package/package.json +13 -13
- /package/dist/{llm/tools → core/ignore}/gitIgnore.d.ts +0 -0
- /package/dist/{llm/tools → core/ignore}/gitIgnore.js +0 -0
- /package/dist/{config → core}/paths.d.ts +0 -0
- /package/dist/{config → core}/paths.js +0 -0
- /package/dist/{config → core/persistence}/privateStorage.d.ts +0 -0
- /package/dist/{llm → core}/toolResultTypes.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.0 - 2026-11-25
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `! <command>` runs a shell command directly in the chat and hands its output to the model, which then reacts in one turn. `\!` sends text that starts with `!` as a prompt.
|
|
8
|
+
- On-demand Git, code graph, and LSP tool groups: clear requests load relevant groups automatically, and the agent can load additional groups during a goal.
|
|
9
|
+
- Dedicated Git tools for repository inspection and local mutations, plus non-interactive fetch, pull, and workspace-confined clone. Pull defaults to fast-forward only.
|
|
10
|
+
- The status bar shows how much context is left (`NN% context left`; `~` when estimated).
|
|
11
|
+
- Readline-style line editing in the prompt: `Ctrl+W` deletes the word before the cursor, `Ctrl+U` and `Ctrl+K` clear to the start and end of the line, `Ctrl+A` and `Ctrl+E` jump to the line start and end.
|
|
12
|
+
- Provider wizard: `Esc` goes back one step instead of abandoning the flow, `later` skips model selection for now, and saving an API key probes the model list.
|
|
13
|
+
- `--print` as an alias of `--prompt`.
|
|
14
|
+
- Curated Z.ai GLM-5.4 (1M context, 128K output): Coding Plan preset entry plus endpoint and model-catalog limits, so request budgeting no longer falls back to 128K.
|
|
15
|
+
- Documented GLM-5.4 reasoning effort on Z.ai endpoints (`low`/`high`/`max`): `/reasoning` and the built-in default now apply instead of the provider's `max` default, and subagent workers run at `low`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Haze requires Node.js 22.13 or newer; `bin/haze.js` reports a clear message on older runtimes.
|
|
20
|
+
- `haze --version` is answered before the build-staleness check.
|
|
21
|
+
- The live tail counts the streaming items that do not fit in one `+N more` row and keeps the newest visible.
|
|
22
|
+
- Theme text colors meet a 3:1 contrast ratio against their backgrounds.
|
|
23
|
+
- Terminal colours are adopted (OSC 10/11) only when the terminal reports colour capability, and the terminal title is restored on fatal exits.
|
|
24
|
+
- Git tools run with a scrubbed `GIT_*` environment, never prompt, and report a timeout by name.
|
|
25
|
+
- Redaction also covers Stripe secret keys, more GitHub token kinds, and lowercase `bearer` credentials.
|
|
26
|
+
- Dependency updates (AI SDK, marked, ESLint tooling); CI uploads one tarball per run, runs the supply-chain gates in a hygiene job, and has Dependabot configured.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- MCP tools whose names start with `graph` or `lsp` (for example `lspLint`) were deferred behind the built-in tool groups and could go missing.
|
|
31
|
+
- The URL guard now also blocks 6to4 and Teredo IPv6 literals.
|
|
32
|
+
- Terminal control sequences: `DEL`, `U+FEFF`, bidirectional controls and `ESC X` are stripped from transcript output.
|
|
33
|
+
- `openPath` refuses `cmd.exe` metacharacter targets on Windows.
|
|
34
|
+
- Output-cap errors are no longer classified as context overflow.
|
|
35
|
+
- Markdown inline spans follow GFM rules (nested emphasis, strike-through, autolinks); block-level HTML no longer prints raw tags.
|
|
36
|
+
- A submit arriving between a `!` command and its model turn no longer starts a concurrent turn.
|
|
37
|
+
- `/model` rejects a bare unknown model; only `provider:model` registers.
|
|
38
|
+
- `setBusy` uses a functional state update, so batched calls see the current busy state.
|
|
39
|
+
|
|
40
|
+
|
|
3
41
|
## 1.7.12 - 2026-11-20
|
|
4
42
|
|
|
5
43
|
### Added
|
package/README.md
CHANGED
|
@@ -244,19 +244,30 @@ for official sources, layouts, support limits and cross-agent setup.
|
|
|
244
244
|
|
|
245
245
|
```txt
|
|
246
246
|
/help
|
|
247
|
+
! <command> # run a shell command directly, then have the model react to its output
|
|
248
|
+
\! <text> # send a message that starts with ! as a prompt
|
|
247
249
|
/provider
|
|
248
250
|
/model
|
|
249
251
|
/model <name-or-provider:name>
|
|
250
252
|
/model list
|
|
251
253
|
/settings
|
|
252
254
|
/settings open
|
|
255
|
+
/settings edit
|
|
256
|
+
/editor
|
|
253
257
|
/themes
|
|
254
258
|
/themes <name>
|
|
255
|
-
/reasoning [level|unset|reset|status]
|
|
259
|
+
/reasoning [level|off|unset|reset|status]
|
|
260
|
+
/thinking [level|off|unset|reset|status]
|
|
256
261
|
/logs [id]
|
|
262
|
+
/logs <id> view
|
|
257
263
|
/lsp
|
|
258
264
|
/mcp
|
|
265
|
+
/plugin [inspect|install|list|remove]
|
|
266
|
+
/kit
|
|
259
267
|
/init
|
|
268
|
+
/graph
|
|
269
|
+
/graph status
|
|
270
|
+
/graph delete
|
|
260
271
|
/context
|
|
261
272
|
/session
|
|
262
273
|
/resume [id]
|
|
@@ -264,12 +275,17 @@ for official sources, layouts, support limits and cross-agent setup.
|
|
|
264
275
|
/compact [instructions]
|
|
265
276
|
/clear
|
|
266
277
|
/exit
|
|
278
|
+
/quit
|
|
267
279
|
|
|
268
280
|
/skills
|
|
269
281
|
/tips
|
|
270
282
|
/fleet [--review] [--profile <name>] [--workers <provider:model>] [--concurrency <n>] <prompt>
|
|
271
283
|
```
|
|
272
284
|
|
|
285
|
+
`/quit`, `/kit` and `/thinking` are aliases of `/exit`, `/plugin` and `/reasoning`. `off` means reasoning
|
|
286
|
+
level `none`; `unset` sends no reasoning parameter (provider default). `/logs <id> view` pages a raw log
|
|
287
|
+
through `$PAGER`; `/graph status` and `/graph delete` inspect or remove the persisted code graph.
|
|
288
|
+
|
|
273
289
|
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.
|
|
274
290
|
|
|
275
291
|
CLI flags:
|
|
@@ -279,6 +295,9 @@ haze --debug # show model/tool debug logs and write detailed JSONL logs
|
|
|
279
295
|
haze --continue # resume the latest saved session for this workspace
|
|
280
296
|
haze --resume <id> # resume an exact session id for this workspace
|
|
281
297
|
haze --no-session # run without durable session storage
|
|
298
|
+
haze --verbose --version # also print the commit, runtime/executable paths, and the capability registry
|
|
299
|
+
haze -p "prompt" --reasoning xhigh # one print-mode run with a reasoning effort override (off = none, unset = provider default)
|
|
300
|
+
haze doctor # print runtime provenance, verify build integrity, show the capability registry
|
|
282
301
|
```
|
|
283
302
|
|
|
284
303
|
Non-interactive / print mode:
|
|
@@ -353,6 +372,7 @@ haze has a small built-in toolset:
|
|
|
353
372
|
- `fetch` reads public `http(s)` URLs as Markdown, formatted JSON, or text. It rejects non-HTTP schemes, private and loopback addresses, metadata hosts, and malformed IPv6-like hosts. Bounded output remains available through `readToolOutput`.
|
|
354
373
|
- `writeTasks` replaces the task list at meaningful phase changes. Completed lists clear on the next user turn.
|
|
355
374
|
- `skill` loads an installed Markdown workflow or one of its references.
|
|
375
|
+
- Git tools inspect status, history, diffs, and branches; stage and commit changes; manage branches, rebase, and reset; fetch or pull from a configured remote; and clone a remote repository into the workspace. Pull defaults to fast-forward only. Network Git authentication must work without interactive prompts. Haze loads relevant Git, code graph, and LSP tool groups for clear requests; the agent can load another group as needed during the goal, with shell as a fallback.
|
|
356
376
|
- Optional LSP tools provide hierarchical symbol/body retrieval, definitions, enriched references, implementations, symbol-scoped diagnostics, semantic rename, and checked safe delete. They appear only when an enabled server command is installed.
|
|
357
377
|
|
|
358
378
|
Tool calls are grouped in the transcript so you can see what happened without reading a novella. Every successful `editFile`, `replaceInFiles`, `replaceLines`, `writeFile`, and mutating LSP content change shows colored additions and removals with line numbers and context. Large diffs keep an eight-row preview—the first four and last four rows, separated by an omission marker—and expose the complete retained diff through `readToolOutput`; no-op mutations are labeled explicitly. File-tool failures include a reason code and a recovery hint; protected secret files (SSH keys, shell histories, `.env` files, credentials) are refused outright with `secret_file_protected` and show as `blocked: protected secret file` in the transcript. Large shell, search, and fetch results stay behind an in-memory handle. Later model calls see a compact summary tailored to validation, git, search, diffs, JSON, logs, or the head and tail of the output.
|
|
@@ -505,7 +525,7 @@ The npm package ships `bin`, `dist`, README, SECURITY.md, license, and changelog
|
|
|
505
525
|
|
|
506
526
|
## Release
|
|
507
527
|
|
|
508
|
-
The
|
|
528
|
+
The public site's source is the Astro project under `website/`; the built pages are committed as static HTML under `docs/`. Update the version stamps in `website/src` (`layouts/SiteLayout.astro`, `pages/index.astro`, `pages/quickstart.astro`), run `npm run sync --prefix website`, and commit the regenerated `docs/` files. `npm run check --prefix website` detects drift.
|
|
509
529
|
|
|
510
530
|
```bash
|
|
511
531
|
npm ci
|
|
@@ -513,17 +533,21 @@ npm run typecheck
|
|
|
513
533
|
npm test
|
|
514
534
|
npm run lint
|
|
515
535
|
npm run build
|
|
516
|
-
npm
|
|
536
|
+
npm run release:verify
|
|
517
537
|
npm pack --dry-run
|
|
518
538
|
git tag vX.Y.Z
|
|
519
|
-
git push origin main --tags
|
|
520
|
-
npm publish --access public --provenance
|
|
539
|
+
git push origin main --tags # the Release workflow publishes to npm with provenance
|
|
521
540
|
```
|
|
522
541
|
|
|
542
|
+
## What's new in 1.8.0
|
|
543
|
+
|
|
544
|
+
`! <command>` runs a shell command from the chat and lets the model react to its output; dedicated Git tools and on-demand Git, code graph, and LSP tool groups; a context-left percentage in the status bar; readline-style `Ctrl+W`/`U`/`K`/`A`/`E` line editing; a provider wizard where `Esc` steps back instead of quitting. Haze now requires Node.js 22.13 or newer.
|
|
545
|
+
|
|
523
546
|
<details>
|
|
524
547
|
<summary>Previous release highlights</summary>
|
|
525
548
|
|
|
526
|
-
|
|
549
|
+
### Changes in 1.7.12
|
|
550
|
+
|
|
527
551
|
|
|
528
552
|
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
553
|
|
package/SECURITY.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Version | Supported |
|
|
6
6
|
|---------|-----------|
|
|
7
|
-
| Latest minor (`1.
|
|
7
|
+
| Latest minor (`1.8.x`) | Yes — security fixes |
|
|
8
8
|
| Older minors and pre-1.0 (`0.x`) | No — upgrade required |
|
|
9
9
|
|
|
10
10
|
Security fixes are provided for the latest published minor release. Upgrade to the newest release before reporting an issue that may already have been fixed.
|
package/bin/haze.js
CHANGED
|
@@ -27,6 +27,24 @@ function readJson(file) {
|
|
|
27
27
|
return JSON.parse(readFileSync(path.join(root, file), 'utf8'));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/** readJson that returns undefined instead of throwing (for the --version path). */
|
|
31
|
+
function readJsonSafe(file) {
|
|
32
|
+
try {
|
|
33
|
+
return readJson(file);
|
|
34
|
+
} catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** realpathSync that falls back to the given path, so --verbose never throws (OPS-06). */
|
|
40
|
+
function safeRealpath(file) {
|
|
41
|
+
try {
|
|
42
|
+
return realpathSync(file);
|
|
43
|
+
} catch {
|
|
44
|
+
return file ?? 'unknown';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
function readGitHead() {
|
|
31
49
|
const sha = (value) => (/^[0-9a-f]{7,40}$/i.test((value ?? '').trim()) ? value.trim() : undefined);
|
|
32
50
|
const readOptional = (file) => {
|
|
@@ -70,6 +88,35 @@ function readGitHead() {
|
|
|
70
88
|
const problems = [];
|
|
71
89
|
let pkg;
|
|
72
90
|
let build;
|
|
91
|
+
|
|
92
|
+
// Node floor (OPS-06): fail with a clear message instead of a syntax error
|
|
93
|
+
// from dist on old runtimes. Checked before anything that could throw.
|
|
94
|
+
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(Number);
|
|
95
|
+
if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 13)) {
|
|
96
|
+
process.stderr.write(`haze requires Node >= 22.13 (found ${process.versions.node}).\n`);
|
|
97
|
+
process.exit(1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// `--version` (optionally `--verbose`) is answered before the staleness gate
|
|
101
|
+
// (OPS-06): provenance must work even while dist is being repaired.
|
|
102
|
+
const argv = process.argv.slice(2);
|
|
103
|
+
if (argv.includes('--version') || argv.includes('-V')) {
|
|
104
|
+
const version = readJsonSafe('package.json')?.version ?? readJsonSafe('dist/buildInfo.json')?.version ?? '0.0.0';
|
|
105
|
+
if (argv.includes('--verbose')) {
|
|
106
|
+
const lines = [
|
|
107
|
+
`Haze ${version}`,
|
|
108
|
+
`commit: ${readJsonSafe('dist/buildInfo.json')?.commit ?? 'unknown'}`,
|
|
109
|
+
...(readJsonSafe('dist/buildInfo.json')?.builtAt ? [`builtAt: ${readJsonSafe('dist/buildInfo.json').builtAt}`] : []),
|
|
110
|
+
`runtime: ${path.join(root, 'dist')}`,
|
|
111
|
+
`executable: ${safeRealpath(process.argv[1])}`,
|
|
112
|
+
`goal supervisor: ${existsSync(path.join(root, 'dist/cli/commands/streaming/goalSupervisor.js')) ? 'enabled' : 'disabled'}`,
|
|
113
|
+
];
|
|
114
|
+
process.stdout.write(`${lines.join('\n')}\n`);
|
|
115
|
+
} else {
|
|
116
|
+
process.stdout.write(`${version}\n`);
|
|
117
|
+
}
|
|
118
|
+
process.exit(0);
|
|
119
|
+
}
|
|
73
120
|
try {
|
|
74
121
|
pkg = readJson('package.json');
|
|
75
122
|
} catch {
|
|
@@ -101,23 +148,4 @@ if (problems.length > 0) {
|
|
|
101
148
|
process.exit(1);
|
|
102
149
|
}
|
|
103
150
|
|
|
104
|
-
const argv = process.argv.slice(2);
|
|
105
|
-
if (argv.includes('--version') || argv.includes('-V')) {
|
|
106
|
-
const version = pkg?.version ?? build?.version ?? '0.0.0';
|
|
107
|
-
if (argv.includes('--verbose')) {
|
|
108
|
-
const lines = [
|
|
109
|
-
`Haze ${version}`,
|
|
110
|
-
`commit: ${build?.commit ?? 'unknown'}`,
|
|
111
|
-
...(build?.builtAt ? [`builtAt: ${build.builtAt}`] : []),
|
|
112
|
-
`runtime: ${path.join(root, 'dist')}`,
|
|
113
|
-
`executable: ${realpathSync(process.argv[1])}`,
|
|
114
|
-
`goal supervisor: ${existsSync(path.join(root, 'dist/cli/commands/streaming/goalSupervisor.js')) ? 'enabled' : 'disabled'}`,
|
|
115
|
-
];
|
|
116
|
-
process.stdout.write(`${lines.join('\n')}\n`);
|
|
117
|
-
} else {
|
|
118
|
-
process.stdout.write(`${version}\n`);
|
|
119
|
-
}
|
|
120
|
-
process.exit(0);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
151
|
import('../dist/cli/index.js');
|
package/dist/buildInfo.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@denizokcu/haze",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"commit": "
|
|
5
|
-
"builtAt": "2026-11-
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"commit": "3f483ff88c29768a11bf8af5b29633e5c4d38382",
|
|
5
|
+
"builtAt": "2026-11-25T22:00:36.341Z"
|
|
6
6
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
/** Spinner ticks stay within this subtree, not the transcript orchestrator. */
|
|
3
2
|
export declare function BusyBar({ label, elapsed, detail, tip }: {
|
|
4
3
|
label: string;
|
|
5
4
|
elapsed: string;
|
|
6
5
|
detail?: string;
|
|
7
6
|
tip?: string;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The static welcome paragraph under the header banner. A component (not a
|
|
3
|
+
* module-level element) so `<Text color>` reads the active theme on every
|
|
4
|
+
* render and live `/themes` switches repaint it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ChatHeaderSubtitle(): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
import { theme } from '../../ui/theme.js';
|
|
4
|
+
/**
|
|
5
|
+
* The static welcome paragraph under the header banner. A component (not a
|
|
6
|
+
* module-level element) so `<Text color>` reads the active theme on every
|
|
7
|
+
* render and live `/themes` switches repaint it.
|
|
8
|
+
*/
|
|
9
|
+
export function ChatHeaderSubtitle() {
|
|
10
|
+
return (_jsxs(Text, { children: ['A minimal coding agent for your terminal.\n\nStart with chat. Turn repeated work into Markdown skills:\n', _jsx(Text, { color: theme.command, children: "/skills" }), ' — create, enable, disable, validate, or remove skills.\n\nType ', _jsx(Text, { color: theme.command, children: "@" }), ' to browse workspace files. To grant read-only access to a file or directory outside the workspace for this turn, mention a path containing ', _jsx(Text, { color: theme.command, children: "/" }), ' (for example, ', _jsx(Text, { color: theme.command, children: "@../shared/file.ts" }), ' or ', _jsx(Text, { color: theme.command, children: "/tmp/reference.md" }), ').\n\nImage mentions require a vision-capable model. File edits and writes stay inside the workspace.\n\nhaze runs tool calls without confirmation gates. Supervise consequential work as you would any shell session.\n\nShape haze around your workflow as you go.\n\nUse ', _jsx(Text, { color: theme.command, children: "/help" }), ' for commands.'] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChatOptions {
|
|
3
|
+
debug?: boolean;
|
|
4
|
+
version?: string;
|
|
5
|
+
/** Safe build provenance (commit, build time) recorded into session headers. */
|
|
6
|
+
build?: {
|
|
7
|
+
commit?: string;
|
|
8
|
+
builtAt?: string;
|
|
9
|
+
};
|
|
10
|
+
continueSession?: boolean;
|
|
11
|
+
resumeSessionId?: string;
|
|
12
|
+
noSession?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ChatScreen({ debug, version, build, continueSession, resumeSessionId, noSession, onShutdownReady }: ChatOptions & {
|
|
15
|
+
onShutdownReady?: (shutdown: () => Promise<void>) => void;
|
|
16
|
+
}): React.JSX.Element;
|