-
Notifications
You must be signed in to change notification settings - Fork 87
feat: add cursor-agent integration (curask/curpend/curping) #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
bluewings1211
wants to merge
267
commits into
bfly123:main
from
bluewings1211:feat/cursor-agent-integration
Closed
feat: add cursor-agent integration (curask/curpend/curping) #57
bluewings1211
wants to merge
267
commits into
bfly123:main
from
bluewings1211:feat/cursor-agent-integration
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add /cask-w and /gask-w to the fast path triggers in CLAUDE.md config, so Claude will immediately call bash without going through skill system. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Optimizations: - Move imports after startup signal for faster first output - Add lazy_init parameter to CodexCommunicator and GeminiCommunicator - Defer log reader creation and health check until actually needed - Skip Windows encoding setup on Linux Performance improvement: - Startup to first output: 38-40ms -> 24-27ms (35-40% faster) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove timeout=0 parameter from ask_sync calls - Use lazy imports for better startup performance - Simplify error output format - Use raise SystemExit instead of sys.exit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change behavior to STOP immediately after sending to Codex/Gemini instead of continuing with other work in background. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- cask-w/gask-w now return immediately after sending - Background process waits for reply (up to 5 min) - Reply cached in ~/.cache/ccb/ for cpend/gpend to read - cpend/gpend check cache first before querying session 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prevents parent process from blocking on child stdout/stderr. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Simplify cask-w/gask-w to pure synchronous wait (no fork) - Use Claude Code's run_in_background=true for async execution - Fix _latest_log() to detect stale log file bindings - Update skill configs to use background task + TaskOutput pattern - Add pending_state save on timeout/interrupt for later retrieval 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _send_message() and _generate_marker() to GeminiCommunicator - Add marker_prefix to GeminiCommunicator.__init__ - Add save_pending_state() for timeout/interrupt recovery - Use _send_message() instead of direct _send_via_terminal() - Add KeyboardInterrupt handling - Call _remember_gemini_session() after send and wait 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add retry loop (10 attempts) in capture_state() for transient JSONDecodeError - Return msg_count=-1 to indicate unknown baseline instead of 0 - In _read_since(), establish stable baseline first when msg_count<0 - Add id/hash deduplication to avoid returning already-processed messages Root cause: Gemini CLI writes session JSON in-place, causing transient parse failures that reset msg_count to 0, leading to old messages being returned as "new" replies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change file open from text mode to binary mode ("rb")
- Use offset=-1 to indicate unknown baseline
- Establish baseline from EOF when offset unknown
- Start from EOF when switching log files to avoid replaying old content
Root cause: text mode seek/tell uses "cookie" values that don't equal
byte offsets, causing offset > st_size clamping to misposition and
return stale messages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ility - Add UTF-8 BOM to file header - Set $OutputEncoding, [Console]::OutputEncoding/InputEncoding to UTF-8 - Run chcp 65001 for consistent Chinese/emoji output on Windows PowerShell 5.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Key changes: - cask-w/gask-w now run in background mode, not blocking foreground work - Fix codex_comm: use binary mode for consistent byte offset handling - Fix gemini_comm: prevent returning stale messages on JSON parse failure - Fix gask-w: align implementation with cask-w - Fix install.ps1: add UTF-8 BOM for PowerShell 5.1 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…oding - Use utf-8-sig encoding when reading session files (tolerate BOM) - Use utf-8 encoding when writing session files - Refactor _get_latest_codex_session_id() to use _read_json_file() - Add --restore as alias for --resume - Support ccb -r as shortcut for ccb up -r Root cause: Windows PowerShell 5.1 default encoding caused JSON parse failure, making -r ignore .codex-session in current directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Fix-PythonShebang function to replace python3 with python - Generate .cmd and .bat wrappers for all scripts - Wrappers try python first, fallback to py -3 - Fix relative path references in wrappers This fixes "python3: No such file or directory" error on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ensures UTF-8 encoding is configured before any emoji output on Windows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _normalize_path_for_match() to handle Windows/WSL/MSYS path variations - Add fallback scan in _get_latest_codex_session_id() when codex_session_id missing - Validate work_dir match in _read_local_claude_session_id() to prevent cross-dir restore - Store work_dir_norm in session files for reliable matching 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ss-dir restore - Add _extract_session_work_dir_norm() helper for consistent work_dir extraction - Validate work_dir in _get_latest_codex_session_id() before using cached codex_session_id - Reject resume in _read_local_claude_session_id() when work_dir is missing (old files) - Add work_dir check in cmd_restore() for codex_session_id 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add expanduser for ~ prefixed paths in _normalize_path_for_match() - Absolutize relative paths against cwd for matching purposes - Try multiple path forms (absolute, resolve, PWD) for Gemini hash lookup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…eply leakage - Use utf-8-sig encoding for session file reads (handle Windows BOM) - Validate pending_state is dict before accessing - Use safe_write_session for atomic writes - Check log_path exists before reading to avoid global fallback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- codex_comm: start from beginning when switching to new log file to avoid missing replies already written before detection - gemini_comm: detect and return valid replies on first successful read when capture_state failed due to transient JSON writes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Display old and new version info: vX.X commit date - Show "Updated: old → new" or "Already up to date: current" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move version reading before git check - Works for tarball installs without .git directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GIT_COMMIT and GIT_DATE variables to ccb - install.sh updates these variables from git info - Works for tarball installs without .git directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comments were being included in parsed values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Method 1: From local git repo - Method 2: From CCB_GIT_COMMIT/CCB_GIT_DATE env vars - Method 3: From GitHub API (fallback for tarball) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously _read_since returned the first gemini message with content, which could be an intermediate status message when Gemini sends multiple messages (tool calls → intermediate status → final reply). Now it collects all gemini messages and returns the last one with content. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- codex_comm.py: Remove session_id_filter from _scan_latest() to always read the latest session file by mtime, fixing issue where old session replies were returned instead of new ones - install.sh: Update CLAUDE.md config to use run_in_background=true and auto-cat output on bash-notification for cask-w/gask-w 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove ambiguous "STOP and wait for user input" instruction. Now clearly states: wait for bash-notification, then cat output file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add cmd_version() to display current version info (version, commit, date) - Add _get_remote_version_info() to check GitHub API for latest version - Move _get_version_info() and _format_version_info() to global scope - Support ccb -v, ccb --version, and ccb version subcommand 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use temp file instead of $(cat << 'HEREDOC') pattern to avoid parsing bug with single quotes (e.g., "don't") on macOS Bash 3.2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 5-dimension readiness model (100pts): Problem Clarity, Functional Scope, Success Criteria, Constraints, Priority/MVP - Replace free-text questions with option-based format - Add gap classification rules (Defined/Assumption/Gap) - Add Phase 5 markdown document output to plans/ directory - Sync updates to both Claude and Codex versions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0bd70df to
3d1c916
Compare
Add support for cursor-agent as a new delegation provider: - curask: send requests to cursor-agent with --force default on - curpend: retrieve task results from MCP cache - curping: health check for cursor-agent availability Features: - Session resume support via --resume <chatId> - Simplified architecture (no daemon needed) - MCP integration with cursor-specific schema
3d1c916 to
218ca46
Compare
Update PowerShell installer to include cursor-agent commands: - SCRIPTS_TO_LINK: curask, curpend, curping - CLAUDE_MARKDOWN: curpend.md, curping.md - $scripts array for .bat/.cmd wrappers - CLAUDE.md collaboration rules with Cursor - settings.json permissions for cursor commands
- Move `import re` to top of file (curask) - Fix output logic: only write to stdout when --output not specified - Fix cursor-agent install URL in curping
- Add --print --output-format json to cursor-agent command - Parse session_id directly from JSON instead of regex extraction - Extract cursor_utils.py to lib/ for reusable parsing functions - Add fallback regex parsing when JSON parsing fails - Track json_parsed status in metadata - Add 12 test cases for parse_json_output and extract_chat_id_fallback
- curask: add --name parameter to name tasks for parallel tracking - curask: add name validation (alphanumeric, underscore, hyphen only) - curask: add 200 char length limit for task names - curpend: add --list to show all cursor tasks with status - curpend: add --name to query task by name - curpend: add --chat-id to output only chat_id (for scripting) - curpend: optimize name lookup with specific glob pattern - curpend: use started_at for reliable sorting instead of mtime - docs: add Cursor Commands section to README (EN/ZH)
Owner
|
容我考虑下cursor的融合 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for cursor-agent as a new delegation provider:
Features: