codex-ralph 0.4.1 โ†’ 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ CODEX_RALPH_TG_KEY=123456:bot-token
17
17
  CODEX_RALPH_TG_CHAT=123456789
18
18
  ```
19
19
 
20
- Provide these as environment variables (e.g., when invoking `npx`). Each session generates a UUID and includes it in progress messages.
20
+ Provide these as environment variables (e.g., when invoking `npx`). Each session uses a randomly selected emoji to tag progress messages.
21
21
 
22
22
  Usage:
23
23
 
@@ -31,10 +31,10 @@ Optional flags:
31
31
  --max-iterations=10
32
32
  ```
33
33
 
34
- Message format:
34
+ Message format (session emoji is chosen randomly from a small fixed set and stays constant for the session):
35
35
 
36
36
  ```
37
- ๐Ÿงญ ~<session-uuid>~
37
+ <session emoji>
38
38
  ๐Ÿ“Œ <current requirement title>
39
39
  ๐ŸŽฏ <current index> of <total requirements>
40
40
  ```
@@ -11,19 +11,23 @@ ROOT_DIR="$(cd "$(dirname "$SCRIPT_PATH")/.." && pwd)"
11
11
  SPRINT_FILE=""
12
12
  MAX_ITERATIONS=10
13
13
  NOTES_FILE=""
14
- SESSION_UUID=""
14
+ SESSION_EMOJI=""
15
+ USE_CURSOR_AGENT=false
15
16
 
16
- session_uuid() {
17
- if [[ -n "${SESSION_UUID}" ]]; then
18
- echo "${SESSION_UUID}"
17
+ session_emoji() {
18
+ if [[ -n "${SESSION_EMOJI}" ]]; then
19
+ echo "${SESSION_EMOJI}"
19
20
  return
20
21
  fi
21
- SESSION_UUID="$(python3 - <<PY
22
- import uuid
23
- print(uuid.uuid4())
24
- PY
25
- )"
26
- echo "${SESSION_UUID}"
22
+ local emoji_pool=(
23
+ "๐Ÿงญ" "๐Ÿงฉ" "๐Ÿงช" "๐Ÿ›ฐ๏ธ" "๐Ÿช"
24
+ "๐Ÿช" "๐ŸŽ›๏ธ" "๐Ÿงฟ" "๐Ÿงฒ" "๐Ÿช„"
25
+ "๐Ÿงฐ" "๐Ÿชš" "๐Ÿช" "๐Ÿชถ" "๐Ÿงฏ"
26
+ "๐Ÿงต" "๐Ÿงถ" "๐Ÿงท" "๐Ÿช™" "๐Ÿชฌ"
27
+ )
28
+ local index=$((RANDOM % ${#emoji_pool[@]}))
29
+ SESSION_EMOJI="${emoji_pool[$index]}"
30
+ echo "${SESSION_EMOJI}"
27
31
  }
28
32
 
29
33
  send_telegram() {
@@ -40,22 +44,26 @@ send_telegram() {
40
44
 
41
45
  usage() {
42
46
  cat <<USAGE
43
- Usage: ralph-loop SPRINT_PATH [--max-iterations=N]
47
+ Usage: ralph-loop SPRINT_PATH [--max-iterations=N] [--cursor-agent]
44
48
 
45
49
  Options:
46
50
  SPRINT_PATH Path to the sprint markdown file (required).
47
51
  --max-iterations=N Stop after N iterations (0 = no limit, default 10).
52
+ --cursor-agent Use cursor-agent instead of codex (default: disabled).
48
53
  -h, --help Show this help.
49
54
  USAGE
50
55
  }
51
56
 
52
- session_uuid >/dev/null
57
+ session_emoji >/dev/null
53
58
 
54
59
  for arg in "$@"; do
55
60
  case "$arg" in
56
61
  --max-iterations=*)
57
62
  MAX_ITERATIONS="${arg#*=}"
58
63
  ;;
64
+ --cursor-agent)
65
+ USE_CURSOR_AGENT=true
66
+ ;;
59
67
  -h|--help)
60
68
  usage
61
69
  exit 0
@@ -195,7 +203,8 @@ while true; do
195
203
  remaining="$(remaining_count)"
196
204
  if [[ "$remaining" == "0" ]]; then
197
205
  total="$(total_count)"
198
- send_telegram "๐Ÿงญ `${SESSION_UUID}`"$'\n'"โœ… All requirements completed"$'\n'"๐ŸŽฏ ${total} of ${total}"
206
+ session_marker="$(session_emoji)"
207
+ send_telegram "${session_marker}"$'\n'"โœ… All requirements completed"$'\n'"๐ŸŽฏ ${total} of ${total}"
199
208
  echo "All sprint requirements complete."
200
209
  echo "<promise>DONE</promise>"
201
210
  exit 0
@@ -209,7 +218,8 @@ while true; do
209
218
  desc="$(next_description)"
210
219
  total="$(total_count)"
211
220
  current="$(current_index)"
212
- send_telegram "๐Ÿงญ `${SESSION_UUID}`"$'\n'"๐Ÿ“Œ ${desc}"$'\n'"๐ŸŽฏ ${current} of ${total}"
221
+ session_marker="$(session_emoji)"
222
+ send_telegram "${session_marker}"$'\n'"๐Ÿ“Œ ${desc}"$'\n'"๐ŸŽฏ ${current} of ${total}"
213
223
  echo "Iteration $iteration - next requirement: $desc"
214
224
 
215
225
  prompt_tmp="$(mktemp)"
@@ -223,7 +233,11 @@ while true; do
223
233
  current_item_block
224
234
  } > "$prompt_tmp"
225
235
 
226
- codex exec - < "$prompt_tmp"
236
+ if [[ "$USE_CURSOR_AGENT" == "true" ]]; then
237
+ cursor-agent -p < "$prompt_tmp"
238
+ else
239
+ codex exec - < "$prompt_tmp"
240
+ fi
227
241
 
228
242
  rm -f "$prompt_tmp"
229
243
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-ralph",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Ralph Loop sprint runner for Codex.",
5
5
  "bin": {
6
6
  "ralph-loop": "agent/ralph-loop.sh"