@locusai/cli 0.9.13 → 0.9.14

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.
@@ -30940,8 +30940,6 @@ class WorktreeManager {
30940
30940
  this.log("No changes to commit", "info");
30941
30941
  return null;
30942
30942
  }
30943
- this.gitExec(["config", "user.name", "LocusAgent"], worktreePath);
30944
- this.gitExec(["config", "user.email", "agent@locusai.team"], worktreePath);
30945
30943
  this.git("add -A", worktreePath);
30946
30944
  const staged = this.git("diff --cached --name-only", worktreePath).trim();
30947
30945
  if (!staged) {
package/bin/locus.js CHANGED
@@ -38633,8 +38633,6 @@ class WorktreeManager {
38633
38633
  this.log("No changes to commit", "info");
38634
38634
  return null;
38635
38635
  }
38636
- this.gitExec(["config", "user.name", "LocusAgent"], worktreePath);
38637
- this.gitExec(["config", "user.email", "agent@locusai.team"], worktreePath);
38638
38636
  this.git("add -A", worktreePath);
38639
38637
  const staged = this.git("diff --cached --name-only", worktreePath).trim();
38640
38638
  if (!staged) {
@@ -42658,6 +42656,7 @@ import { parseArgs as parseArgs2 } from "node:util";
42658
42656
 
42659
42657
  // src/config-manager.ts
42660
42658
  init_index_node();
42659
+ import { execSync as execSync3 } from "node:child_process";
42661
42660
  import { existsSync as existsSync15, mkdirSync as mkdirSync7, readFileSync as readFileSync11, writeFileSync as writeFileSync7 } from "node:fs";
42662
42661
  import { join as join14 } from "node:path";
42663
42662
  var LOCUS_GITIGNORE_MARKER = "# Locus AI";
@@ -42749,6 +42748,40 @@ function updateGitignore(projectPath) {
42749
42748
  `;
42750
42749
  writeFileSync7(gitignorePath, content);
42751
42750
  }
42751
+ function ensureGitIdentity(projectPath) {
42752
+ const hasName = (() => {
42753
+ try {
42754
+ return execSync3("git config --get user.name", {
42755
+ cwd: projectPath,
42756
+ stdio: ["pipe", "pipe", "pipe"]
42757
+ }).toString().trim();
42758
+ } catch {
42759
+ return "";
42760
+ }
42761
+ })();
42762
+ const hasEmail = (() => {
42763
+ try {
42764
+ return execSync3("git config --get user.email", {
42765
+ cwd: projectPath,
42766
+ stdio: ["pipe", "pipe", "pipe"]
42767
+ }).toString().trim();
42768
+ } catch {
42769
+ return "";
42770
+ }
42771
+ })();
42772
+ if (!hasName) {
42773
+ execSync3('git config user.name "LocusAgent"', {
42774
+ cwd: projectPath,
42775
+ stdio: "ignore"
42776
+ });
42777
+ }
42778
+ if (!hasEmail) {
42779
+ execSync3('git config user.email "agent@locusai.team"', {
42780
+ cwd: projectPath,
42781
+ stdio: "ignore"
42782
+ });
42783
+ }
42784
+ }
42752
42785
 
42753
42786
  class ConfigManager {
42754
42787
  projectPath;
@@ -42797,6 +42830,7 @@ class ConfigManager {
42797
42830
  writeFileSync7(locusConfigPath, JSON.stringify(config2, null, 2));
42798
42831
  }
42799
42832
  updateGitignore(this.projectPath);
42833
+ ensureGitIdentity(this.projectPath);
42800
42834
  }
42801
42835
  loadConfig() {
42802
42836
  const path2 = getLocusPath(this.projectPath, "configFile");
@@ -42880,6 +42914,7 @@ class ConfigManager {
42880
42914
  if (gitignoreBefore !== gitignoreAfter) {
42881
42915
  result.gitignoreUpdated = true;
42882
42916
  }
42917
+ ensureGitIdentity(this.projectPath);
42883
42918
  return result;
42884
42919
  }
42885
42920
  getWorkspaceId() {
@@ -44423,11 +44458,11 @@ async function telegramCommand(args) {
44423
44458
  }
44424
44459
  // src/commands/upgrade.ts
44425
44460
  init_index_node();
44426
- import { execSync as execSync3 } from "node:child_process";
44461
+ import { execSync as execSync4 } from "node:child_process";
44427
44462
  var PACKAGES = ["@locusai/cli", "@locusai/telegram"];
44428
44463
  function getInstalledVersion(pkg) {
44429
44464
  try {
44430
- const output = execSync3(`npm list -g ${pkg} --depth=0 --json`, {
44465
+ const output = execSync4(`npm list -g ${pkg} --depth=0 --json`, {
44431
44466
  encoding: "utf-8",
44432
44467
  stdio: ["pipe", "pipe", "pipe"]
44433
44468
  });
@@ -44439,7 +44474,7 @@ function getInstalledVersion(pkg) {
44439
44474
  }
44440
44475
  function getLatestVersion(pkg) {
44441
44476
  try {
44442
- return execSync3(`npm view ${pkg} version`, {
44477
+ return execSync4(`npm view ${pkg} version`, {
44443
44478
  encoding: "utf-8",
44444
44479
  stdio: ["pipe", "pipe", "pipe"]
44445
44480
  }).trim();
@@ -44453,7 +44488,7 @@ async function upgradeCommand() {
44453
44488
  `);
44454
44489
  try {
44455
44490
  console.log(` ${c.dim("◌")} Cleaning npm cache...`);
44456
- execSync3("npm cache clean --force", {
44491
+ execSync4("npm cache clean --force", {
44457
44492
  stdio: ["pipe", "pipe", "pipe"]
44458
44493
  });
44459
44494
  console.log(` ${c.success("✔")} npm cache cleaned
@@ -44479,7 +44514,7 @@ async function upgradeCommand() {
44479
44514
  }
44480
44515
  console.log(` ${c.primary("↑")} ${c.bold(pkg)} ${c.dim(`v${current}`)} → ${c.primary(`v${latest}`)}`);
44481
44516
  try {
44482
- execSync3(`npm install -g ${pkg}@latest`, {
44517
+ execSync4(`npm install -g ${pkg}@latest`, {
44483
44518
  stdio: "inherit"
44484
44519
  });
44485
44520
  console.log(` ${c.success("✔")} ${c.bold(pkg)} updated to ${c.primary(`v${latest}`)}
@@ -44494,10 +44529,10 @@ async function upgradeCommand() {
44494
44529
  }
44495
44530
  // src/commands/version.ts
44496
44531
  init_index_node();
44497
- import { execSync as execSync4 } from "node:child_process";
44532
+ import { execSync as execSync5 } from "node:child_process";
44498
44533
  function getTelegramVersion() {
44499
44534
  try {
44500
- const output = execSync4("npm list -g @locusai/telegram --depth=0 --json", {
44535
+ const output = execSync5("npm list -g @locusai/telegram --depth=0 --json", {
44501
44536
  encoding: "utf-8",
44502
44537
  stdio: ["pipe", "pipe", "pipe"]
44503
44538
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locusai/cli",
3
- "version": "0.9.13",
3
+ "version": "0.9.14",
4
4
  "description": "CLI for Locus - AI-native project management platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,7 +32,7 @@
32
32
  "author": "",
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
- "@locusai/sdk": "^0.9.13"
35
+ "@locusai/sdk": "^0.9.14"
36
36
  },
37
37
  "devDependencies": {}
38
38
  }