@nowcrew/daemon 0.6.88-beta.23 → 0.6.88-beta.24

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.
@@ -22,7 +22,7 @@ const clip = (text) => text.length > TOOL_RESULT_CAP
22
22
  ? `${text.slice(0, TOOL_RESULT_CAP)}… (+${text.length - TOOL_RESULT_CAP})`
23
23
  : text;
24
24
  const SCRIPT_TOOLS = new Set(["Bash", "PowerShell", "Shell"]);
25
- export function createConsoleFormatter() {
25
+ export function createConsoleFormatter(runtime) {
26
26
  const pending = new Map();
27
27
  // listId → 上一条 todos 快照的指纹;仅用于丢弃「连续两次完全相同」的重复事件(无损去重)。
28
28
  // 只比对相邻快照,不做跨快照合并——进度推进的中间态必须逐条下发,否则前端进度条会停在旧值。
@@ -86,7 +86,7 @@ export function createConsoleFormatter() {
86
86
  const filler = consumePendingThinking();
87
87
  if (filler) {
88
88
  const content = message.content.map((block) => block.type === "thinking" && !block.thinking?.trim() ? { ...block, thinking: filler } : block);
89
- return dedupeTodos(toConsoleLines({ ...rec, message: { ...message, content } }));
89
+ return dedupeTodos(toConsoleLines({ ...rec, message: { ...message, content } }, runtime));
90
90
  }
91
91
  }
92
92
  }
@@ -146,7 +146,7 @@ export function createConsoleFormatter() {
146
146
  }
147
147
  return out;
148
148
  }
149
- return dedupeTodos(toConsoleLines(event));
149
+ return dedupeTodos(toConsoleLines(event, runtime));
150
150
  },
151
151
  };
152
152
  }
package/dist/console.js CHANGED
@@ -263,7 +263,7 @@ function codexItemChunks(item, td) {
263
263
  return [];
264
264
  }
265
265
  /** 把一个 stream-json 事件转成 0..N 条 console 行(完全透传)。 */
266
- export function toConsoleLines(event) {
266
+ export function toConsoleLines(event, runtime) {
267
267
  const e = (event ?? {});
268
268
  const lang = detectDaemonLang();
269
269
  const td = (message) => translateDaemon(lang, message);
@@ -284,7 +284,20 @@ export function toConsoleLines(event) {
284
284
  return [{ stream: "system", text: `● ${td("Claude session started")}` }];
285
285
  }
286
286
  if (e.type === "thread.started") {
287
- return [{ stream: "system", text: `● ${td("Codex session started")}` }];
287
+ // thread.started is shared by Codex and ACP adapters; its shape does not
288
+ // identify the runtime. Use the executor-owned selection, not event fields.
289
+ const messages = {
290
+ claude: "Claude session started",
291
+ codex: "Codex session started",
292
+ kimi: "Kimi session started",
293
+ hermes: "Hermes session started",
294
+ opencode: "OpenCode session started",
295
+ "deepseek-harness": "DeepSeek Harness session started",
296
+ };
297
+ const message = runtime && Object.hasOwn(messages, runtime)
298
+ ? messages[runtime]
299
+ : "Session started";
300
+ return [{ stream: "system", text: `● ${td(message)}` }];
288
301
  }
289
302
  if (e.type === "turn.plan.updated") {
290
303
  const plan = boundedCodexPlan(e.plan);
package/dist/i18n.js CHANGED
@@ -18,6 +18,11 @@ export function detectDaemonLang(env = process.env) {
18
18
  const zh = {
19
19
  "Claude session started": "Claude 会话启动",
20
20
  "Codex session started": "Codex 会话启动",
21
+ "Kimi session started": "Kimi 会话启动",
22
+ "Hermes session started": "Hermes 会话启动",
23
+ "OpenCode session started": "OpenCode 会话启动",
24
+ "DeepSeek Harness session started": "DeepSeek Harness 会话启动",
25
+ "Session started": "会话启动",
21
26
  "Plan updated": "计划更新",
22
27
  "Thinking (~{{tokens}} tokens, content not streamed by Claude Code)": "思考(约 {{tokens}} tokens,Claude Code 未输出思考正文)",
23
28
  "Thinking (content not streamed by Claude Code)": "思考(Claude Code 未输出思考正文)",
@@ -718,7 +718,7 @@ async function executeLocalUnlocked(input, callbacks, dependencies) {
718
718
  // (incident: 2026-09-02, boss-alarm 排查结论未投递)。所有 runtime 的文本都喂给它。
719
719
  const externalOutput = new ExternalAnswerDecoder();
720
720
  // 每轮独立:tool_use/result 关联状态不能跨 execution 泄漏。
721
- const consoleFormatter = createConsoleFormatter();
721
+ const consoleFormatter = createConsoleFormatter(runtime.name);
722
722
  let runtimeReady = false;
723
723
  let runtimeRunning = false;
724
724
  let resolveRuntimeReady;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowcrew/daemon",
3
- "version": "0.6.88-beta.23",
3
+ "version": "0.6.88-beta.24",
4
4
  "type": "module",
5
5
  "description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
6
6
  "license": "Apache-2.0",