@neriros/ralphy 2.13.3 → 2.13.4

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 +58 -2
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -56407,7 +56407,7 @@ function log(msg) {
56407
56407
  // package.json
56408
56408
  var package_default = {
56409
56409
  name: "@neriros/ralphy",
56410
- version: "2.13.3",
56410
+ version: "2.13.4",
56411
56411
  description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
56412
56412
  keywords: [
56413
56413
  "agent",
@@ -69463,6 +69463,10 @@ var HOST = "https://eu.i.posthog.com";
69463
69463
  var enabled = process.env["RALPH_TELEMETRY"] !== "0";
69464
69464
  var client = null;
69465
69465
  var distinctId = "anonymous";
69466
+ var defaultProps = {};
69467
+ function setDefaultProperties(props) {
69468
+ defaultProps = { ...defaultProps, ...props };
69469
+ }
69466
69470
  async function init() {
69467
69471
  if (!enabled)
69468
69472
  return;
@@ -69481,7 +69485,8 @@ async function init() {
69481
69485
  });
69482
69486
  }
69483
69487
  function capture(event, properties) {
69484
- client?.capture({ distinctId, event, ...properties !== undefined && { properties } });
69488
+ const merged = { ...defaultProps, ...properties };
69489
+ client?.capture({ distinctId, event, properties: merged });
69485
69490
  }
69486
69491
  async function shutdown() {
69487
69492
  if (client)
@@ -69873,10 +69878,16 @@ function useLoop(opts) {
69873
69878
  const result2 = `failed:exit-${engineResult.exitCode}`;
69874
69879
  updateStateIteration(stateDir, result2, iterStart, opts.engine, opts.model, engineResult.usage);
69875
69880
  if (failure.shouldStop || engineResult.rateLimited) {
69881
+ capture("engine_rate_limited", { exit_code: engineResult.exitCode, iteration: iter });
69876
69882
  finalStopReason = "rateLimited";
69877
69883
  setStopReason("rateLimited");
69878
69884
  break;
69879
69885
  }
69886
+ capture("iteration_failed", {
69887
+ exit_code: engineResult.exitCode,
69888
+ iteration: iter,
69889
+ consecutive_failures: consFailures + 1
69890
+ });
69880
69891
  if (result2 === lastResult) {
69881
69892
  consFailures++;
69882
69893
  } else {
@@ -69905,7 +69916,9 @@ function useLoop(opts) {
69905
69916
  await sleep(opts.delay);
69906
69917
  }
69907
69918
  } catch (err) {
69919
+ const message = err instanceof Error ? err.message : String(err);
69908
69920
  addInfo(`Engine error: ${err}`);
69921
+ capture("engine_error", { iteration: iter, error: message });
69909
69922
  break;
69910
69923
  }
69911
69924
  }
@@ -70575,6 +70588,7 @@ class AgentCoordinator {
70575
70588
  ]);
70576
70589
  } catch (err) {
70577
70590
  this.deps.onLog(`! Linear poll failed: ${err.message}`, "red");
70591
+ capture("agent_linear_poll_failed", { error: err.message });
70578
70592
  return { found: 0, added: 0 };
70579
70593
  }
70580
70594
  const queuedIds = new Set(this.queue.map((q) => q.issue.id));
@@ -70699,10 +70713,16 @@ class AgentCoordinator {
70699
70713
  const alreadyNotified = this.conflictNotified.has(issue.id);
70700
70714
  if (alreadyNotified)
70701
70715
  continue;
70716
+ capture("agent_conflict_detected", { issue_identifier: issue.identifier });
70702
70717
  try {
70703
70718
  await this.deps.applyIndicator(issue, this.opts.setConflicted);
70704
70719
  } catch (err) {
70705
70720
  this.deps.onLog(`! Linear setConflicted failed for ${issue.identifier}: ${err.message}`, "red");
70721
+ capture("agent_indicator_failed", {
70722
+ indicator: "setConflicted",
70723
+ issue_identifier: issue.identifier,
70724
+ error: err.message
70725
+ });
70706
70726
  continue;
70707
70727
  }
70708
70728
  this.conflictNotified.add(issue.id);
@@ -70733,6 +70753,11 @@ class AgentCoordinator {
70733
70753
  } catch (err) {
70734
70754
  this.pendingIds.delete(issue.id);
70735
70755
  this.deps.onLog(`! prepare(${mode}) failed for ${issue.identifier}: ${err.message}`, "red");
70756
+ capture("agent_prepare_failed", {
70757
+ spawn_mode: mode,
70758
+ issue_identifier: issue.identifier,
70759
+ error: err.message
70760
+ });
70736
70761
  this.spawnNext();
70737
70762
  return;
70738
70763
  }
@@ -70745,6 +70770,11 @@ class AgentCoordinator {
70745
70770
  await this.deps.applyIndicator(issue, this.opts.setInProgress);
70746
70771
  } catch (err) {
70747
70772
  this.deps.onLog(`! Linear setInProgress failed for ${issue.identifier}: ${err.message}`, "yellow");
70773
+ capture("agent_indicator_failed", {
70774
+ indicator: "setInProgress",
70775
+ issue_identifier: issue.identifier,
70776
+ error: err.message
70777
+ });
70748
70778
  }
70749
70779
  }
70750
70780
  if (mode === "fresh" && this.opts.postComments !== false) {
@@ -70776,6 +70806,10 @@ class AgentCoordinator {
70776
70806
  };
70777
70807
  this.workers.push(worker);
70778
70808
  this.pendingIds.delete(issue.id);
70809
+ capture("agent_worker_spawned", {
70810
+ spawn_mode: mode,
70811
+ issue_identifier: issue.identifier
70812
+ });
70779
70813
  this.deps.onWorkersChanged();
70780
70814
  handle.exited.then(async (code) => {
70781
70815
  const idx = this.workers.indexOf(worker);
@@ -70783,6 +70817,12 @@ class AgentCoordinator {
70783
70817
  this.workers.splice(idx, 1);
70784
70818
  const ok = code === 0;
70785
70819
  this.deps.onLog(`${ok ? "\u2713" : "\u2717"} ${issue.identifier} \u2192 ${prep.changeName} exited (code ${code})`, ok ? "green" : "red");
70820
+ capture("agent_worker_exited", {
70821
+ spawn_mode: mode,
70822
+ issue_identifier: issue.identifier,
70823
+ exit_code: code,
70824
+ ok
70825
+ });
70786
70826
  await this.notifyExited(issue, prep.changeName, code, mode);
70787
70827
  this.deps.onWorkersChanged();
70788
70828
  this.spawnNext();
@@ -70807,6 +70847,11 @@ class AgentCoordinator {
70807
70847
  await this.deps.removeIndicator(issue, this.opts.clearConflicted);
70808
70848
  } catch (err) {
70809
70849
  this.deps.onLog(`! Linear clearConflicted failed for ${issue.identifier}: ${err.message}`, "red");
70850
+ capture("agent_indicator_failed", {
70851
+ indicator: "clearConflicted",
70852
+ issue_identifier: issue.identifier,
70853
+ error: err.message
70854
+ });
70810
70855
  }
70811
70856
  }
70812
70857
  this.conflictNotified.delete(issue.id);
@@ -70815,6 +70860,11 @@ class AgentCoordinator {
70815
70860
  await this.deps.applyIndicator(issue, this.opts.setDone);
70816
70861
  } catch (err) {
70817
70862
  this.deps.onLog(`! Linear setDone failed for ${issue.identifier}: ${err.message}`, "red");
70863
+ capture("agent_indicator_failed", {
70864
+ indicator: "setDone",
70865
+ issue_identifier: issue.identifier,
70866
+ error: err.message
70867
+ });
70818
70868
  }
70819
70869
  }
70820
70870
  } else if (this.opts.setError) {
@@ -70822,6 +70872,11 @@ class AgentCoordinator {
70822
70872
  await this.deps.applyIndicator(issue, this.opts.setError);
70823
70873
  } catch (err) {
70824
70874
  this.deps.onLog(`! Linear setError failed for ${issue.identifier}: ${err.message}`, "red");
70875
+ capture("agent_indicator_failed", {
70876
+ indicator: "setError",
70877
+ issue_identifier: issue.identifier,
70878
+ error: err.message
70879
+ });
70825
70880
  }
70826
70881
  }
70827
70882
  }
@@ -72552,6 +72607,7 @@ try {
72552
72607
  printHelp();
72553
72608
  process.exit(1);
72554
72609
  }
72610
+ setDefaultProperties({ mode: args.mode, engine: args.engine, model: args.model });
72555
72611
  capture("command_run", { mode: args.mode, engine: args.engine, model: args.model });
72556
72612
  try {
72557
72613
  const projectRoot = await findProjectRoot();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.13.3",
3
+ "version": "2.13.4",
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",