@neriros/ralphy 2.13.5 → 2.13.6

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +643 -139
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -56373,6 +56373,8 @@ var useApp = () => import_react17.useContext(AppContext_default);
56373
56373
  var use_app_default = useApp;
56374
56374
  // node_modules/.bun/ink@5.2.1+1f88f629f0141b18/node_modules/ink/build/hooks/use-stdout.js
56375
56375
  var import_react18 = __toESM(require_react(), 1);
56376
+ var useStdout = () => import_react18.useContext(StdoutContext_default);
56377
+ var use_stdout_default = useStdout;
56376
56378
  // node_modules/.bun/ink@5.2.1+1f88f629f0141b18/node_modules/ink/build/hooks/use-stderr.js
56377
56379
  var import_react19 = __toESM(require_react(), 1);
56378
56380
  // node_modules/.bun/ink@5.2.1+1f88f629f0141b18/node_modules/ink/build/hooks/use-focus.js
@@ -56407,7 +56409,7 @@ function log(msg) {
56407
56409
  // package.json
56408
56410
  var package_default = {
56409
56411
  name: "@neriros/ralphy",
56410
- version: "2.13.5",
56412
+ version: "2.13.6",
56411
56413
  description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
56412
56414
  keywords: [
56413
56415
  "agent",
@@ -72110,27 +72112,27 @@ function trunc(s, max2) {
72110
72112
  function priorityBadge(p) {
72111
72113
  switch (p) {
72112
72114
  case 1:
72113
- return { text: "!", color: "red" };
72115
+ return { text: "\u25B2", color: "red", label: "URGENT" };
72114
72116
  case 2:
72115
- return { text: "\u2191", color: "yellow" };
72117
+ return { text: "\u2191", color: "yellow", label: "HIGH" };
72116
72118
  case 3:
72117
- return { text: "\xB7", color: "blue" };
72119
+ return { text: "\xB7", color: "blue", label: "MED" };
72118
72120
  case 4:
72119
- return { text: "\u2193", color: "gray" };
72121
+ return { text: "\u2193", color: "gray", label: "LOW" };
72120
72122
  default:
72121
- return { text: " ", color: "gray" };
72123
+ return { text: " ", color: "gray", label: "" };
72122
72124
  }
72123
72125
  }
72124
72126
  function modeBadge(mode) {
72125
72127
  switch (mode) {
72126
72128
  case "fresh":
72127
- return { text: "new", color: "cyan" };
72129
+ return { text: "NEW", color: "cyan" };
72128
72130
  case "resume":
72129
- return { text: "resume", color: "yellow" };
72131
+ return { text: "RESUME", color: "yellow" };
72130
72132
  case "conflict-fix":
72131
- return { text: "fix", color: "magenta" };
72133
+ return { text: "FIX", color: "magenta" };
72132
72134
  default:
72133
- return { text: mode, color: "white" };
72135
+ return { text: mode.toUpperCase(), color: "white" };
72134
72136
  }
72135
72137
  }
72136
72138
  function phaseColor(phase) {
@@ -72160,6 +72162,29 @@ function phaseColor(phase) {
72160
72162
  return "white";
72161
72163
  }
72162
72164
  }
72165
+ function workerBorderColor(phase) {
72166
+ switch (phase) {
72167
+ case "working":
72168
+ case "scaffolding":
72169
+ return "cyan";
72170
+ case "committing":
72171
+ case "commit-retry":
72172
+ case "pushing":
72173
+ case "push-retry":
72174
+ case "rebasing":
72175
+ case "pr-create":
72176
+ return "yellow";
72177
+ case "ci-poll":
72178
+ case "ci-fix":
72179
+ return "blue";
72180
+ case "done":
72181
+ return "green";
72182
+ case "gave-up":
72183
+ return "red";
72184
+ default:
72185
+ return "gray";
72186
+ }
72187
+ }
72163
72188
  function displayTailLines(activeCount) {
72164
72189
  if (activeCount <= 1)
72165
72190
  return 20;
@@ -72167,34 +72192,24 @@ function displayTailLines(activeCount) {
72167
72192
  return 12;
72168
72193
  if (activeCount <= 3)
72169
72194
  return 8;
72170
- return 6;
72195
+ return 5;
72171
72196
  }
72172
- function settingsSummary(cfg, filterDesc) {
72173
- const parts = [
72174
- `${cfg.engine}/${cfg.model}`,
72175
- `concurrency: ${cfg.concurrency}`,
72176
- `poll: ${cfg.pollIntervalSeconds}s`
72177
- ];
72178
- if (cfg.maxIterationsPerTask > 0)
72179
- parts.push(`maxIter: ${cfg.maxIterationsPerTask}`);
72180
- if (cfg.maxCostUsdPerTask > 0)
72181
- parts.push(`maxCost: $${cfg.maxCostUsdPerTask}`);
72182
- if (cfg.maxRuntimeMinutesPerTask > 0)
72183
- parts.push(`maxRuntime: ${cfg.maxRuntimeMinutesPerTask}m`);
72184
- if (cfg.createPrOnSuccess)
72185
- parts.push("PR: on");
72186
- if (cfg.fixCiOnFailure)
72187
- parts.push("fixCI: on");
72188
- if (cfg.useWorktree)
72189
- parts.push("worktree: on");
72190
- const settingsStr = parts.join(" \xB7 ");
72191
- return filterDesc ? `${settingsStr} [${filterDesc}]` : settingsStr;
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
+ });
72192
72204
  }
72193
72205
  function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72194
72206
  const { exit } = use_app_default();
72207
+ const { stdout } = use_stdout_default();
72208
+ const { isRawModeSupported } = use_stdin_default();
72195
72209
  const [logs, setLogs] = import_react57.useState([]);
72196
72210
  const [, setTick] = import_react57.useState(0);
72197
72211
  const [clock, setClock] = import_react57.useState(0);
72212
+ const [focusedIdx, setFocusedIdx] = import_react57.useState(0);
72198
72213
  const coordRef = import_react57.useRef(null);
72199
72214
  const workerMetaRef = import_react57.useRef(new Map);
72200
72215
  const nextPollAtRef = import_react57.useRef(0);
@@ -72262,7 +72277,7 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72262
72277
  if (m.tail.length > TAIL_BUFFER_SIZE)
72263
72278
  m.tail.splice(0, m.tail.length - TAIL_BUFFER_SIZE);
72264
72279
  },
72265
- onWorkerCmd: (changeName, cmd, state, durationMs, ok) => {
72280
+ onWorkerCmd: (changeName, cmd, state) => {
72266
72281
  const m = workerMetaRef.current.get(changeName);
72267
72282
  if (!m)
72268
72283
  return;
@@ -72278,20 +72293,6 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72278
72293
  m.prUrl = prUrl;
72279
72294
  }
72280
72295
  });
72281
- appendLog(` concurrency: ${concurrency} \xB7 poll: ${pollInterval}s \xB7 ${cfg2.engine}/${cfg2.model}`, "gray");
72282
- const feats = [];
72283
- if (cfg2.createPrOnSuccess)
72284
- feats.push("createPR");
72285
- if (cfg2.fixCiOnFailure)
72286
- feats.push("fixCI");
72287
- if (cfg2.useWorktree)
72288
- feats.push("worktree");
72289
- if (cfg2.maxIterationsPerTask > 0)
72290
- feats.push(`maxIter=${cfg2.maxIterationsPerTask}`);
72291
- if (cfg2.maxCostUsdPerTask > 0)
72292
- feats.push(`maxCost=$${cfg2.maxCostUsdPerTask}`);
72293
- if (feats.length)
72294
- appendLog(` features: ${feats.join(", ")}`, "gray");
72295
72296
  coordRef.current = coord2;
72296
72297
  await coord2.init();
72297
72298
  const tick = async () => {
@@ -72376,7 +72377,27 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72376
72377
  const now2 = Date.now();
72377
72378
  const secsToNextPoll = nextPollAtRef.current ? Math.max(0, Math.ceil((nextPollAtRef.current - now2) / 1000)) : null;
72378
72379
  const activeCount = coord?.activeCount ?? 0;
72379
- const tailLines = displayTailLines(activeCount);
72380
+ const termWidth = (stdout?.columns ?? 100) - 2;
72381
+ const termHeight = stdout?.rows ?? 40;
72382
+ const filterParts = pollStatus.filterDesc ? parseFilterParts(pollStatus.filterDesc) : [];
72383
+ const safeFocusedIdx = activeCount > 0 ? Math.min(focusedIdx, activeCount - 1) : 0;
72384
+ use_input_default((input, key) => {
72385
+ if (activeCount === 0)
72386
+ return;
72387
+ if (key.tab || key.rightArrow) {
72388
+ setFocusedIdx((i) => (Math.min(i, activeCount - 1) + 1) % activeCount);
72389
+ } else if (key.leftArrow) {
72390
+ setFocusedIdx((i) => (Math.min(i, activeCount - 1) - 1 + activeCount) % activeCount);
72391
+ } else {
72392
+ const n = parseInt(input, 10);
72393
+ if (!isNaN(n) && n >= 1 && n <= activeCount)
72394
+ setFocusedIdx(n - 1);
72395
+ }
72396
+ }, { isActive: isRawModeSupported && activeCount > 1 });
72397
+ const FIXED_OVERHEAD = 22;
72398
+ const nonFocusedCount = Math.max(0, activeCount - 1);
72399
+ const focusedTailLines = Math.max(5, termHeight - FIXED_OVERHEAD - nonFocusedCount);
72400
+ const compactTailLines = displayTailLines(activeCount);
72380
72401
  return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72381
72402
  flexDirection: "column",
72382
72403
  children: [
@@ -72390,45 +72411,387 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72390
72411
  }, line.id, false, undefined, this)
72391
72412
  }, undefined, false, undefined, this),
72392
72413
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72393
- marginTop: 1,
72394
72414
  flexDirection: "column",
72415
+ marginTop: 1,
72395
72416
  children: [
72396
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72397
- dimColor: true,
72417
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72418
+ borderStyle: "round",
72419
+ borderColor: "blue",
72420
+ flexDirection: "column",
72421
+ paddingX: 1,
72422
+ width: termWidth,
72398
72423
  children: [
72399
- spinnerFrame,
72400
- " ",
72401
- pollStatus.state === "polling" ? `polling Linear (${pollStatus.filterDesc})` : pollStatus.lastAt !== null ? `last poll: ${pollStatus.lastFound} open, ${pollStatus.lastAdded} new${secsToNextPoll !== null ? ` \xB7 next in ${secsToNextPoll}s` : ""}` : "starting\u2026"
72424
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72425
+ gap: 2,
72426
+ children: [
72427
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72428
+ bold: true,
72429
+ color: "cyan",
72430
+ children: "\u25C8 RALPH AGENT"
72431
+ }, undefined, false, undefined, this),
72432
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72433
+ dimColor: true,
72434
+ children: [
72435
+ "v",
72436
+ VERSION
72437
+ ]
72438
+ }, undefined, true, undefined, this),
72439
+ cfg && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72440
+ children: [
72441
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72442
+ dimColor: true,
72443
+ children: "\u2502"
72444
+ }, undefined, false, undefined, this),
72445
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72446
+ dimColor: true,
72447
+ children: "ENGINE"
72448
+ }, undefined, false, undefined, this),
72449
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72450
+ color: "cyan",
72451
+ bold: true,
72452
+ children: [
72453
+ cfg.engine,
72454
+ "/",
72455
+ cfg.model
72456
+ ]
72457
+ }, undefined, true, undefined, this),
72458
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72459
+ dimColor: true,
72460
+ children: "\u2502"
72461
+ }, undefined, false, undefined, this),
72462
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72463
+ dimColor: true,
72464
+ children: "CONCURRENCY"
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),
72475
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72476
+ dimColor: true,
72477
+ children: "POLL"
72478
+ }, undefined, false, undefined, this),
72479
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72480
+ color: "white",
72481
+ children: [
72482
+ cfg.pollIntervalSeconds,
72483
+ "s"
72484
+ ]
72485
+ }, undefined, true, undefined, this),
72486
+ cfg.maxIterationsPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72487
+ children: [
72488
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72489
+ dimColor: true,
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)
72500
+ ]
72501
+ }, undefined, true, undefined, this),
72502
+ cfg.maxCostUsdPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72503
+ children: [
72504
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72505
+ dimColor: true,
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)
72519
+ ]
72520
+ }, undefined, true, undefined, this),
72521
+ cfg.maxRuntimeMinutesPerTask > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72522
+ children: [
72523
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72524
+ dimColor: true,
72525
+ children: "\u2502"
72526
+ }, undefined, false, undefined, this),
72527
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72528
+ dimColor: true,
72529
+ children: "MAX TIME"
72530
+ }, undefined, false, undefined, this),
72531
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72532
+ color: "yellow",
72533
+ children: [
72534
+ cfg.maxRuntimeMinutesPerTask,
72535
+ "m"
72536
+ ]
72537
+ }, undefined, true, undefined, this)
72538
+ ]
72539
+ }, undefined, true, undefined, this)
72540
+ ]
72541
+ }, undefined, true, undefined, this)
72542
+ ]
72543
+ }, undefined, true, undefined, this),
72544
+ cfg && (cfg.createPrOnSuccess || cfg.fixCiOnFailure || cfg.useWorktree) && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72545
+ gap: 2,
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,
72569
+ children: [
72570
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72571
+ dimColor: true,
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))
72587
+ ]
72588
+ }, undefined, true, undefined, this)
72402
72589
  ]
72403
72590
  }, undefined, true, undefined, this),
72404
72591
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72592
+ flexDirection: "row",
72593
+ gap: 1,
72594
+ marginTop: 1,
72595
+ width: termWidth,
72405
72596
  children: [
72406
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72407
- dimColor: true,
72597
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72598
+ borderStyle: "round",
72599
+ borderColor: "gray",
72600
+ flexDirection: "column",
72601
+ paddingX: 1,
72602
+ flexGrow: 1,
72408
72603
  children: [
72409
- " ",
72410
- "workers active: ",
72411
- activeCount,
72412
- " \xB7 queued: ",
72413
- coord?.queuedCount ?? 0
72604
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72605
+ dimColor: true,
72606
+ bold: true,
72607
+ children: "POLL STATUS"
72608
+ }, undefined, false, undefined, this),
72609
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72610
+ gap: 2,
72611
+ marginTop: 0,
72612
+ children: [
72613
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72614
+ color: "gray",
72615
+ children: spinnerFrame
72616
+ }, undefined, false, undefined, this),
72617
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72618
+ children: pollStatus.state === "polling" ? "Polling Linear\u2026" : pollStatus.lastAt !== null ? "Idle" : "Starting\u2026"
72619
+ }, undefined, false, undefined, this),
72620
+ pollStatus.lastAt !== null && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72621
+ children: [
72622
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72623
+ dimColor: true,
72624
+ children: "\u2502"
72625
+ }, undefined, false, undefined, this),
72626
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72627
+ dimColor: true,
72628
+ children: "found"
72629
+ }, undefined, false, undefined, this),
72630
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72631
+ color: "white",
72632
+ children: pollStatus.lastFound
72633
+ }, undefined, false, undefined, this),
72634
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72635
+ dimColor: true,
72636
+ children: "\u2502"
72637
+ }, undefined, false, undefined, this),
72638
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72639
+ dimColor: true,
72640
+ children: "new"
72641
+ }, undefined, false, undefined, this),
72642
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72643
+ color: pollStatus.lastAdded > 0 ? "green" : "white",
72644
+ children: pollStatus.lastAdded
72645
+ }, undefined, false, undefined, this),
72646
+ secsToNextPoll !== null && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72647
+ children: [
72648
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72649
+ dimColor: true,
72650
+ children: "\u2502"
72651
+ }, undefined, false, undefined, this),
72652
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72653
+ dimColor: true,
72654
+ children: "next in"
72655
+ }, undefined, false, undefined, this),
72656
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72657
+ color: "gray",
72658
+ children: [
72659
+ secsToNextPoll,
72660
+ "s"
72661
+ ]
72662
+ }, undefined, true, undefined, this)
72663
+ ]
72664
+ }, undefined, true, undefined, this)
72665
+ ]
72666
+ }, undefined, true, undefined, this)
72667
+ ]
72668
+ }, undefined, true, undefined, this)
72414
72669
  ]
72415
72670
  }, undefined, true, undefined, this),
72416
- cfg && pollStatus.filterDesc && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72417
- dimColor: true,
72671
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72672
+ borderStyle: "round",
72673
+ borderColor: "gray",
72674
+ flexDirection: "column",
72675
+ paddingX: 1,
72676
+ minWidth: 28,
72418
72677
  children: [
72419
- " ",
72420
- settingsSummary(cfg, pollStatus.filterDesc)
72678
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72679
+ dimColor: true,
72680
+ bold: true,
72681
+ children: "WORKERS"
72682
+ }, undefined, false, undefined, this),
72683
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72684
+ gap: 3,
72685
+ marginTop: 0,
72686
+ children: [
72687
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72688
+ gap: 1,
72689
+ children: [
72690
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72691
+ dimColor: true,
72692
+ children: "active"
72693
+ }, undefined, false, undefined, this),
72694
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72695
+ color: activeCount > 0 ? "cyan" : "gray",
72696
+ bold: true,
72697
+ children: activeCount
72698
+ }, undefined, false, undefined, this)
72699
+ ]
72700
+ }, undefined, true, undefined, this),
72701
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72702
+ gap: 1,
72703
+ children: [
72704
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72705
+ dimColor: true,
72706
+ children: "queued"
72707
+ }, undefined, false, undefined, this),
72708
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72709
+ color: coord?.queuedCount ?? 0 > 0 ? "yellow" : "gray",
72710
+ bold: true,
72711
+ children: coord?.queuedCount ?? 0
72712
+ }, undefined, false, undefined, this)
72713
+ ]
72714
+ }, undefined, true, undefined, this)
72715
+ ]
72716
+ }, undefined, true, undefined, this)
72421
72717
  ]
72422
72718
  }, undefined, true, undefined, this)
72423
72719
  ]
72424
72720
  }, undefined, true, undefined, this),
72425
- coord?.activeWorkers.map((w) => {
72721
+ activeCount > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72722
+ borderStyle: "round",
72723
+ borderColor: "gray",
72724
+ flexDirection: "column",
72725
+ paddingX: 1,
72726
+ marginTop: 1,
72727
+ width: termWidth,
72728
+ children: [
72729
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72730
+ gap: 1,
72731
+ children: [
72732
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72733
+ dimColor: true,
72734
+ bold: true,
72735
+ children: "TASKS"
72736
+ }, undefined, false, undefined, this),
72737
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72738
+ dimColor: true,
72739
+ children: activeCount > 1 ? " Tab/\u2190 \u2192 to switch \xB7 1-9 jump" : ""
72740
+ }, undefined, false, undefined, this)
72741
+ ]
72742
+ }, undefined, true, undefined, this),
72743
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72744
+ gap: 3,
72745
+ flexWrap: "wrap",
72746
+ children: coord?.activeWorkers.map((w, idx) => {
72747
+ const meta = workerMetaRef.current.get(w.changeName);
72748
+ const phase = meta?.phase ?? "working";
72749
+ const pBadge = priorityBadge(w.issue.priority);
72750
+ const isFocused = idx === safeFocusedIdx;
72751
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72752
+ gap: 1,
72753
+ children: [
72754
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72755
+ color: isFocused ? "white" : "gray",
72756
+ bold: isFocused,
72757
+ children: [
72758
+ "[",
72759
+ idx + 1,
72760
+ "]"
72761
+ ]
72762
+ }, undefined, true, undefined, this),
72763
+ pBadge.label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72764
+ color: pBadge.color,
72765
+ children: pBadge.text
72766
+ }, undefined, false, undefined, this),
72767
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72768
+ color: isFocused ? "cyan" : "gray",
72769
+ bold: isFocused,
72770
+ children: w.issueIdentifier
72771
+ }, undefined, false, undefined, this),
72772
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72773
+ color: phaseColor(phase),
72774
+ dimColor: !isFocused,
72775
+ children: phase
72776
+ }, undefined, false, undefined, this),
72777
+ isFocused && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72778
+ color: "white",
72779
+ children: "\u25C0"
72780
+ }, undefined, false, undefined, this)
72781
+ ]
72782
+ }, w.changeName, true, undefined, this);
72783
+ })
72784
+ }, undefined, false, undefined, this)
72785
+ ]
72786
+ }, undefined, true, undefined, this),
72787
+ coord?.activeWorkers.map((w, idx) => {
72788
+ const isFocused = idx === safeFocusedIdx;
72426
72789
  const meta = workerMetaRef.current.get(w.changeName);
72427
72790
  const elapsed = meta ? fmtElapsed(now2 - meta.startedAt) : "\u2013";
72428
72791
  const iter = meta?.iter ?? 0;
72429
72792
  const phase = meta?.phase ?? "working";
72430
72793
  const phaseElapsed = meta ? fmtElapsed(now2 - meta.phaseStartedAt) : "\u2013";
72431
- const phaseDetail = meta?.phaseDetail ? ` (${meta.phaseDetail})` : "";
72794
+ const phaseDetail = meta?.phaseDetail ?? "";
72432
72795
  const cmd = meta?.currentCmd;
72433
72796
  const cmdElapsed = cmd ? fmtElapsed(now2 - cmd.startedAt) : null;
72434
72797
  const tail2 = meta?.tail ?? [];
@@ -72436,136 +72799,277 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72436
72799
  const currentTask = meta?.currentTask ?? null;
72437
72800
  const pBadge = priorityBadge(w.issue.priority);
72438
72801
  const mBadge = modeBadge(w.mode);
72439
- const issueTitle = trunc(w.issue.title, 52);
72440
72802
  const pColor = phaseColor(phase);
72803
+ const bColor = isFocused ? workerBorderColor(phase) : "gray";
72804
+ const visibleTailLines = isFocused ? focusedTailLines : compactTailLines;
72805
+ if (!isFocused && activeCount > 1) {
72806
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72807
+ borderStyle: "round",
72808
+ borderColor: "gray",
72809
+ paddingX: 1,
72810
+ marginTop: 1,
72811
+ gap: 2,
72812
+ width: termWidth,
72813
+ children: [
72814
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72815
+ dimColor: true,
72816
+ children: [
72817
+ "[",
72818
+ idx + 1,
72819
+ "]"
72820
+ ]
72821
+ }, undefined, true, undefined, this),
72822
+ pBadge.label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72823
+ color: pBadge.color,
72824
+ children: pBadge.text
72825
+ }, undefined, false, undefined, this),
72826
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72827
+ color: "gray",
72828
+ bold: true,
72829
+ children: w.issueIdentifier
72830
+ }, undefined, false, undefined, this),
72831
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72832
+ dimColor: true,
72833
+ children: trunc(w.issue.title, 40)
72834
+ }, undefined, false, undefined, this),
72835
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72836
+ dimColor: true,
72837
+ children: "\u2502"
72838
+ }, undefined, false, undefined, this),
72839
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72840
+ color: pColor,
72841
+ dimColor: true,
72842
+ children: phase
72843
+ }, undefined, false, undefined, this),
72844
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72845
+ dimColor: true,
72846
+ children: "\u2502"
72847
+ }, undefined, false, undefined, this),
72848
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72849
+ dimColor: true,
72850
+ children: elapsed
72851
+ }, undefined, false, undefined, this),
72852
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72853
+ dimColor: true,
72854
+ children: "\xB7"
72855
+ }, undefined, false, undefined, this),
72856
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72857
+ dimColor: true,
72858
+ children: [
72859
+ "iter ",
72860
+ iter
72861
+ ]
72862
+ }, undefined, true, undefined, this),
72863
+ currentTask && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(jsx_dev_runtime9.Fragment, {
72864
+ children: [
72865
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72866
+ dimColor: true,
72867
+ children: "\u2502"
72868
+ }, undefined, false, undefined, this),
72869
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72870
+ dimColor: true,
72871
+ children: [
72872
+ "\u25B6 ",
72873
+ trunc(currentTask, 40)
72874
+ ]
72875
+ }, undefined, true, undefined, this)
72876
+ ]
72877
+ }, undefined, true, undefined, this)
72878
+ ]
72879
+ }, w.changeName, true, undefined, this);
72880
+ }
72441
72881
  return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72882
+ borderStyle: "round",
72883
+ borderColor: bColor,
72442
72884
  flexDirection: "column",
72885
+ paddingX: 1,
72443
72886
  marginTop: 1,
72887
+ width: termWidth,
72444
72888
  children: [
72445
72889
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72890
+ gap: 2,
72446
72891
  children: [
72447
72892
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72448
- children: " "
72893
+ children: spinnerFrame
72449
72894
  }, undefined, false, undefined, this),
72450
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72895
+ pBadge.label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72896
+ color: pBadge.color,
72451
72897
  children: [
72452
- spinnerFrame,
72453
- " "
72898
+ pBadge.text,
72899
+ " ",
72900
+ pBadge.label
72454
72901
  ]
72455
72902
  }, undefined, true, undefined, this),
72456
72903
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72457
- color: pBadge.color,
72458
- children: pBadge.text
72904
+ color: "cyan",
72905
+ bold: true,
72906
+ children: w.issueIdentifier
72459
72907
  }, undefined, false, undefined, this),
72460
72908
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72461
- children: " "
72909
+ color: "white",
72910
+ bold: true,
72911
+ children: trunc(w.issue.title, Math.max(30, termWidth - 60))
72462
72912
  }, undefined, false, undefined, this),
72463
72913
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72464
- color: "cyan",
72914
+ color: mBadge.color,
72465
72915
  bold: true,
72466
- children: w.issueIdentifier
72916
+ children: [
72917
+ "[",
72918
+ mBadge.text,
72919
+ "]"
72920
+ ]
72921
+ }, undefined, true, undefined, this),
72922
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72923
+ dimColor: true,
72924
+ children: "\u2502"
72467
72925
  }, undefined, false, undefined, this),
72468
72926
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72469
72927
  dimColor: true,
72470
- children: " \xB7 "
72928
+ children: "elapsed"
72471
72929
  }, undefined, false, undefined, this),
72472
72930
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72473
- children: issueTitle
72931
+ color: "white",
72932
+ children: elapsed
72474
72933
  }, undefined, false, undefined, this),
72475
72934
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72476
72935
  dimColor: true,
72477
- children: " "
72936
+ children: "\u2502"
72478
72937
  }, undefined, false, undefined, this),
72479
72938
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72480
- color: mBadge.color,
72939
+ dimColor: true,
72940
+ children: "iter"
72941
+ }, undefined, false, undefined, this),
72942
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72943
+ color: "white",
72944
+ bold: true,
72945
+ children: iter
72946
+ }, undefined, false, undefined, this)
72947
+ ]
72948
+ }, undefined, true, undefined, this),
72949
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72950
+ gap: 3,
72951
+ marginTop: 0,
72952
+ children: [
72953
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72954
+ gap: 1,
72481
72955
  children: [
72482
- "[",
72483
- mBadge.text,
72484
- "]"
72956
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72957
+ dimColor: true,
72958
+ children: "\u2197 LINEAR"
72959
+ }, undefined, false, undefined, this),
72960
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72961
+ color: "blue",
72962
+ children: w.issue.url
72963
+ }, undefined, false, undefined, this)
72485
72964
  ]
72486
72965
  }, undefined, true, undefined, this),
72487
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72488
- dimColor: true,
72966
+ prUrl && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72967
+ gap: 1,
72489
72968
  children: [
72490
- " ",
72491
- elapsed,
72492
- " \xB7 iter ",
72493
- iter
72969
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72970
+ dimColor: true,
72971
+ children: "\u2197 PR"
72972
+ }, undefined, false, undefined, this),
72973
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72974
+ color: "green",
72975
+ children: prUrl
72976
+ }, undefined, false, undefined, this)
72494
72977
  ]
72495
72978
  }, undefined, true, undefined, this)
72496
72979
  ]
72497
72980
  }, undefined, true, undefined, this),
72498
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72499
- dimColor: true,
72500
- children: [
72501
- " \u2197 ",
72502
- w.issue.url
72503
- ]
72504
- }, undefined, true, undefined, this),
72505
72981
  currentTask && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72982
+ gap: 1,
72983
+ marginTop: 0,
72506
72984
  children: [
72507
72985
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72508
- dimColor: true,
72509
- children: " \u25B6 "
72986
+ color: "yellow",
72987
+ bold: true,
72988
+ children: "\u25B6 TASK"
72510
72989
  }, undefined, false, undefined, this),
72511
72990
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72512
72991
  color: "white",
72513
- children: trunc(currentTask, 90)
72992
+ children: trunc(currentTask, termWidth - 14)
72514
72993
  }, undefined, false, undefined, this)
72515
72994
  ]
72516
72995
  }, undefined, true, undefined, this),
72517
72996
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
72997
+ gap: 3,
72998
+ marginTop: 0,
72518
72999
  children: [
72519
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72520
- dimColor: true,
72521
- children: " phase: "
72522
- }, undefined, false, undefined, this),
72523
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72524
- color: pColor,
73000
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
73001
+ gap: 1,
72525
73002
  children: [
72526
- phase,
72527
- phaseDetail
73003
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73004
+ dimColor: true,
73005
+ children: "PHASE"
73006
+ }, undefined, false, undefined, this),
73007
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73008
+ color: pColor,
73009
+ bold: true,
73010
+ children: [
73011
+ phase,
73012
+ phaseDetail ? ` (${phaseDetail})` : ""
73013
+ ]
73014
+ }, undefined, true, undefined, this),
73015
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73016
+ dimColor: true,
73017
+ children: phaseElapsed
73018
+ }, undefined, false, undefined, this)
72528
73019
  ]
72529
73020
  }, undefined, true, undefined, this),
72530
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72531
- dimColor: true,
73021
+ cmd && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
73022
+ gap: 1,
72532
73023
  children: [
72533
- " \xB7 ",
72534
- phaseElapsed
73024
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73025
+ color: "yellow",
73026
+ children: "\u23F5 CMD"
73027
+ }, undefined, false, undefined, this),
73028
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73029
+ color: "yellow",
73030
+ children: fmtCmd(cmd.argv)
73031
+ }, undefined, false, undefined, this),
73032
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73033
+ dimColor: true,
73034
+ children: cmdElapsed
73035
+ }, undefined, false, undefined, this)
73036
+ ]
73037
+ }, undefined, true, undefined, this),
73038
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
73039
+ gap: 1,
73040
+ children: [
73041
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73042
+ dimColor: true,
73043
+ children: "LOG"
73044
+ }, undefined, false, undefined, this),
73045
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73046
+ dimColor: true,
73047
+ children: trunc(meta?.logFile ?? "\u2013", 60)
73048
+ }, undefined, false, undefined, this)
72535
73049
  ]
72536
73050
  }, undefined, true, undefined, this)
72537
73051
  ]
72538
73052
  }, undefined, true, undefined, this),
72539
- prUrl && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72540
- dimColor: true,
72541
- children: [
72542
- " \u2197 pr: ",
72543
- prUrl
72544
- ]
72545
- }, undefined, true, undefined, this),
72546
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72547
- dimColor: true,
72548
- children: [
72549
- " log: ",
72550
- meta?.logFile ?? "\u2013"
72551
- ]
72552
- }, undefined, true, undefined, this),
72553
- cmd && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72554
- color: "yellow",
73053
+ tail2.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
73054
+ flexDirection: "column",
73055
+ marginTop: 0,
72555
73056
  children: [
72556
- " \u23F5 ",
72557
- fmtCmd(cmd.argv),
72558
- " \xB7 ",
72559
- cmdElapsed
72560
- ]
72561
- }, undefined, true, undefined, this),
72562
- tail2.slice(-tailLines).map((line, i) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
72563
- dimColor: true,
72564
- children: [
72565
- " \u2502 ",
72566
- line.length > 110 ? line.slice(0, 109) + "\u2026" : line
73057
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73058
+ dimColor: true,
73059
+ children: [
73060
+ "\u2500 OUTPUT ",
73061
+ "\u2500".repeat(Math.max(4, termWidth - 14))
73062
+ ]
73063
+ }, undefined, true, undefined, this),
73064
+ tail2.slice(-visibleTailLines).map((line, i) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
73065
+ dimColor: true,
73066
+ children: [
73067
+ "\u2502 ",
73068
+ trunc(line, termWidth - 6)
73069
+ ]
73070
+ }, `${w.changeName}-tail-${i}`, true, undefined, this))
72567
73071
  ]
72568
- }, `${w.changeName}-tail-${i}`, true, undefined, this))
73072
+ }, undefined, true, undefined, this)
72569
73073
  ]
72570
73074
  }, w.changeName, true, undefined, this);
72571
73075
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.13.5",
3
+ "version": "2.13.6",
4
4
  "description": "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
5
5
  "keywords": [
6
6
  "agent",