- Define PROTOCOL_VERSION constant in shared/src/version.ts
- Server sets X-Hapi-Protocol-Version header on /cli/* responses
- Server includes protocolVersion in /health endpoint
- CLI extracts serverProtocolVersion from API responses
- CLI shows version mismatch hints in both directions
- Add tests for error utilities and version extraction
close#104
Add ability to resume inactive sessions and automatically continue with new
session ID. Includes message merging for preserving conversation history,
UI improvements to allow sending during inactive state, and database schema
migration. close#87
Implement full support for the request_user_input tool with both Web UI and CLI
components. This includes:
- New view and footer components for request_user_input tool UI
- Tool registration in knownTools and view registries
- Nested answer format support (Record<string, { answers: string[] }>)
- Backward compatibility with flat answer format (Record<string, string[]>)
- Permission handler updates for CLI request_user_input acceptance
- Type definitions and schema updates across shared/cli/server/web packages
- Translation strings for request_user_input UI elements
- Conditional footer rendering in ToolCard for question tools
Adds support for Claude Code's microcompact_boundary system message type to display context microcompaction events with token savings information in the chat UI. Shows a package icon with formatted token count (e.g., "Context compacted (saved 32K tokens)"). close#108
Extract auto-approval decision resolution and common RPC handler registration into BasePermissionHandler to eliminate duplication across Claude, Codex, and Gemini implementations. Make handlePermissionResponse async throughout the hierarchy to properly support awaitable permission completions.
- Replace .passthrough() with explicit field definitions across all schemas
- Add missing optional fields (homeDir, happyHomeDir, happyLibDir, displayName)
- Refactor RawJSONLinesSchema to use structured base schema for clarity
- Improve schema validation strictness and type safety
- Update Machine interface to reflect explicit fields instead of index signature
Move socket-related type definitions and schemas from cli and server packages
into a shared @hapi/protocol package for centralized type management. This
includes migrating Update types, socket event interfaces (ClientToServerEvents,
ServerToClientEvents), and terminal payload schemas. Add strongly-typed socket
handlers that reference the protocol package instead of duplicating definitions.
Move duplicate isObject, asString, asNumber, and safeStringify functions from multiple modules into a centralized shared/src/utils.ts module and update imports across cli, server, and web packages. This eliminates code duplication and improves maintainability.
Add a new ModelSelector component that allows users to choose specific model variants for different AI agents. This includes:
- ModelSelector UI component with agent-specific model options
- Model parameter propagation through API, RPC, and spawning layers
- Support for auto model selection (default behavior)
- Localization strings for English and Chinese
- Type definitions for model options per agent
Kill entire process tree instead of just the direct child to prevent
orphans when Gemini CLI ignores SIGTERM. Implements killProcessTree that
collects all PIDs synchronously, signals children first, then waits for
termination with auto-escalation to SIGKILL after 2 seconds. Also removes
Node.js signal option from spawn since built-in abort handling doesn't
handle grandchildren.
- AcpStdioTransport: Fix stdout JSON validation to filter non-object JSON (numbers, strings, booleans) that could break protocol
- AcpStdioTransport: Add request timeout with 2-minute default, properly cleared on settle, using unref() for graceful shutdown
- AcpStdioTransport: Add stderr error parsing for rate limit (429), model not found (404), auth errors, quota exceeded
- AcpSdkBackend: Add initialization retry mechanism using withRetry() for initialize and session/new (3 attempts, 1-5s backoff)
- AcpSdkBackend: Add waitForResponseComplete() for safe session swaps and preventing race conditions
- AcpSdkBackend: Add onStderrError() handler and processingMessage getter for error reporting
- AcpSdkBackend: Use Infinity timeout for session/prompt to support long-running tasks
- Replace outdated WEBAPP_URL with HAPI_PUBLIC_URL in server and web READMEs
- Add CLI version verification steps in prerequisites section
- Enhance Cloudflare Tunnel documentation with quick and named tunnel examples
- Add --protocol http2 recommendation for tunnel stability
- Include pm2 alternative for runner process management
- Add Telegram Mini App troubleshooting notes and verification steps
The button was blocking UI elements at the bottom-right corner. This CSS
override moves it to the middle-right position while keeping the same
horizontal placement, providing better UI visibility and interaction.
Add support for users to select voice language preference, which is passed through to ElevenLabs agents via platform settings overrides. Includes new language mapping utilities, UI controls in settings page, and updated voice session initialization.
- Add resetRealtimeSessionState() function to reset session state
- Store and stop media stream from permission request to prevent resource leak
- Call reset function when voice session disconnects
This fixes an issue where npx @twsxtd/hapi fails because npm doesn't create
bin symlinks for packages with optionalDependencies. The postinstall script
ensures bin/hapi.cjs has executable permission.