File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ echo " === Starting forced completion approach ==="
5+
6+ # Run cursor-agent in background
7+ cursor-agent -p " You are updating documentation summary files.
8+
9+ TASK: Check if docs/$CHANGED_SUBDIRS /llms.txt and docs/$CHANGED_SUBDIRS /llms-full.txt need updates based on PR 296.
10+
11+ PROCESS:
12+ 1. Get diff: gh pr diff 296
13+ 2. Read docs/$CHANGED_SUBDIRS /llms.txt
14+ 3. Read docs/$CHANGED_SUBDIRS /llms-full.txt
15+ 4. If changes warrant updates: modify the files
16+ 5. If no updates needed: do nothing
17+ 6. Print 'ANALYSIS_COMPLETE' and stop
18+
19+ CRITICAL: You have 5 minutes to complete this. Print 'ANALYSIS_COMPLETE' when done and exit immediately. Do not commit or push." \
20+ --force --model " $MODEL " --output-format=text &
21+
22+ AGENT_PID=$!
23+ echo " Started cursor-agent with PID: $AGENT_PID "
24+
25+ # Force kill after 5 minutes
26+ (sleep 300; echo " === Forcing completion after 5 minutes ===" ; kill -9 $AGENT_PID 2> /dev/null) &
27+ KILLER_PID=$!
28+
29+ # Wait for completion
30+ if wait $AGENT_PID 2> /dev/null; then
31+ echo " === Agent completed normally ==="
32+ kill $KILLER_PID 2> /dev/null || true
33+ else
34+ echo " === Agent was terminated ==="
35+ fi
36+
37+ echo " === Process finished ==="
You can’t perform that action at this time.
0 commit comments