@neriros/ralphy 2.16.0 → 2.16.2

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 +23 -10
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -35029,8 +35029,8 @@ import { readFileSync as readFileSync2 } from "fs";
35029
35029
  import { resolve } from "path";
35030
35030
  function getVersion() {
35031
35031
  try {
35032
- if ("2.16.0")
35033
- return "2.16.0";
35032
+ if ("2.16.2")
35033
+ return "2.16.2";
35034
35034
  } catch {}
35035
35035
  const dirsToTry = [];
35036
35036
  try {
@@ -60791,14 +60791,7 @@ async function fixConflictsAndCiLoop(ctx, prUrl, wantFixCi, checkPrConflict) {
60791
60791
  onPhase: (p, d) => ctx.emit(p, d),
60792
60792
  getStatus: () => getPrChecksStatus(prUrl, ctx.cmd, ctx.cwd, (n, ms, why) => ctx.log(` gh transient (try ${n}) \u2014 retry in ${Math.round(ms / 1000)}s \xB7 ${why}`, "yellow")),
60793
60793
  getFailedLogs: (ids) => fetchFailedRunLogs(ids, ctx.cmd, ctx.cwd),
60794
- runTaskWithSteering: async (steering) => {
60795
- try {
60796
- await prependFixTask(join14(ctx.changeDir, "tasks.md"), "Fix failing CI checks", steering);
60797
- } catch (err) {
60798
- ctx.log(`! could not prepend fix task: ${err.message}`, "red");
60799
- }
60800
- return ctx.respawnWorker();
60801
- },
60794
+ runTaskWithSteering: (steering) => runWorkerWithFixTask(ctx, "Fix failing CI checks", steering),
60802
60795
  pushBranch: async () => {
60803
60796
  await ctx.cmd.run(["git", "push", "origin", ctx.branch], ctx.cwd);
60804
60797
  },
@@ -72626,6 +72619,13 @@ function writeAgentLog(text) {
72626
72619
  return;
72627
72620
  });
72628
72621
  }
72622
+ function writePhaseLog(phaseLogFile, text) {
72623
+ const line = `[${new Date().toISOString()}] ${text}
72624
+ `;
72625
+ appendFile(phaseLogFile, line).catch(() => {
72626
+ return;
72627
+ });
72628
+ }
72629
72629
  function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72630
72630
  const { exit } = use_app_default();
72631
72631
  const { stdout } = use_stdout_default();
@@ -72669,10 +72669,16 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72669
72669
  onWorkersChanged: () => setTick((t) => t + 1),
72670
72670
  onWorkerStarted: (changeName, dir, logFile, changeDir) => {
72671
72671
  writeAgentLog(`worker-started ${changeName} log=${logFile}`);
72672
+ const phaseLogFile = logFile.replace(/\.log$/, "-phases.log");
72673
+ mkdir4(dirname4(phaseLogFile), { recursive: true }).then(() => appendFile(phaseLogFile, `=== session ${SESSION_START} | worker-started ${new Date().toISOString()} ===
72674
+ `)).catch(() => {
72675
+ return;
72676
+ });
72672
72677
  workerMetaRef.current.set(changeName, {
72673
72678
  startedAt: Date.now(),
72674
72679
  statesDir: dir,
72675
72680
  logFile,
72681
+ phaseLogFile,
72676
72682
  changeDir,
72677
72683
  iter: 0,
72678
72684
  phase: "working",
@@ -72686,6 +72692,10 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72686
72692
  },
72687
72693
  onWorkerExited: (changeName) => {
72688
72694
  writeAgentLog(`worker-exited ${changeName}`);
72695
+ const m = workerMetaRef.current.get(changeName);
72696
+ if (m?.phaseLogFile) {
72697
+ writePhaseLog(m.phaseLogFile, `=== worker-exited ===`);
72698
+ }
72689
72699
  workerMetaRef.current.delete(changeName);
72690
72700
  },
72691
72701
  onWorkerPhase: (changeName, phase, detail) => {
@@ -72698,6 +72708,9 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
72698
72708
  }
72699
72709
  m.phase = phase;
72700
72710
  m.phaseDetail = detail ?? "";
72711
+ if (m.phaseLogFile) {
72712
+ writePhaseLog(m.phaseLogFile, `${phase}${detail ? ` (${detail})` : ""}`);
72713
+ }
72701
72714
  },
72702
72715
  onWorkerOutput: (changeName, line) => {
72703
72716
  const m = workerMetaRef.current.get(changeName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.16.0",
3
+ "version": "2.16.2",
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",