@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.
Files changed (2) hide show
  1. package/bin/locus.js +8 -5
  2. 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 workerPath = join4(__dirname, "agent", "worker.js");
30641
- if (!existsSync4(workerPath)) {
30642
- throw new Error(`Worker file not found at ${workerPath}. ` + `Make sure the SDK is properly built. __dirname: ${__dirname}`);
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 workerTsPath = workerPath.replace(/\.js$/, ".ts");
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") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Local-first AI development platform & engineering workspace",
5
5
  "type": "module",
6
6
  "bin": {