@neriros/ralphy 2.16.1 → 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.
- package/dist/cli/index.js +22 -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.
|
|
35033
|
-
return "2.16.
|
|
35032
|
+
if ("2.16.2")
|
|
35033
|
+
return "2.16.2";
|
|
35034
35034
|
} catch {}
|
|
35035
35035
|
const dirsToTry = [];
|
|
35036
35036
|
try {
|
|
@@ -72619,6 +72619,13 @@ function writeAgentLog(text) {
|
|
|
72619
72619
|
return;
|
|
72620
72620
|
});
|
|
72621
72621
|
}
|
|
72622
|
+
function writePhaseLog(phaseLogFile, text) {
|
|
72623
|
+
const line = `[${new Date().toISOString()}] ${text}
|
|
72624
|
+
`;
|
|
72625
|
+
appendFile(phaseLogFile, line).catch(() => {
|
|
72626
|
+
return;
|
|
72627
|
+
});
|
|
72628
|
+
}
|
|
72622
72629
|
function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
72623
72630
|
const { exit } = use_app_default();
|
|
72624
72631
|
const { stdout } = use_stdout_default();
|
|
@@ -72662,10 +72669,16 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72662
72669
|
onWorkersChanged: () => setTick((t) => t + 1),
|
|
72663
72670
|
onWorkerStarted: (changeName, dir, logFile, changeDir) => {
|
|
72664
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
|
+
});
|
|
72665
72677
|
workerMetaRef.current.set(changeName, {
|
|
72666
72678
|
startedAt: Date.now(),
|
|
72667
72679
|
statesDir: dir,
|
|
72668
72680
|
logFile,
|
|
72681
|
+
phaseLogFile,
|
|
72669
72682
|
changeDir,
|
|
72670
72683
|
iter: 0,
|
|
72671
72684
|
phase: "working",
|
|
@@ -72679,6 +72692,10 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72679
72692
|
},
|
|
72680
72693
|
onWorkerExited: (changeName) => {
|
|
72681
72694
|
writeAgentLog(`worker-exited ${changeName}`);
|
|
72695
|
+
const m = workerMetaRef.current.get(changeName);
|
|
72696
|
+
if (m?.phaseLogFile) {
|
|
72697
|
+
writePhaseLog(m.phaseLogFile, `=== worker-exited ===`);
|
|
72698
|
+
}
|
|
72682
72699
|
workerMetaRef.current.delete(changeName);
|
|
72683
72700
|
},
|
|
72684
72701
|
onWorkerPhase: (changeName, phase, detail) => {
|
|
@@ -72691,6 +72708,9 @@ function AgentMode({ args, projectRoot, statesDir, tasksDir }) {
|
|
|
72691
72708
|
}
|
|
72692
72709
|
m.phase = phase;
|
|
72693
72710
|
m.phaseDetail = detail ?? "";
|
|
72711
|
+
if (m.phaseLogFile) {
|
|
72712
|
+
writePhaseLog(m.phaseLogFile, `${phase}${detail ? ` (${detail})` : ""}`);
|
|
72713
|
+
}
|
|
72694
72714
|
},
|
|
72695
72715
|
onWorkerOutput: (changeName, line) => {
|
|
72696
72716
|
const m = workerMetaRef.current.get(changeName);
|