@liumir/lmcode 0.5.14 → 0.5.15

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.
@@ -74149,8 +74149,8 @@ function validateCommand(command, isWindows) {
74149
74149
  return null;
74150
74150
  }
74151
74151
  function buildSelfProtectionPreamble(isWindows) {
74152
- if (isWindows) return "_SCREAM_CHECK(){ for _a in \"$@\";do [ \"$_a\" = \"$SCREAM_PID\" ]&&{ echo \"LMcode self-protection: refusing to kill itself (pid $SCREAM_PID). Use a specific non-Scream PID.\">&2;return 1;};done;return 0;};kill(){ _SCREAM_CHECK \"$@\"||return 1;command kill \"$@\";};pkill(){ echo \"LMcode self-protection: pkill blocked. Use kill <pid>.\">&2;return 1;};taskkill(){ _SCREAM_CHECK \"$@\"||return 1;command taskkill \"$@\";};tskill(){ _SCREAM_CHECK \"$@\"||return 1;command tskill \"$@\";};";
74153
- return "_SCREAM_CHECK(){ for _a in \"$@\";do [ \"$_a\" = \"$SCREAM_PID\" ]||[ \"$_a\" = \"-$SCREAM_PID\" ]&&{ echo \"LMcode self-protection: refusing to kill itself (pid $SCREAM_PID). Use a specific non-Scream PID.\">&2;return 1;};done;return 0;};kill(){ _SCREAM_CHECK \"$@\"||return 1;command kill \"$@\";};pkill(){ echo \"LMcode self-protection: pkill blocked. Use kill <pid>.\">&2;return 1;};killall(){ echo \"LMcode self-protection: killall blocked. Use kill <pid>.\">&2;return 1;};";
74152
+ if (isWindows) return "_SCREAM_CHECK(){ for _a in \"$@\";do [ \"$_a\" = \"$SCREAM_PID\" ]&&{ echo \"LMcode self-protection: refusing to kill itself (pid $SCREAM_PID). Use a specific non-LMcode PID.\">&2;return 1;};done;return 0;};kill(){ _SCREAM_CHECK \"$@\"||return 1;command kill \"$@\";};pkill(){ echo \"LMcode self-protection: pkill blocked. Use kill <pid>.\">&2;return 1;};taskkill(){ _SCREAM_CHECK \"$@\"||return 1;command taskkill \"$@\";};tskill(){ _SCREAM_CHECK \"$@\"||return 1;command tskill \"$@\";};";
74153
+ return "_SCREAM_CHECK(){ for _a in \"$@\";do [ \"$_a\" = \"$SCREAM_PID\" ]||[ \"$_a\" = \"-$SCREAM_PID\" ]&&{ echo \"LMcode self-protection: refusing to kill itself (pid $SCREAM_PID). Use a specific non-LMcode PID.\">&2;return 1;};done;return 0;};kill(){ _SCREAM_CHECK \"$@\"||return 1;command kill \"$@\";};pkill(){ echo \"LMcode self-protection: pkill blocked. Use kill <pid>.\">&2;return 1;};killall(){ echo \"LMcode self-protection: killall blocked. Use kill <pid>.\">&2;return 1;};";
74154
74154
  }
74155
74155
  var BashTool = class {
74156
74156
  jian;
@@ -94891,7 +94891,7 @@ function camelToSnake$1(str) {
94891
94891
  const DEFAULT_CONFIG_FILE_TEXT = `# ~/.lmcode/config.toml
94892
94892
  # Runtime settings for LMcode.
94893
94893
  # This file starts empty so built-in defaults can apply.
94894
- # Login will populate managed Scream provider and model entries.
94894
+ # Login will populate managed LMcode provider and model entries.
94895
94895
  `;
94896
94896
  async function ensureConfigFile(filePath) {
94897
94897
  await mkdir(dirname$2(filePath), {
@@ -118870,7 +118870,7 @@ function errorMessage(error) {
118870
118870
  //#endregion
118871
118871
  //#region src/cli/commands.ts
118872
118872
  function createProgram(version, onMain, onMigrate, onPluginNodeRunner = () => {}, onStreamJson = () => {}, onChannelSetup = () => {}) {
118873
- const program = new Command("lm").description("下一代智能体的起点").version(version, "-V, --version").allowUnknownOption(false).configureHelp({ helpWidth: 100 }).helpOption("-h, --help", "显示帮助。").addHelpText("after", "\n文档: https://scream-cli.github.io/lmcode/\n");
118873
+ const program = new Command("lm").description("下一代智能体的起点").version(version, "-V, --version").allowUnknownOption(false).configureHelp({ helpWidth: 100 }).helpOption("-h, --help", "显示帮助。").addHelpText("after", "\n文档: https://lmcode.chat/\n");
118874
118874
  program.addOption(new Option("-S, --session [id]", "恢复会话。带 ID:恢复该会话。不带 ID:交互式选择。").argParser((val) => val === true ? "" : val)).addOption(new Option("-r, --resume [id]").hideHelp().argParser((val) => val === true ? "" : val)).option("-C, --continue", "继续当前工作目录的上一个会话。", false).option("-y, --yolo", "自动批准所有操作。", false).option("--auto", "以自动权限模式启动。", false).addOption(new Option("-m, --model <model>", "本次调用使用的 LLM 模型别名。默认使用 config.toml 中的 default_model。")).addOption(new Option("-p, --prompt <prompt>", "非交互式运行一条提示并打印响应。")).addOption(new Option("--output-format <format>", "提示模式的输出格式。默认为 text。").choices(["text", "stream-json"])).addOption(new Option("--skills-dir <dir>", "从该目录加载技能,而不是自动发现的用户和项目目录。可多次指定。").argParser((value, previous) => [...previous ?? [], value]).default([])).addOption(new Option("--yes").hideHelp().default(false)).addOption(new Option("--auto-approve").hideHelp().default(false)).option("--plan", "以计划模式启动。", false);
118875
118875
  registerExportCommand(program);
118876
118876
  registerMigrateCommand(program, onMigrate);
@@ -119678,7 +119678,7 @@ const BUILTIN_SLASH_COMMANDS = [
119678
119678
  {
119679
119679
  name: "plugin",
119680
119680
  aliases: ["plugins"],
119681
- description: "ScreamCode 插件中心:浏览、安装、卸载插件",
119681
+ description: "LMcode 插件中心:浏览、安装、卸载插件",
119682
119682
  priority: 111,
119683
119683
  availability: "always"
119684
119684
  },
@@ -122275,7 +122275,7 @@ function buildExportMarkdown(input) {
122275
122275
  `token_count: ${String(tokenCount)}`,
122276
122276
  "---",
122277
122277
  "",
122278
- "# Scream 会话导出",
122278
+ "# LMcode 会话导出",
122279
122279
  ""
122280
122280
  ];
122281
122281
  const turns = groupIntoTurns(history);
@@ -122523,9 +122523,9 @@ var GoalStatusMessageComponent = class {
122523
122523
  constructor(goal, colors) {
122524
122524
  this.goal = goal;
122525
122525
  this.colors = colors;
122526
- if (goal === null) this.panel = new UsagePanelComponent(buildEmptyGoalLines(this.colors), this.colors.success, " Scream Goal ");
122526
+ if (goal === null) this.panel = new UsagePanelComponent(buildEmptyGoalLines(this.colors), this.colors.success, " LMcode Goal ");
122527
122527
  else {
122528
- const title = ` Scream Goal · ${statusLabel(goal.status)} `;
122528
+ const title = ` LMcode Goal · ${statusLabel(goal.status)} `;
122529
122529
  this.panel = new UsagePanelComponent(buildGoalReportLines(goal, this.colors), this.colors.success, title);
122530
122530
  }
122531
122531
  }
@@ -127107,11 +127107,11 @@ async function openPluginPanel(host) {
127107
127107
  const installed = await loadInstalled(host);
127108
127108
  const options = buildOptions(marketplace, installed);
127109
127109
  if (options.length === 0) {
127110
- host.showNotice("ScreamCode 插件中心", "暂无可用插件。请检查网络或稍后重试。");
127110
+ host.showNotice("LMcode 插件中心", "暂无可用插件。请检查网络或稍后重试。");
127111
127111
  return;
127112
127112
  }
127113
127113
  const picker = new ChoicePickerComponent({
127114
- title: "ScreamCode 插件中心",
127114
+ title: "LMcode 插件中心",
127115
127115
  hint: "Enter 安装 / d+Enter 卸载 / Esc 返回",
127116
127116
  options,
127117
127117
  colors: host.state.theme.colors,
@@ -134271,7 +134271,7 @@ const TOOLBAR_TIPS = [
134271
134271
  priority: 3
134272
134272
  },
134273
134273
  {
134274
- text: "让 Scream 安排任务,例如 \"2个小时后提醒我去拿快递\"",
134274
+ text: "让 LMcode 安排任务,例如 \"2个小时后提醒我去拿快递\"",
134275
134275
  solo: true,
134276
134276
  priority: 3
134277
134277
  }
@@ -136358,7 +136358,7 @@ var HelpPanelComponent = class extends Container {
136358
136358
  accent("─".repeat(width)),
136359
136359
  accent.bold(" 帮助 ") + muted("· Esc / Enter / q 关闭 · ↑↓ 滚动"),
136360
136360
  "",
136361
- ` ${dim("Scream 已准备好帮助您!发送消息即可开始。")}`,
136361
+ ` ${dim("LMcode 已准备好帮助您!发送消息即可开始。")}`,
136362
136362
  "",
136363
136363
  ` ${chalk.bold("键盘快捷键")}`,
136364
136364
  ...shortcuts.map((s) => ` ${kbdColor(s.keys.padEnd(kbdWidth))} ${dim(s.description)}`),
@@ -138266,12 +138266,12 @@ var LmcodeTUI = class {
138266
138266
  //#region src/tui/components/chrome/loading.ts
138267
138267
  const { stdout, stdin } = process$1;
138268
138268
  const LOGO = [
138269
- "███████╗ ██████╗██████╗ ███████╗ █████╗ ███╗ ███╗ ██████╗ ██████╗ ██████╗ ███████╗",
138270
- "██╔════╝██╔════╝██╔══██╗██╔════╝██╔══██╗████╗ ████║ ██╔════╝██╔═══██╗██╔══██╗██╔════╝",
138271
- "███████╗██║ ██████╔╝█████╗ ███████║██╔████╔██║ ██║ ██║ ██║██║ ██║█████╗ ",
138272
- "╚════██║██║ ██╔══██╗██╔══╝ ██╔══██║██║╚██╔╝██║ ██║ ██║ ██║██║ ██║██╔══╝ ",
138273
- "███████║╚██████╗██║ ██║███████╗██║ ██║██║ ╚═╝ ██║ ╚██████╗╚██████╔╝██████╔╝███████╗",
138274
- "╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝"
138269
+ "██╗ ███╗ ███╗ ██████╗ ██████╗ ██████╗ ███████╗",
138270
+ "██║ ████╗ ████║██╔════╝██╔═══██╗██╔══██╗██╔════╝",
138271
+ "██║ ██╔████╔██║██║ ██║ ██║██║ ██║█████╗ ",
138272
+ "██║ ██║╚██╔╝██║██║ ██║ ██║██║ ██║██╔══╝ ",
138273
+ "███████╗██║ ╚═╝ ██║╚██████╗╚██████╔╝██████╔╝███████╗",
138274
+ "╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝"
138275
138275
  ];
138276
138276
  const SHADOW_CHARS = new Set([
138277
138277
  "╚",
@@ -138758,7 +138758,7 @@ async function runChannelSetup() {
138758
138758
  console.log(` ✔ 已选择: ${platform.name}`);
138759
138759
  console.log("");
138760
138760
  const cliPath = detectScreamPath();
138761
- console.log(` ScreamCode 路径: ${cliPath}`);
138761
+ console.log(` LMcode 路径: ${cliPath}`);
138762
138762
  console.log("");
138763
138763
  const configPath = resolveConfigPath();
138764
138764
  const configDir = dirname$1(configPath);
package/dist/main.mjs CHANGED
@@ -6,7 +6,7 @@ const __dirname = __cjsShimDirname(__filename);
6
6
  import "./suppress-sqlite-warning-C2VB0doZ.mjs";
7
7
  //#region src/main.ts
8
8
  try {
9
- (await import("./app-BrCDSMM8.mjs")).main();
9
+ (await import("./app-Kb8SXRR1.mjs")).main();
10
10
  } catch (error) {
11
11
  process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
12
12
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liumir/lmcode",
3
- "version": "0.5.14",
3
+ "version": "0.5.15",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "liumir",