@locusai/cli 0.4.11 → 0.4.12

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 +6 -14
  2. package/package.json +2 -2
package/bin/locus.js CHANGED
@@ -17026,7 +17026,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
17026
17026
  // src/cli.ts
17027
17027
  import { existsSync as existsSync6, readFileSync as readFileSync5 } from "node:fs";
17028
17028
  import { dirname as dirname3, join as join6 } from "node:path";
17029
- import { fileURLToPath as fileURLToPath2 } from "node:url";
17029
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
17030
17030
  import { parseArgs } from "node:util";
17031
17031
 
17032
17032
  // ../sdk/src/agent/artifact-syncer.ts
@@ -30693,6 +30693,7 @@ if (process.argv[1]?.includes("agent-worker") || process.argv[1]?.includes("work
30693
30693
  import { spawn as spawn2 } from "node:child_process";
30694
30694
  import { existsSync as existsSync4 } from "node:fs";
30695
30695
  import { dirname as dirname2, join as join4 } from "node:path";
30696
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
30696
30697
  import { EventEmitter as EventEmitter3 } from "events";
30697
30698
  class AgentOrchestrator extends EventEmitter3 {
30698
30699
  client;
@@ -30771,16 +30772,6 @@ ${c.primary("\uD83E\uDD16 Locus Agent Orchestrator")}`);
30771
30772
  console.log(`
30772
30773
  ${c.success("✅ Orchestrator finished")}`);
30773
30774
  }
30774
- findPackageRoot(startPath) {
30775
- let currentDir = startPath;
30776
- while (currentDir !== "/") {
30777
- if (existsSync4(join4(currentDir, "package.json"))) {
30778
- return currentDir;
30779
- }
30780
- currentDir = dirname2(currentDir);
30781
- }
30782
- return startPath;
30783
- }
30784
30775
  async spawnAgent() {
30785
30776
  const agentId = `agent-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
30786
30777
  const agentState = {
@@ -30795,8 +30786,9 @@ ${c.success("✅ Orchestrator finished")}`);
30795
30786
  console.log(`${c.primary("\uD83D\uDE80 Agent started:")} ${c.bold(agentId)}
30796
30787
  `);
30797
30788
  const potentialPaths = [];
30798
- const entryDir = dirname2(process.argv[1]);
30799
- potentialPaths.push(join4(entryDir, "agent", "worker.js"), join4(entryDir, "worker.js"));
30789
+ const currentModulePath = fileURLToPath2(import.meta.url);
30790
+ const currentModuleDir = dirname2(currentModulePath);
30791
+ potentialPaths.push(join4(currentModuleDir, "agent", "worker.js"), join4(currentModuleDir, "worker.js"));
30800
30792
  const workerPath = potentialPaths.find((p) => existsSync4(p));
30801
30793
  if (!workerPath) {
30802
30794
  throw new Error(`Worker file not found. Checked: ${potentialPaths.join(", ")}. ` + `Make sure the SDK is properly built and installed.`);
@@ -31060,7 +31052,7 @@ ${tree}`;
31060
31052
  // src/cli.ts
31061
31053
  function getVersion() {
31062
31054
  try {
31063
- const __filename2 = fileURLToPath2(import.meta.url);
31055
+ const __filename2 = fileURLToPath3(import.meta.url);
31064
31056
  const __dirname2 = dirname3(__filename2);
31065
31057
  const packagePath = join6(__dirname2, "..", "package.json");
31066
31058
  if (existsSync6(packagePath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/cli",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "Local-first AI development platform & engineering workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "author": "",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@locusai/sdk": "^0.4.11"
34
+ "@locusai/sdk": "^0.4.12"
35
35
  },
36
36
  "devDependencies": {}
37
37
  }