@ai-setting/roy-agent-cli 1.6.10-beta.2 → 1.6.10
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/dist/bin/roy-agent.js +23 -5
- package/dist/index.js +23 -5
- package/dist/roy-agent-linux-x64/bin/roy-agent +0 -0
- package/package.json +1 -1
- package/dist/index.d.ts +0 -5126
package/dist/bin/roy-agent.js
CHANGED
|
@@ -7426,7 +7426,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7426
7426
|
var require_package = __commonJS((exports, module) => {
|
|
7427
7427
|
module.exports = {
|
|
7428
7428
|
name: "@ai-setting/roy-agent-cli",
|
|
7429
|
-
version: "1.6.10
|
|
7429
|
+
version: "1.6.10",
|
|
7430
7430
|
type: "module",
|
|
7431
7431
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7432
7432
|
main: "./dist/index.js",
|
|
@@ -7535,6 +7535,10 @@ class CliQuietModeService {
|
|
|
7535
7535
|
}
|
|
7536
7536
|
}
|
|
7537
7537
|
|
|
7538
|
+
// src/commands/act.ts
|
|
7539
|
+
import { execFile, execFileSync } from "node:child_process";
|
|
7540
|
+
import { promisify } from "node:util";
|
|
7541
|
+
|
|
7538
7542
|
// src/services/environment.service.ts
|
|
7539
7543
|
import path from "path";
|
|
7540
7544
|
import os from "os";
|
|
@@ -8566,6 +8570,18 @@ async function runActShutdownCleanup(deps) {
|
|
|
8566
8570
|
}
|
|
8567
8571
|
|
|
8568
8572
|
// src/commands/act.ts
|
|
8573
|
+
function detectWorkspaceRoot(cwd = process.cwd(), runGit = execFileSync) {
|
|
8574
|
+
try {
|
|
8575
|
+
return runGit("git", ["rev-parse", "--show-toplevel"], {
|
|
8576
|
+
cwd,
|
|
8577
|
+
encoding: "utf8",
|
|
8578
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
8579
|
+
}).trim();
|
|
8580
|
+
} catch {
|
|
8581
|
+
return cwd;
|
|
8582
|
+
}
|
|
8583
|
+
}
|
|
8584
|
+
var execFileAsync = promisify(execFile);
|
|
8569
8585
|
function createActCommand(externalEnvService) {
|
|
8570
8586
|
return {
|
|
8571
8587
|
command: "act [message]",
|
|
@@ -8760,16 +8776,18 @@ function createActCommand(externalEnvService) {
|
|
|
8760
8776
|
}
|
|
8761
8777
|
}
|
|
8762
8778
|
const { createGlobalLSPManager: createGlobalLSPManager2 } = await import("@ai-setting/roy-agent-coder-harness");
|
|
8779
|
+
const detectedRoot = detectWorkspaceRoot();
|
|
8763
8780
|
const lspManager = createGlobalLSPManager2({
|
|
8764
8781
|
idleTimeout: lspConfig.idleTimeout ?? 300000,
|
|
8765
8782
|
maxConnections: lspConfig.maxConnections ?? 10,
|
|
8766
8783
|
autoDownload: lspConfig.autoInstall ?? false,
|
|
8767
|
-
preloadLanguages: lspConfig.preloadLanguages
|
|
8784
|
+
preloadLanguages: lspConfig.preloadLanguages,
|
|
8785
|
+
workspaceRoot: detectedRoot
|
|
8768
8786
|
});
|
|
8769
8787
|
lspManager.registerShutdownHandler();
|
|
8770
8788
|
lspManagerDispose = () => lspManager.dispose();
|
|
8771
8789
|
if (lspConfig.preload || coderPluginNames.includes("lsp")) {
|
|
8772
|
-
lspManager.prewarm().then(() => {
|
|
8790
|
+
lspManager.prewarm(undefined, detectedRoot).then(() => {
|
|
8773
8791
|
if (!quiet) {
|
|
8774
8792
|
output.success("✅ LSP 服务器预热完成");
|
|
8775
8793
|
}
|
|
@@ -15665,8 +15683,8 @@ var CommandsRemoveCommand = {
|
|
|
15665
15683
|
// src/commands/commands-info.ts
|
|
15666
15684
|
import chalk45 from "chalk";
|
|
15667
15685
|
import { exec as exec2 } from "child_process";
|
|
15668
|
-
import { promisify } from "util";
|
|
15669
|
-
var execAsync2 =
|
|
15686
|
+
import { promisify as promisify2 } from "util";
|
|
15687
|
+
var execAsync2 = promisify2(exec2);
|
|
15670
15688
|
var CommandsInfoCommand = {
|
|
15671
15689
|
command: "info <name>",
|
|
15672
15690
|
describe: "显示命令详细信息",
|
package/dist/index.js
CHANGED
|
@@ -7425,7 +7425,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7425
7425
|
var require_package = __commonJS((exports, module) => {
|
|
7426
7426
|
module.exports = {
|
|
7427
7427
|
name: "@ai-setting/roy-agent-cli",
|
|
7428
|
-
version: "1.6.10
|
|
7428
|
+
version: "1.6.10",
|
|
7429
7429
|
type: "module",
|
|
7430
7430
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7431
7431
|
main: "./dist/index.js",
|
|
@@ -7534,6 +7534,10 @@ class CliQuietModeService {
|
|
|
7534
7534
|
}
|
|
7535
7535
|
}
|
|
7536
7536
|
|
|
7537
|
+
// src/commands/act.ts
|
|
7538
|
+
import { execFile, execFileSync } from "node:child_process";
|
|
7539
|
+
import { promisify } from "node:util";
|
|
7540
|
+
|
|
7537
7541
|
// src/services/environment.service.ts
|
|
7538
7542
|
import path from "path";
|
|
7539
7543
|
import os from "os";
|
|
@@ -8565,6 +8569,18 @@ async function runActShutdownCleanup(deps) {
|
|
|
8565
8569
|
}
|
|
8566
8570
|
|
|
8567
8571
|
// src/commands/act.ts
|
|
8572
|
+
function detectWorkspaceRoot(cwd = process.cwd(), runGit = execFileSync) {
|
|
8573
|
+
try {
|
|
8574
|
+
return runGit("git", ["rev-parse", "--show-toplevel"], {
|
|
8575
|
+
cwd,
|
|
8576
|
+
encoding: "utf8",
|
|
8577
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
8578
|
+
}).trim();
|
|
8579
|
+
} catch {
|
|
8580
|
+
return cwd;
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
var execFileAsync = promisify(execFile);
|
|
8568
8584
|
function createActCommand(externalEnvService) {
|
|
8569
8585
|
return {
|
|
8570
8586
|
command: "act [message]",
|
|
@@ -8759,16 +8775,18 @@ function createActCommand(externalEnvService) {
|
|
|
8759
8775
|
}
|
|
8760
8776
|
}
|
|
8761
8777
|
const { createGlobalLSPManager: createGlobalLSPManager2 } = await import("@ai-setting/roy-agent-coder-harness");
|
|
8778
|
+
const detectedRoot = detectWorkspaceRoot();
|
|
8762
8779
|
const lspManager = createGlobalLSPManager2({
|
|
8763
8780
|
idleTimeout: lspConfig.idleTimeout ?? 300000,
|
|
8764
8781
|
maxConnections: lspConfig.maxConnections ?? 10,
|
|
8765
8782
|
autoDownload: lspConfig.autoInstall ?? false,
|
|
8766
|
-
preloadLanguages: lspConfig.preloadLanguages
|
|
8783
|
+
preloadLanguages: lspConfig.preloadLanguages,
|
|
8784
|
+
workspaceRoot: detectedRoot
|
|
8767
8785
|
});
|
|
8768
8786
|
lspManager.registerShutdownHandler();
|
|
8769
8787
|
lspManagerDispose = () => lspManager.dispose();
|
|
8770
8788
|
if (lspConfig.preload || coderPluginNames.includes("lsp")) {
|
|
8771
|
-
lspManager.prewarm().then(() => {
|
|
8789
|
+
lspManager.prewarm(undefined, detectedRoot).then(() => {
|
|
8772
8790
|
if (!quiet) {
|
|
8773
8791
|
output.success("✅ LSP 服务器预热完成");
|
|
8774
8792
|
}
|
|
@@ -15664,8 +15682,8 @@ var CommandsRemoveCommand = {
|
|
|
15664
15682
|
// src/commands/commands-info.ts
|
|
15665
15683
|
import chalk45 from "chalk";
|
|
15666
15684
|
import { exec as exec2 } from "child_process";
|
|
15667
|
-
import { promisify } from "util";
|
|
15668
|
-
var execAsync2 =
|
|
15685
|
+
import { promisify as promisify2 } from "util";
|
|
15686
|
+
var execAsync2 = promisify2(exec2);
|
|
15669
15687
|
var CommandsInfoCommand = {
|
|
15670
15688
|
command: "info <name>",
|
|
15671
15689
|
describe: "显示命令详细信息",
|
|
Binary file
|