@locusai/cli 0.3.0 → 0.3.1
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/bin/locus.js +8 -5
- package/package.json +1 -1
package/bin/locus.js
CHANGED
|
@@ -30637,9 +30637,13 @@ class AgentOrchestrator extends EventEmitter3 {
|
|
|
30637
30637
|
this.agents.set(agentId, agentState);
|
|
30638
30638
|
console.log(`\uD83D\uDE80 Agent started: ${agentId}
|
|
30639
30639
|
`);
|
|
30640
|
-
const
|
|
30641
|
-
|
|
30642
|
-
|
|
30640
|
+
const potentialPaths = [
|
|
30641
|
+
join4(__dirname, "agent", "worker.ts"),
|
|
30642
|
+
join4(__dirname, "agent", "worker.js")
|
|
30643
|
+
];
|
|
30644
|
+
const workerPath = potentialPaths.find((p) => existsSync4(p));
|
|
30645
|
+
if (!workerPath) {
|
|
30646
|
+
throw new Error(`Worker file not found. Checked: ${potentialPaths.join(", ")}. ` + `Make sure the SDK is properly built. __dirname: ${__dirname}`);
|
|
30643
30647
|
}
|
|
30644
30648
|
const workerArgs = [
|
|
30645
30649
|
"--agent-id",
|
|
@@ -30662,8 +30666,7 @@ class AgentOrchestrator extends EventEmitter3 {
|
|
|
30662
30666
|
if (this.resolvedSprintId) {
|
|
30663
30667
|
workerArgs.push("--sprint-id", this.resolvedSprintId);
|
|
30664
30668
|
}
|
|
30665
|
-
const
|
|
30666
|
-
const agentProcess = spawn2("bun", ["run", workerTsPath, ...workerArgs]);
|
|
30669
|
+
const agentProcess = spawn2("bun", ["run", workerPath, ...workerArgs]);
|
|
30667
30670
|
agentState.process = agentProcess;
|
|
30668
30671
|
agentProcess.on("message", (msg) => {
|
|
30669
30672
|
if (msg.type === "stats") {
|