Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Merge remote-tracking branch 'origin/dev' into merge-495

Fei241148b68a497557
diff --cc docs/plans/2026-10-09-context-and-memory.md
index d5b0e870,bc7b8951..7900fdf4
--- a/docs/plans/2026-10-09-context-and-memory.md
+++ b/docs/plans/2026-10-09-context-and-memory.md
@@@ -143,4 -146,4 +147,5 @@@ Bot 是长期的:用户和一个 Bot
- 2026-10-09:分段从「到线就换段」改为「管家判断压缩还是换段」;所有线改为跟着模型走。
- 2026-10-17:加群记忆(#151)。之前群里学到的东西只能进团队记忆,所有 Bot 都读,群外新建的 Bot 也会带上;现在群聊按群整理,只写群记忆。
- 2026-10-23:换工作文件夹触发的换段在会话尾部显示一行状态(「正在切换工作文件夹」,#486)。其他原因的换段仍然无感。
+ - 2026-10-23:加 `pending.json`,一次改动当成一次来做(#481)。之前文件先写、日志后写,中断会留下没有日志的条目,或没有链接的主题。
+- 2026-10-23:没写进记忆的时候,`remember` / `forget` 报错,对话里显示一行失败提示和记忆面板的入口(#482)。
diff --cc ds-bot/src/host/memory.js
index eb762b56,c64eee65..de583e91
--- a/ds-bot/src/host/memory.js
+++ b/ds-bot/src/host/memory.js
@@@ -23,13 -23,14 +23,14 @@@
// memory section the first time it renders, so its prompt stays byte-stable and the
// provider's prefix cache holds; a fresh part, or a checkpoint (which breaks the cache
// anyway), freezes it anew.
- import { createHash } from 'node:crypto'
- import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs'
+ import { createHash, randomUUID } from 'node:crypto'
+ import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, truncateSync, unlinkSync, writeFileSync } from 'node:fs'
import { appendFile, mkdir, rename, unlink, writeFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
-import { BlockAssembler } from '@deepseek-ai/dsh-llm'
+import { BlockAssembler, HarnessError } from '@deepseek-ai/dsh-llm'
import { defineTool } from '@deepseek-ai/dsh-tools'
import { replaceFile } from './files.js'
+ import { inside, pendingPath, read as readPending, record as pendingRecord, relativePath, serialize as serializePending } from './memory-pending.js'
import { splitRef, unquote } from './text.js'
import { speakerOf } from '../shared/mentions.js'
import { output } from './tools.js'