Repository navigation
Releases: owner888/pig
Releases · owner888/pig
Release list
v0.4.7
Fixed
- Fixed Vim and interactive full-screen TUI applications in Web PTY Terminals:
- Added
COLORFGBG=15;0to the PTY environment so macOS and Linux Vim correctly recognize dark backgrounds, rendering clear white text and bright tildes instead of invisible black-on-black text. - Centralized
PtyManagerinHttpServerwith dynamic terminal-to-connection routing, ensuring active PTY processes and Vim sessions survive WebSocket reconnects rather than being killed when a connection drops. - Added container click-to-focus listeners in
WebTerminal.jsandNodeWorkbench.jsso clicking anywhere in the terminal drawer immediately focuses xterm.js input. - Initialized terminal instances with visible display before fitting so
FitAddonmeasures real pixel dimensions (colsandrows) rather than defaulting to 80x24.
- Added
v0.4.6
Changed
- Streamlined Web UI header action buttons for visual consistency:
- Renamed "账号与配额" to concise "🔑 账号" (in Chinese) and "🔑 Accounts" (in English) with dedicated key icon.
- Added clean 6px gap spacing to
.ctrl-btnbetween.nodes-btn-iconSVG and "SSH 节点" label, matching all other header buttons.
v0.4.4
Fixed
- Fixed
PHP Warning: Undefined array keyinPtyManager::input()andPtyManager::resize():- Accessing
$this->terminals[$id]?->...triggered PHP undefined array key warnings when frontend xterm.js resize listeners or lingering keystrokes arrived after a terminal session had exited and been unset. - Replaced with null-coalescing
$this->terminals[$id] ?? nullaccess to safely ignore input and resize operations on terminated or unknown terminal sessions without leaking warnings.
- Accessing
v0.4.3
Changed
- Streamlined TUI working status indicator by removing redundant
(esc to interrupt)hint:- Aligned with upstream pi's minimal
defaultWorkingMessage = "Working"and project UI minimalism principles. - Eliminates visual noise in the editor's top border: cleanly renders
⠋ Working...initially, and⠋ Working... · 16s(or· 1m15s) as time elapses.
- Aligned with upstream pi's minimal
v0.4.2
Added
- Added dynamic elapsed timer to TUI working, compaction, and branch summary status indicators:
Loader::withTimer()automatically calculates and formats elapsed duration in the top border:⠋ Working... · 16s (esc to interrupt)(or· 1m15safter 60s).- Provides clear real-time feedback that long-running operations (deep model reasoning, large codebase searches, slow network API calls, and context compactions) are actively executing rather than frozen.
- Enabled during turns (
Working...), manual/compact, tree branch summarization, and auto-compaction, while preserving retry countdowns untouched.
v0.4.1
Added
- Added automatic browser launch on in-session
/webcommand:- Running
/webor/web [port]in the interactive TUI starts the web interface and automatically opens the user's default system browser athttp://127.0.0.1:<port>. - Re-running
/webwhile the server is already running opens the browser at the existing server URL. - Background daemon and status commands (
/web start,/web stop,/web status,/web restart) operate strictly in the terminal without opening unwanted browser windows.
- Running
v0.4.0 - PTY Terminals, SSH Workbench & Multi-Session Architecture
New Features
- Interactive Local PTY Terminals & Web Terminal Drawer (
PtyProcess,PtyManager,WebTerminal.js):- Native Unix pseudo-terminal execution using PHP's
proc_openwith['pty']descriptor on macOS/Linux with zero external C-extensions. - Non-blocking I/O integrated into
Pig\Async\Loop, 16ms output micro-batching to prevent WebSocket frame storms, and slave PTY device detection (lsofon Darwin,/proc/$pid/fd/0on Linux) with window resizing viastty+SIGWINCH. - Frontend integration with
xterm.jsandFitAddonmulti-tab terminal drawer (accessible viaCtrl+\`` /Cmd+`or the top navigation terminal icon), with 200KB scrollback buffering and full support for interactive TUI tools (vim,nvim,nano,htop,tmux,less`).
- Native Unix pseudo-terminal execution using PHP's
- SSH Node Workbench & SFTP Remote File Explorer/Editor (
NodeWorkbench.js,NodeManager,NodeProfile):- Persistent node inventory in
~/.pig/agent/nodes.jsonand credentials in~/.pig/agent/nodes-secrets.json(chmod 0600). - SHA-256 host key fingerprint detection (
ssh-keyscan+ssh-keygen -lf) with verification and trust prompts. - Automatic OpenSSH
~/.ssh/confighost discovery and one-click import. - Remote interactive SSH terminal streaming via PTY (
ssh -tt) and SFTP remote directory listing, navigation, and file reading/writing (capped at 512 KiB).
- Persistent node inventory in
- Multi-Session Tab Multiplexing Architecture & Web Daemon:
- Multiplexed multi-session tabs over a single physical WebSocket connection with per-tab chat scroll areas, background streaming indicators, and state recovery on reload.
- Isolated
pig --mode rpcchild processes percwd::sessionFilewith 60s idle reaping and zero cross-session interference. - Native zero-dependency daemon management via
pig web start|stop|status|restart [-d]and in-session/web restart,/web status,/web stopcontrols.
- Telegram-style Language Packs & Client-Side i18n Engine:
- Full bilingual client-side
I18Ndictionary with 101 symmetric keys (defaulting tozh-CN), instant zero-refresh language modal (#lang-btn), Telegram-style JSON import/export, and$pig->registerLocale()onExtensionApiwith/api/localesaggregation.
- Full bilingual client-side
Added
- Added
externalEditorsetting and intelligent fallback forCtrl+Gexternal prompt editing (aligned with upstream pigetExternalEditorCommand): precedence followssettings.externalEditor>$VISUAL>$EDITOR> platform fallback (notepadon Windows;nano/vim/vion POSIX). - Added
ExtensionApiPhase 2 parity: EventBus, lifecycle hooks, tool loadout, context/session control, UI capabilities, and cross-handler state sharing via$ctx->set(),$ctx->get(), and$ctx->has(). - Added provider traffic hooks (
before_provider_request,after_provider_response,before_retry) and dynamic provider registration (registerProvider), cleanly decoupling Google Antigravity into a standalone pure PHP extension. - Added session title telemetry and speed meter integration in
FooterComponent(pwd (branch) • <session-name>),session_infoJSONL persistence, and/nameslash command. - Added model selection persistence control: session switches default to
persistAsDefault: false(matching upstream pi), andCtrl+S(app.models.save) explicitly saves the chosen model as global default.
Changed
- Enhanced
SessionManager::open()andSessionManager::describe()to use streaming line-by-line reading (fopen+fgets), reducing memory consumption on 70MB+ session files from >150MB to <10MB and preventing 128MB OOM crashes. - Optimized session tree backtrace (
SessionManager::pathTo()) by replacing O(N)array_unshiftwith O(1) append + singlearray_reverse, speeding up 28,000-node tree traversal from 718ms to 3ms (230x speedup). - Optimized
SessionManager::latestPathFor()with lightweight first-line sniffing, reducingpig -csession resume latency from 2275ms to 489ms. - Optimized LRU cache eviction in
Width::visible()from O(N)array_shiftto O(1) hash eviction (unset), speeding up cache updates by 5.0x with capacity expanded to 2048. - Aligned
TextWrap::tokenize()with upstream pi'scjkBreakRegexfor clean hyphenation and natural wrapping in mixed Chinese/English sentences. - Updated
Chars::isPunctuation()with Unicode punctuation matching (^[\p{P}\p{S}]\z/u) to recognize CJK punctuation as word boundaries forCtrl+W/Alt+Backspace.
Fixed
- Fixed background fibers and subprocesses continuing to run on
/quitwhile working:AgentSession::dispose()now cleanly aborts in-flight LLM streams, retries, compactions, and bash commands. - Fixed Broken pipe and SSL zero-write loops on non-blocking OpenSSL transport failures: expanded
Retry::WORDSregex to catch native SSL, handshake, and connection errors, and encapsulatedfwrite/freadin warning-capturing error handlers. - Fixed background process (
&) pipe inheritance deadlock: added process state polling inRun::wait()to exit gracefully once the parent shell process terminates. - Fixed silent LLM turn failures in Web mode: serialized
lastErrorinAgentEndEventand enhanced client-side error rendering with automatic input restoration. - Fixed long quota reset errors displaying raw provider text: normalized to pi-style action guidance messages.
- Fixed top-level symbol redeclaration crashes on
/reloadand guarded extensions with tokenized symbol checks.
v0.3.65
Added
- Added
externalEditorsetting and intelligent fallback forCtrl+Gexternal prompt editing (aligned with upstream pigetExternalEditorCommand):- Added
Settings::externalEditor()andsetExternalEditor(?string)to support"externalEditor": "vim"(or"nvim","code --wait") in~/.pig/agent/settings.json. - Resolution precedence:
settings.externalEditor>$VISUAL>$EDITOR> platform fallback (notepadon Windows;nano/vim/vion POSIX). - Eliminates the previous hard failure
Warning: No editor configured. Set $VISUAL or $EDITOR.when environment variables were not exported.
- Added
v0.3.64
New Features
- Ported Interactive Local PTY Terminals, SSH Node Workbench, and SFTP File Explorer (aligned with
youweichen/pi-web-ui/omp-web-ui):- Local PTY Terminal Engine (
PtyProcess&PtyManager): Native pseudo-terminal execution using PHP'sproc_openwith['pty']descriptor on macOS/Linux with zero external C-extensions. Non-blocking I/O integrated intoPig\Async\Loop, 16ms output micro-batching to prevent WebSocket frame storms, slave PTY device detection with window resizing viastty+SIGWINCH, and 200KB scrollback buffering. - SSH Node Workbench (
NodeProfile&NodeManager): Persistent inventory in~/.pig/agent/nodes.jsonand credentials in~/.pig/agent/nodes-secrets.json(chmod 0600), SHA-256 host key fingerprint detection (ssh-keyscan+ssh-keygen -lf) with verification and trust prompts, OpenSSH~/.ssh/configdiscovery, remote PTY terminal streaming (ssh -tt), and SFTP remote directory listing/reading/writing (capped at 512 KiB). - Web UI Integration: Embedded
xterm.jsandFitAddonmulti-tab terminal drawer (WebTerminal.js),#nodes-btnin header and mobile drawer, full-featuredNodeWorkbench.jsmodal with remote terminal tabs and SFTP file explorer/editor, and bilingual i18n support.
- Local PTY Terminal Engine (
v0.3.63
Fixed
- Fixed startup model resolution ignoring extension-provided default providers:
CodingAgent::session()resolved the startup model before loading extensions, so whensettings.jsonconfigured an extension provider asdefaultProvider(e.g.antigravity), resolution failed to find the unregistered provider and fell back to direct built-ins (e.g.google/gemini-3.8-flash). Extensions and custom providers are now loaded before model resolution runs.