@ai-setting/roy-agent-cli 1.7.11 → 1.7.13

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.
@@ -9461,7 +9461,7 @@ class CliQuietModeService {
9461
9461
  // package.json
9462
9462
  var package_default = {
9463
9463
  name: "@ai-setting/roy-agent-cli",
9464
- version: "1.7.11",
9464
+ version: "1.7.13",
9465
9465
  type: "module",
9466
9466
  description: "CLI for roy-agent - Non-interactive command execution",
9467
9467
  main: "./dist/index.js",
@@ -21170,7 +21170,7 @@ var EventSourceAddCommand = {
21170
21170
  type: "string",
21171
21171
  demandOption: true
21172
21172
  }).positional("type", {
21173
- describe: "事件源类型(如 lark-cli, timer, websocket 或第三方自定义类型)",
21173
+ describe: "事件源类型(如 lark-cli, bounty-cli, bounty-im, timer, websocket 或第三方自定义类型)",
21174
21174
  type: "string",
21175
21175
  demandOption: true
21176
21176
  }).option("event-types", {
@@ -21193,7 +21193,7 @@ var EventSourceAddCommand = {
21193
21193
  describe: "Cron 表达式",
21194
21194
  type: "string"
21195
21195
  }).option("profile", {
21196
- describe: "Profile 名称(lark-cli / bounty-im 类型用,从 ~/.config/bounty/profiles/<name>.json 读取配置;多 appId / 多账户场景必要,参考 #1637)",
21196
+ describe: "Profile 名称(lark-cli / bounty-im / bounty-cli 类型用,从 ~/.config/bounty/profiles/<name>.json 读取配置;多 appId / 多账户场景必要,参考 #1637)",
21197
21197
  type: "string"
21198
21198
  }).option("email", {
21199
21199
  describe: "Agent IM 注册邮箱(bounty-im 类型用,v0.14 strict email-only;与 --profile 互斥)",
@@ -21202,6 +21202,9 @@ var EventSourceAddCommand = {
21202
21202
  describe: "跳过 TLS 证书校验(bounty-im 类型用,wss:// 自签名场景,生产环境不推荐)",
21203
21203
  type: "boolean",
21204
21204
  default: false
21205
+ }).option("channel", {
21206
+ describe: "Mattermost 频道名(bounty-cli 类型用,启动时执行 `bounty event consume --channel <name>`;与 --command 互斥)",
21207
+ type: "string"
21205
21208
  }).option("prompt", {
21206
21209
  describe: "自定义 prompt 消息(timer 类型,替换默认 SelfReminder 内容)",
21207
21210
  type: "string"
@@ -21255,6 +21258,14 @@ var EventSourceAddCommand = {
21255
21258
  } else {
21256
21259
  resolvedServerUrl = resolveServerUrl(undefined, fallback);
21257
21260
  }
21261
+ if (a.type === "bounty-cli") {
21262
+ if (!a.channel && !a.command) {
21263
+ output.error(chalk61.red(`
21264
+ ✗ bounty-cli 类型需要 --channel <频道名>(或 --command 覆盖默认命令)
21265
+ `));
21266
+ process.exit(1);
21267
+ }
21268
+ }
21258
21269
  const config = {
21259
21270
  id: uuid(),
21260
21271
  name: a.name,
@@ -21269,6 +21280,7 @@ var EventSourceAddCommand = {
21269
21280
  email: resolvedEmail,
21270
21281
  imServerUrl: resolvedServerUrl,
21271
21282
  tlsSkipVerify: a.tlsSkipVerify === true,
21283
+ ...a.type === "bounty-cli" && a.channel ? { channel: a.channel } : {},
21272
21284
  options: a.prompt ? { prompt: a.prompt } : undefined
21273
21285
  };
21274
21286
  esComponent.register(config);
@@ -21303,6 +21315,9 @@ var EventSourceAddCommand = {
21303
21315
  if (a.prompt) {
21304
21316
  output.log(` Prompt: ${chalk61.gray(a.prompt.length > 60 ? a.prompt.slice(0, 60) + "..." : a.prompt)}`);
21305
21317
  }
21318
+ if (a.channel) {
21319
+ output.log(` Channel: ${chalk61.gray(a.channel)}`);
21320
+ }
21306
21321
  output.log("");
21307
21322
  output.log(chalk61.gray(`使用 'roy-agent eventsource start ${config.id.substring(0, 8)}' 启动它。`));
21308
21323
  } finally {
package/dist/index.js CHANGED
@@ -9460,7 +9460,7 @@ class CliQuietModeService {
9460
9460
  // package.json
9461
9461
  var package_default = {
9462
9462
  name: "@ai-setting/roy-agent-cli",
9463
- version: "1.7.11",
9463
+ version: "1.7.13",
9464
9464
  type: "module",
9465
9465
  description: "CLI for roy-agent - Non-interactive command execution",
9466
9466
  main: "./dist/index.js",
@@ -21169,7 +21169,7 @@ var EventSourceAddCommand = {
21169
21169
  type: "string",
21170
21170
  demandOption: true
21171
21171
  }).positional("type", {
21172
- describe: "事件源类型(如 lark-cli, timer, websocket 或第三方自定义类型)",
21172
+ describe: "事件源类型(如 lark-cli, bounty-cli, bounty-im, timer, websocket 或第三方自定义类型)",
21173
21173
  type: "string",
21174
21174
  demandOption: true
21175
21175
  }).option("event-types", {
@@ -21192,7 +21192,7 @@ var EventSourceAddCommand = {
21192
21192
  describe: "Cron 表达式",
21193
21193
  type: "string"
21194
21194
  }).option("profile", {
21195
- describe: "Profile 名称(lark-cli / bounty-im 类型用,从 ~/.config/bounty/profiles/<name>.json 读取配置;多 appId / 多账户场景必要,参考 #1637)",
21195
+ describe: "Profile 名称(lark-cli / bounty-im / bounty-cli 类型用,从 ~/.config/bounty/profiles/<name>.json 读取配置;多 appId / 多账户场景必要,参考 #1637)",
21196
21196
  type: "string"
21197
21197
  }).option("email", {
21198
21198
  describe: "Agent IM 注册邮箱(bounty-im 类型用,v0.14 strict email-only;与 --profile 互斥)",
@@ -21201,6 +21201,9 @@ var EventSourceAddCommand = {
21201
21201
  describe: "跳过 TLS 证书校验(bounty-im 类型用,wss:// 自签名场景,生产环境不推荐)",
21202
21202
  type: "boolean",
21203
21203
  default: false
21204
+ }).option("channel", {
21205
+ describe: "Mattermost 频道名(bounty-cli 类型用,启动时执行 `bounty event consume --channel <name>`;与 --command 互斥)",
21206
+ type: "string"
21204
21207
  }).option("prompt", {
21205
21208
  describe: "自定义 prompt 消息(timer 类型,替换默认 SelfReminder 内容)",
21206
21209
  type: "string"
@@ -21254,6 +21257,14 @@ var EventSourceAddCommand = {
21254
21257
  } else {
21255
21258
  resolvedServerUrl = resolveServerUrl(undefined, fallback);
21256
21259
  }
21260
+ if (a.type === "bounty-cli") {
21261
+ if (!a.channel && !a.command) {
21262
+ output.error(chalk61.red(`
21263
+ ✗ bounty-cli 类型需要 --channel <频道名>(或 --command 覆盖默认命令)
21264
+ `));
21265
+ process.exit(1);
21266
+ }
21267
+ }
21257
21268
  const config = {
21258
21269
  id: uuid(),
21259
21270
  name: a.name,
@@ -21268,6 +21279,7 @@ var EventSourceAddCommand = {
21268
21279
  email: resolvedEmail,
21269
21280
  imServerUrl: resolvedServerUrl,
21270
21281
  tlsSkipVerify: a.tlsSkipVerify === true,
21282
+ ...a.type === "bounty-cli" && a.channel ? { channel: a.channel } : {},
21271
21283
  options: a.prompt ? { prompt: a.prompt } : undefined
21272
21284
  };
21273
21285
  esComponent.register(config);
@@ -21302,6 +21314,9 @@ var EventSourceAddCommand = {
21302
21314
  if (a.prompt) {
21303
21315
  output.log(` Prompt: ${chalk61.gray(a.prompt.length > 60 ? a.prompt.slice(0, 60) + "..." : a.prompt)}`);
21304
21316
  }
21317
+ if (a.channel) {
21318
+ output.log(` Channel: ${chalk61.gray(a.channel)}`);
21319
+ }
21305
21320
  output.log("");
21306
21321
  output.log(chalk61.gray(`使用 'roy-agent eventsource start ${config.id.substring(0, 8)}' 启动它。`));
21307
21322
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.7.11",
3
+ "version": "1.7.13",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",