@ai-setting/roy-agent-cli 1.5.57 → 1.5.58

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.
@@ -7319,7 +7319,7 @@ var require_dist = __commonJS((exports) => {
7319
7319
  var require_package = __commonJS((exports, module) => {
7320
7320
  module.exports = {
7321
7321
  name: "@ai-setting/roy-agent-cli",
7322
- version: "1.5.57",
7322
+ version: "1.5.58",
7323
7323
  type: "module",
7324
7324
  description: "CLI for roy-agent - Non-interactive command execution",
7325
7325
  main: "./dist/index.js",
@@ -7346,7 +7346,7 @@ var require_package = __commonJS((exports, module) => {
7346
7346
  },
7347
7347
  dependencies: {
7348
7348
  "@ai-setting/roy-agent-coder-harness": "^1.5.48",
7349
- "@ai-setting/roy-agent-core": "^1.5.56",
7349
+ "@ai-setting/roy-agent-core": "^1.5.57",
7350
7350
  "@ai-setting/roy-agent-ontology-harness": "^1.5.47",
7351
7351
  chalk: "^5.6.2",
7352
7352
  commander: "^14.0.3",
@@ -8960,7 +8960,17 @@ class EventMessageFormatter {
8960
8960
  const desc = payload.description || "未命名任务";
8961
8961
  const result = payload.result;
8962
8962
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8963
+ const bgProcessId = payload.backgroundTaskId || "";
8964
+ const taskId = payload.associatedTaskId;
8963
8965
  let message = `${this.prefix} ✅ 后台任务「${desc}」已完成 ${time}`;
8966
+ if (bgProcessId) {
8967
+ message += `
8968
+ bgprocess: ${bgProcessId}`;
8969
+ }
8970
+ if (taskId !== undefined) {
8971
+ message += `
8972
+ Task #${taskId}`;
8973
+ }
8964
8974
  if (result) {
8965
8975
  const truncatedResult = result.length > 1e4 ? result.substring(0, 100) + "...[TRUNCATED]" : result;
8966
8976
  message += `
@@ -8972,7 +8982,17 @@ class EventMessageFormatter {
8972
8982
  const desc = payload.description || "未命名任务";
8973
8983
  const error = payload.error || "未知错误";
8974
8984
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8985
+ const bgProcessId = payload.backgroundTaskId || "";
8986
+ const taskId = payload.associatedTaskId;
8975
8987
  let message = `${this.prefix} ❌ 后台任务「${desc}」失败 ${time}`;
8988
+ if (bgProcessId) {
8989
+ message += `
8990
+ bgprocess: ${bgProcessId}`;
8991
+ }
8992
+ if (taskId !== undefined) {
8993
+ message += `
8994
+ Task #${taskId}`;
8995
+ }
8976
8996
  if (error) {
8977
8997
  const truncatedError = error.length > 100 ? error.substring(0, 100) + "..." : error;
8978
8998
  message += `
@@ -8983,12 +9003,34 @@ class EventMessageFormatter {
8983
9003
  formatTaskTimeout(payload) {
8984
9004
  const desc = payload.description || "未命名任务";
8985
9005
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8986
- return `${this.prefix} ⏱️ 后台任务「${desc}」超时 ${time}`;
9006
+ const bgProcessId = payload.backgroundTaskId || "";
9007
+ const taskId = payload.associatedTaskId;
9008
+ let message = `${this.prefix} ⏱️ 后台任务「${desc}」超时 ${time}`;
9009
+ if (bgProcessId) {
9010
+ message += `
9011
+ bgprocess: ${bgProcessId}`;
9012
+ }
9013
+ if (taskId !== undefined) {
9014
+ message += `
9015
+ Task #${taskId}`;
9016
+ }
9017
+ return message;
8987
9018
  }
8988
9019
  formatTaskStopped(payload) {
8989
9020
  const desc = payload.description || "未命名任务";
8990
9021
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8991
- return `${this.prefix} \uD83D\uDED1 后台任务「${desc}」已停止 ${time}`;
9022
+ const bgProcessId = payload.backgroundTaskId || "";
9023
+ const taskId = payload.associatedTaskId;
9024
+ let message = `${this.prefix} \uD83D\uDED1 后台任务「${desc}」已停止 ${time}`;
9025
+ if (bgProcessId) {
9026
+ message += `
9027
+ bgprocess: ${bgProcessId}`;
9028
+ }
9029
+ if (taskId !== undefined) {
9030
+ message += `
9031
+ Task #${taskId}`;
9032
+ }
9033
+ return message;
8992
9034
  }
8993
9035
  formatGeneric(event) {
8994
9036
  return `${this.prefix} 收到事件: ${event.type}`;
package/dist/index.js CHANGED
@@ -7318,7 +7318,7 @@ var require_dist = __commonJS((exports) => {
7318
7318
  var require_package = __commonJS((exports, module) => {
7319
7319
  module.exports = {
7320
7320
  name: "@ai-setting/roy-agent-cli",
7321
- version: "1.5.57",
7321
+ version: "1.5.58",
7322
7322
  type: "module",
7323
7323
  description: "CLI for roy-agent - Non-interactive command execution",
7324
7324
  main: "./dist/index.js",
@@ -7345,7 +7345,7 @@ var require_package = __commonJS((exports, module) => {
7345
7345
  },
7346
7346
  dependencies: {
7347
7347
  "@ai-setting/roy-agent-coder-harness": "^1.5.48",
7348
- "@ai-setting/roy-agent-core": "^1.5.56",
7348
+ "@ai-setting/roy-agent-core": "^1.5.57",
7349
7349
  "@ai-setting/roy-agent-ontology-harness": "^1.5.47",
7350
7350
  chalk: "^5.6.2",
7351
7351
  commander: "^14.0.3",
@@ -8959,7 +8959,17 @@ class EventMessageFormatter {
8959
8959
  const desc = payload.description || "未命名任务";
8960
8960
  const result = payload.result;
8961
8961
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8962
+ const bgProcessId = payload.backgroundTaskId || "";
8963
+ const taskId = payload.associatedTaskId;
8962
8964
  let message = `${this.prefix} ✅ 后台任务「${desc}」已完成 ${time}`;
8965
+ if (bgProcessId) {
8966
+ message += `
8967
+ bgprocess: ${bgProcessId}`;
8968
+ }
8969
+ if (taskId !== undefined) {
8970
+ message += `
8971
+ Task #${taskId}`;
8972
+ }
8963
8973
  if (result) {
8964
8974
  const truncatedResult = result.length > 1e4 ? result.substring(0, 100) + "...[TRUNCATED]" : result;
8965
8975
  message += `
@@ -8971,7 +8981,17 @@ class EventMessageFormatter {
8971
8981
  const desc = payload.description || "未命名任务";
8972
8982
  const error = payload.error || "未知错误";
8973
8983
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8984
+ const bgProcessId = payload.backgroundTaskId || "";
8985
+ const taskId = payload.associatedTaskId;
8974
8986
  let message = `${this.prefix} ❌ 后台任务「${desc}」失败 ${time}`;
8987
+ if (bgProcessId) {
8988
+ message += `
8989
+ bgprocess: ${bgProcessId}`;
8990
+ }
8991
+ if (taskId !== undefined) {
8992
+ message += `
8993
+ Task #${taskId}`;
8994
+ }
8975
8995
  if (error) {
8976
8996
  const truncatedError = error.length > 100 ? error.substring(0, 100) + "..." : error;
8977
8997
  message += `
@@ -8982,12 +9002,34 @@ class EventMessageFormatter {
8982
9002
  formatTaskTimeout(payload) {
8983
9003
  const desc = payload.description || "未命名任务";
8984
9004
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8985
- return `${this.prefix} ⏱️ 后台任务「${desc}」超时 ${time}`;
9005
+ const bgProcessId = payload.backgroundTaskId || "";
9006
+ const taskId = payload.associatedTaskId;
9007
+ let message = `${this.prefix} ⏱️ 后台任务「${desc}」超时 ${time}`;
9008
+ if (bgProcessId) {
9009
+ message += `
9010
+ bgprocess: ${bgProcessId}`;
9011
+ }
9012
+ if (taskId !== undefined) {
9013
+ message += `
9014
+ Task #${taskId}`;
9015
+ }
9016
+ return message;
8986
9017
  }
8987
9018
  formatTaskStopped(payload) {
8988
9019
  const desc = payload.description || "未命名任务";
8989
9020
  const time = payload.executionTimeMs ? `(${this.formatDuration(payload.executionTimeMs)})` : "";
8990
- return `${this.prefix} \uD83D\uDED1 后台任务「${desc}」已停止 ${time}`;
9021
+ const bgProcessId = payload.backgroundTaskId || "";
9022
+ const taskId = payload.associatedTaskId;
9023
+ let message = `${this.prefix} \uD83D\uDED1 后台任务「${desc}」已停止 ${time}`;
9024
+ if (bgProcessId) {
9025
+ message += `
9026
+ bgprocess: ${bgProcessId}`;
9027
+ }
9028
+ if (taskId !== undefined) {
9029
+ message += `
9030
+ Task #${taskId}`;
9031
+ }
9032
+ return message;
8991
9033
  }
8992
9034
  formatGeneric(event) {
8993
9035
  return `${this.prefix} 收到事件: ${event.type}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.5.57",
3
+ "version": "1.5.58",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@ai-setting/roy-agent-coder-harness": "^1.5.48",
30
- "@ai-setting/roy-agent-core": "^1.5.56",
30
+ "@ai-setting/roy-agent-core": "^1.5.57",
31
31
  "@ai-setting/roy-agent-ontology-harness": "^1.5.47",
32
32
  "chalk": "^5.6.2",
33
33
  "commander": "^14.0.3",