@locusai/cli 0.9.12 → 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.
- package/bin/agent/worker.js +1 -1
- package/bin/locus.js +45 -8
- package/package.json +2 -2
package/bin/agent/worker.js
CHANGED
|
@@ -31536,7 +31536,7 @@ class AgentWorker {
|
|
|
31536
31536
|
const trailers = [
|
|
31537
31537
|
`Task-ID: ${task2.id}`,
|
|
31538
31538
|
`Agent: ${this.config.agentId}`,
|
|
31539
|
-
"Co-authored-by: LocusAI <
|
|
31539
|
+
"Co-authored-by: LocusAI <agent@locusai.team>"
|
|
31540
31540
|
];
|
|
31541
31541
|
if (this.ghUsername) {
|
|
31542
31542
|
trailers.push(`Co-authored-by: ${this.ghUsername} <${this.ghUsername}@users.noreply.github.com>`);
|
package/bin/locus.js
CHANGED
|
@@ -38909,7 +38909,7 @@ class AgentWorker {
|
|
|
38909
38909
|
const trailers = [
|
|
38910
38910
|
`Task-ID: ${task2.id}`,
|
|
38911
38911
|
`Agent: ${this.config.agentId}`,
|
|
38912
|
-
"Co-authored-by: LocusAI <
|
|
38912
|
+
"Co-authored-by: LocusAI <agent@locusai.team>"
|
|
38913
38913
|
];
|
|
38914
38914
|
if (this.ghUsername) {
|
|
38915
38915
|
trailers.push(`Co-authored-by: ${this.ghUsername} <${this.ghUsername}@users.noreply.github.com>`);
|
|
@@ -42656,6 +42656,7 @@ import { parseArgs as parseArgs2 } from "node:util";
|
|
|
42656
42656
|
|
|
42657
42657
|
// src/config-manager.ts
|
|
42658
42658
|
init_index_node();
|
|
42659
|
+
import { execSync as execSync3 } from "node:child_process";
|
|
42659
42660
|
import { existsSync as existsSync15, mkdirSync as mkdirSync7, readFileSync as readFileSync11, writeFileSync as writeFileSync7 } from "node:fs";
|
|
42660
42661
|
import { join as join14 } from "node:path";
|
|
42661
42662
|
var LOCUS_GITIGNORE_MARKER = "# Locus AI";
|
|
@@ -42747,6 +42748,40 @@ function updateGitignore(projectPath) {
|
|
|
42747
42748
|
`;
|
|
42748
42749
|
writeFileSync7(gitignorePath, content);
|
|
42749
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
|
+
}
|
|
42750
42785
|
|
|
42751
42786
|
class ConfigManager {
|
|
42752
42787
|
projectPath;
|
|
@@ -42795,6 +42830,7 @@ class ConfigManager {
|
|
|
42795
42830
|
writeFileSync7(locusConfigPath, JSON.stringify(config2, null, 2));
|
|
42796
42831
|
}
|
|
42797
42832
|
updateGitignore(this.projectPath);
|
|
42833
|
+
ensureGitIdentity(this.projectPath);
|
|
42798
42834
|
}
|
|
42799
42835
|
loadConfig() {
|
|
42800
42836
|
const path2 = getLocusPath(this.projectPath, "configFile");
|
|
@@ -42878,6 +42914,7 @@ class ConfigManager {
|
|
|
42878
42914
|
if (gitignoreBefore !== gitignoreAfter) {
|
|
42879
42915
|
result.gitignoreUpdated = true;
|
|
42880
42916
|
}
|
|
42917
|
+
ensureGitIdentity(this.projectPath);
|
|
42881
42918
|
return result;
|
|
42882
42919
|
}
|
|
42883
42920
|
getWorkspaceId() {
|
|
@@ -44421,11 +44458,11 @@ async function telegramCommand(args) {
|
|
|
44421
44458
|
}
|
|
44422
44459
|
// src/commands/upgrade.ts
|
|
44423
44460
|
init_index_node();
|
|
44424
|
-
import { execSync as
|
|
44461
|
+
import { execSync as execSync4 } from "node:child_process";
|
|
44425
44462
|
var PACKAGES = ["@locusai/cli", "@locusai/telegram"];
|
|
44426
44463
|
function getInstalledVersion(pkg) {
|
|
44427
44464
|
try {
|
|
44428
|
-
const output =
|
|
44465
|
+
const output = execSync4(`npm list -g ${pkg} --depth=0 --json`, {
|
|
44429
44466
|
encoding: "utf-8",
|
|
44430
44467
|
stdio: ["pipe", "pipe", "pipe"]
|
|
44431
44468
|
});
|
|
@@ -44437,7 +44474,7 @@ function getInstalledVersion(pkg) {
|
|
|
44437
44474
|
}
|
|
44438
44475
|
function getLatestVersion(pkg) {
|
|
44439
44476
|
try {
|
|
44440
|
-
return
|
|
44477
|
+
return execSync4(`npm view ${pkg} version`, {
|
|
44441
44478
|
encoding: "utf-8",
|
|
44442
44479
|
stdio: ["pipe", "pipe", "pipe"]
|
|
44443
44480
|
}).trim();
|
|
@@ -44451,7 +44488,7 @@ async function upgradeCommand() {
|
|
|
44451
44488
|
`);
|
|
44452
44489
|
try {
|
|
44453
44490
|
console.log(` ${c.dim("◌")} Cleaning npm cache...`);
|
|
44454
|
-
|
|
44491
|
+
execSync4("npm cache clean --force", {
|
|
44455
44492
|
stdio: ["pipe", "pipe", "pipe"]
|
|
44456
44493
|
});
|
|
44457
44494
|
console.log(` ${c.success("✔")} npm cache cleaned
|
|
@@ -44477,7 +44514,7 @@ async function upgradeCommand() {
|
|
|
44477
44514
|
}
|
|
44478
44515
|
console.log(` ${c.primary("↑")} ${c.bold(pkg)} ${c.dim(`v${current}`)} → ${c.primary(`v${latest}`)}`);
|
|
44479
44516
|
try {
|
|
44480
|
-
|
|
44517
|
+
execSync4(`npm install -g ${pkg}@latest`, {
|
|
44481
44518
|
stdio: "inherit"
|
|
44482
44519
|
});
|
|
44483
44520
|
console.log(` ${c.success("✔")} ${c.bold(pkg)} updated to ${c.primary(`v${latest}`)}
|
|
@@ -44492,10 +44529,10 @@ async function upgradeCommand() {
|
|
|
44492
44529
|
}
|
|
44493
44530
|
// src/commands/version.ts
|
|
44494
44531
|
init_index_node();
|
|
44495
|
-
import { execSync as
|
|
44532
|
+
import { execSync as execSync5 } from "node:child_process";
|
|
44496
44533
|
function getTelegramVersion() {
|
|
44497
44534
|
try {
|
|
44498
|
-
const output =
|
|
44535
|
+
const output = execSync5("npm list -g @locusai/telegram --depth=0 --json", {
|
|
44499
44536
|
encoding: "utf-8",
|
|
44500
44537
|
stdio: ["pipe", "pipe", "pipe"]
|
|
44501
44538
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.9.
|
|
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.
|
|
35
|
+
"@locusai/sdk": "^0.9.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {}
|
|
38
38
|
}
|