@neriros/ralphy 2.13.6 → 2.13.7
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/dist/cli/index.js +65 -132
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -56409,7 +56409,7 @@ function log(msg) {
|
|
|
56409
56409
|
// package.json
|
|
56410
56410
|
var package_default = {
|
|
56411
56411
|
name: "@neriros/ralphy",
|
|
56412
|
-
version: "2.13.
|
|
56412
|
+
version: "2.13.7",
|
|
56413
56413
|
description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
|
|
56414
56414
|
keywords: [
|
|
56415
56415
|
"agent",
|
|
@@ -72109,6 +72109,26 @@ function fmtElapsed(ms) {
|
|
|
72109
72109
|
function trunc(s, max2) {
|
|
72110
72110
|
return s.length > max2 ? s.slice(0, max2 - 1) + "\u2026" : s;
|
|
72111
72111
|
}
|
|
72112
|
+
function prLabel(prUrl) {
|
|
72113
|
+
const m = prUrl.match(/\/pull\/(\d+)/);
|
|
72114
|
+
return m ? `#${m[1]}` : "PR";
|
|
72115
|
+
}
|
|
72116
|
+
var ANSI_STRIP_RE = /\x1b(?:\[[0-9;]*[A-Za-z]|\][^\x07\x1b]*(?:\x07|\x1b\\)|.)/g;
|
|
72117
|
+
var BOX_ONLY_RE = /^[\s\u2500\u2502\u256D\u256E\u2570\u256F\u254C\u2504\u2501\u2503]+$/;
|
|
72118
|
+
var STATUS_BAR_LINE_RE = /^[\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F\u2713\u2717]\s+iter\s+\d+/;
|
|
72119
|
+
var ITER_HEADER_LINE_RE = /^\u2500\u2500/;
|
|
72120
|
+
function cleanOutputLine(raw) {
|
|
72121
|
+
const clean = raw.replace(ANSI_STRIP_RE, "").trim();
|
|
72122
|
+
if (!clean)
|
|
72123
|
+
return null;
|
|
72124
|
+
if (BOX_ONLY_RE.test(clean))
|
|
72125
|
+
return null;
|
|
72126
|
+
if (STATUS_BAR_LINE_RE.test(clean))
|
|
72127
|
+
return null;
|
|
72128
|
+
if (ITER_HEADER_LINE_RE.test(clean))
|
|
72129
|
+
return null;
|
|
72130
|
+
return clean;
|
|
72131
|
+
}
|
|
72112
72132
|
function priorityBadge(p) {
|
|
72113
72133
|
switch (p) {
|
|
72114
72134
|
case 1:
|
|
@@ -72194,14 +72214,6 @@ function displayTailLines(activeCount) {
|
|
|
72194
72214
|
return 8;
|
|
72195
72215
|
return 5;
|
|
72196
72216
|
}
|
|
72197
|
-
function parseFilterParts(filterDesc) {
|
|
72198
|
-
return filterDesc.split(", ").map((part) => {
|
|
72199
|
-
const eq = part.indexOf("=");
|
|
72200
|
-
if (eq < 0)
|
|
72201
|
-
return { key: part, val: "" };
|
|
72202
|
-
return { key: part.slice(0, eq), val: part.slice(eq + 1) };
|
|
72203
|
-
});
|
|
72204
|
-
}
|
|
72205
72217
|
function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
72206
72218
|
const { exit } = use_app_default();
|
|
72207
72219
|
const { stdout } = use_stdout_default();
|
|
@@ -72273,7 +72285,10 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72273
72285
|
const m = workerMetaRef.current.get(changeName);
|
|
72274
72286
|
if (!m)
|
|
72275
72287
|
return;
|
|
72276
|
-
|
|
72288
|
+
const clean = cleanOutputLine(line);
|
|
72289
|
+
if (!clean)
|
|
72290
|
+
return;
|
|
72291
|
+
m.tail.push(clean);
|
|
72277
72292
|
if (m.tail.length > TAIL_BUFFER_SIZE)
|
|
72278
72293
|
m.tail.splice(0, m.tail.length - TAIL_BUFFER_SIZE);
|
|
72279
72294
|
},
|
|
@@ -72379,7 +72394,6 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72379
72394
|
const activeCount = coord?.activeCount ?? 0;
|
|
72380
72395
|
const termWidth = (stdout?.columns ?? 100) - 2;
|
|
72381
72396
|
const termHeight = stdout?.rows ?? 40;
|
|
72382
|
-
const filterParts = pollStatus.filterDesc ? parseFilterParts(pollStatus.filterDesc) : [];
|
|
72383
72397
|
const safeFocusedIdx = activeCount > 0 ? Math.min(focusedIdx, activeCount - 1) : 0;
|
|
72384
72398
|
use_input_default((input, key) => {
|
|
72385
72399
|
if (activeCount === 0)
|
|
@@ -72421,14 +72435,16 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72421
72435
|
paddingX: 1,
|
|
72422
72436
|
width: termWidth,
|
|
72423
72437
|
children: [
|
|
72424
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
72425
|
-
gap: 2,
|
|
72438
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72426
72439
|
children: [
|
|
72427
72440
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72428
72441
|
bold: true,
|
|
72429
72442
|
color: "cyan",
|
|
72430
|
-
children:
|
|
72431
|
-
|
|
72443
|
+
children: [
|
|
72444
|
+
"\u25C8 RALPH AGENT",
|
|
72445
|
+
" "
|
|
72446
|
+
]
|
|
72447
|
+
}, undefined, true, undefined, this),
|
|
72432
72448
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72433
72449
|
dimColor: true,
|
|
72434
72450
|
children: [
|
|
@@ -72436,15 +72452,11 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72436
72452
|
VERSION
|
|
72437
72453
|
]
|
|
72438
72454
|
}, undefined, true, undefined, this),
|
|
72439
|
-
cfg && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
72455
|
+
cfg && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72440
72456
|
children: [
|
|
72441
72457
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72442
72458
|
dimColor: true,
|
|
72443
|
-
children: "\u2502"
|
|
72444
|
-
}, undefined, false, undefined, this),
|
|
72445
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72446
|
-
dimColor: true,
|
|
72447
|
-
children: "ENGINE"
|
|
72459
|
+
children: " \u2502 "
|
|
72448
72460
|
}, undefined, false, undefined, this),
|
|
72449
72461
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72450
72462
|
color: "cyan",
|
|
@@ -72457,133 +72469,54 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72457
72469
|
}, undefined, true, undefined, this),
|
|
72458
72470
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72459
72471
|
dimColor: true,
|
|
72460
|
-
children:
|
|
72461
|
-
|
|
72462
|
-
|
|
72463
|
-
|
|
72464
|
-
|
|
72465
|
-
}, undefined, false, undefined, this),
|
|
72466
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72467
|
-
color: "white",
|
|
72468
|
-
bold: true,
|
|
72469
|
-
children: cfg.concurrency
|
|
72470
|
-
}, undefined, false, undefined, this),
|
|
72471
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72472
|
-
dimColor: true,
|
|
72473
|
-
children: "\u2502"
|
|
72474
|
-
}, undefined, false, undefined, this),
|
|
72472
|
+
children: [
|
|
72473
|
+
" \u2502 \xD7",
|
|
72474
|
+
cfg.concurrency
|
|
72475
|
+
]
|
|
72476
|
+
}, undefined, true, undefined, this),
|
|
72475
72477
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72476
72478
|
dimColor: true,
|
|
72477
|
-
children: "POLL"
|
|
72478
|
-
}, undefined, false, undefined, this),
|
|
72479
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72480
|
-
color: "white",
|
|
72481
72479
|
children: [
|
|
72480
|
+
" \u2502 poll ",
|
|
72482
72481
|
cfg.pollIntervalSeconds,
|
|
72483
72482
|
"s"
|
|
72484
72483
|
]
|
|
72485
72484
|
}, undefined, true, undefined, this),
|
|
72486
|
-
cfg.maxIterationsPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
72485
|
+
cfg.maxIterationsPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72486
|
+
color: "yellow",
|
|
72487
72487
|
children: [
|
|
72488
|
-
|
|
72489
|
-
|
|
72490
|
-
children: "\u2502"
|
|
72491
|
-
}, undefined, false, undefined, this),
|
|
72492
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72493
|
-
dimColor: true,
|
|
72494
|
-
children: "MAX ITER"
|
|
72495
|
-
}, undefined, false, undefined, this),
|
|
72496
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72497
|
-
color: "yellow",
|
|
72498
|
-
children: cfg.maxIterationsPerTask
|
|
72499
|
-
}, undefined, false, undefined, this)
|
|
72488
|
+
" \u2502 iter \u2264",
|
|
72489
|
+
cfg.maxIterationsPerTask
|
|
72500
72490
|
]
|
|
72501
72491
|
}, undefined, true, undefined, this),
|
|
72502
|
-
cfg.maxCostUsdPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(
|
|
72492
|
+
cfg.maxCostUsdPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72493
|
+
color: "yellow",
|
|
72503
72494
|
children: [
|
|
72504
|
-
|
|
72505
|
-
|
|
72506
|
-
children: "\u2502"
|
|
72507
|
-
}, undefined, false, undefined, this),
|
|
72508
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72509
|
-
dimColor: true,
|
|
72510
|
-
children: "MAX COST"
|
|
72511
|
-
}, undefined, false, undefined, this),
|
|
72512
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72513
|
-
color: "yellow",
|
|
72514
|
-
children: [
|
|
72515
|
-
"$",
|
|
72516
|
-
cfg.maxCostUsdPerTask
|
|
72517
|
-
]
|
|
72518
|
-
}, undefined, true, undefined, this)
|
|
72495
|
+
" \u2502 cost \u2264$",
|
|
72496
|
+
cfg.maxCostUsdPerTask
|
|
72519
72497
|
]
|
|
72520
72498
|
}, undefined, true, undefined, this),
|
|
72521
|
-
cfg.
|
|
72522
|
-
|
|
72523
|
-
|
|
72524
|
-
|
|
72525
|
-
|
|
72526
|
-
|
|
72527
|
-
|
|
72528
|
-
|
|
72529
|
-
|
|
72530
|
-
|
|
72531
|
-
|
|
72532
|
-
|
|
72533
|
-
children: [
|
|
72534
|
-
cfg.maxRuntimeMinutesPerTask,
|
|
72535
|
-
"m"
|
|
72536
|
-
]
|
|
72537
|
-
}, undefined, true, undefined, this)
|
|
72538
|
-
]
|
|
72539
|
-
}, undefined, true, undefined, this)
|
|
72499
|
+
cfg.createPrOnSuccess && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72500
|
+
color: "green",
|
|
72501
|
+
children: " \u25CF PR"
|
|
72502
|
+
}, undefined, false, undefined, this),
|
|
72503
|
+
cfg.fixCiOnFailure && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72504
|
+
color: "green",
|
|
72505
|
+
children: " \u25CF fixCI"
|
|
72506
|
+
}, undefined, false, undefined, this),
|
|
72507
|
+
cfg.useWorktree && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72508
|
+
color: "green",
|
|
72509
|
+
children: " \u25CF worktree"
|
|
72510
|
+
}, undefined, false, undefined, this)
|
|
72540
72511
|
]
|
|
72541
72512
|
}, undefined, true, undefined, this)
|
|
72542
72513
|
]
|
|
72543
72514
|
}, undefined, true, undefined, this),
|
|
72544
|
-
|
|
72545
|
-
|
|
72546
|
-
marginTop: 0,
|
|
72547
|
-
children: [
|
|
72548
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72549
|
-
dimColor: true,
|
|
72550
|
-
children: "FEATURES"
|
|
72551
|
-
}, undefined, false, undefined, this),
|
|
72552
|
-
cfg.createPrOnSuccess && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72553
|
-
color: "green",
|
|
72554
|
-
children: "\u25CF create-pr"
|
|
72555
|
-
}, undefined, false, undefined, this),
|
|
72556
|
-
cfg.fixCiOnFailure && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72557
|
-
color: "green",
|
|
72558
|
-
children: "\u25CF fix-ci"
|
|
72559
|
-
}, undefined, false, undefined, this),
|
|
72560
|
-
cfg.useWorktree && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72561
|
-
color: "green",
|
|
72562
|
-
children: "\u25CF worktree"
|
|
72563
|
-
}, undefined, false, undefined, this)
|
|
72564
|
-
]
|
|
72565
|
-
}, undefined, true, undefined, this),
|
|
72566
|
-
filterParts.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
72567
|
-
gap: 3,
|
|
72568
|
-
marginTop: 0,
|
|
72515
|
+
pollStatus.filterDesc && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72516
|
+
dimColor: true,
|
|
72569
72517
|
children: [
|
|
72570
|
-
|
|
72571
|
-
|
|
72572
|
-
children: "LINEAR"
|
|
72573
|
-
}, undefined, false, undefined, this),
|
|
72574
|
-
filterParts.map(({ key, val }) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
72575
|
-
gap: 1,
|
|
72576
|
-
children: [
|
|
72577
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72578
|
-
dimColor: true,
|
|
72579
|
-
children: key
|
|
72580
|
-
}, undefined, false, undefined, this),
|
|
72581
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72582
|
-
color: "magenta",
|
|
72583
|
-
children: val
|
|
72584
|
-
}, undefined, false, undefined, this)
|
|
72585
|
-
]
|
|
72586
|
-
}, key, true, undefined, this))
|
|
72518
|
+
"Linear ",
|
|
72519
|
+
trunc(pollStatus.filterDesc.replace(/, /g, " \xB7 "), termWidth - 12)
|
|
72587
72520
|
]
|
|
72588
72521
|
}, undefined, true, undefined, this)
|
|
72589
72522
|
]
|
|
@@ -72959,7 +72892,7 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72959
72892
|
}, undefined, false, undefined, this),
|
|
72960
72893
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72961
72894
|
color: "blue",
|
|
72962
|
-
children: w.
|
|
72895
|
+
children: w.issueIdentifier
|
|
72963
72896
|
}, undefined, false, undefined, this)
|
|
72964
72897
|
]
|
|
72965
72898
|
}, undefined, true, undefined, this),
|
|
@@ -72972,7 +72905,7 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72972
72905
|
}, undefined, false, undefined, this),
|
|
72973
72906
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
72974
72907
|
color: "green",
|
|
72975
|
-
children: prUrl
|
|
72908
|
+
children: prLabel(prUrl)
|
|
72976
72909
|
}, undefined, false, undefined, this)
|
|
72977
72910
|
]
|
|
72978
72911
|
}, undefined, true, undefined, this)
|