orquesta-cli 0.2.46 → 0.2.47
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/eval/eval-runner.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createLLMClient } from '../core/llm/llm-client.js';
|
|
2
2
|
import { configManager } from '../core/config/config-manager.js';
|
|
3
3
|
import { PlanExecutor } from '../orchestration/plan-executor.js';
|
|
4
|
+
import * as fs from 'fs';
|
|
5
|
+
import * as path from 'path';
|
|
4
6
|
function emitEvent(event) {
|
|
5
7
|
console.log(JSON.stringify(event));
|
|
6
8
|
}
|
|
@@ -15,8 +17,11 @@ export class EvalRunner {
|
|
|
15
17
|
filesModified = new Set();
|
|
16
18
|
lastResponse = '';
|
|
17
19
|
todos = [];
|
|
20
|
+
followUpFile;
|
|
18
21
|
constructor() {
|
|
19
22
|
this.planExecutor = new PlanExecutor();
|
|
23
|
+
const tmpDir = process.env['ORQUESTA_IPC_DIR'] || path.join(process.env['HOME'] || '/tmp', '.orquesta-cli');
|
|
24
|
+
this.followUpFile = path.join(tmpDir, 'follow-up.msg');
|
|
20
25
|
}
|
|
21
26
|
async run(input) {
|
|
22
27
|
this.startTime = Date.now();
|
|
@@ -126,6 +131,23 @@ export class EvalRunner {
|
|
|
126
131
|
},
|
|
127
132
|
setAskUserRequest: () => {
|
|
128
133
|
},
|
|
134
|
+
getPendingMessage: () => {
|
|
135
|
+
try {
|
|
136
|
+
if (fs.existsSync(this.followUpFile)) {
|
|
137
|
+
const msg = fs.readFileSync(this.followUpFile, 'utf-8').trim();
|
|
138
|
+
if (msg)
|
|
139
|
+
return msg;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch { }
|
|
143
|
+
return null;
|
|
144
|
+
},
|
|
145
|
+
clearPendingMessage: () => {
|
|
146
|
+
try {
|
|
147
|
+
fs.unlinkSync(this.followUpFile);
|
|
148
|
+
}
|
|
149
|
+
catch { }
|
|
150
|
+
},
|
|
129
151
|
};
|
|
130
152
|
}
|
|
131
153
|
emitTodo(action, todo) {
|