codex-ralph 0.4.6 → 0.5.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 +5 -0
- package/agent/ralph-loop.sh +2 -65
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,3 +62,8 @@ Acceptance criteria: Free-form acceptance criteria.
|
|
|
62
62
|
- Marks items complete only when all steps are satisfied.
|
|
63
63
|
- Uses conventional commits for each completed requirement (no story ID requirement).
|
|
64
64
|
- If no local `AGENTS.md` exists up the tree, use `./.codex/AGENTS.md`. In monorepos, prefer package-level AGENTS.md for package-specific knowledge.
|
|
65
|
+
|
|
66
|
+
## Changelog
|
|
67
|
+
|
|
68
|
+
### 0.5.0
|
|
69
|
+
- Version bump.
|
package/agent/ralph-loop.sh
CHANGED
|
@@ -210,69 +210,6 @@ print(filled + empty)
|
|
|
210
210
|
PY
|
|
211
211
|
}
|
|
212
212
|
|
|
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
213
|
iteration=1
|
|
277
214
|
while true; do
|
|
278
215
|
remaining="$(remaining_count)"
|
|
@@ -312,9 +249,9 @@ while true; do
|
|
|
312
249
|
} > "$prompt_tmp"
|
|
313
250
|
|
|
314
251
|
if [[ "$USE_CURSOR_AGENT" == "true" ]]; then
|
|
315
|
-
cursor-agent -f -p < "$prompt_tmp"
|
|
252
|
+
cursor-agent -f -p < "$prompt_tmp"
|
|
316
253
|
else
|
|
317
|
-
codex exec - < "$prompt_tmp"
|
|
254
|
+
codex exec - < "$prompt_tmp"
|
|
318
255
|
fi
|
|
319
256
|
|
|
320
257
|
rm -f "$prompt_tmp"
|