scream-code 0.19.3 → 0.19.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.
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
3
3
  import { dirname as __cjsShimDirname } from 'node:path';
4
4
  const __filename = __cjsShimFileURLToPath(import.meta.url);
5
5
  const __dirname = __cjsShimDirname(__filename);
6
- import { en as handleConnectCommand } from "./dispatch-BziMqJ_r.mjs";
6
+ import { Qt as handleConnectCommand } from "./dispatch-Brb_yK-J.mjs";
7
7
  export { handleConnectCommand };
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-NpW56jQ9.mjs")).main();
9
+ (await import("./app-JxeaGaIc.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);
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
3
3
  import { dirname as __cjsShimDirname } from 'node:path';
4
4
  const __filename = __cjsShimFileURLToPath(import.meta.url);
5
5
  const __dirname = __cjsShimDirname(__filename);
6
- import { t as TextInputDialogComponent } from "./text-input-dialog-yvsx17gg.mjs";
6
+ import { t as TextInputDialogComponent } from "./text-input-dialog-D6PfbOws.mjs";
7
7
  export { TextInputDialogComponent };
@@ -8,8 +8,8 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { arch, hostname, release, type } from "node:os";
10
10
  import { execFileSync } from "node:child_process";
11
- import chalk from "chalk";
12
11
  import { Container, Input, Key, matchesKey, truncateToWidth, visibleWidth } from "@liutod-scream/pi-tui";
12
+ import chalk from "chalk";
13
13
  //#region ../../packages/config/src/identity.ts
14
14
  /**
15
15
  * Scream host and device identity header factories.
@@ -140,6 +140,7 @@ const dictionaries = {
140
140
  "status.cron_fired_coalesced": "⏰ 定时任务已触发(合并 {count} 次):{preview}",
141
141
  "status.cron_once": "⏰ 一次性提醒已触发:{preview}",
142
142
  "status.cron_stale": "⚠️ 定时任务已过期,仍触发:{preview}",
143
+ "status.cron_empty": "⚠️ 定时任务执行结束但没有输出:{preview}",
143
144
  "status.reconnecting_detail": "⚠️ 重连中 {attempt}/{max}:{reason} · {delay}s",
144
145
  "status.reason_rate_limit": "限流",
145
146
  "status.reason_server": "服务器错误",
@@ -1361,6 +1362,9 @@ const dictionaries = {
1361
1362
  "cron.kind_recurring": "重复",
1362
1363
  "cron.kind_once": "一次性",
1363
1364
  "cron.stale": "已过期",
1365
+ "cron.silent": "静默",
1366
+ "cron.mute": "静音",
1367
+ "cron.last_error": "上次失败:{error}",
1364
1368
  "cron.sched_5m": "每 5 分钟",
1365
1369
  "cron.sched_hourly": "每小时",
1366
1370
  "cron.sched_daily9": "每天 09:00",
@@ -1517,6 +1521,7 @@ const dictionaries = {
1517
1521
  "status.cron_fired_coalesced": "⏰ Scheduled task fired ({count} runs merged): {preview}",
1518
1522
  "status.cron_once": "⏰ One-time reminder fired: {preview}",
1519
1523
  "status.cron_stale": "⚠️ Scheduled task expired, fired anyway: {preview}",
1524
+ "status.cron_empty": "⚠️ Scheduled task finished with no output: {preview}",
1520
1525
  "status.reconnecting_detail": "⚠️ Reconnecting {attempt}/{max}: {reason} · {delay}s",
1521
1526
  "status.reason_rate_limit": "rate limited",
1522
1527
  "status.reason_server": "server error",
@@ -2738,6 +2743,9 @@ const dictionaries = {
2738
2743
  "cron.kind_recurring": "repeats",
2739
2744
  "cron.kind_once": "one-shot",
2740
2745
  "cron.stale": "expired",
2746
+ "cron.silent": "silent",
2747
+ "cron.mute": "muted",
2748
+ "cron.last_error": "last failed: {error}",
2741
2749
  "cron.sched_5m": "Every 5 minutes",
2742
2750
  "cron.sched_hourly": "Hourly",
2743
2751
  "cron.sched_daily9": "Daily at 09:00",
package/docs/line.md CHANGED
@@ -104,11 +104,20 @@
104
104
  | `/status` | 当前模型、权限/计划/群狼/RLM 模式、上下文占用与思考级别 |
105
105
  | `/model <名称>` | 切换模型;不带参数显示当前模型 |
106
106
  | `/compact` | 压缩上下文 |
107
+ | `/stop` | 停止**正在运行**的那一轮,并丢弃该聊天还在排队的消息(IM 版的 ESC;忙时也可用),回执「已停止当前任务。」;若 10 秒内停不下来(工具挂死),会关闭在线会话,下一条消息自动恢复同一会话 |
108
+ | `/cancel` | 停止并开启新会话(等价 `/stop` + `/new`,忙时也可用) |
109
+ | `/cron` | 查看本聊天的定时任务(含「静默/静音」标记与「上次失败」);`/cron add [--silent\|--mute] <分 时 日 月 周> <要做的事>` 新建;`/cron rm <id>` 删除 |
110
+
111
+ - `--silent`:触发时不发「⏰ 已触发」,只发结果;`--mute`:什么都不发(纯后台维护任务)。模型侧 `CronCreate` 对应参数 `silent` / `mute`。
112
+ - 任务失败会在 `/cron` 列表里留一行「上次失败:…」,下次成功自动清除。
107
113
  | `/new` | 丢弃当前会话,下条消息开新会话 |
108
114
  | `/help` | 命令列表(含自定义命令) |
109
115
  | `/自定义` | 你自己在配置里定义的命令(`prompt` 型或 `exec` 型) |
110
116
 
111
- - 有任务正在处理时,`/model`、`/compact`、`/new` 会回复「请等这一轮结束」,避免与运行中的回合争用。
117
+ - 有任务正在处理时,`/model`、`/compact`、`/new` 会回复「请等这一轮结束(回复 /stop 可中止)」,避免与运行中的回合争用;`/stop` 本身**不受忙限制**。
118
+ - 消息排在别人后面时,会立刻回一条 `收到,前面还有 N 条在处理中。回复 /stop 可中止当前任务。`——不再静默排队。
119
+ - **定时任务现在能回到聊天**:`cron.fired` 在会话里触发后,守护进程会先发一行 `⏰ 定时任务已触发:…`,等这一轮跑完再把最终内容发到该聊天。投递靠入站时缓存的聊天目标(飞书 chat id / 微信 peer + context_token),因此**微信在守护进程重启后、你再次发消息之前无法主动推送**(与平台限制一致,日志会提示)。触发时若正有你的回合在跑,结果并入那一轮回复,不会重复推送。
120
+ - `/status` 末尾会带上启动时的语音能力探测结果(ffmpeg / AMR-NB 编码器是否可用),缺编码器意味着语音会降级成文件。
112
121
  - **自定义命令**:配置项的 `commands` 数组里定义,`prompt` 型会把模板(`{args}` 会被替换,无占位符则把参数附在末尾)作为一轮输入发给模型;`exec` 型在守护进程里执行 shell(macOS/Linux 为 `/bin/sh -c`,Windows 为 `%ComSpec% /d /s /c`;30 s 超时、输出截断 8 KiB、参数通过 `LINE_ARGS` 环境变量传递、`work_dir` 必须位于工作目录内)。Windows 上出于命令注入安全考虑**不支持 `{args}` 占位符**,请在脚本里读 `%LINE_ARGS%`。命令名不能与内置命令重名、不能重复。
113
122
  - **未识别的命令照常发给模型**;需要界面交互的命令(`/theme`、`/line` 向导、无参 `/model` 选择器、`/sessions`)会提示「需要桌面端」。
114
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scream-code",
3
- "version": "0.19.3",
3
+ "version": "0.19.5",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "ScreamCli",