codex-ralph 0.4.6 → 0.6.0

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
@@ -29,6 +29,8 @@ Optional flags:
29
29
 
30
30
  ```
31
31
  --max-iterations=10
32
+ --cursor-agent
33
+ --gemini-agent
32
34
  ```
33
35
 
34
36
  Message format (session emoji is chosen randomly from a small fixed set and stays constant for the session):
@@ -62,3 +64,11 @@ Acceptance criteria: Free-form acceptance criteria.
62
64
  - Marks items complete only when all steps are satisfied.
63
65
  - Uses conventional commits for each completed requirement (no story ID requirement).
64
66
  - If no local `AGENTS.md` exists up the tree, use `./.codex/AGENTS.md`. In monorepos, prefer package-level AGENTS.md for package-specific knowledge.
67
+
68
+ ## Changelog
69
+
70
+ ### 0.6.0
71
+ - Add support for Gemini agent via `--gemini-agent` flag.
72
+
73
+ ### 0.5.0
74
+ - Version bump.
@@ -13,6 +13,7 @@ MAX_ITERATIONS=10
13
13
  NOTES_FILE=""
14
14
  SESSION_EMOJI=""
15
15
  USE_CURSOR_AGENT=false
16
+ USE_GEMINI_AGENT=false
16
17
 
17
18
  session_emoji() {
18
19
  if [[ -n "${SESSION_EMOJI}" ]]; then
@@ -50,6 +51,7 @@ Options:
50
51
  SPRINT_PATH Path to the sprint markdown file (required).
51
52
  --max-iterations=N Stop after N iterations (0 = no limit, default 10).
52
53
  --cursor-agent Use cursor-agent instead of codex (default: disabled).
54
+ --gemini-agent Use gemini-agent instead of codex (default: disabled).
53
55
  -h, --help Show this help.
54
56
  USAGE
55
57
  }
@@ -64,6 +66,9 @@ for arg in "$@"; do
64
66
  --cursor-agent)
65
67
  USE_CURSOR_AGENT=true
66
68
  ;;
69
+ --gemini-agent)
70
+ USE_GEMINI_AGENT=true
71
+ ;;
67
72
  -h|--help)
68
73
  usage
69
74
  exit 0
@@ -210,69 +215,6 @@ print(filled + empty)
210
215
  PY
211
216
  }
212
217
 
213
- filter_repeated_diffs() {
214
- python3 - <<'PYFILTER'
215
- import sys
216
- import hashlib
217
- import re
218
- from collections import deque
219
-
220
- # Keep only last 30 diff hashes to avoid memory issues
221
- seen_hashes = deque(maxlen=30)
222
- current_block = []
223
- collecting_diff = False
224
-
225
- for line in sys.stdin:
226
- stripped = line.rstrip('\n\r')
227
-
228
- # Start of a file update block
229
- if stripped == 'file update:':
230
- if current_block:
231
- # Process previous block
232
- block_text = '\n'.join(current_block)
233
- block_hash = hashlib.md5(block_text.encode()).hexdigest()
234
- if block_hash not in seen_hashes:
235
- sys.stdout.write(block_text + '\n')
236
- sys.stdout.flush()
237
- seen_hashes.append(block_hash)
238
- # else: skip repeated diff
239
-
240
- current_block = [stripped]
241
- collecting_diff = True
242
- elif collecting_diff:
243
- current_block.append(stripped)
244
- # Check if we hit a new action (end of diff block)
245
- if re.match(r'^(thinking|exec):', stripped):
246
- # End of diff block
247
- block_text = '\n'.join(current_block)
248
- block_hash = hashlib.md5(block_text.encode()).hexdigest()
249
-
250
- if block_hash not in seen_hashes:
251
- sys.stdout.write(block_text + '\n')
252
- sys.stdout.flush()
253
- seen_hashes.append(block_hash)
254
- else:
255
- # Skip the diff, only output the new action
256
- sys.stdout.write(line)
257
- sys.stdout.flush()
258
-
259
- current_block = []
260
- collecting_diff = False
261
- else:
262
- # Regular output, pass through immediately
263
- sys.stdout.write(line)
264
- sys.stdout.flush()
265
-
266
- # Output any remaining block
267
- if current_block:
268
- block_text = '\n'.join(current_block)
269
- block_hash = hashlib.md5(block_text.encode()).hexdigest()
270
- if block_hash not in seen_hashes:
271
- sys.stdout.write(block_text + '\n')
272
- sys.stdout.flush()
273
- PYFILTER
274
- }
275
-
276
218
  iteration=1
277
219
  while true; do
278
220
  remaining="$(remaining_count)"
@@ -312,9 +254,11 @@ while true; do
312
254
  } > "$prompt_tmp"
313
255
 
314
256
  if [[ "$USE_CURSOR_AGENT" == "true" ]]; then
315
- cursor-agent -f -p < "$prompt_tmp" 2>&1 | filter_repeated_diffs
257
+ cursor-agent -f -p < "$prompt_tmp"
258
+ elif [[ "$USE_GEMINI_AGENT" == "true" ]]; then
259
+ gemini-agent -p -f < "$prompt_tmp"
316
260
  else
317
- codex exec - < "$prompt_tmp" 2>&1 | filter_repeated_diffs
261
+ codex exec - < "$prompt_tmp"
318
262
  fi
319
263
 
320
264
  rm -f "$prompt_tmp"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-ralph",
3
- "version": "0.4.6",
3
+ "version": "0.6.0",
4
4
  "description": "Ralph Loop sprint runner for Codex.",
5
5
  "bin": {
6
6
  "ralph-loop": "agent/ralph-loop.sh"