@ai-setting/roy-agent-cli 1.6.3 → 1.6.5
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 +24 -8
- package/dist/index.js +24 -8
- package/dist/roy-agent-linux-x64/bin/roy-agent +0 -0
- package/package.json +1 -1
package/dist/bin/roy-agent.js
CHANGED
|
@@ -207,9 +207,8 @@ ${COLORS.system("[已中断]")}
|
|
|
207
207
|
process.stdout.write(COLORS.reasoning(delta));
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
|
-
if (this.reasoningClosedByText)
|
|
211
|
-
|
|
212
|
-
}
|
|
210
|
+
if (this.reasoningClosedByText)
|
|
211
|
+
return;
|
|
213
212
|
this.reasoningBuffer += delta;
|
|
214
213
|
if (this.reasoningBuffer.length >= 15) {
|
|
215
214
|
this.flushReasoningBuffer();
|
|
@@ -7407,7 +7406,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7407
7406
|
var require_package = __commonJS((exports, module) => {
|
|
7408
7407
|
module.exports = {
|
|
7409
7408
|
name: "@ai-setting/roy-agent-cli",
|
|
7410
|
-
version: "1.6.
|
|
7409
|
+
version: "1.6.5",
|
|
7411
7410
|
type: "module",
|
|
7412
7411
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7413
7412
|
main: "./dist/index.js",
|
|
@@ -9016,7 +9015,12 @@ class QueryExecutor {
|
|
|
9016
9015
|
this.output = options.output;
|
|
9017
9016
|
this.quiet = options.quiet;
|
|
9018
9017
|
}
|
|
9019
|
-
initSummaryAgent(
|
|
9018
|
+
initSummaryAgent(llmComponent, promptComponent) {
|
|
9019
|
+
const session = this.sessionComponent;
|
|
9020
|
+
if (typeof session.setSummaryComponents === "function") {
|
|
9021
|
+
session.setSummaryComponents(promptComponent, llmComponent);
|
|
9022
|
+
}
|
|
9023
|
+
}
|
|
9020
9024
|
initStreamOutput(llmComponent, providerId = "minimax") {
|
|
9021
9025
|
if (llmComponent) {
|
|
9022
9026
|
const contextConfig = llmComponent.getContextThresholdConfig(providerId);
|
|
@@ -10616,6 +10620,11 @@ function createInteractiveCommand(externalEnvService) {
|
|
|
10616
10620
|
}).option("model", {
|
|
10617
10621
|
describe: "使用的模型",
|
|
10618
10622
|
type: "string"
|
|
10623
|
+
}).option("default-agent-name", {
|
|
10624
|
+
alias: "dan",
|
|
10625
|
+
describe: "Default agent 名字(默认 Roy,可被覆盖)",
|
|
10626
|
+
type: "string",
|
|
10627
|
+
default: "Roy"
|
|
10619
10628
|
}),
|
|
10620
10629
|
async handler(args) {
|
|
10621
10630
|
CliQuietModeService.getInstance().setQuiet(true);
|
|
@@ -10785,7 +10794,12 @@ function createInteractiveCommand(externalEnvService) {
|
|
|
10785
10794
|
...currentAgentContext,
|
|
10786
10795
|
model: args.model,
|
|
10787
10796
|
...agentContext,
|
|
10788
|
-
eventSourceSystemPrompt
|
|
10797
|
+
eventSourceSystemPrompt,
|
|
10798
|
+
metadata: {
|
|
10799
|
+
...currentAgentContext?.metadata ?? {},
|
|
10800
|
+
...agentContext?.metadata ?? {},
|
|
10801
|
+
defaultAgentName: args.defaultAgentName
|
|
10802
|
+
}
|
|
10789
10803
|
};
|
|
10790
10804
|
const effectiveSessionId = mergedContext.eventSessionId ?? sessionId;
|
|
10791
10805
|
const result = await queryExecutor.execute(message, effectiveSessionId, {
|
|
@@ -13359,7 +13373,7 @@ var UpdateCommand = {
|
|
|
13359
13373
|
type: "number",
|
|
13360
13374
|
describe: "任务 ID",
|
|
13361
13375
|
demandOption: true
|
|
13362
|
-
}).option("title", { alias: "t", type: "string", description: "标题" }).option("description", { alias: "d", type: "string", description: "描述" }).option("status", { alias: "s", type: "string", choices: ["todo", "active", "completed", "paused", "cancelled"], description: "状态" }).option("priority", { alias: "p", type: "string", choices: ["low", "medium", "high"], description: "优先级" }).option("type", { type: "string", choices: ["normal", "cycle", "longterm"], description: "任务类型 (normal/cycle/longterm)" }).option("progress", { type: "number", min: 0, max: 100, description: "进度 (0-100)" }).option("current_status", { alias: "c", type: "string", description: "当前状态描述" }).option("project-path", { type: "string", description: "项目路径" }).option("context", { type: "string", description: "任务上下文 (JSON 字符串)" }).option("json", { alias: "j", type: "boolean", default: false, description: "JSON 输出" }),
|
|
13376
|
+
}).option("title", { alias: "t", type: "string", description: "标题" }).option("description", { alias: "d", type: "string", description: "描述" }).option("status", { alias: "s", type: "string", choices: ["todo", "active", "completed", "paused", "cancelled"], description: "状态" }).option("priority", { alias: "p", type: "string", choices: ["low", "medium", "high"], description: "优先级" }).option("type", { type: "string", choices: ["normal", "cycle", "longterm"], description: "任务类型 (normal/cycle/longterm)" }).option("progress", { type: "number", min: 0, max: 100, description: "进度 (0-100)" }).option("current_status", { alias: "c", type: "string", description: "当前状态描述" }).option("project-path", { type: "string", description: "项目路径" }).option("context", { type: "string", description: "任务上下文 (JSON 字符串)" }).option("parent-id", { type: "number", description: "父任务 ID(不传则保持原父任务;传 null 可提升为根任务)" }).option("json", { alias: "j", type: "boolean", default: false, description: "JSON 输出" }),
|
|
13363
13377
|
async handler(args) {
|
|
13364
13378
|
const output = new OutputService2;
|
|
13365
13379
|
const envService = new EnvironmentService(output);
|
|
@@ -13377,6 +13391,7 @@ var UpdateCommand = {
|
|
|
13377
13391
|
process.exit(1);
|
|
13378
13392
|
}
|
|
13379
13393
|
const currentSessionId = sessionComponent?.getActiveSessionId() || "cli";
|
|
13394
|
+
const parentTaskId = Object.prototype.hasOwnProperty.call(args, "parent-id") ? args["parent-id"] : undefined;
|
|
13380
13395
|
const updateOptions = {
|
|
13381
13396
|
title: args.title,
|
|
13382
13397
|
description: args.description,
|
|
@@ -13386,7 +13401,8 @@ var UpdateCommand = {
|
|
|
13386
13401
|
progress: args.progress,
|
|
13387
13402
|
current_status: args.current_status,
|
|
13388
13403
|
project_path: args["project-path"],
|
|
13389
|
-
context: args.context
|
|
13404
|
+
context: args.context,
|
|
13405
|
+
parent_task_id: parentTaskId
|
|
13390
13406
|
};
|
|
13391
13407
|
const task = await taskComponent.updateTask(args.id, updateOptions);
|
|
13392
13408
|
if (!task) {
|
package/dist/index.js
CHANGED
|
@@ -206,9 +206,8 @@ ${COLORS.system("[已中断]")}
|
|
|
206
206
|
process.stdout.write(COLORS.reasoning(delta));
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
-
if (this.reasoningClosedByText)
|
|
210
|
-
|
|
211
|
-
}
|
|
209
|
+
if (this.reasoningClosedByText)
|
|
210
|
+
return;
|
|
212
211
|
this.reasoningBuffer += delta;
|
|
213
212
|
if (this.reasoningBuffer.length >= 15) {
|
|
214
213
|
this.flushReasoningBuffer();
|
|
@@ -7406,7 +7405,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7406
7405
|
var require_package = __commonJS((exports, module) => {
|
|
7407
7406
|
module.exports = {
|
|
7408
7407
|
name: "@ai-setting/roy-agent-cli",
|
|
7409
|
-
version: "1.6.
|
|
7408
|
+
version: "1.6.5",
|
|
7410
7409
|
type: "module",
|
|
7411
7410
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7412
7411
|
main: "./dist/index.js",
|
|
@@ -9015,7 +9014,12 @@ class QueryExecutor {
|
|
|
9015
9014
|
this.output = options.output;
|
|
9016
9015
|
this.quiet = options.quiet;
|
|
9017
9016
|
}
|
|
9018
|
-
initSummaryAgent(
|
|
9017
|
+
initSummaryAgent(llmComponent, promptComponent) {
|
|
9018
|
+
const session = this.sessionComponent;
|
|
9019
|
+
if (typeof session.setSummaryComponents === "function") {
|
|
9020
|
+
session.setSummaryComponents(promptComponent, llmComponent);
|
|
9021
|
+
}
|
|
9022
|
+
}
|
|
9019
9023
|
initStreamOutput(llmComponent, providerId = "minimax") {
|
|
9020
9024
|
if (llmComponent) {
|
|
9021
9025
|
const contextConfig = llmComponent.getContextThresholdConfig(providerId);
|
|
@@ -10615,6 +10619,11 @@ function createInteractiveCommand(externalEnvService) {
|
|
|
10615
10619
|
}).option("model", {
|
|
10616
10620
|
describe: "使用的模型",
|
|
10617
10621
|
type: "string"
|
|
10622
|
+
}).option("default-agent-name", {
|
|
10623
|
+
alias: "dan",
|
|
10624
|
+
describe: "Default agent 名字(默认 Roy,可被覆盖)",
|
|
10625
|
+
type: "string",
|
|
10626
|
+
default: "Roy"
|
|
10618
10627
|
}),
|
|
10619
10628
|
async handler(args) {
|
|
10620
10629
|
CliQuietModeService.getInstance().setQuiet(true);
|
|
@@ -10784,7 +10793,12 @@ function createInteractiveCommand(externalEnvService) {
|
|
|
10784
10793
|
...currentAgentContext,
|
|
10785
10794
|
model: args.model,
|
|
10786
10795
|
...agentContext,
|
|
10787
|
-
eventSourceSystemPrompt
|
|
10796
|
+
eventSourceSystemPrompt,
|
|
10797
|
+
metadata: {
|
|
10798
|
+
...currentAgentContext?.metadata ?? {},
|
|
10799
|
+
...agentContext?.metadata ?? {},
|
|
10800
|
+
defaultAgentName: args.defaultAgentName
|
|
10801
|
+
}
|
|
10788
10802
|
};
|
|
10789
10803
|
const effectiveSessionId = mergedContext.eventSessionId ?? sessionId;
|
|
10790
10804
|
const result = await queryExecutor.execute(message, effectiveSessionId, {
|
|
@@ -13358,7 +13372,7 @@ var UpdateCommand = {
|
|
|
13358
13372
|
type: "number",
|
|
13359
13373
|
describe: "任务 ID",
|
|
13360
13374
|
demandOption: true
|
|
13361
|
-
}).option("title", { alias: "t", type: "string", description: "标题" }).option("description", { alias: "d", type: "string", description: "描述" }).option("status", { alias: "s", type: "string", choices: ["todo", "active", "completed", "paused", "cancelled"], description: "状态" }).option("priority", { alias: "p", type: "string", choices: ["low", "medium", "high"], description: "优先级" }).option("type", { type: "string", choices: ["normal", "cycle", "longterm"], description: "任务类型 (normal/cycle/longterm)" }).option("progress", { type: "number", min: 0, max: 100, description: "进度 (0-100)" }).option("current_status", { alias: "c", type: "string", description: "当前状态描述" }).option("project-path", { type: "string", description: "项目路径" }).option("context", { type: "string", description: "任务上下文 (JSON 字符串)" }).option("json", { alias: "j", type: "boolean", default: false, description: "JSON 输出" }),
|
|
13375
|
+
}).option("title", { alias: "t", type: "string", description: "标题" }).option("description", { alias: "d", type: "string", description: "描述" }).option("status", { alias: "s", type: "string", choices: ["todo", "active", "completed", "paused", "cancelled"], description: "状态" }).option("priority", { alias: "p", type: "string", choices: ["low", "medium", "high"], description: "优先级" }).option("type", { type: "string", choices: ["normal", "cycle", "longterm"], description: "任务类型 (normal/cycle/longterm)" }).option("progress", { type: "number", min: 0, max: 100, description: "进度 (0-100)" }).option("current_status", { alias: "c", type: "string", description: "当前状态描述" }).option("project-path", { type: "string", description: "项目路径" }).option("context", { type: "string", description: "任务上下文 (JSON 字符串)" }).option("parent-id", { type: "number", description: "父任务 ID(不传则保持原父任务;传 null 可提升为根任务)" }).option("json", { alias: "j", type: "boolean", default: false, description: "JSON 输出" }),
|
|
13362
13376
|
async handler(args) {
|
|
13363
13377
|
const output = new OutputService2;
|
|
13364
13378
|
const envService = new EnvironmentService(output);
|
|
@@ -13376,6 +13390,7 @@ var UpdateCommand = {
|
|
|
13376
13390
|
process.exit(1);
|
|
13377
13391
|
}
|
|
13378
13392
|
const currentSessionId = sessionComponent?.getActiveSessionId() || "cli";
|
|
13393
|
+
const parentTaskId = Object.prototype.hasOwnProperty.call(args, "parent-id") ? args["parent-id"] : undefined;
|
|
13379
13394
|
const updateOptions = {
|
|
13380
13395
|
title: args.title,
|
|
13381
13396
|
description: args.description,
|
|
@@ -13385,7 +13400,8 @@ var UpdateCommand = {
|
|
|
13385
13400
|
progress: args.progress,
|
|
13386
13401
|
current_status: args.current_status,
|
|
13387
13402
|
project_path: args["project-path"],
|
|
13388
|
-
context: args.context
|
|
13403
|
+
context: args.context,
|
|
13404
|
+
parent_task_id: parentTaskId
|
|
13389
13405
|
};
|
|
13390
13406
|
const task = await taskComponent.updateTask(args.id, updateOptions);
|
|
13391
13407
|
if (!task) {
|
|
Binary file
|