@denizokcu/haze 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -1
- package/README.md +66 -25
- package/SECURITY.md +22 -0
- package/bin/haze.js +102 -1
- package/dist/buildInfo.json +7 -0
- package/dist/cli/chat/TaskBar.d.ts +2 -1
- package/dist/cli/chat/TaskBar.js +7 -4
- package/dist/cli/chat/contextReport.js +2 -0
- package/dist/cli/chat/fileMentionSuggestions.js +3 -2
- package/dist/cli/chat/liveRegion.d.ts +25 -0
- package/dist/cli/chat/liveRegion.js +48 -0
- package/dist/cli/chat/messages.d.ts +33 -2
- package/dist/cli/chat/messages.js +216 -33
- package/dist/cli/chat/sessionLifecycle.d.ts +9 -0
- package/dist/cli/chat/sessionLifecycle.js +64 -14
- package/dist/cli/chat/sessionRecorder.js +75 -7
- package/dist/cli/chat/startupInfo.d.ts +0 -1
- package/dist/cli/chat/startupInfo.js +11 -15
- package/dist/cli/chat/wizardDispatch.js +111 -12
- package/dist/cli/commands/chat.d.ts +5 -0
- package/dist/cli/commands/chat.js +203 -101
- package/dist/cli/commands/commands.d.ts +2 -0
- package/dist/cli/commands/commands.js +10 -5
- package/dist/cli/commands/doctor.d.ts +19 -0
- package/dist/cli/commands/doctor.js +76 -0
- package/dist/cli/commands/formatters.js +2 -0
- package/dist/cli/commands/ndjsonSink.d.ts +23 -0
- package/dist/cli/commands/ndjsonSink.js +38 -0
- package/dist/cli/commands/providerWizard.d.ts +9 -2
- package/dist/cli/commands/providerWizard.js +37 -4
- package/dist/cli/commands/runCommand.d.ts +3 -0
- package/dist/cli/commands/runCommand.js +117 -11
- package/dist/cli/commands/streaming/abortCause.d.ts +24 -0
- package/dist/cli/commands/streaming/abortCause.js +16 -0
- package/dist/cli/commands/streaming/assistantText.js +9 -2
- package/dist/cli/commands/streaming/goalCheckpoint.d.ts +65 -0
- package/dist/cli/commands/streaming/goalCheckpoint.js +23 -0
- package/dist/cli/commands/streaming/goalSupervisor.d.ts +64 -0
- package/dist/cli/commands/streaming/goalSupervisor.js +127 -0
- package/dist/cli/commands/streaming/toolCallRecovery.d.ts +2 -0
- package/dist/cli/commands/streaming/toolCallRecovery.js +24 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.d.ts +29 -0
- package/dist/cli/commands/streaming/toolGroupRenderer.js +50 -4
- package/dist/cli/commands/streaming/toolResultState.d.ts +6 -1
- package/dist/cli/commands/streaming/toolResultState.js +29 -7
- package/dist/cli/commands/streaming/turnOutcome.d.ts +17 -0
- package/dist/cli/commands/streaming/turnOutcome.js +27 -11
- package/dist/cli/commands/streaming.d.ts +70 -3
- package/dist/cli/commands/streaming.js +491 -77
- package/dist/cli/commands/wizardActions.d.ts +1 -0
- package/dist/cli/commands/wizardActions.js +1 -0
- package/dist/cli/commands/wizardPrompts.js +7 -1
- package/dist/cli/commands/wizardSuggestions.js +5 -3
- package/dist/cli/index.js +68 -22
- package/dist/cli/terminalTitle.js +1 -1
- package/dist/config/modelDiscovery.d.ts +51 -0
- package/dist/config/modelDiscovery.js +164 -1
- package/dist/config/privateStorage.js +28 -2
- package/dist/config/providerAuth.d.ts +14 -0
- package/dist/config/providerAuth.js +49 -0
- package/dist/config/providerPresets.d.ts +39 -7
- package/dist/config/providerPresets.js +371 -100
- package/dist/config/providers.js +2 -0
- package/dist/config/settings.d.ts +36 -0
- package/dist/config/settings.js +9 -0
- package/dist/core/agent/budgets.d.ts +10 -0
- package/dist/core/agent/budgets.js +10 -0
- package/dist/core/agent/compaction.d.ts +38 -0
- package/dist/core/agent/compaction.js +92 -17
- package/dist/core/agent/completionController.d.ts +230 -0
- package/dist/core/agent/completionController.js +287 -0
- package/dist/core/agent/contextBudget.d.ts +38 -0
- package/dist/core/agent/contextBudget.js +60 -7
- package/dist/core/agent/events.d.ts +74 -0
- package/dist/core/agent/reasoningPolicy.d.ts +31 -0
- package/dist/core/agent/reasoningPolicy.js +27 -0
- package/dist/core/agent/toolCapabilities.d.ts +27 -0
- package/dist/core/agent/toolCapabilities.js +58 -0
- package/dist/core/agent/toolExecutionBudget.d.ts +35 -0
- package/dist/core/agent/toolExecutionBudget.js +49 -0
- package/dist/core/agent/toolOutputStore.d.ts +8 -0
- package/dist/core/agent/toolOutputStore.js +10 -10
- package/dist/core/agent/toolResults.d.ts +12 -0
- package/dist/core/agent/toolResults.js +38 -0
- package/dist/core/agent/turnBudget.d.ts +35 -0
- package/dist/core/agent/turnBudget.js +27 -0
- package/dist/core/agent/turnPolicy.d.ts +11 -0
- package/dist/core/agent/turnPolicy.js +19 -0
- package/dist/core/agent/workState.d.ts +75 -0
- package/dist/core/agent/workState.js +120 -9
- package/dist/core/deadline.d.ts +33 -0
- package/dist/core/deadline.js +74 -0
- package/dist/core/goal/completionPolicy.d.ts +27 -0
- package/dist/core/goal/completionPolicy.js +37 -1
- package/dist/core/limits/byteBudgets.d.ts +2 -0
- package/dist/core/limits/byteBudgets.js +2 -0
- package/dist/core/limits/textBudgets.d.ts +2 -0
- package/dist/core/limits/textBudgets.js +2 -0
- package/dist/core/log/llmLog.js +7 -0
- package/dist/core/persistence/orderedFileWriter.d.ts +10 -0
- package/dist/core/persistence/orderedFileWriter.js +16 -2
- package/dist/core/process/backgroundRegistry.js +8 -7
- package/dist/core/process/runBoundedProcess.d.ts +8 -2
- package/dist/core/process/runBoundedProcess.js +15 -6
- package/dist/core/safety/missingExecutable.d.ts +42 -0
- package/dist/core/safety/missingExecutable.js +77 -0
- package/dist/core/session/sessionStore.d.ts +37 -0
- package/dist/core/session/sessionStore.js +215 -51
- package/dist/core/subagent/contracts.d.ts +4 -0
- package/dist/core/subagent/contracts.js +1 -0
- package/dist/core/subagent/subagentCoordinator.d.ts +4 -0
- package/dist/core/subagent/subagentCoordinator.js +32 -2
- package/dist/core/subagent/subagentRunner.js +17 -37
- package/dist/llm/client.d.ts +17 -1
- package/dist/llm/client.js +82 -14
- package/dist/llm/hazeTools.d.ts +554 -80
- package/dist/llm/hazeTools.js +103 -24
- package/dist/llm/lsp.d.ts +24 -4
- package/dist/llm/lsp.js +72 -11
- package/dist/llm/lspTools.d.ts +2366 -0
- package/dist/llm/lspTools.js +87 -79
- package/dist/llm/openaiCodex.d.ts +3 -0
- package/dist/llm/openaiCodex.js +47 -0
- package/dist/llm/openaiCodexOAuth.d.ts +54 -0
- package/dist/llm/openaiCodexOAuth.js +214 -0
- package/dist/llm/requestContext.d.ts +3 -0
- package/dist/llm/requestContext.js +7 -4
- package/dist/llm/systemPrompt.d.ts +11 -0
- package/dist/llm/systemPrompt.js +12 -6
- package/dist/llm/toolResultTypes.d.ts +8 -1
- package/dist/llm/tools/bashTool.d.ts +48 -16
- package/dist/llm/tools/bashTool.js +5 -0
- package/dist/llm/tools/editMatch.d.ts +14 -0
- package/dist/llm/tools/editMatch.js +72 -0
- package/dist/llm/tools/failures.d.ts +2 -0
- package/dist/llm/tools/failures.js +1 -0
- package/dist/llm/tools/fetchTool.d.ts +16 -0
- package/dist/llm/tools/fileToolShared.d.ts +4 -3
- package/dist/llm/tools/fileToolShared.js +16 -21
- package/dist/llm/tools/gitIgnore.d.ts +49 -0
- package/dist/llm/tools/gitIgnore.js +129 -0
- package/dist/llm/tools/readRecovery.d.ts +10 -0
- package/dist/llm/tools/readRecovery.js +135 -0
- package/dist/llm/tools/toolContext.d.ts +1 -1
- package/dist/llm/tools/toolContext.js +61 -32
- package/dist/llm/webFetch.d.ts +17 -0
- package/dist/llm/webFetch.js +64 -97
- package/dist/ui/codeHighlight.d.ts +4 -0
- package/dist/ui/codeHighlight.js +31 -0
- package/dist/ui/components/Header.d.ts +1 -1
- package/dist/ui/components/MarkdownText.d.ts +16 -2
- package/dist/ui/components/MarkdownText.js +244 -34
- package/dist/ui/components/TextInput.d.ts +8 -1
- package/dist/ui/components/TextInput.js +6 -2
- package/dist/ui/theme.d.ts +4 -3
- package/dist/ui/theme.js +5 -4
- package/dist/utils/buildInfo.d.ts +104 -0
- package/dist/utils/buildInfo.js +253 -0
- package/dist/utils/fs.d.ts +9 -0
- package/dist/utils/fs.js +87 -25
- package/dist/utils/openPath.d.ts +2 -2
- package/dist/utils/openPath.js +19 -6
- package/dist/utils/path.d.ts +2 -0
- package/dist/utils/path.js +5 -1
- package/dist/utils/utf8.d.ts +22 -0
- package/dist/utils/utf8.js +54 -0
- package/dist/utils/version.d.ts +9 -3
- package/dist/utils/version.js +28 -2
- package/package.json +24 -19
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Known provider presets derived from
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* Known OpenAI-compatible provider presets derived from provider documentation and
|
|
3
|
+
* community conventions. Do not copy native-provider entries from multi-adapter clients:
|
|
4
|
+
* every standard preset here must accept OpenAI Chat Completions requests at its base URL.
|
|
5
|
+
* The OpenAI Subscription preset is the explicit exception and uses its own Codex adapter.
|
|
6
|
+
* Hosted presets carry a pre-configured base URL so users only need to supply an API key
|
|
7
|
+
* and model names. Local/keyless providers have sensible localhost defaults.
|
|
8
|
+
*
|
|
9
|
+
* `modelLimits` values are curated from models.dev (the same catalog pi and nanocoder
|
|
10
|
+
* consume; refreshed 2026-08-15). They are keyed by the exact suggested model id for
|
|
11
|
+
* THIS preset: aggregators may cap context below the origin model's capability (e.g.
|
|
12
|
+
* Together serves DeepSeek-V4-Pro at 512K vs DeepSeek's own 1M), so limits never
|
|
13
|
+
* transfer between providers. When the wizard adds a suggested model, these values are
|
|
14
|
+
* written into the provider's settings `modelLimits`, where they remain user-editable.
|
|
15
|
+
* Local providers (Ollama/llama.cpp/MLX/LM Studio) intentionally carry no limits: their
|
|
16
|
+
* effective context depends on the local server configuration, not the model.
|
|
8
17
|
*/
|
|
18
|
+
export interface PresetModelLimits {
|
|
19
|
+
contextWindowTokens: number;
|
|
20
|
+
maxOutputTokens: number;
|
|
21
|
+
}
|
|
9
22
|
export interface ProviderPreset {
|
|
10
23
|
/** Unique identifier used as the selection value. */
|
|
11
24
|
id: string;
|
|
@@ -13,8 +26,10 @@ export interface ProviderPreset {
|
|
|
13
26
|
name: string;
|
|
14
27
|
/** Pre-configured OpenAI-compatible base URL. */
|
|
15
28
|
baseUrl: string;
|
|
16
|
-
/** Whether an API key is typically required. Local providers
|
|
29
|
+
/** Whether an API key is typically required. Local and OAuth providers use false. */
|
|
17
30
|
needsApiKey: boolean;
|
|
31
|
+
/** Provider-specific sign-in flow, when setup is not an API-key prompt. */
|
|
32
|
+
auth?: 'chatgpt-oauth';
|
|
18
33
|
/** Hint shown when prompting for the API key. */
|
|
19
34
|
apiKeyHint?: string;
|
|
20
35
|
/**
|
|
@@ -28,8 +43,25 @@ export interface ProviderPreset {
|
|
|
28
43
|
* as type-in examples when discovery fails.
|
|
29
44
|
*/
|
|
30
45
|
suggestedModels?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Context-window and output-token limits keyed by exact suggested model id
|
|
48
|
+
* (provider-specific; see the module comment). Feeds request budgeting when a
|
|
49
|
+
* user adds the model without configuring limits themselves.
|
|
50
|
+
*/
|
|
51
|
+
modelLimits?: Record<string, PresetModelLimits>;
|
|
31
52
|
/** Category for grouping in the picker. */
|
|
32
53
|
category: 'cloud' | 'local';
|
|
33
54
|
}
|
|
34
55
|
export declare const PROVIDER_PRESETS: ProviderPreset[];
|
|
35
56
|
export declare function findPreset(id: string): ProviderPreset | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Limits for models a wizard flow is adding to a provider, matched by the
|
|
59
|
+
* provider's base URL or its name (a provider created from a preset keeps the
|
|
60
|
+
* preset's name unless the user renamed it). Returns only entries the caller
|
|
61
|
+
* should merge into the provider's settings `modelLimits`; user-configured
|
|
62
|
+
* limits always win because callers merge without overwriting existing keys.
|
|
63
|
+
*/
|
|
64
|
+
export declare function presetModelLimitsForModels(provider: {
|
|
65
|
+
name?: string;
|
|
66
|
+
url?: string;
|
|
67
|
+
}, models: readonly string[]): Record<string, PresetModelLimits>;
|