Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Integration in void ACP and more - #941

Open
Vai3soh wants to merge 18 commits into
voideditor:mainfrom
Vai3soh:acp-void-platform-overhaul
Open

Vai3soh wants to merge 18 commits into
voideditor:mainfrom
Vai3soh:acp-void-platform-overhaul

Conversation

@Vai3soh

@Vai3soh Vai3soh commented Feb 14, 2026

Copy link
Copy Markdown

Hi.

In this commit, I tried to address:

  1. An architectural issue — the ESLint rules in the project were configured in a way that prevented importing module A from module B. This is now fixed.

  2. Switch to dynamic configuration. Now you don’t need to manually update the codebase every time a new LLM is released. Configuration retrieval is tied to OpenRouter endpoints. If their endpoint goes down, we’ll have to save their JSON and host our own.

  3. Various options like max_tokens, top_p, etc. are now passed to the UI from the configuration and can be changed if desired.

  4. Prompts have been completely rewritten.

  5. Integrated the ACP protocol — in Void this can work as:

    • a. An internal agent: runs as a separate process and works with existing Void tools. This mode can be enabled in the UI.
    • b. An external agent: here you can connect other agents (in theory). In practice, the code has been tested and is effectively implemented to interact with vibe-acp from Mistral. So there’s a 99% chance that if you connect something else, it will break. There’s no real universality yet; I haven’t figured out whether it can be made fully universal — most likely not. So we’ll need to refactor the codebase and move vibe-acp into a separate layer.

    In ACP mode, the agent sends a plan when executing a task.

  6. Tools like edit_file / read_file (and some others — I don’t remember which ones) were updated.

  7. Running Apply (from chat) now works differently — it doesn’t send the model’s code anymore. It simply applies the changes (if it works, then OK). If not, it sends a notification.

  8. Non-native tools are also parsed from the reasoning stream (in case the model sends nonsense). In that case, it gets a short message explaining how it should do it.

  9. You can now disable static and dynamic tools individually (one by one).

  10. Support for sending images from chat (if the model supports it).

2 1 3

Tested on Linux with an OpenAI-compatible endpoint.

…lint layering)

This commit begins a large refactor and platform migration of Void chat/LLM infrastructure.

Key changes:

- Integrated Agent Control Protocol (ACP) in electron-main: builtin agent, main service, IPC wiring, log sanitization, loop guard, and supporting utilities.

- Relocated shared Void code from workbench-contrib into src/vs/platform/void to satisfy eslint module-boundary rules and eliminate layering violations.

- Extracted common and electron-main components (types, helpers, services) so they can be safely reused across workbench and main-process code.

- Removed the static modelCapabilities layer; model configuration is now request-driven and propagated through the LLM pipeline (provider, model, parameters, limits).

- Rewrote sendLLMMessage.impl: unified streaming send/receive pipeline, robust handling of text and tool calls (including correction of invalid XML tool-call output), tool schema conversion (OpenAI / Anthropic / Gemini), output budgeting, and token usage collection.

- Completely reworked the system prompt for the existing execution model; added a separate prompt for the internal ACP agent responsible for generating an execution plan.

- Improved edit_file workflow: unified-diff previews for the UI and removal of brittle exact-match behavior.

- Added support for disabling/skipping tools (static Void tools and dynamic/MCP tools) via UI settings and JSON configuration.

- Expanded Settings UI (void-settings-tsx/Settings.tsx): tool approval controls, unified Tools section, per-tool enable/disable toggles with source attribution.

- File reading and terminal tools now return chunked output and surface results in the UI.

Notes:

- WIP: first part of a larger change-set.
Add ACP workbench/browser services for host callbacks (fs/terminal/permission) used by ACP sessions

Wire callback routing through the ACP workbench service, including thread/window guards

Keep builtin-only extMethod handling separate from common host callbacks

Update related Void workbench integration so the build compiles
…tion

  Why:
  - Resolve eslint module-boundary violations by separating editor language APIs under `src/vs/editor/common/language/*`.
  - Eliminate manual steps around ACP vendor artifacts by wiring their generation into the regular build lifecycle.
  - Remove lifecycle-related disposable leak risks in extension-host restart/status paths.

  What changed:
  - Added `editor/common/language/*` modules and switched runtime/build/workbench/api imports + worker entrypoints to this namespace.
  - This directly addresses `local/code-import-patterns` and `local/code-layering` constraints.
  - Added `scripts/build-acp-vendor.mjs` and integrated ACP vendor generation into `postinstall`, `compile`, and `watch`.
  - Updated build/package resource flow for Void assets (JetBrains Mono fonts, `woff/woff2` loaders, resource copy steps).
  - Added targeted robustness fixes: URI-safe `deepClone`, and proper disposable tracking/guards in extension-host output+status paths.
  - Expanded ACP/Void regression coverage (ACP args, `read_file` normalization/pagination, model-config switching, tool safety/search behavior, LLM grammar/reasoning propagation).
  - Tightened validation flow: precommit now runs hygiene + node tests + quick Void/ACP browser suite.
  MSG
Delete obsolete src/vs/editor/common/model and src/vs/editor/common/services after migrating imports to src/vs/editor/common/language/*.
Add build/npm/run-gulp.js and route the root gulp script through it to apply configurable Node heap limits from CLI/env with a safe default.

Update mangler worker handling: support VSCODE_MANGLE_MAX_WORKERS and VSCODE_MANGLE_WORKER_MAX_OLD_SPACE_SIZE, run workers as processes, and skip rename edits for .d.ts and out-of-project files.

Remove hardcoded VSCODE_TSC_IGNORE_UNUSED toggling from build/gulpfile.vscode.js so unused-check behavior is controlled explicitly by environment config.

Document local build tuning (VSCODE_MANGLE_MAX_WORKERS, VSCODE_TSC_IGNORE_UNUSED) and add notes for building the vscode-reh-linux-x64 component in HOW_TO_CONTRIBUTE.md.

Fix promptSyntax declaration typings by replacing removed ResolveError imports with a structural IPromptResolveError interface and by switching to IRange/IModelDecorationOptions.

Update extensions to reduce Buffer() deprecation sources: replace tunnel with https-proxy-agent in configuration-editing/github, remove byline in git in favor of readline, and sync related lockfiles.

Add tslib to remote production dependencies and lockfile to satisfy dependency resolution.
- Preserve vscode-remote URIs during ACP/tool path normalization and checkpoint restore.
- Fix read_file path click behavior and unify URI resolution
  in sidebar tool previews.
- Align read/edit preview path display for relative paths.
- Allow command bar and selection helper on vscode-remote files.
- Add regression tests for remote workspace path handling.
  Introduce Agent Skills discovery and activation across Void chat and ACP flows.

  - Discover trusted project and user SKILL.md roots under .void/skills and .agents/skills.
  - Add the activate_skill tool, prompt catalog injection, explicit $skill activation, active-skill tracking, and
  compression protection.
  - Add Agent Skills settings, external ACP fallback instructions, docs, and unit coverage.
  - Allow the built-in ACP agent to bind an alternate loopback address via --acp-agent-addr or env vars.
  - Fix custom provider request config so Google-prefixed models served through OpenRouter keep OpenAI-compatible
  transport and tool formatting instead of inheriting Gemini defaults.
  - Preserve per-model supportsSystemMessage and specialToolFormat values from custom provider capabilities.
@andrewpareles
andrewpareles force-pushed the main branch 11 times, most recently from 360390b to b3166e7 Compare June 2, 2026 22:03
Vai3soh added 11 commits June 17, 2026 10:22
…VOID.md

- Remove support for `.voidrules`
- Remove global `aiInstructions` setting and related UI
- Switch all workspace instruction loading to `VOID.md`
- Update onboarding/help text and sidebar action to reference `VOID.md`
- Preload and read `VOID.md` from workspace roots
- Use `VOID.md` contents as system-level instructions for LLM message conversion
- Stop passing ACP system prompts from `ChatAcpHandler`
- Resolve ACP system prompts from `VOID.md` inside `AcpService`
- Propagate system prompts through ACP metadata and inject them into built-in agent requests
- Preserve system prompt delivery across providers with different system-message capabilities
- Remove ACP system prompt configuration UI
- Update tests to reflect the new `VOID.md`-based behavior
- add `Void.md` to `.gitignore`
- Add `modelsWhitelist` / `modelsWhitelistUseRegex` to custom provider settings and expose them in the Settings UI (validation included; affects **Refresh models** only).
- Implement whitelist filtering in `DynamicProviderRegistryService` (exact match or RegExp; supports model id variants like full id, short name, and `slug/model`).
- Propagate per-turn token usage from the builtin ACP agent via `_meta.llmTokenUsageTurns`, through ACP channel chunks as `tokenUsageTurns`.
- Attach token usage to assistant messages (`ChatMessage.tokenUsage`), apply per-turn usage after completion, and render an inline expandable token breakdown in chat bubbles.
- Fix OpenAI usage mapping to correctly account for cache read/write tokens and compute “uncached prompt” vs total prompt tokens.
- Streaming robustness: stop processing deltas after tool-finish to avoid post-tool artifacts.
- Minor fixes: OpenRouter slug detection uses `.includes('openrouter')`; dedupe `CodeSelection` context items by range.
- fix approval/reject/skip flow by resolving the latest pending tool request instead of assuming the last tool message is a request
- add regression tests covering pending tool requests followed by skipped tool results
- send compacted message history instead of only injecting a summary message
- use provider prompt token usage to make history compaction decisions more accurate
- expose additional history compaction and context window metrics in the UI
- reduce default reserved output token budget to improve context utilization
- apply minor UI cleanup and remove unused code
… rewrite_file creation

Multiple fixes across chat thread service, history compressor, tools,
and UI to address context overflow errors, silent message truncation,
main-thread freezes, and missing file creation.

Token estimation & context compression
- estimateTokensForMessages now counts tool call params, assistant
  reasoning, anthropic redacted_thinking, tool name/id overhead, and
  applies a 1.15x safety margin for system prompt + tool definitions.
- maybeSummarizeHistoryBeforeLLM accepts lastProviderPromptTokens and
  uses max(localEstimate, providerPromptTokens) to decide whether to
  compress — prevents underestimation that left context summary
  disabled until the provider returned a 400.
- ChatExecutionEngine passes tokenUsageLastRequest into the compressor.

max_tokens vs reservedOutputTokenSpace
- maxInputTokens now uses min(reservedOutputTokenSpace, max_tokens from
  per-model requestParams) so the UI and compressor see the real
  provider limit instead of an unnecessarily conservative value.

Caps fallback & whitelist
- getEffectiveModelCapabilities no longer returns contextWindow: 4096
  / reservedOutputTokenSpace: 4096 as fallback — downstream now keeps
  the user override instead of silently replacing 1_048_576 with 4096.
- refreshModelsForProvider no longer destroys caps for models outside
  the whitelist: caps are populated for all known models, whitelist
  only filters the models list shown in UI.
- setProviderModels preserves prevCaps for all previously known models.
- inferCapabilitiesForRemoteModels is now called for all remote IDs,
  not only the whitelist-filtered subset.

prepareMessages
- Removed Math.max(contextWindow/2, reservedOutputTokenSpace ?? 4096)
  that was silently overriding the user's reservedOutputTokenSpace and
  halving the available prompt window.

rewrite_file
- Creates the file if it does not exist (createFile with overwrite:
  false after a stat probe), so rewrite_file can be used as
  "create or replace". Throws a clear error if the path is a directory.

Storage performance
- Per-thread storage keys (void.chat.thread.<id>) + a lightweight
  index (void.chat.threads.index) replace the single
  JSON.stringify(allThreads) on every message.
- Each thread is serialized independently, debounced (1s), and run in
  requestIdleCallback to avoid blocking the main thread.
- flushPendingStores is called on ILifecycleService.onWillShutdown.
- Legacy THREAD_STORAGE_KEY is no longer read or written.

React subscription split
- New emitters onDidChangeCurrentThreadId and onDidChangeAllThreads
  allow components to subscribe to only what they need.
- New hooks useCurrentThreadId / useAllThreads in services.tsx.
- PastThreadsList uses useAllThreads to skip re-renders on
  currentThreadId changes.
- PastThreadsList wraps sortedThreadIds and runningThreadIds in
  useMemo to avoid re-sort on every render.

Mount timeout
- awaitMountWithTimeout (2s) replaces bare awaits on whenMounted in
  focusCurrentChat and sidebarActions to prevent actions from hanging
  forever when React fails to mount the target component.
- SidebarChat useEffect guards against double-resolving the mount
  promise after a timeout.

UI token usage panel
- Renamed "Total" to "Session" to avoid confusion with the context
  window size.
- Added an always-visible "window ~X% used" indicator and a
  "Context window pressure (last request)" line with an explicit
  fraction (used/maxInputTokens).
- Cumulative fields are now labeled "(cumulative)".
…p detector

Context window & token estimation
- estimateTokensForMessages now counts tool params, reasoning and per-message
  overhead with a 1.15x safety margin.
- maybeSummarizeHistoryBeforeLLM uses max(localEstimate, lastProviderPromptTokens).
- maxInputTokens now respects per-model max_tokens from requestParams.
- getEffectiveModelCapabilities no longer falls back to contextWindow: 4096.
- refreshModelsForProvider no longer destroys caps for models outside the
  whitelist.
- prepareMessages no longer overrides reservedOutputTokenSpace with
  contextWindow/2.

rewrite_file
- Creates the file if it does not exist.
- Diff uses the actual disk content as originalCode (fixes red/green colors).
- Resets cached ITextModel after file delete/recreate (fixes empty preview).
- saveModel uses ignoreModifiedSince when the file was just recreated.

Storage performance
- Per-thread storage keys + a lightweight index replace the single
  JSON.stringify(allThreads) on every message.
- Serialization is debounced and runs in requestIdleCallback.
- flushPendingStores is called on ILifecycleService.onWillShutdown.

React subscriptions
- New emitters onDidChangeCurrentThreadId / onDidChangeAllThreads and hooks
  useCurrentThreadId / useAllThreads.
- PastThreadsList uses useAllThreads and wraps sortedThreadIds in useMemo.

Mount timeout
- awaitMountWithTimeout (2s) replaces bare awaits on whenMounted to prevent
  actions from hanging forever.

Parallel tool calls
- non-ACP: remaining tool calls are queued in a pending buffer and shown one
  by one for approval; LLM cycle runs only after the last one is handled.
- ACP: removed abortRunning from onReject so the ACP session is no longer
  cancelled on the first reject.
- ACP agent ends the turn when every tool call in the turn was rejected.

Loop detector
- assistant_repeat is now a soft signal (no loop on its own).
- tool_repeat only triggers on consecutive identical calls.
- Read-only tools get a higher limit; read_file counter resets after edits.
- Default maxTurnsPerPrompt raised to 25, assistantPrefixWords to 5.

UI
- Token usage panel: "Session" label, "window ~X% used" indicator,
  cumulative labels.
- EditToolSoFar shows streaming progress with elapsed time, char count and
  a live preview of the content being generated.
…aming resilience

Run independent tools concurrently and turn large terminal output into cheap-to-model summaries.

- Tool classification
  - New `read-only-terminal` execution kind so safe terminal commands (cat,
    grep, head, ls, pwd, stat, tail, wc, plus read-only git/openspec/find/rg
    invocations without mutating flags) can be batched in parallel with built-in
    read-only tools, while everything else stays serialized. Auto-approve must
    still be enabled for read-only terminal batches.
- ChatExecutionEngine
  - Per-thread run generation + interruptor registry, so stopThread can cancel
    in-flight tools and surfacing interrupted messages instead of leaking
    promises. Pending tool queue drains on stop.
  - Stream updates are throttled (50ms) and reasoning previews are trimmed at
    ~8k chars to keep the sidebar responsive on long reasoning streams.
  - Prepare branch now honors `streamAttempt` to reset cumulative delta state
    between retries.
- Terminal output
  - Optional special summarizer for `run_command` results: keeps head/tail lines
    plus semantically interesting middle lines, writes the full raw output to a
    footer log file and embeds an extended TRUNCATION_META (`summarizer`,
    `linesOmitted`, `wasCharTruncated`, `logFilePath`, …). Honors user settings
    (`terminalOutputSummarization`, `terminalOutputHeadLines`,
    `terminalOutputTailLines`) and backfills defaults on load.
  - Sidebar surfaces "saved tokens" label under the command block for
    summarized runs and the footer is detected to avoid double-summarizing.
  - TerminalToolService.runCommand now correctly waits (via event + timeout
    fallback) for the `CommandDetection` capability when it is mounted late,
    instead of returning `undefined`.
- Streaming & retries
  - Reasoning-only truncation (model used the whole budget on reasoning) no
    longer triggers automatic retry; user-facing message is rewritten with
    provider/model/maxTokens guidance.
  - Delta channel distinguishes cumulative snapshots from incremental deltas so
    a new attempt starts with a clean transport state.
  - Edge cases with streamAttempt threading and incremental reasoning parsing
    (500-char growth floor + reset hook) to avoid stalls.
- Message history
  - OpenAI/Anthropic prep drops orphan tool results that follow a later user/
    assistant message and clears `tool_calls` when no matching tool result is
    sent, plus tests covering both scenarios.
- ChatThreadService
  - `approveLatestToolRequest` / `rejectLatestToolRequest` /
    `skipLatestToolRequest` accept a `toolCallId`, so a specific pending request
    can be addressed instead of always acting on the trailing message; tests
    updated accordingly.
- UI stability
  - ErrorBoundary reports a structured serialized error and component stack to
    the console and WarningBox.
  - ScrollToBottom uses a rAF-token guard and a single ResizeObserver;
    services coalesce chat-thread stream-state notifications via rAF.
  - getRelative guards against missing uri/fsPath/workspace context.
  - EditCodeService debounces _refreshStylesAndDiffsInURI via rAF/idle callback
    per URI to avoid redundant refresh bursts.
  - Async markdown rendering centralized on a single promise chain to avoid
    interleaved/out-of-order parse results.
- Misc
  - Token-count estimate constant moved to prompt/constants so it can be shared
    with ChatHistoryCompressor.
  - Terminal tool description updated to describe the new parallel semantics
    and the need for non-interactive git flags when used in safe commands.
  - test-browser-void-quick now also runs the new terminal-output-summarizer
    and saved-tokens unit tests.
…hestration

Major refactor of the chat/ACP tool-approval pipeline.

ACP builtin agent (acpBuiltinAgent, ChatAcpHandler, ChatExecutionEngine):
- Introduce a per-session toolCallStatesById state machine
  (queued → awaiting-permission → running → succeeded/failed/skipped) plus an
  activePermissionCallId, replacing ad-hoc pendingToolCall tracking.
- Centralize approval rules through new toolApprovalPolicy /
  toolExecutionPolicy (getToolApprovalRequirement, classifyToolCall);
  read-only calls execute without permission round-trips, and MCP/dynamic
  tools respect the new mcpAutoApprove flag.
- Make approval, rejection, and skip async, addressed by tool call id
  (approveToolCall / rejectToolCall / skipToolCall on the execution engine),
  so simultaneous or late-arriving parallel approvals no longer race against
  the wrong request.
- _closeCancelledToolCalls guarantees every batched tool call settles exactly
  once with a single tool result; unfinalized calls are failed and a
  "Tool call was cancelled before completion." message is recorded.

Chat thread service (chatThreadService.ts):
- Remove `_advancePendingToolCall` and `_editToolMessageById`; replace
  `running_now` patching with `_replaceRunningToolMessageById`.
- makeLatestToolRequest helpers thread validateParams for builtin tools and
  delegate the user decision to the execution engine. Recovery migration
  (migrateInvalidBuiltinToolRequests) fails-closed invalid saved builtin
  approvals while preserving valid delete / dynamic requests.
- Stricter state typing (ThreadStreamState / ThreadType, removed `any` casts),
  including `setThreadState` accepting `Partial<ThreadType['state']>` and the
  access object exposing properly typed helpers to ChatAcpHandler.

Chat UI (SidebarChatTools.tsx):
- Approval controls now consult shouldRenderToolRequestApprovalControls and
  getToolApprovalRequirement so only tools that actually need user approval
  show accept/reject/skip buttons; toolName widened to `string` to support
  MCP tools.

LLM sending (sendLLMMessage.impl.ts, sendLLMMessageTypes.ts):
- New helpers providerHttpErrorMetadata / providerHttpErrorMessage redact
  sensitive headers, surface X-Request-ID and Retry-After, and distinguish
  body-absent vs body-present 4xx/5xx errors.
- Retries now cover 429 (rate limit) using Retry-After, while non-429
  errors short-circuit.
- New preflightOpenAICompatibleRequest + prepareOpenAICompatibleRequest
  validate tool definitions, parses assistant tool_call arguments, and
  compact only complete assistant+tool groups when the serialized payload
  exceeds the hard byte limit, keeping every tool definition available.

Misc:
- voidSettingsService: backfill autoApprove.delete for upgrading users.
- toolsServiceTypes: drop the now unused approvalTypeOfToolName export.
- AcpHostCallbacksService / AcpInternalExtMethodService: small wiring
  updates to surface approvalRequired through extMethod.
- Tests: split acpBuiltinAgent.test.ts into toolTurn/loopError suites,
  added coverage for the new approval state machine, HTTP error metadata,
  preflight, and migration; package.json test-browser-void-quick now
  references the split suites.
Introduce a pure, platform-agnostic terminal output summary pipeline:

- terminalOutputSummaryTypes.ts: shared typed contracts (profiles,
  summary blocks, evidence, adaptive decision) with no `any` and no
  fabricated values; count facts are `undefined` when unparseable.
- terminalOutputClassifier.ts: classifies normalized raw output into
  `test`, `build-diagnostics`, `package-manager`, `search-listing`,
  `version-control`, `logs`, or `generic` using command + content
  markers. Confidence stays `low` when only a command marker matches,
  and repeated weak content cannot inflate it; ambiguous ties fall
  back to `generic`. Negative patterns filter out paths, source code,
  and media files that would otherwise false-positive as diagnostics.
- terminalOutputSummaryPolicy.ts: pure adaptive trigger policy that
  chooses between `pass-through`, `verbose`, and `hard-limit` based
  on verbose evidence (repeat-noise, progress density, blank/churn,
  native summary), absolute+fractional savings thresholds, and
  survival of mandatory signals in the rendered candidate.
- Unit tests for both modules: profile selection across pytest/jest/
  go/cargo/tsc/eslint/npm/pip/rg/git/kubectl, false-positive guards,
  savings threshold edges, non-finite ratio safety, hard-limit
  delegation, and determinism on large inputs.

Update sendLLMMessage streaming to retry when the provider reports
`finish_reason=length` or timeout while a tool call is truncated or
incomplete. Previously retries only fired when no tool call had been
emitted; `toolCallCount` and `hasIncompleteToolCall` are now tracked
through both retry paths so partial tool calls are retried alongside
partial text. Reasoning-only truncations (no text, no tool call)
continue to be skipped. Diagnostic messages now include
`tool_calls=N`.
Introduce a pluggable profile adapter system for terminal output summarization
under src/vs/platform/void/common/terminalOutputProfiles/. The new registry
selects the best matching adapter per command family and falls back to a generic
adapter, replacing the previous ad-hoc classifier-to-block pipeline with a
deterministic, evidence-backed summary model.

What's new
----------
* terminalOutputProfiles/
  - terminalOutputProfileAdapter.ts: TerminalOutputProfileAdapter interface
    (match + extract) with confidence, evidenceSpecificity and evidenceRanges.
  - terminalOutputAdapterRegistry.ts: selectTerminalOutputAdapter() picks the
    most specific matching adapter or the provided generic fallback.
  - index.ts: public entry points summarizeTestOutput(),
    summarizeBuildOutput(), summarizePackageManagerOutput(),
    summarizeSearchListingOutput(), summarizeVersionControlOutput() plus the
    full adapter surface re-exported.
  - testAdapters.ts: jest-like, pytest, cargo test, go test + generic.
  - buildAdapters.ts: typescript/eslint, rustc + generic.
  - packageManagerAdapters.ts: npm/pnpm/yarn + generic.
  - searchListingAdapters.ts: rg/grep, cat, find/ls/tree + generic.
  - versionControlAdapters.ts: git status/diff/log/mutation + generic.

* terminalOutputSummaryModel.ts: pure helpers (terminalOutputLines,
  sourceRange, normalizeSourceRanges) plus createTerminalOutputSummary(),
  which deterministically normalizes all evidence (native summaries, statuses,
  counts, durations, diagnostics, aggregates, samples) and derives the block
  list and protected ranges without inventing any facts.

Type refactor in terminalOutputSummaryTypes.ts
----------------------------------------------
* Replace loose CountFact.name with discriminated CountFactKind + CountFactScope
  unions so every count is machine-classifiable (e.g. passed/failed/xfailed,
  insertions/deletions, vulnerabilities, matches, commits).
* Introduce VerbatimEvidence and inherit NativeSummaryEvidence, StatusEvidence,
  DurationEvidence from it; every evidence carries sourceRange + confidence.
* Add TerminalProcessStatus, SummarySeverity, DiagnosticKind and reshape
  DiagnosticBlock around identity/verbatim/contextRange instead of free-form
  severity/file/line/column/code fields.
* Add SummaryAggregate (exact-line vs adapter-signature), RepresentativeSample,
  TerminalOutputLine, AggregateKind.
* Extend SummaryBlockKind with 'failure' and 'diff'.
* Drop deprecated fields: nativeSummaryLines, statusLines, verbose
  SummaryPipelineOptions comments; replace with normalized typed collections
  on TerminalOutputSummary and a new TerminalOutputSummaryInput.

Tests
-----
* Add unit suites for every adapter family and for the new summary model.
* Update terminalOutputClassifier.test.ts to assert on the new
  evidence.nativeSummaries / evidence.statuses arrays.
* Wire all new suites into the test-browser-void-quick script in package.json.

Why
---
* Adapters own their parsing, so the classifier no longer needs to know about
  every command family; new commands are added by registering an adapter.
* Every summary field is now traceable to a verbatim source range, which lets
  the renderer trust and protect evidence during budget reduction instead of
  paraphrasing it.
* Discriminated count kinds make downstream consumers (rendering, metrics,
  telemetry) type-safe without stringly-typed comparisons.
…ctron 43 upgrade

Add chat model fallback rotation, a v2 deterministic terminal output
summarization pipeline, and upgrade the platform to Electron 43 / Node 22.

- Chat model fallback rotation: new chatModelFallback settings (disabled by
  default) with error policy, fallback model list, cooldowns (honors
  Retry-After), maxRotationAttempts and return-to-primary; implemented for
  both regular Chat (ChatExecutionEngine) and the built-in ACP agent
  (model_status session updates, actualModel metadata, rotation retry);
  inline ModelTransitionIndicator / "Served by" UI and FallbackModelsEditor
  in Settings; new fallback metrics taxonomy.
- Provider errors: ProviderHttpErrorMetadata carries isNetworkError across
  IPC; UND_ERR_SOCKET / ECONNRESET-class failures (even with HTTP 200) are
  retryable and fallback-eligible; onError forwards providerHttp.
- Terminal output summarization v2: summary pipeline / renderer / policy /
  signal extractor / reducer plus log adapters (incl. docker build); footer
  v2 TRUNCATION_META (profile, adapter, confidence, summaryReason,
  rawLogAvailable, omitted counts, protectedSignals); truthful footers when
  the raw-log write fails, forged-footer detection, aggregate/progress
  compression; summary indicator shown in the chat UI.
- OpenAI-compatible providers: auto-detect reasoning_content / reasoning
  stream deltas for unconfigured providers, parse inline think tags, send
  reasoning_effort for effort-slider models; preflight now removes invalid,
  duplicate or orphaned tool history instead of blocking the request
  (removedInvalidToolCallCount diagnostics); deeply redacted HTTP body debug
  logging.
- ACP: live token usage via a new 'usage' chunk and usage_update session
  events; skip/cancel permission decisions now select skip_once /
  cancel_once (skip continues the prompt, cancel ends it with stopReason
  'cancelled'); richer tool failure errorText.
- Toolchain: Node 20.18.2 -> 22.23.2, Electron 34.3.2 -> 43.0.0 (checksums,
  cgmanifest), gulp 4 -> 5 (encoding:false for binary assets, extensions
  srcBase fallback, local untar via tar/gulp-vinyl-zip); updated deps
  (@parcel/watcher 2.6, ripgrep 1.18, node-pty 1.1.0, @XTerm beta.143,
  React 19.2.8, openai 4.104, MCP SDK 1.30); drop the obsolete Linux cppgc
  16K-page workaround; optional dock menu chaining; memory-eviction crash
  reason.
- Misc: read_file validates startLine against the file's line count;
  run_command waits for terminal processReady; React chat state updates are
  coalesced into a single rAF flush; new and updated tests wired into
  test-browser-void-quick.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant