@ai-setting/roy-agent-cli 1.6.10-beta.2 → 1.6.11
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 +57 -7
- package/dist/index.js +57 -7
- 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.
|
|
7429
|
+
version: "1.6.11",
|
|
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
|
}
|
|
@@ -11359,6 +11377,38 @@ var ListCommand = {
|
|
|
11359
11377
|
|
|
11360
11378
|
// src/commands/sessions/get.ts
|
|
11361
11379
|
import chalk8 from "chalk";
|
|
11380
|
+
function colorWorkflowStatus(status) {
|
|
11381
|
+
switch (status) {
|
|
11382
|
+
case "running":
|
|
11383
|
+
return chalk8.green;
|
|
11384
|
+
case "paused":
|
|
11385
|
+
return chalk8.yellow;
|
|
11386
|
+
case "completed":
|
|
11387
|
+
return chalk8.gray;
|
|
11388
|
+
case "failed":
|
|
11389
|
+
return chalk8.red;
|
|
11390
|
+
case "stopped":
|
|
11391
|
+
return chalk8.magenta;
|
|
11392
|
+
default:
|
|
11393
|
+
return chalk8.gray;
|
|
11394
|
+
}
|
|
11395
|
+
}
|
|
11396
|
+
function colorAgentSessionStatus(status) {
|
|
11397
|
+
switch (status) {
|
|
11398
|
+
case "active":
|
|
11399
|
+
return chalk8.green;
|
|
11400
|
+
case "paused":
|
|
11401
|
+
return chalk8.yellow;
|
|
11402
|
+
case "completed":
|
|
11403
|
+
return chalk8.gray;
|
|
11404
|
+
case "failed":
|
|
11405
|
+
return chalk8.red;
|
|
11406
|
+
case "stopped":
|
|
11407
|
+
return chalk8.magenta;
|
|
11408
|
+
default:
|
|
11409
|
+
return chalk8.gray;
|
|
11410
|
+
}
|
|
11411
|
+
}
|
|
11362
11412
|
var GetCommand = {
|
|
11363
11413
|
command: "get <session-id>",
|
|
11364
11414
|
aliases: ["show"],
|
|
@@ -11431,12 +11481,12 @@ var GetCommand = {
|
|
|
11431
11481
|
if (workflowMeta.workflowId) {
|
|
11432
11482
|
lines.push(`│ Workflow ID: ${workflowMeta.workflowId}`);
|
|
11433
11483
|
}
|
|
11434
|
-
const statusColor = workflowMeta.status
|
|
11484
|
+
const statusColor = colorWorkflowStatus(workflowMeta.status);
|
|
11435
11485
|
lines.push(`│ Status: ${statusColor(workflowMeta.status)}`);
|
|
11436
11486
|
if (workflowMeta.agentSessions && workflowMeta.agentSessions.length > 0) {
|
|
11437
11487
|
lines.push("├─ Agent Sub-sessions ─────────────────────────────────┤");
|
|
11438
11488
|
workflowMeta.agentSessions.forEach((agent) => {
|
|
11439
|
-
const agentStatusColor = agent.status
|
|
11489
|
+
const agentStatusColor = colorAgentSessionStatus(agent.status);
|
|
11440
11490
|
lines.push(`│ ${agent.nodeId}: ${agent.sessionId} (${agentStatusColor(agent.status)})`);
|
|
11441
11491
|
});
|
|
11442
11492
|
}
|
|
@@ -15665,8 +15715,8 @@ var CommandsRemoveCommand = {
|
|
|
15665
15715
|
// src/commands/commands-info.ts
|
|
15666
15716
|
import chalk45 from "chalk";
|
|
15667
15717
|
import { exec as exec2 } from "child_process";
|
|
15668
|
-
import { promisify } from "util";
|
|
15669
|
-
var execAsync2 =
|
|
15718
|
+
import { promisify as promisify2 } from "util";
|
|
15719
|
+
var execAsync2 = promisify2(exec2);
|
|
15670
15720
|
var CommandsInfoCommand = {
|
|
15671
15721
|
command: "info <name>",
|
|
15672
15722
|
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.
|
|
7428
|
+
version: "1.6.11",
|
|
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
|
}
|
|
@@ -11358,6 +11376,38 @@ var ListCommand = {
|
|
|
11358
11376
|
|
|
11359
11377
|
// src/commands/sessions/get.ts
|
|
11360
11378
|
import chalk8 from "chalk";
|
|
11379
|
+
function colorWorkflowStatus(status) {
|
|
11380
|
+
switch (status) {
|
|
11381
|
+
case "running":
|
|
11382
|
+
return chalk8.green;
|
|
11383
|
+
case "paused":
|
|
11384
|
+
return chalk8.yellow;
|
|
11385
|
+
case "completed":
|
|
11386
|
+
return chalk8.gray;
|
|
11387
|
+
case "failed":
|
|
11388
|
+
return chalk8.red;
|
|
11389
|
+
case "stopped":
|
|
11390
|
+
return chalk8.magenta;
|
|
11391
|
+
default:
|
|
11392
|
+
return chalk8.gray;
|
|
11393
|
+
}
|
|
11394
|
+
}
|
|
11395
|
+
function colorAgentSessionStatus(status) {
|
|
11396
|
+
switch (status) {
|
|
11397
|
+
case "active":
|
|
11398
|
+
return chalk8.green;
|
|
11399
|
+
case "paused":
|
|
11400
|
+
return chalk8.yellow;
|
|
11401
|
+
case "completed":
|
|
11402
|
+
return chalk8.gray;
|
|
11403
|
+
case "failed":
|
|
11404
|
+
return chalk8.red;
|
|
11405
|
+
case "stopped":
|
|
11406
|
+
return chalk8.magenta;
|
|
11407
|
+
default:
|
|
11408
|
+
return chalk8.gray;
|
|
11409
|
+
}
|
|
11410
|
+
}
|
|
11361
11411
|
var GetCommand = {
|
|
11362
11412
|
command: "get <session-id>",
|
|
11363
11413
|
aliases: ["show"],
|
|
@@ -11430,12 +11480,12 @@ var GetCommand = {
|
|
|
11430
11480
|
if (workflowMeta.workflowId) {
|
|
11431
11481
|
lines.push(`│ Workflow ID: ${workflowMeta.workflowId}`);
|
|
11432
11482
|
}
|
|
11433
|
-
const statusColor = workflowMeta.status
|
|
11483
|
+
const statusColor = colorWorkflowStatus(workflowMeta.status);
|
|
11434
11484
|
lines.push(`│ Status: ${statusColor(workflowMeta.status)}`);
|
|
11435
11485
|
if (workflowMeta.agentSessions && workflowMeta.agentSessions.length > 0) {
|
|
11436
11486
|
lines.push("├─ Agent Sub-sessions ─────────────────────────────────┤");
|
|
11437
11487
|
workflowMeta.agentSessions.forEach((agent) => {
|
|
11438
|
-
const agentStatusColor = agent.status
|
|
11488
|
+
const agentStatusColor = colorAgentSessionStatus(agent.status);
|
|
11439
11489
|
lines.push(`│ ${agent.nodeId}: ${agent.sessionId} (${agentStatusColor(agent.status)})`);
|
|
11440
11490
|
});
|
|
11441
11491
|
}
|
|
@@ -15664,8 +15714,8 @@ var CommandsRemoveCommand = {
|
|
|
15664
15714
|
// src/commands/commands-info.ts
|
|
15665
15715
|
import chalk45 from "chalk";
|
|
15666
15716
|
import { exec as exec2 } from "child_process";
|
|
15667
|
-
import { promisify } from "util";
|
|
15668
|
-
var execAsync2 =
|
|
15717
|
+
import { promisify as promisify2 } from "util";
|
|
15718
|
+
var execAsync2 = promisify2(exec2);
|
|
15669
15719
|
var CommandsInfoCommand = {
|
|
15670
15720
|
command: "info <name>",
|
|
15671
15721
|
describe: "显示命令详细信息",
|
|
Binary file
|