mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(cursor): add support for Cursor Agent CLI integration (#236)
* feat(cursor): add support for Cursor Agent CLI integration - Introduced new command `hapi cursor` to start Cursor Agent sessions. - Added functionality for resuming sessions and managing permission modes. - Updated documentation to include Cursor Agent usage and installation instructions. - Enhanced existing codebase to accommodate Cursor as a recognized agent flavor. - Implemented local and remote session handling for Cursor Agent. This update expands HAPI's capabilities by integrating support for the Cursor Agent, allowing users to leverage its features alongside existing agents. * Remove TODO.md file as it is no longer needed following the integration of Cursor Agent CLI support. This cleanup helps streamline project documentation and reflects the completion of the associated tasks. * feat(cursor): implement remote mode and fix --hapi-starting-mode - Consume --hapi-starting-mode in cursor command (do not forward to agent) - Implement cursorRemoteLauncher: spawn agent -p with stream-json, --trust - Add cursorEventConverter for NDJSON parsing (system/assistant/tool_call/result) - Multi-turn via --resume session_id - Update docs: cursor supports both local and remote modes Made-with: Cursor * fix: type error * fix(cursor): address PR review - model UI, sessionId metadata, duplicate flags - HappyComposer: use isClaudeFlavor for model mode (cursor has no model modes) - cursorLocalLauncher: call onSessionFound for resume so cursorSessionId in metadata - cursorCommand: do not forward parsed flags to cursorArgs (avoid duplicates) Made-with: Cursor
This commit is contained in:
@@ -18,6 +18,7 @@ Yes, HAPI is open source and free to use under the AGPL-3.0-only license.
|
||||
|
||||
- **Claude Code** (recommended)
|
||||
- **OpenAI Codex**
|
||||
- **Cursor Agent**
|
||||
- **Google Gemini**
|
||||
- **OpenCode**
|
||||
|
||||
@@ -156,6 +157,19 @@ npm install -g @anthropic-ai/claude-code
|
||||
export HAPI_CLAUDE_PATH=/path/to/claude
|
||||
```
|
||||
|
||||
### Cursor Agent not found
|
||||
|
||||
Install Cursor Agent CLI:
|
||||
```bash
|
||||
# macOS/Linux
|
||||
curl https://cursor.com/install -fsS | bash
|
||||
|
||||
# Windows (PowerShell)
|
||||
irm 'https://cursor.com/install?win32=true' | iex
|
||||
```
|
||||
|
||||
Ensure `agent` is on your PATH.
|
||||
|
||||
### How do I run diagnostics?
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user