Repository navigation
Releases
Releases · summit4you/aih
v0.8.15
[0.8.15] - 2026-09-20
Added
- SOCKS5 proxy for LLM requests (
cli/src/index.ts): LLM API calls now route through a SOCKS5 tunnel whenproxy.socks5/AIH_SOCKS5_PROXYis set.buildRealLlminjects asocksFetch-basedfetchImplintoOpenAICompatibleLLM(which already accepts a caller-suppliedfetchImpl), so any provider's requests can go through a SOCKS endpoint — self-hosted networks, corporate egress, or a supported-region exit. No core changes. /socksruntime toggle (cli/src/index.ts,cli/src/tui.ts,cli/src/slash.ts): switch the LLM SOCKS5 proxy on/off without restarting. Bare/socksflips the state (on⇄off);/socks on|offsets it explicitly. AsocksOverridegates thefetchImplinjection (off forces direct even whenaih.jsonhasproxy.socks5), and the TUI status line surfaces aSOCKS on/SOCKS offindicator after the agent tag. Registered as a builtin slash head so it is recognized while busy, with completions and a palette entry.
Fixed
- Bounded network recovery in the agent loop (
core/src/agent-loop.ts): a provider that accepts the connection but never answers (silent timeouts) could make every user message spin for minutes and re-burn the whole retry budget on the next message. A cumulative, TURN-level park cap (MAX_NETWORK_PARK_WAITS, symmetric withMAX_QUOTA_WAITS) now bounds the waits; exceeding it ends the turn honestly with a dedicatednetwork_exhaustedstopReason instead of hanging. The TUI surfaces a clear "network retries exhausted" hint. - Response-header timeout at the adapter (
core/src/seams/llm-openai.ts): a provider that accepts the TCP/SOCKS connection but never returns HTTP headers would hang the fetch forever (TUI spins, noturn/end). ARESPONSE_HEADER_TIMEOUT_MSguard (default 60s,0disables) bounds the header wait and reclassifies the timeout into a message the network-retry path owns, so it folds into the extended retry budget and the turn-level cap above. - Guardian reviewer session parity + event persistence (
cli/src/index.ts): the Guardian's auxiliary review LLM now shares the main loop's conversation-stable session identity (x-opencode-sessionaffinity) across all three call sites (run/workflow/ TUIchat), so it no longer diverges onto a per-instance random id that can surface as provider-side denials. Every review result is also persisted to the session log as a model-invisibleapp/event(source: "guardian/review"), so denial/error outcomes are visible in the JSONL instead of only on the terminal.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.14
[0.8.14] - 2026-09-20
Added
- SOCKS5 proxy for
webfetch/websearch(cli/src/socks-proxy.ts,cli/src/general-tools.ts,cli/src/config.ts): outbound web tools can now route through a SOCKS5 tunnel. Configure it inaih.json/ user config / project config (later layers win):Optional{ "proxy": { "socks5": "127.0.0.1:1080" } }username/passwordfor authenticated proxies, and atimeoutMsoverride. EnvAIH_SOCKS5_PROXY=host:portwins over config. Implemented with undici's officialSocks5ProxyAgent(pure JS, no native deps) so it handles the CONNECT handshake, optional auth, and the TLS wrap for HTTPS targets — and bundles cleanly into the offline package. With no proxy configured,webfetch/websearchfall back to the direct path exactly as before.
Changed
- Auxiliary LLM calls now stream at the adapter level (
core/src/seams/llm-openai.ts,core/src/agent-loop.ts): side-calls that bypass the main loop's streaming — goal judge,best_of_njudge, MEA guardian/auditor, dream/title/branch distillation, and the compaction summary — previously emittedstream:falseand were rejected (403) by gateways that only accept streaming from a keyless client. The adapter now decides the stream decision in one place, so every such call is covered and the final text is still fully assembled. No behavior change for callers that only need the final response. - Clean-slate offline packaging (
scripts/offline-package): the packaged default config now ships no providers, no models and no proxy — a clean slate so each user configures their own endpoint after install. The build machine's localaih.json(providers, models, proxy, local endpoints) is stripped, not merged, so nothing machine-local leaks into the installer. - Fresh-install startup guidance (
cli/src/index.ts): with nothing configured,aih run/aih chatno longer fail with a cryptic "no API key" / "no model id" error. Instead the user is pointed at the setup path:or add a provider toaih connect # browse the provider catalog aih connect <id> --key <API_KEY> # save a provider + keyaih.json. Self-hosted / keyless endpoints need no key;--mockruns an offline demo. - TUI multi-select + compaction hints (
cli/src/tui.ts): the multi-select column window widens monotonically (drag right-then-down keeps the swept width), and the status area surfaces an "▲ compact soon (auto ≥ 80%)" warning.
Fixed
- node tarball silently dropped new runtime deps (
scripts/package): the runtime dep list was hardcoded (@modelcontextprotocol/sdk/string-width/zod), so a new runtime dep added to a workspace (e.g.undicifor the SOCKS5 proxy) was missing from the tarball and the staged-tree sanity check failed. The dep set is now derived dynamically from each workspace'spackage.json(matchingscripts/offline-package), so adding a dep to a workspace ships it automatically.
Docs
- 0.8.13 release page width (
docs-site/style.css): the content column was capped at 840px and left-aligned inside a ~1200px content area, leaving a large empty band on the right. The reading column is now wider and centered, so the page uses its width properly on desktop while staying responsive on mobile.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.13
[0.8.13] - 2026-09-18
Fixed
- stale todo list across sessions (
cli/src/index.ts,cli/src/serve.ts): the sidebar todo panel reads the project-level.aih/todos.json, which survived at exit and leaked the previous session's list into every NEW session. A fresh-session launch now clears the file (resume via--session/-c, in-session/restorerollback keeps it — same session scope as the P#37② snapshot). Regression-tested. - sidebar text padding walked after repaint (
cli/src/tui.ts): the todo icon prefix mixed widths — ▶ (U+25B6) is rendered one cell wide by the zh_CN CJK fonts although standard string-width counts it as 2 (emoji). The family is now corrected inWIDTH_OVERRIDES(▶ ⚠ ⚙ ↩ → 1 cell; ❓ stays 2 — it is Emoji_Presentation and renders 2 everywhere), and todo first lines carry a fixed 2-column prefix so every status aligns with its wrapped continuation lines. Added the R8-1b alignment smoke assertions. - minimize→maximize froze the UI for seconds (
cli/src/tui.ts): window animations fire resize events per intermediate size; each event invalidated every item cache (width changed) and paid a full cold re-render (~150ms at 10k items, 16ms debounce did not merge the burst). The resize handler now debounces at animation scale (160ms, 400ms legacy conhost) so a burst collapses into ONE final paint. - minimize→maximize no longer stuck to the last message (
cli/src/tui.ts): the resize handler only forced a full repaint; a pinned viewport was not re-followed (the paint-time clamp only pulls DOWN an out-of-range scrollTop). The handler now refreshes#rows/#colsFIRST, then re-follows the bottom when pinned — growing the window keeps the last message on the last line. Shrinking drifts and unpinned history browsing are unaffected. - sidebar background block crept left after minimize→maximize (
cli/src/tui.ts): the frame is now (width-1) cells wide — the panel column anchors one cell earlier and the final terminal column is never written, so the cursor never rides the DECAWM pending-wrap boundary (edge-column drift on several terminal families shortened the 4-col gutter; user-probe showed the width model itself was already correct). ?could not be typed at position 0 (cli/src/tui.ts): the help keybind swallowed the?byte; closing the dialog left the composer empty and pressing?re-opened help forever.openHelpFromKeynow replays the byte into the composer when the dialog closes (/helpand the palette do not replay). Also un-leaked a smoke mock ofprocess.stdin.onthat broke later stdin-driven tests.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.12
[0.8.12] - 2026-09-17
Fixed
- steering input swallowed at the final step (
core/src/agent-loop.ts): steering queued while the model was about to end the turn was silently dropped. The final-step drain now appends pending steering to the log and runs one more step to process the user's instruction. - compaction failures were silent no-ops (
core/src/agent-loop.ts): an empty summary left the context bloated with no diagnostic (next LLM call could 400 or hang). Empty summaries now emit[aih] compaction produced empty summary (turn=…, head=N msgs)on stderr;#compactOrSkiperrors gainturn=+trigger=autocontext. The compaction summary template now also mandates preserving USER AUTHORIZATION STATE verbatim (已获授权推送/未经允许不 commit/不修复are behavioral constraints, not work items — losing them makes the agent act without permission or redo declined work).
Changed
- model picker MRU (
cli/src/mru.ts): providers/models used most recently float to the top of the/modelpalette (deduped by provider/model, rest keep config order); recorded only on SUCCESS so failed switches don't pollute recents. - steering recall (↩ / Alt+Up) (
cli/src/tui.ts): pull the most recent NOT-yet-drained steering message back into the editor for editing/resubmission; once drained it is part of the turn and cannot be recalled. - question UX (
cli/src/tui.ts):askQuestion()forces#pinned+ scroll-to-bottom so the question text is never hidden behind the option panel while browsing history; custom free-text mode is exitable (backspace on empty buffer → back to options). - Ctrl+R fallback (
cli/src/tui.ts): secondary keybinding for steering where the primary is taken.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.11
[0.8.11] - 2026-09-15
Fixed
- question options silently dropped at the TUI boundary (
cli/src/index.ts): the agent wiring passed only(q)to theaskcallback, so LLM-suppliedoptionsnever reachedTui.askQuestionand the choice list fell back to the plain free-text input (the smoke suite exercisedTui.askQuestiondirectly, bypassing the callback, so it stayed green). The wiring now forwards(q, options)and the non-TTY stdin fallback renders the option rows too. Regression: the full real chain (GeneralToolsquestionexecute →askcallback → TUI option rows + digit pick answer) plus a static guard on the wiring shape — fails on the pre-fix single-arg form.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.10
[0.8.10] - 2026-09-15
Fixed
- Compaction starved by shrunk provider prompt_tokens (
core/src/agent-loop.ts): a free-tier gateway (opencode zen) reported ~150K promptTokens on a conversation whose real locally-estimated size was ~190K. The old one-sided plausibility gate (promptTokens <= est*3, no lower bound) admitted 150K, pinningeffectiveContextbelow the 160K compaction trigger (0.8×200K window) while the TUI panel showed the true ~190K — auto-compaction never fired mid-turn until the local estimate grew far past the window. The wire number is now trusted only while the local estimate stays within[promptTokens/3, promptTokens*1.25](bidirectional band, same ascli/src/cost.tslastContextTokens); estimate ≫ report (stale/shrunk sample) falls back to the local estimate for the compaction decision. Regression: seeded ~90K history → huge assistant text pushes the estimate past the trigger while the gateway reports 150K on both responses → compaction must fire (fails on pre-fix code).
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.9
[0.8.9] - 2026-09-15
Fixed
- TUI keyboard: Enter deadlock after Esc in the connect-provider submenu (
cli/src/index.ts): "connect provider" in the palette previously went throughhandleLine("/connect")→void openConnectPicker()(subflow not awaited), while "switch model" awaited its subflow directly. Not awaiting caused a race:openPalette'sawait run()returned immediately,isTop("Commands")was true, the loop pushed another Commands frame on reuse (query reset), thenopenConnectPickerasynchronously pushed the Connect-provider frame — after Esc popped back, the stack was misaligned and the next Enter was routed to a stale resolve (the screen looked stuck on Commands while the server-side /connect flow unfolded asynchronously; symptom: "entering the provider submenu then Esc then Enter can no longer enter the task submenu"). Fix: "connect provider" directly usesrun: () => openConnectPicker()(same keepOnSelect subflow protocol as switch model); the custom-provider completion path addsdismissTop(); catalog-providerapplyModelfailure alsodismissTop()(if the connection was saved, the subflow ends). Regression: Q-R7b (7 assertions) connect subflow enter/esc/re-enter + completion dismiss; a real non-mock PTY (AIH_TRACE_KEYS=1) runs the enter→esc→re-enter loop cleanly on both paths — no ghost frames, no held residue. aih updateloses user config after upgrade (cli/src/update.ts): after the rename-swap,applyUpdatenow carries over app/-internal assets the tarball does not ship (.node/,.deployed-config.json, etc.) from the backup; the offline install script only deploys the bundled config whenconfig.jsondoes not exist (never overwrites existing).
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.8
[0.8.8] - 2026-09-14
Fixed
aih updatefails on Windows offline installs (EPERM: unlink node.exe): an offline install puts portable Node.js inapp\.node\, and the running AIH process is that node.exe; the old "whole-directory rename swap" tried to delete/rename the running executable, which Windows refuses (EPERM). Now, whenapp\.node\is detected, a copy-overwrite path is used — only the new payload (aih, lib/, node_modules/, package.json) is copied over the old directory,.node\and the running node are completely untouched (the old node keeps working), so no EPERM is triggered. Regular tarball installs keep the atomic rename swap.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.7
[0.8.7] - 2026-09-14
Fixed
- TUI input-history browsing falsely triggers wheel recovery (
cli/src/tui.ts): rapid ↑ presses to scroll history tripped the old "≥3 arrows within 900ms" heuristic, misjudging real keypresses as "mouse tracking lost (wheel converted to arrows)", which rolled back the input box and swallowed subsequent ↑ presses (#swallowArrows) until the 900ms window expired — visible as "can only press ↓, then nudge the wheel to continue scrolling history". Fixed with#isWheelBurst: only the last 3 arrows being same-direction with ≤80ms gaps (a terminal-forwarded wheel burst signature) triggers wheel recovery; real human keypresses (>80ms gaps or mixed directions) never false-trigger.
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md
v0.8.6
[0.8.6] - 2026-09-14
Security
- MCP parameter validation hardening (
mcp-server/src/index.ts, Round 5 F5 + Round 6 G1): action parameters are validated as legal Zod schemas before registration (coarse typeof + duck-typedshapeOf: z.object auto-unwraps, non-Zod fails fast). - Readonly-mode execution surface hardening (
cli/src/readonly-allow.ts, Round 5 F6/F7):date -s/--setandfind -ok/-okdirjoin the dangerous-substring / defensive blacklist, blocking system-time writes and interactive execution. - Env-var sanitization expansion (
cli/src/env-policy.ts, Round 5 F8): the SECRET_HINT regex adds AUTH/CRED/ACCESS patterns. - jobs.json read-modify-write race (
cli/src/jobs.ts, Round 6 G9): the load→mutate→save window of spawn/finish/cancel gains a mutex (withBoardLockSync); interleaved calls no longer lose updates.
Fixed
- MCP tool-call timeout (
mcp-server/src/index.ts, Round 6 G3): per-call 120s timeout (AIH_MCP_TOOL_TIMEOUT_MSoverridable); timer unref+clear does not hold the event loop. - MCP error serialization crash (Round 6 G2): the textResult JSON replacer handles circular refs / bigint / functions.
- jobs.json non-atomic write (Round 6 G10):
saveBoardswitches to temp+rename atomic publish. - Update staging-dir collision (
cli/src/index.ts, Round 6 G11): the staging dir gains a PID+random suffix. - Unbounded piped stdin (Round 6 G12):
aih run <input is capped at 10 MiB, erroring above the limit. - @aih/core dependency version mismatch (
cli/package.json, Round 6 G15): 0.2.0 → 0.7.2 (fixesnpm lsELSPROBLEMS).
Full changelog: https://github.com/summit4you/aih/blob/main/CHANGELOG.md