Commit Graph
100 Commits
Author SHA1 Message Date
weishu bfc9ad9f0c docs: for localhost access 2026-03-16 08:54:04 +08:00
weishu ce5edc42e1 Add support for claude 1M context. close #291 2026-03-16 08:51:40 +08:00
weishu ad196bd749 Write necessary tests only. 2026-03-11 12:13:53 +08:00
weishu b4b73d4405 Release version 0.16.1 2026-03-08 16:07:36 +08:00
weishu 4f06cdfd7c Support codex plan tool 2026-03-08 12:11:19 +08:00
weishu 5f8f33c998 Fix web build 2026-03-08 11:41:17 +08:00
weishu d0404d9a4f Add support for PR live review 2026-03-08 11:13:56 +08:00
weishu b2c29a8cbd Add OpenAI new models 2026-03-08 10:53:26 +08:00
weishu 4982e2dbc0 perfer GPT-5.4 2026-03-06 20:26:18 +08:00
weishu fff474ccd7 Add project skills for codex, close #241 2026-03-06 11:01:29 +08:00
weishu 5ceab49630 Release version 0.16.0 2026-03-03 10:36:22 +08:00
weishu 72a23fc761 build baseline variant for linux x64. 2026-03-02 13:11:06 +08:00
weishu 91d03e481f docs: add npm registry recommendation for installation
Update installation guides to specify the official npm registry
and add a recommendation to use it for global installs, as some
mirrors may not sync platform packages in time.
2026-03-02 12:00:19 +08:00
weishu 673e0c8aec refactor(cli): extract platform validation and error reporting from binary launcher
Refactor platform detection and error reporting logic into dedicated,
testable functions. This improves code organization and enables better
error handling for unsupported platforms and missing platform packages.

- Add SUPPORTED_PLATFORMS constant with platform labels
- Extract getPlatformKey() utility function
- Extract isSupportedPlatform() validation function
- Extract reportUnsupportedPlatform() error reporting function
- Extract reportMissingPlatformPackage() error reporting function
- Update main() to use new functions for clearer error handling
2026-03-02 11:58:08 +08:00
weishu 9c2bdfb1ae refactor(cli): extract platform validation and error reporting functions
Extract platform detection and error reporting logic into reusable functions
to improve testability and reduce code duplication in the binary launcher.
Adds comprehensive test coverage for platform validation and error messages.
2026-03-02 11:57:41 +08:00
weishu 76f6196e2b Add Telegram group 2026-03-01 11:10:14 +08:00
weishu 2bdae8fe2d Release version 0.15.4 2026-03-01 11:05:36 +08:00
weishu a74dcc9477 Release version 0.15.3 2026-02-25 17:38:32 +08:00
weishu c8682047bf fix(cli): gemini hook settings schema (#173) 2026-02-14 15:46:34 +08:00
weishu eb8e749946 Release version 0.15.2 2026-02-11 10:25:00 +08:00
weishu 857f625ce3 docs: Self-signed certificates 2026-02-07 11:41:43 +08:00
weishu 93d4028d83 fix(web): improve git status unavailable handling in files view 2026-02-06 21:04:27 +08:00
weishu fb9abc18d4 feat: Add directory tree tab to session files 2026-02-06 20:18:46 +08:00
weishu dc7472f1d0 ci(web): enable VITE_REQUIRE_HUB_URL for pages build 2026-02-06 17:04:00 +08:00
weishu cc9b9279bd fix(web): require hub URL without clearing input 2026-02-06 17:03:46 +08:00
weishu 4242c508c1 docs: update Cloudflare Tunnel section and add relay TCP configuration tip
- Remove Quick Tunnel (TryCloudflare) documentation as it doesn't support SSE which HAPI uses for real-time updates
- Add warning note explaining the limitation with link to Cloudflare docs
- Keep only Named Tunnel as the recommended approach
- Add tip about HAPI_RELAY_FORCE_TCP environment variable for users experiencing connectivity issues
2026-02-04 10:28:08 +08:00
weishu cb693c6c56 docs: add CONTRIBUTING.md with contributor guidelines
Add comprehensive contributor guidelines including code of conduct,
AI-generated code policy (GPT-5.2-codex only), PR best practices
(no mega PRs), bug report/feature request procedures, and getting
started instructions.
2026-02-03 19:57:14 +08:00
weishu 674133d8c7 Release version 0.15.1 2026-02-03 13:37:13 +08:00
weishu 2735421e3f remove unsupported builtin commands for codex 2026-02-02 12:25:15 +08:00
weishu 91529c7592 fix duplicate pr review 2026-02-02 11:23:08 +08:00
weishu 5b27f6b41e feat(web): Add reconnecting feedback when SSE connection is lost (#125)
- Add ReconnectingBanner component to show "Reconnecting..." status
- Track SSE connection state in App.tsx with onDisconnect handler
- Add onBlocked callback to useSendMessage for handling blocked send attempts
- Provide haptic feedback when send is blocked due to no API or session
- Show toast notification when message cannot be sent due to server disconnection
- Add translation keys for reconnecting message and send blocked feedback in en/zh-CN

close #125
2026-02-01 19:40:43 +08:00
weishu 8dfc8749eb fix schema url 2026-01-31 11:06:39 +08:00
weishu effe033c4f docs: unify ENV and settings.json configuration documentation (#113)
- Add settings.json column to environment variables table with key name mappings
- Document missing ENV variables: TELEGRAM_BOT_TOKEN, TELEGRAM_NOTIFICATION,
  HAPI_RELAY_FORCE_TCP, VAPID_SUBJECT
- Add settings.json example with configuration priority explanation
- Create JSON Schema file for settings.json validation and editor autocompletion
  with all fields, descriptions, and ENV variable references

clsoe #113
2026-01-31 11:01:59 +08:00
weishu c5190b4079 refactor: extract local launcher logic into shared BaseLocalLauncher class 2026-01-29 16:45:44 +08:00
weishu 308249abdb fix(web): improve font scale compatibility and defaults 2026-01-29 16:33:30 +08:00
weishu 0ceda16160 refactor: extract access type definitions into shared module 2026-01-29 15:54:59 +08:00
weishu b7c06db327 refactor: extract agent flavor utility functions into shared module 2026-01-29 15:41:19 +08:00
weishu cdf8226a9d refactor: extract tool input utility functions into shared module
Move getInputString, getInputStringAny, and truncate functions from
individual ToolCard components into a dedicated toolInputUtils module
to eliminate duplication across PermissionFooter, ToolCard, and
knownTools components.
2026-01-29 14:37:06 +08:00
weishu 19ba69c6e4 Release version 0.15.0 2026-01-29 10:57:02 +08:00
weishu 7e0b139d24 feat: add change_title MCP tool support to OpenCode 2026-01-29 10:53:15 +08:00
weishu 70b5c22c8f feat: support opencode 2026-01-29 10:34:57 +08:00
weishu dbc5cb9f5f Release version 0.14.0 2026-01-27 21:00:17 +08:00
weishu 78fa9e7e4b docs: expand AGENTS.md with architecture, repo layout, and patterns guide 2026-01-27 20:54:15 +08:00
weishu aef4da9ea9 docs: update cli, hub, and web README files with new features and configuration
- cli/README.md: Remove non-existent runner commands, add codex resume and worktree config
- hub/README.md: Document auto-generated CLI_API_TOKEN, add session/machines/events endpoints and push notifications
- web/README.md: Add settings and terminal routes, terminal and voice assistant sections
- docs/guide: Fix broken anchor link and add terminal FAQ entry
- AGENTS.md: Add new source directory references
2026-01-27 20:46:39 +08:00
weishu 1d56a7cf34 docs: update why-hapi guide with accurate architecture and encryption details
Corrects outdated information about HAPI's decentralized architecture compared
to Happy's centralized approach. Updates user model, encryption strategy,
and deployment details to reflect current design. Clarifies that HAPI supports
both self-hosted and relay modes with proper security implications.
2026-01-27 20:27:53 +08:00
weishu b4bf3ca1e0 remove unused claude.md 2026-01-27 19:54:48 +08:00
weishu 37e10a831b feat: rename server package to hub
Rename the `server/` directory to `hub/` and update all references
across CLI, docs, web, and workspace configuration.
2026-01-27 19:51:21 +08:00
weishu 10fe9f0cd9 Release version 0.13.0 2026-01-27 16:31:49 +08:00
weishu 1b22fe0f82 feat: add CLI-server protocol version mismatch detection
- 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
2026-01-27 16:28:52 +08:00
weishu 87c79c3b94 feat: add session resume capability with automatic continuation
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
2026-01-27 14:44:53 +08:00
weishu 7a8f1c3e87 feat: add compact_boundary event support in web UI
https://github.com/tiann/hapi/issues/108#issuecomment-3799439152
2026-01-27 10:04:01 +08:00
weishu b63089f3f9 fix test 2026-01-26 23:04:28 +08:00
weishu 83f07c199d feat: support codex collaboration_modes 2026-01-26 22:48:02 +08:00
weishu 3a1379dc01 feat: new codex remote mode 2026-01-26 22:22:32 +08:00
weishu 6acde5a9b9 Release version 0.12.1 2026-01-26 18:38:53 +08:00
weishu 40c232ef8b fix: handle option highlighting in request_user_input component
- Trim selected value to match option labels during comparison
- Parse tool.result as JSON when loaded from history, as it's stored as string
2026-01-26 14:08:35 +08:00
weishu ae9650ca7c feat: add support for Codex's request_user_input tool
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
2026-01-26 11:58:36 +08:00
weishu 8137ce4f23 feat: add microcompact_boundary event handling in web UI
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
2026-01-26 10:30:27 +08:00
weishu e53abfb840 refactor: consolidate permission handler auto-approval logic into base class
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.
2026-01-23 16:04:37 +08:00
weishu c78ba1da1a refactor: consolidate hook settings generation into shared common module 2026-01-23 16:04:37 +08:00
weishu 6567f22978 refactor: remove passthrough() from zod schemas and make validation explicit
- 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
2026-01-23 16:04:37 +08:00
weishu 6f8f44a314 refactor: move attachment metadata schema to shared protocol package 2026-01-23 16:04:37 +08:00
weishu 78f56ad0f7 refactor: migrate socket types and payloads to shared protocol package
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.
2026-01-23 16:04:37 +08:00
weishu 9922588c6f refactor: consolidate utility functions into shared package
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.
2026-01-23 16:04:37 +08:00
weishu a41d6aa662 feat: add --model parameter support to command handlers
Pass model selection through command pipeline to enable model switching during runtime

close #83, close #64
2026-01-23 11:55:40 +08:00
weishu e130dfd24b feat: add model selection for AI agents (claude, codex, gemini)
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
2026-01-23 11:55:29 +08:00
weishu 29551478cc feat: add image paste functionality to composer
Implements paste event handler that automatically adds pasted images as attachments
to the composer. Adds Windows x64 binary support to dependencies.
2026-01-23 11:42:12 +08:00
weishu 0ea5b5f8f6 docs: add background service deployment section with nohup, pm2, launchd, and systemd examples 2026-01-22 20:43:16 +08:00
weishu cd6cbe2686 docs: add Architecture section explaining HAPI components and workflows 2026-01-22 20:37:48 +08:00
weishu 4852362e3c Release version 0.12.0 2026-01-22 20:33:11 +08:00
weishu 442f6765b3 fix: prevent Gemini orphan processes when switching modes
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.
2026-01-22 20:17:26 +08:00
weishu 2c1179baf7 feat: gemini local/remote mode 2026-01-22 17:07:54 +08:00
weishu e36759115c feat: improve ACP stability and UX with initialization retry and error handling
- 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
2026-01-22 11:53:17 +08:00
weishu ca63984f7e Release version 0.11.1 2026-01-21 20:11:06 +08:00
weishu 8793362b5f docs: update installation guide and fix environment variable references (#85)
- 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
2026-01-21 20:08:10 +08:00
weishu 6a498ec251 feat: redesign voice assistant icon with sound wave visualization 2026-01-21 19:33:59 +08:00
weishu 26f6249fef fix: reposition ReactQueryDevtools button to middle-right
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.
2026-01-20 10:28:13 +08:00
weishu 15d550d39a feat: add voice language selection in settings
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.
2026-01-20 00:57:01 +08:00
weishu 7a5946731d feat: add settings page with language dropdown 2026-01-19 21:33:22 +08:00
weishu 55dbfa397b Release version 0.11.0 2026-01-19 19:17:26 +08:00
weishu 8a89d23e1b fix: properly clean up voice session resources on disconnect
- 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
2026-01-19 19:14:46 +08:00
weishu a928e82db2 Add error hint 2026-01-19 19:03:01 +08:00
weishu e9db67e18b docs: add voice assistant documentation 2026-01-19 18:48:13 +08:00
weishu 8f5b773b23 feat: voice assistant 2026-01-19 18:16:57 +08:00
weishu 53fff54c84 Release version 0.10.0 2026-01-19 13:07:25 +08:00
weishu 9e335fa305 refactor: rename configuration variables for clarity
Standardize naming across CLI and server components:
- CLI: serverUrl → apiUrl, HAPI_SERVER_URL → HAPI_API_URL
- Server: webapp* → listen*, miniAppUrl → publicUrl, WEBAPP_* → HAPI_LISTEN_*, WEBAPP_URL → HAPI_PUBLIC_URL
- Rename serverUrlInit.ts → apiUrlInit.ts with updated logic for backward compatibility
- Update all imports, function calls, and documentation accordingly
2026-01-19 12:57:37 +08:00
weishu 0228146b99 refactor: rename daemon to runner throughout codebase 2026-01-19 11:12:48 +08:00
weishu ccdcb3d75d feat: add attachment support for Codex and Gemini agents
close #84
2026-01-18 20:30:09 +08:00
weishu 662ed952a3 Release version 0.9.2 2026-01-18 12:34:18 +08:00
weishu f00c290204 fix: add postinstall script to set bin/hapi.cjs executable permission (#78)
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.
2026-01-18 12:27:43 +08:00
weishu b93533b381 refactor: extract isBunCompiled to separate utils module 2026-01-18 12:19:13 +08:00
weishu 0d80e9245d Release version 0.9.0 2026-01-17 20:08:07 +08:00
weishu 3f465cd47d fix: escape newlines in shell arguments on Windows
close #70
2026-01-17 19:59:59 +08:00
weishu c44eae0b17 fix: use --add-dir flag for granting Claude read access to uploads 2026-01-17 19:38:12 +08:00
weishu 53e4de6684 feat: add file upload support 2026-01-17 19:38:12 +08:00
weishu 940d7b8233 feat(web): add turn-duration event display 2026-01-17 15:00:04 +08:00
weishu f33d142446 fix: send session-alive signal immediately on socket connect to prevent initial offline flicker 2026-01-15 22:21:03 +08:00
weishuandGitHub 9d2cbd949e Add demo section to README
Added demo section with a link to the demo.
2026-01-14 14:54:20 +08:00
weishu f11db23d9e Release version 0.8.2 2026-01-14 12:34:28 +08:00
weishu 0163eb372d fix: set default TUNWG_PATH and support ~ in HAPI_HOME
Extract getHapiHome() helper to properly expand ~ prefix in HAPI_HOME
env var. Set TUNWG_PATH default to $HAPI_HOME/tunwg when not specified.
2026-01-14 12:26:00 +08:00