chore(cursor-proxy-debugger): enhance traffic capture for Fork Chat and update README

- Added support for capturing and decoding Fork Chat traffic, including `ForkBackgroundComposer`, `NotifyConversationClone`, and `UploadConversationBlobs`.
- Updated the README to reflect new features and usage instructions for Fork Chat traffic.
- Modified `.gitignore` to include `proto/extensions-cursor-app/`.
- Refactored `Taskfile.yml` to improve error messages related to Cursor extensions.
- Introduced new tests for decoding functionality in `cursor-proxy-debugger`.
This commit is contained in:
leookun
2026-08-05 01:17:01 +08:00
parent 058aaa532e
commit 2f47f02497
20 changed files with 29904 additions and 9643 deletions
+3 -16
View File
@@ -2,22 +2,8 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SNAPSHOT_DEFAULT="$SCRIPT_DIR/extensions-cursor-app/cursor-always-local"
INSTALLED_CURSOR_DEFAULT="/Applications/Cursor.app/Contents/Resources/app/extensions/cursor-always-local/dist/main.js"
LATEST_EXT_DIR="$(
find "$SCRIPT_DIR" -maxdepth 1 -type d -name 'extensions-*' 2>/dev/null \
| sort -V \
| tail -n 1
)"
if [[ -f "$SNAPSHOT_DEFAULT/dist/main.js" ]]; then
INPUT_DEFAULT="$SNAPSHOT_DEFAULT"
elif [[ -f "$INSTALLED_CURSOR_DEFAULT" ]]; then
INPUT_DEFAULT="$INSTALLED_CURSOR_DEFAULT"
elif [[ -n "$LATEST_EXT_DIR" ]]; then
INPUT_DEFAULT="$LATEST_EXT_DIR"
else
INPUT_DEFAULT="$SCRIPT_DIR/extensions-2.6.19"
fi
INPUT_DEFAULT="$INSTALLED_CURSOR_DEFAULT"
OUTPUT_DEFAULT="$SCRIPT_DIR/from_extensions"
INPUT_PATH="${1:-$INPUT_DEFAULT}"
@@ -57,7 +43,8 @@ fi
if [[ ! -f "$INPUT_PATH" ]]; then
echo "Input JS not found: $INPUT_PATH" >&2
echo "Usage: $0 [input-js-file-or-extensions-dir] [output-dir]" >&2
echo "Install/update Cursor, or pass an explicit input bundle:" >&2
echo " $0 /path/to/cursor-always-local/dist/main.js [output-dir]" >&2
exit 1
fi