@ai-setting/roy-agent-cli 1.4.3 → 1.4.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.
Files changed (2) hide show
  1. package/dist/index.js +63 -62
  2. package/package.json +6 -5
package/dist/index.js CHANGED
@@ -7219,14 +7219,14 @@ var require_dist = __commonJS((exports) => {
7219
7219
  var require_package = __commonJS((exports, module) => {
7220
7220
  module.exports = {
7221
7221
  name: "@ai-setting/roy-agent-cli",
7222
- version: "1.4.3",
7222
+ version: "1.4.5",
7223
7223
  type: "module",
7224
7224
  description: "CLI for roy-agent - Non-interactive command execution",
7225
7225
  main: "./dist/index.js",
7226
7226
  module: "./dist/index.js",
7227
7227
  types: "./dist/index.d.ts",
7228
7228
  bin: {
7229
- roy: "./dist/bin/roy.js"
7229
+ "roy-agent": "./dist/bin/roy-agent.js"
7230
7230
  },
7231
7231
  exports: {
7232
7232
  ".": {
@@ -7241,7 +7241,8 @@ var require_package = __commonJS((exports, module) => {
7241
7241
  ],
7242
7242
  scripts: {
7243
7243
  build: "bun run bunup",
7244
- clean: "rm -rf dist"
7244
+ clean: "rm -rf dist",
7245
+ typecheck: "npx tsc --noEmit --skipLibCheck"
7245
7246
  },
7246
7247
  dependencies: {
7247
7248
  "@ai-setting/roy-agent-coder-harness": "workspace:*",
@@ -8204,8 +8205,8 @@ var ActCommand = {
8204
8205
  const output = new OutputService;
8205
8206
  output.configure({ quiet });
8206
8207
  if (!args.message) {
8207
- output.error("\u8BF7\u63D0\u4F9B\u8981\u6267\u884C\u7684\u6D88\u606F\uFF0C\u4F7F\u7528\u65B9\u5F0F\uFF1Aroy act <\u6D88\u606F>");
8208
- output.info('\u793A\u4F8B\uFF1Aroy act "\u5E2E\u6211\u5199\u4E00\u4E2A hello world"');
8208
+ output.error("\u8BF7\u63D0\u4F9B\u8981\u6267\u884C\u7684\u6D88\u606F\uFF0C\u4F7F\u7528\u65B9\u5F0F\uFF1Aroy-agent act <\u6D88\u606F>");
8209
+ output.info('\u793A\u4F8B\uFF1Aroy-agent act "\u5E2E\u6211\u5199\u4E00\u4E2A hello world"');
8209
8210
  process.exit(1);
8210
8211
  }
8211
8212
  const envService = new EnvironmentService(output);
@@ -8429,7 +8430,7 @@ var ActCommand = {
8429
8430
  rootSpan.end(undefined, error instanceof Error ? error : new Error(String(error)));
8430
8431
  if (error instanceof ContextError2 && error.code === ErrorCodes2.CONTEXT_THRESHOLD_EXCEEDED) {
8431
8432
  output.error(`\u4E0A\u4E0B\u6587\u9608\u503C\u8D85\u51FA\u9650\u5236: ${error.usage?.totalTokens}/${error.contextWindow}`);
8432
- output.info("\u8BF7\u624B\u52A8\u538B\u7F29\u4F1A\u8BDD: roy sessions compact " + (sessionId || "<session-id>"));
8433
+ output.info("\u8BF7\u624B\u52A8\u538B\u7F29\u4F1A\u8BDD: roy-agent sessions compact " + (sessionId || "<session-id>"));
8433
8434
  }
8434
8435
  throw error;
8435
8436
  } finally {
@@ -8650,7 +8651,7 @@ class QueryExecutor {
8650
8651
  }
8651
8652
  if (error instanceof ContextError3 && error.code === ErrorCodes3.CONTEXT_THRESHOLD_EXCEEDED) {
8652
8653
  this.output.error(`\u4E0A\u4E0B\u6587\u9608\u503C\u8D85\u51FA\u9650\u5236: ${error.usage?.totalTokens}/${error.contextWindow}`);
8653
- this.output.info("\u8BF7\u624B\u52A8\u538B\u7F29\u4F1A\u8BDD: roy sessions compact " + sessionId);
8654
+ this.output.info("\u8BF7\u624B\u52A8\u538B\u7F29\u4F1A\u8BDD: roy-agent sessions compact " + sessionId);
8654
8655
  }
8655
8656
  throw error;
8656
8657
  } finally {}
@@ -9256,11 +9257,11 @@ ${chalk3.bold("\u2502")} ${chalk3.bold("\u5207\u6362\u4F1A\u8BDD")}
9256
9257
  ${chalk3.bold("\u251C")}${chalk3.dim("\u2500".repeat(49))}${chalk3.bold("\u251C")}
9257
9258
  ${chalk3.bold("\u2502")} \u9000\u51FA\u5F53\u524D\u4EA4\u4E92\u6A21\u5F0F\u540E\uFF0C\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u5207\u6362\u4F1A\u8BDD\uFF1A ${chalk3.bold("\u2502")}
9258
9259
  ${chalk3.bold("\u2502")} ${chalk3.bold("\u2502")}
9259
- ${chalk3.bold("\u2502")} ${COLORS.userInput("roy sessions list")} \u5217\u51FA\u6240\u6709\u4F1A\u8BDD ${chalk3.bold("\u2502")}
9260
- ${chalk3.bold("\u2502")} ${COLORS.userInput("roy sessions use <id>")} \u5207\u6362\u5230\u6307\u5B9A\u4F1A\u8BDD ${chalk3.bold("\u2502")}
9260
+ ${chalk3.bold("\u2502")} ${COLORS.userInput("roy-agent sessions list")} \u5217\u51FA\u6240\u6709\u4F1A\u8BDD ${chalk3.bold("\u2502")}
9261
+ ${chalk3.bold("\u2502")} ${COLORS.userInput("roy-agent sessions use <id>")} \u5207\u6362\u5230\u6307\u5B9A\u4F1A\u8BDD ${chalk3.bold("\u2502")}
9261
9262
  ${chalk3.bold("\u2502")} ${chalk3.bold("\u2502")}
9262
9263
  ${chalk3.bold("\u2502")} \u6216\u76F4\u63A5\u6307\u5B9A\u4F1A\u8BDD\u542F\u52A8\uFF1A ${chalk3.bold("\u2502")}
9263
- ${chalk3.bold("\u2502")} ${COLORS.userInput("roy interactive -s <session-id>")} ${chalk3.bold("\u2502")}
9264
+ ${chalk3.bold("\u2502")} ${COLORS.userInput("roy-agent interactive -s <session-id>")} ${chalk3.bold("\u2502")}
9264
9265
  ${chalk3.bold("\u2570")}${chalk3.dim("\u2500".repeat(49))}${chalk3.bold("\u256F")}
9265
9266
  `);
9266
9267
  }
@@ -10979,7 +10980,7 @@ ${JSON.stringify(tc.args, null, 2)}
10979
10980
  output.log(` Messages: ${addedMessages.length}`);
10980
10981
  output.log("");
10981
10982
  output.log(chalk13.gray(" Now run: "));
10982
- output.log(chalk13.gray(` roy sessions compact ${a.sessionId}`));
10983
+ output.log(chalk13.gray(` roy-agent sessions compact ${a.sessionId}`));
10983
10984
  output.log(chalk13.gray(" to trigger checkpoint generation"));
10984
10985
  }
10985
10986
  } finally {
@@ -11158,24 +11159,24 @@ var SessionsCommand = {
11158
11159
  describe: `\u4F1A\u8BDD\u7BA1\u7406 - \u5217\u51FA\u3001\u521B\u5EFA\u3001\u5220\u9664\u548C\u7BA1\u7406\u4F1A\u8BDD
11159
11160
 
11160
11161
  \u5220\u9664\u547D\u4EE4\u4F7F\u7528\u793A\u4F8B\uFF1A
11161
- roy sessions delete <id> # \u5220\u9664\u5355\u4E2A\u4F1A\u8BDD
11162
- roy sessions delete <id1> <id2> <id3> # \u6279\u91CF\u5220\u9664
11163
- roy sessions delete --all # \u5220\u9664\u6240\u6709\u4F1A\u8BDD
11164
- roy sessions delete --all --keep-active # \u5220\u9664\u6240\u6709\u975E\u6D3B\u8DC3\u4F1A\u8BDD
11165
- roy sessions delete --older-than 30 # \u5220\u966430\u5929\u524D\u7684\u4F1A\u8BDD
11166
- roy sessions delete --dry-run # \u9884\u89C8\u6A21\u5F0F
11162
+ roy-agent sessions delete <id> # \u5220\u9664\u5355\u4E2A\u4F1A\u8BDD
11163
+ roy-agent sessions delete <id1> <id2> <id3> # \u6279\u91CF\u5220\u9664
11164
+ roy-agent sessions delete --all # \u5220\u9664\u6240\u6709\u4F1A\u8BDD
11165
+ roy-agent sessions delete --all --keep-active # \u5220\u9664\u6240\u6709\u975E\u6D3B\u8DC3\u4F1A\u8BDD
11166
+ roy-agent sessions delete --older-than 30 # \u5220\u966430\u5929\u524D\u7684\u4F1A\u8BDD
11167
+ roy-agent sessions delete --dry-run # \u9884\u89C8\u6A21\u5F0F
11167
11168
 
11168
11169
  \u641C\u7D22\u547D\u4EE4\u4F7F\u7528\u793A\u4F8B\uFF1A
11169
- roy sessions grep K8s deployment error # \u591A\u5173\u952E\u5B57\u641C\u7D22
11170
- roy sessions grep "exact phrase" # \u7CBE\u786E\u77ED\u8BED
11171
- roy sessions grep --session <id> query # \u641C\u7D22\u6307\u5B9A\u4F1A\u8BDD
11172
- roy sessions grep --limit 10 query # \u9650\u5236\u7ED3\u679C\u6570
11173
- roy sessions grep --json query # JSON \u8F93\u51FA`,
11170
+ roy-agent sessions grep K8s deployment error # \u591A\u5173\u952E\u5B57\u641C\u7D22
11171
+ roy-agent sessions grep "exact phrase" # \u7CBE\u786E\u77ED\u8BED
11172
+ roy-agent sessions grep --session <id> query # \u641C\u7D22\u6307\u5B9A\u4F1A\u8BDD
11173
+ roy-agent sessions grep --limit 10 query # \u9650\u5236\u7ED3\u679C\u6570
11174
+ roy-agent sessions grep --json query # JSON \u8F93\u51FA`,
11174
11175
  builder: (yargs) => {
11175
11176
  return yargs.command(ListCommand).command(GetCommand).command(NewCommand).command(RenameCommand).command(DeleteCommand).command(MessagesCommand).command(GrepCommand).command(CompactCommand).command(CheckpointsCommand).command(ActiveCommand).command(AddMessageCommand).command(MockCommand).demandCommand().help();
11176
11177
  },
11177
11178
  handler: () => {
11178
- console.log("Use 'roy sessions --help' for usage information");
11179
+ console.log("Use 'roy-agent sessions --help' for usage information");
11179
11180
  }
11180
11181
  };
11181
11182
 
@@ -11728,7 +11729,7 @@ var TasksCommand = {
11728
11729
  global: false
11729
11730
  }).command(ListCommand2).command(GetCommand2).command(CreateCommand).command(UpdateCommand).command(DeleteCommand2).command(CompleteCommand).command(OperationsCommand).demandCommand().help(),
11730
11731
  handler: () => {
11731
- console.log("Use 'roy tasks --help' for usage information");
11732
+ console.log("Use 'roy-agent tasks --help' for usage information");
11732
11733
  }
11733
11734
  };
11734
11735
 
@@ -11863,7 +11864,7 @@ var GetCommand3 = {
11863
11864
  const skill = skillComponent.getSkill(args.name);
11864
11865
  if (!skill) {
11865
11866
  output.error(`Skill not found: ${args.name}`);
11866
- output.log("Use 'roy skills list' to see available skills.");
11867
+ output.log("Use 'roy-agent skills list' to see available skills.");
11867
11868
  process.exit(1);
11868
11869
  }
11869
11870
  if (args.json) {
@@ -12079,10 +12080,10 @@ var ShowConfigCommand = {
12079
12080
  `);
12080
12081
  output.log(chalk26.bold(`## Usage
12081
12082
  `));
12082
- output.log(` ${chalk26.cyan("roy skills list")} ${chalk26.gray("- \u5217\u51FA\u6240\u6709\u6280\u80FD")}`);
12083
- output.log(` ${chalk26.cyan("roy skills get <name>")} ${chalk26.gray("- \u83B7\u53D6\u6280\u80FD\u5185\u5BB9")}`);
12084
- output.log(` ${chalk26.cyan("roy skills search <term>")} ${chalk26.gray("- \u641C\u7D22\u6280\u80FD")}`);
12085
- output.log(` ${chalk26.cyan("roy skills reload")} ${chalk26.gray("- \u91CD\u65B0\u626B\u63CF\u6280\u80FD")}`);
12083
+ output.log(` ${chalk26.cyan("roy-agent skills list")} ${chalk26.gray("- \u5217\u51FA\u6240\u6709\u6280\u80FD")}`);
12084
+ output.log(` ${chalk26.cyan("roy-agent skills get <name>")} ${chalk26.gray("- \u83B7\u53D6\u6280\u80FD\u5185\u5BB9")}`);
12085
+ output.log(` ${chalk26.cyan("roy-agent skills search <term>")} ${chalk26.gray("- \u641C\u7D22\u6280\u80FD")}`);
12086
+ output.log(` ${chalk26.cyan("roy-agent skills reload")} ${chalk26.gray("- \u91CD\u65B0\u626B\u63CF\u6280\u80FD")}`);
12086
12087
  } catch (error) {
12087
12088
  output.error(`Failed to show config: ${error}`);
12088
12089
  process.exit(1);
@@ -12098,7 +12099,7 @@ var SkillsCommand = {
12098
12099
  describe: "\u6280\u80FD\u7BA1\u7406 - \u5217\u51FA\u3001\u83B7\u53D6\u3001\u641C\u7D22\u3001\u91CD\u65B0\u52A0\u8F7D\u6280\u80FD",
12099
12100
  builder: (yargs) => yargs.command(ListCommand3).command(GetCommand3).command(SearchCommand).command(ReloadCommand).command(ShowConfigCommand).demandCommand().help(),
12100
12101
  handler: () => {
12101
- console.log("Use 'roy skills --help' for usage information");
12102
+ console.log("Use 'roy-agent skills --help' for usage information");
12102
12103
  }
12103
12104
  };
12104
12105
 
@@ -12118,7 +12119,7 @@ function truncateVisual(str, maxWidth) {
12118
12119
  }
12119
12120
  function formatCommandsTable(commands) {
12120
12121
  if (commands.length === 0) {
12121
- return chalk27.yellow("\u547D\u4EE4\u76EE\u5F55\u4E3A\u7A7A\uFF0C\u4F7F\u7528 'roy commands add' \u6DFB\u52A0\u547D\u4EE4");
12122
+ return chalk27.yellow("\u547D\u4EE4\u76EE\u5F55\u4E3A\u7A7A\uFF0C\u4F7F\u7528 'roy-agent commands add' \u6DFB\u52A0\u547D\u4EE4");
12122
12123
  }
12123
12124
  const NAME_WIDTH = 20;
12124
12125
  const SOURCE_WIDTH = 10;
@@ -12736,12 +12737,12 @@ var COMPONENT_DESCRIPTIONS = {
12736
12737
 
12737
12738
  // packages/cli/src/commands/config/list.ts
12738
12739
  var USAGE_COMMANDS = [
12739
- { command: "roy config list", description: "\u663E\u793A\u5E2E\u52A9\u4FE1\u606F" },
12740
- { command: "roy config list tool", description: "\u67E5\u770B tool component \u914D\u7F6E" },
12741
- { command: "roy config list session", description: "\u67E5\u770B session component \u914D\u7F6E" },
12742
- { command: "roy config list all", description: "\u67E5\u770B\u6240\u6709 components \u6982\u89C8" },
12743
- { command: "roy config list tool --json", description: "JSON \u683C\u5F0F\u8F93\u51FA" },
12744
- { command: "roy config list tool --keys", description: "\u53EA\u663E\u793A\u914D\u7F6E\u952E" }
12740
+ { command: "roy-agent config list", description: "\u663E\u793A\u5E2E\u52A9\u4FE1\u606F" },
12741
+ { command: "roy-agent config list tool", description: "\u67E5\u770B tool component \u914D\u7F6E" },
12742
+ { command: "roy-agent config list session", description: "\u67E5\u770B session component \u914D\u7F6E" },
12743
+ { command: "roy-agent config list all", description: "\u67E5\u770B\u6240\u6709 components \u6982\u89C8" },
12744
+ { command: "roy-agent config list tool --json", description: "JSON \u683C\u5F0F\u8F93\u51FA" },
12745
+ { command: "roy-agent config list tool --keys", description: "\u53EA\u663E\u793A\u914D\u7F6E\u952E" }
12745
12746
  ];
12746
12747
  var ConfigListCommand = {
12747
12748
  command: "list [component]",
@@ -12765,7 +12766,7 @@ var ConfigListCommand = {
12765
12766
  type: "string",
12766
12767
  describe: "\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84",
12767
12768
  alias: "c"
12768
- }).example("roy config list", "\u663E\u793A\u5E2E\u52A9\u4FE1\u606F").example("roy config list tool", "\u67E5\u770B tool component \u914D\u7F6E").example("roy config list session", "\u67E5\u770B session component \u914D\u7F6E").example("roy config list all", "\u67E5\u770B\u6240\u6709 components \u6982\u89C8").example("roy config list tool --json", "JSON \u683C\u5F0F\u8F93\u51FA").example("roy config list tool --keys", "\u53EA\u663E\u793A\u914D\u7F6E\u952E"),
12769
+ }).example("roy-agent config list", "\u663E\u793A\u5E2E\u52A9\u4FE1\u606F").example("roy-agent config list tool", "\u67E5\u770B tool component \u914D\u7F6E").example("roy-agent config list session", "\u67E5\u770B session component \u914D\u7F6E").example("roy-agent config list all", "\u67E5\u770B\u6240\u6709 components \u6982\u89C8").example("roy-agent config list tool --json", "JSON \u683C\u5F0F\u8F93\u51FA").example("roy-agent config list tool --keys", "\u53EA\u663E\u793A\u914D\u7F6E\u952E"),
12769
12770
  async handler(args) {
12770
12771
  const output = new OutputService;
12771
12772
  const envService = new EnvironmentService(output);
@@ -12814,12 +12815,12 @@ var ConfigListCommand = {
12814
12815
  }
12815
12816
  };
12816
12817
  function showHelp(output) {
12817
- output.log(chalk32.bold.cyan("# roy config list"));
12818
+ output.log(chalk32.bold.cyan("# roy-agent config list"));
12818
12819
  output.log("");
12819
12820
  output.log("\u67E5\u770B roy-agent \u7EC4\u4EF6\u914D\u7F6E\u4FE1\u606F");
12820
12821
  output.log("");
12821
12822
  output.log(chalk32.bold("Usage:"));
12822
- output.log(` ${chalk32.cyan("roy config list [component] [options]")}`);
12823
+ output.log(` ${chalk32.cyan("roy-agent config list [component] [options]")}`);
12823
12824
  output.log("");
12824
12825
  output.log(chalk32.bold("Components:"));
12825
12826
  for (const comp of SUPPORTED_COMPONENTS) {
@@ -12938,7 +12939,7 @@ var ConfigExportCommand = {
12938
12939
  type: "string",
12939
12940
  describe: "\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84",
12940
12941
  alias: "c"
12941
- }).example("roy config export agent --file agent-config.json", "\u5BFC\u51FA agent \u914D\u7F6E").example("roy config export session --file session-config.json", "\u5BFC\u51FA session \u914D\u7F6E"),
12942
+ }).example("roy-agent config export agent --file agent-config.json", "\u5BFC\u51FA agent \u914D\u7F6E").example("roy-agent config export session --file session-config.json", "\u5BFC\u51FA session \u914D\u7F6E"),
12942
12943
  async handler(args) {
12943
12944
  const output = new OutputService;
12944
12945
  const envService = new EnvironmentService(output);
@@ -13006,7 +13007,7 @@ var ConfigImportCommand = {
13006
13007
  type: "string",
13007
13008
  describe: "\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84",
13008
13009
  alias: "c"
13009
- }).example("roy config import session --file session-config.json", "\u5BFC\u5165 session \u914D\u7F6E").example("roy config import session --file session-config.json --dry-run", "\u9884\u89C8\u53D8\u66F4").example("roy config import session --file session-config.json --verbose", "\u663E\u793A\u8BE6\u7EC6\u4FE1\u606F"),
13010
+ }).example("roy-agent config import session --file session-config.json", "\u5BFC\u5165 session \u914D\u7F6E").example("roy-agent config import session --file session-config.json --dry-run", "\u9884\u89C8\u53D8\u66F4").example("roy-agent config import session --file session-config.json --verbose", "\u663E\u793A\u8BE6\u7EC6\u4FE1\u606F"),
13010
13011
  async handler(args) {
13011
13012
  const output = new OutputService;
13012
13013
  const envService = new EnvironmentService(output);
@@ -13436,7 +13437,7 @@ var GetCommand4 = {
13436
13437
  const tool = toolComponent.getTool(args.name);
13437
13438
  if (!tool) {
13438
13439
  output.error(`Tool not found: ${args.name}`);
13439
- output.log("Use 'roy tools list' to see available tools.");
13440
+ output.log("Use 'roy-agent tools list' to see available tools.");
13440
13441
  process.exit(1);
13441
13442
  }
13442
13443
  const params = extractParameters(tool.parameters);
@@ -13512,7 +13513,7 @@ var ExecToolCommand = {
13512
13513
  const tool = toolComponent.getTool(toolName);
13513
13514
  if (!tool) {
13514
13515
  output.error(`Tool not found: ${toolName}`);
13515
- output.log("Use 'roy tools list' to see available tools.");
13516
+ output.log("Use 'roy-agent tools list' to see available tools.");
13516
13517
  process.exit(1);
13517
13518
  }
13518
13519
  const params = extractParameters(tool.parameters);
@@ -13571,7 +13572,7 @@ var ToolsCommand2 = {
13571
13572
  describe: "\u5DE5\u5177\u7BA1\u7406 - \u5217\u51FA\u3001\u83B7\u53D6\u3001\u6267\u884C\u5185\u7F6E\u5DE5\u5177",
13572
13573
  builder: (yargs) => yargs.command(ListCommand5).command(GetCommand4).command(ExecToolCommand).demandCommand().help(),
13573
13574
  handler: () => {
13574
- console.log("Use 'roy tools --help' for usage information");
13575
+ console.log("Use 'roy-agent tools --help' for usage information");
13575
13576
  }
13576
13577
  };
13577
13578
 
@@ -13865,7 +13866,7 @@ function truncateVisual2(str, maxWidth) {
13865
13866
  }
13866
13867
  function formatSourcesTable(sources) {
13867
13868
  if (sources.length === 0) {
13868
- return chalk42.yellow("\u6CA1\u6709\u914D\u7F6E\u7684\u4E8B\u4EF6\u6E90\uFF0C\u4F7F\u7528 'roy eventsource add' \u6DFB\u52A0");
13869
+ return chalk42.yellow("\u6CA1\u6709\u914D\u7F6E\u7684\u4E8B\u4EF6\u6E90\uFF0C\u4F7F\u7528 'roy-agent eventsource add' \u6DFB\u52A0");
13869
13870
  }
13870
13871
  const ID_WIDTH = 10;
13871
13872
  const NAME_WIDTH = 20;
@@ -13931,7 +13932,7 @@ var EventSourceListCommand = {
13931
13932
  if (args.json) {
13932
13933
  output.json({ sources: [], count: 0 });
13933
13934
  } else {
13934
- output.log(chalk42.yellow("\u6CA1\u6709\u914D\u7F6E\u7684\u4E8B\u4EF6\u6E90\uFF0C\u4F7F\u7528 'roy eventsource add' \u6DFB\u52A0"));
13935
+ output.log(chalk42.yellow("\u6CA1\u6709\u914D\u7F6E\u7684\u4E8B\u4EF6\u6E90\uFF0C\u4F7F\u7528 'roy-agent eventsource add' \u6DFB\u52A0"));
13935
13936
  }
13936
13937
  return;
13937
13938
  }
@@ -14056,7 +14057,7 @@ var EventSourceAddCommand = {
14056
14057
  output.log(` Interval: ${chalk43.gray(`${a.interval}ms`)}`);
14057
14058
  }
14058
14059
  output.log("");
14059
- output.log(chalk43.gray(`\u4F7F\u7528 'roy eventsource start ${config.id.substring(0, 8)}' \u542F\u52A8\u5B83\u3002`));
14060
+ output.log(chalk43.gray(`\u4F7F\u7528 'roy-agent eventsource start ${config.id.substring(0, 8)}' \u542F\u52A8\u5B83\u3002`));
14060
14061
  } finally {
14061
14062
  await envService.dispose();
14062
14063
  }
@@ -14103,7 +14104,7 @@ var EventSourceRemoveCommand = {
14103
14104
  const status = esComponent.getStatus(matchedSource.id);
14104
14105
  if (status === "running" && !args.force) {
14105
14106
  output.error(`\u4E8B\u4EF6\u6E90\u6B63\u5728\u8FD0\u884C\u4E2D\uFF0C\u8BF7\u5148\u505C\u6B62: ${matchedSource.name} (${status})`);
14106
- output.log(chalk44.gray(`\u4F7F\u7528 --force \u5F3A\u5236\u79FB\u9664\u6216 'roy eventsource stop ${matchedSource.id.substring(0, 8)}' \u5148\u505C\u6B62`));
14107
+ output.log(chalk44.gray(`\u4F7F\u7528 --force \u5F3A\u5236\u79FB\u9664\u6216 'roy-agent eventsource stop ${matchedSource.id.substring(0, 8)}' \u5148\u505C\u6B62`));
14107
14108
  process.exit(1);
14108
14109
  }
14109
14110
  if (status === "running") {
@@ -15036,7 +15037,7 @@ var WorkflowListCommand = {
15036
15037
  }
15037
15038
  const service = workflowComponent.workflowService;
15038
15039
  if (!service) {
15039
- output.error('WorkflowService not initialized. Please run "roy workflow init" first.');
15040
+ output.error('WorkflowService not initialized. Please run "roy-agent workflow init" first.');
15040
15041
  process.exit(1);
15041
15042
  }
15042
15043
  const workflows = service.listWorkflows({
@@ -15766,8 +15767,8 @@ var WorkflowAddCommand = {
15766
15767
  ${a.desc}
15767
15768
 
15768
15769
  ## \u91CD\u8981\u63D0\u9192
15769
- 1. \u5148\u7528 \`roy workflow nodes\` \u67E5\u770B\u53EF\u7528\u7684\u8282\u70B9\u7C7B\u578B
15770
- 2. \u751F\u6210\u7684 YAML \u5FC5\u987B\u901A\u8FC7 \`roy workflow validate --yaml "<yaml>"\` \u9A8C\u8BC1
15770
+ 1. \u5148\u7528 \`roy-agent workflow nodes\` \u67E5\u770B\u53EF\u7528\u7684\u8282\u70B9\u7C7B\u578B
15771
+ 2. \u751F\u6210\u7684 YAML \u5FC5\u987B\u901A\u8FC7 \`roy-agent workflow validate --yaml "<yaml>"\` \u9A8C\u8BC1
15771
15772
  3. \u9A8C\u8BC1\u901A\u8FC7\u540E\u624D\u8F93\u51FA\u6700\u7EC8 YAML`;
15772
15773
  output.log(chalk50.gray("Running workflow-extractor agent..."));
15773
15774
  const result = await agentComponent.run("workflow-extractor", prompt);
@@ -15809,7 +15810,7 @@ Agent output:
15809
15810
  `));
15810
15811
  } else {
15811
15812
  output.error("Please provide --file or --desc option");
15812
- output.error('Usage: roy workflow add --file <path> | --desc "<description>"');
15813
+ output.error('Usage: roy-agent workflow add --file <path> | --desc "<description>"');
15813
15814
  process.exit(1);
15814
15815
  }
15815
15816
  const tags = a.tags ? a.tags.split(",").map((t) => t.trim()) : undefined;
@@ -16178,7 +16179,7 @@ var runWorkflow = wrapFunction(async function runWorkflowImpl(args) {
16178
16179
  }
16179
16180
  const service = workflowComponent.workflowService;
16180
16181
  if (!service) {
16181
- output.error('WorkflowService not initialized. Please run "roy workflow init" first.');
16182
+ output.error('WorkflowService not initialized. Please run "roy-agent workflow init" first.');
16182
16183
  process.exit(1);
16183
16184
  }
16184
16185
  let input = {};
@@ -16280,7 +16281,7 @@ var runWorkflow = wrapFunction(async function runWorkflowImpl(args) {
16280
16281
  }));
16281
16282
  if (result.status === "paused") {
16282
16283
  output.log(chalk54.gray(`
16283
- \uD83D\uDCA1 Use "roy workflow run -s ${result.runId}" to resume`));
16284
+ \uD83D\uDCA1 Use "roy-agent workflow run -s ${result.runId}" to resume`));
16284
16285
  }
16285
16286
  } else {
16286
16287
  output.log(chalk54.blue(`\uD83D\uDE80 Running workflow: ${args.identifier}`));
@@ -16294,7 +16295,7 @@ var runWorkflow = wrapFunction(async function runWorkflowImpl(args) {
16294
16295
  }));
16295
16296
  if (result.status === "paused") {
16296
16297
  output.log(chalk54.gray(`
16297
- \uD83D\uDCA1 Use "roy workflow run -s ${result.runId}" to resume`));
16298
+ \uD83D\uDCA1 Use "roy-agent workflow run -s ${result.runId}" to resume`));
16298
16299
  }
16299
16300
  }
16300
16301
  if (workflowSpan) {
@@ -16916,7 +16917,7 @@ var WorkflowNodesCommand = {
16916
16917
  if (!nodeType) {
16917
16918
  console.log(renderNodeTypesTable(BUILT_IN_NODES));
16918
16919
  console.log(chalk57.gray(`
16919
- Use `) + chalk57.cyan("roy workflow nodes <type>") + chalk57.gray(" for detailed information"));
16920
+ Use `) + chalk57.cyan("roy-agent workflow nodes <type>") + chalk57.gray(" for detailed information"));
16920
16921
  console.log(chalk57.gray("Available types: ") + chalk57.yellow(BUILT_IN_NODES.map((n) => n.type).join(", ")));
16921
16922
  return;
16922
16923
  }
@@ -17084,7 +17085,7 @@ var LspInstallCommand = {
17084
17085
  ${installed.length}/${LSP_PACKAGES.length} installed
17085
17086
  `);
17086
17087
  if (missing.length > 0) {
17087
- console.log(`Run 'roy lsp install' to install missing servers
17088
+ console.log(`Run 'roy-agent lsp install' to install missing servers
17088
17089
  `);
17089
17090
  }
17090
17091
  return;
@@ -17135,8 +17136,8 @@ ${installed.length}/${LSP_PACKAGES.length} installed
17135
17136
  console.log(` ${status} ${pkg.serverId.padEnd(12)} ${pkg.description}`);
17136
17137
  }
17137
17138
  console.log(`
17138
- Run 'roy lsp install <language>' to install specific servers`);
17139
- console.log(` Run 'roy lsp install --all' to install all servers
17139
+ Run 'roy-agent lsp install <language>' to install specific servers`);
17140
+ console.log(` Run 'roy-agent lsp install --all' to install all servers
17140
17141
  `);
17141
17142
  }
17142
17143
  }
@@ -17269,7 +17270,7 @@ var LspCommand = {
17269
17270
  describe: "Manage LSP (Language Server Protocol) servers",
17270
17271
  builder: (yargs) => yargs.command(LspInstallCommand).command(LspListCommand).command(LspCheckCommand).demandCommand().help(),
17271
17272
  handler: () => {
17272
- console.log("Use 'roy lsp --help' for usage information");
17273
+ console.log("Use 'roy-agent lsp --help' for usage information");
17273
17274
  }
17274
17275
  };
17275
17276
 
@@ -17298,7 +17299,7 @@ Examples:
17298
17299
  async function runCli() {
17299
17300
  const pkg = await Promise.resolve().then(() => __toESM(require_package(), 1));
17300
17301
  const yargs = yargsLib;
17301
- await yargs(hideBin(process.argv)).scriptName("roy").version(pkg.default.version).option("quiet", {
17302
+ await yargs(hideBin(process.argv)).scriptName("roy-agent").version(pkg.default.version).option("quiet", {
17302
17303
  alias: "q",
17303
17304
  type: "boolean",
17304
17305
  description: "Suppress all log output",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "bin": {
10
- "roy": "./dist/bin/roy.js"
10
+ "roy-agent": "./dist/bin/roy-agent.js"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
@@ -30,8 +30,8 @@
30
30
  "vscode-json-languageserver": "^1.3.4",
31
31
  "yargs": "^17.7.2",
32
32
  "zod-to-json-schema": "^3.25.2",
33
- "@ai-setting/roy-agent-coder-harness": "1.1.1",
34
- "@ai-setting/roy-agent-core": "1.4.1"
33
+ "@ai-setting/roy-agent-coder-harness": "1.1.3",
34
+ "@ai-setting/roy-agent-core": "1.4.5"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.10.0",
@@ -65,6 +65,7 @@
65
65
  },
66
66
  "scripts": {
67
67
  "build": "bun run bunup",
68
- "clean": "rm -rf dist"
68
+ "clean": "rm -rf dist",
69
+ "typecheck": "npx tsc --noEmit --skipLibCheck"
69
70
  }
70
71
  }