@lemoncat7/dsh-partner 1.11.1 → 1.12.0
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.
- package/README.md +21 -1
- package/docs/memory-quality.md +115 -0
- package/docs/releases/1.12.0.md +25 -0
- package/lib/agent-runtime.d.ts +1 -1
- package/lib/agent-runtime.d.ts.map +1 -1
- package/lib/agent-runtime.js +16 -11
- package/lib/agent-runtime.js.map +1 -1
- package/lib/api/features/memory-layers-api.d.ts +5 -0
- package/lib/api/features/memory-layers-api.d.ts.map +1 -0
- package/lib/api/features/memory-layers-api.js +42 -0
- package/lib/api/features/memory-layers-api.js.map +1 -0
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +5 -1
- package/lib/api.js.map +1 -1
- package/lib/client-api.d.ts +2 -0
- package/lib/client-api.d.ts.map +1 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +2894 -2553
- package/lib/client.js.map +4 -4
- package/lib/collaboration/composition.js +2 -2
- package/lib/collaboration/composition.js.map +1 -1
- package/lib/concern-store.d.ts +1 -0
- package/lib/concern-store.d.ts.map +1 -1
- package/lib/concern-store.js +17 -0
- package/lib/concern-store.js.map +1 -1
- package/lib/concern-tool.d.ts +1 -1
- package/lib/concern-tool.d.ts.map +1 -1
- package/lib/concern-tool.js +12 -9
- package/lib/concern-tool.js.map +1 -1
- package/lib/daily-review.d.ts +1 -0
- package/lib/daily-review.d.ts.map +1 -1
- package/lib/daily-review.js +14 -3
- package/lib/daily-review.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -1
- package/lib/memory-artifacts.d.ts +42 -0
- package/lib/memory-artifacts.d.ts.map +1 -0
- package/lib/memory-artifacts.js +120 -0
- package/lib/memory-artifacts.js.map +1 -0
- package/lib/memory-domain.d.ts +10 -0
- package/lib/memory-domain.d.ts.map +1 -1
- package/lib/memory-journal.d.ts +16 -0
- package/lib/memory-journal.d.ts.map +1 -0
- package/lib/memory-journal.js +51 -0
- package/lib/memory-journal.js.map +1 -0
- package/lib/memory-prompt-context.d.ts.map +1 -1
- package/lib/memory-prompt-context.js +2 -1
- package/lib/memory-prompt-context.js.map +1 -1
- package/lib/memory-quality.d.ts +4 -0
- package/lib/memory-quality.d.ts.map +1 -0
- package/lib/memory-quality.js +16 -0
- package/lib/memory-quality.js.map +1 -0
- package/lib/memory-reflection.d.ts +15 -2
- package/lib/memory-reflection.d.ts.map +1 -1
- package/lib/memory-reflection.js +103 -17
- package/lib/memory-reflection.js.map +1 -1
- package/lib/memory-retrieval.d.ts +5 -0
- package/lib/memory-retrieval.d.ts.map +1 -0
- package/lib/memory-retrieval.js +20 -0
- package/lib/memory-retrieval.js.map +1 -0
- package/lib/memory-store.d.ts +26 -2
- package/lib/memory-store.d.ts.map +1 -1
- package/lib/memory-store.js +142 -50
- package/lib/memory-store.js.map +1 -1
- package/lib/memory-worker.d.ts +25 -0
- package/lib/memory-worker.d.ts.map +1 -0
- package/lib/memory-worker.js +42 -0
- package/lib/memory-worker.js.map +1 -0
- package/lib/profile-domain.d.ts.map +1 -1
- package/lib/profile-domain.js +12 -4
- package/lib/profile-domain.js.map +1 -1
- package/lib/ui/memory/automation-settings.d.ts +8 -0
- package/lib/ui/memory/automation-settings.d.ts.map +1 -0
- package/lib/ui/memory/automation-settings.js +60 -0
- package/lib/ui/memory/automation-settings.js.map +1 -0
- package/lib/ui/memory/concern-board.d.ts +12 -0
- package/lib/ui/memory/concern-board.d.ts.map +1 -0
- package/lib/ui/memory/concern-board.js +129 -0
- package/lib/ui/memory/concern-board.js.map +1 -0
- package/lib/ui/memory/concern-panel.d.ts +7 -0
- package/lib/ui/memory/concern-panel.d.ts.map +1 -0
- package/lib/ui/memory/concern-panel.js +62 -0
- package/lib/ui/memory/concern-panel.js.map +1 -0
- package/lib/ui/memory/experience-view.d.ts +8 -0
- package/lib/ui/memory/experience-view.d.ts.map +1 -0
- package/lib/ui/memory/experience-view.js +52 -0
- package/lib/ui/memory/experience-view.js.map +1 -0
- package/lib/ui/memory/history-view.d.ts +6 -0
- package/lib/ui/memory/history-view.d.ts.map +1 -0
- package/lib/ui/memory/history-view.js +40 -0
- package/lib/ui/memory/history-view.js.map +1 -0
- package/lib/ui/memory/memory-cards.d.ts +14 -0
- package/lib/ui/memory/memory-cards.d.ts.map +1 -0
- package/lib/ui/memory/memory-cards.js +17 -0
- package/lib/ui/memory/memory-cards.js.map +1 -0
- package/lib/ui/memory/memory-detail.d.ts +8 -0
- package/lib/ui/memory/memory-detail.d.ts.map +1 -0
- package/lib/ui/memory/memory-detail.js +45 -0
- package/lib/ui/memory/memory-detail.js.map +1 -0
- package/lib/ui/memory/memory-graph.d.ts +8 -0
- package/lib/ui/memory/memory-graph.d.ts.map +1 -0
- package/lib/ui/memory/memory-graph.js +43 -0
- package/lib/ui/memory/memory-graph.js.map +1 -0
- package/lib/ui/memory/memory-library.d.ts +9 -0
- package/lib/ui/memory/memory-library.d.ts.map +1 -0
- package/lib/ui/memory/memory-library.js +38 -0
- package/lib/ui/memory/memory-library.js.map +1 -0
- package/lib/ui/memory/memory-panel.d.ts +10 -0
- package/lib/ui/memory/memory-panel.d.ts.map +1 -0
- package/lib/ui/memory/memory-panel.js +48 -0
- package/lib/ui/memory/memory-panel.js.map +1 -0
- package/lib/ui/memory/types.d.ts +44 -0
- package/lib/ui/memory/types.d.ts.map +1 -0
- package/lib/ui/memory/types.js +2 -0
- package/lib/ui/memory/types.js.map +1 -0
- package/lib/ui/memory/use-memory-resource.d.ts +9 -0
- package/lib/ui/memory/use-memory-resource.d.ts.map +1 -0
- package/lib/ui/memory/use-memory-resource.js +65 -0
- package/lib/ui/memory/use-memory-resource.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
伙伴不是一次会话中的临时提示词。每个伙伴拥有独立身份、Agent Preset、模型路由、能力声明,以及按微信联系人隔离的 DSH Session。第一版以微信为主要渠道,使用腾讯微信 iLink Bot API,不模拟个人微信网页版协议。
|
|
6
6
|
|
|
7
|
+
## 1.12.0 更新:记忆质量与工作区
|
|
8
|
+
|
|
9
|
+
正式版,适配 DSH **0.1.2-rc.1**,需要 Node.js **^22.19.0 或 >=24.0.0**。
|
|
10
|
+
|
|
11
|
+
- 「持续关注」成为独立标签页;记忆页按画像、记忆和回顾组织,设置使用统一弹窗,支持手机、平板与桌面。
|
|
12
|
+
- 记忆候选验证用户原话依据,区分明确事实、稳定偏好、一次性过程和持续关注,召回仅保留相关内容。
|
|
13
|
+
- 提炼任务持久化、后台执行、失败退避重试;已保存提炼结果复用,不因后续写入或通知失败重新调用模型。
|
|
14
|
+
- 提供场景摘要、对话历史、处理状态与经验审核;经验仅审核后导出,不自动安装 Skill 或扩大权限。
|
|
15
|
+
- 保留已有数据与权限,不自动清理旧记忆。当前仍按有效对话逐轮提炼,未增加 token 用量统计或短消息合批。
|
|
16
|
+
|
|
17
|
+
详见 [发布说明](docs/releases/1.12.0.md) 和 [记忆设计与边界](docs/memory-quality.md)。
|
|
18
|
+
|
|
19
|
+
## 1.11.2 更新
|
|
20
|
+
|
|
21
|
+
适配 DSH **0.1.2-rc.1**。
|
|
22
|
+
|
|
23
|
+
- 明确要求关注可直接保存到「在意的事」,返回保存结果及关注 ID;支持逐项提交多个事项,隐式关注继续使用筛选策略。
|
|
24
|
+
- 区分变化驱动的关注与按时执行、周期性交付的定时任务;记忆关闭时不以定时任务替代关注。
|
|
25
|
+
- 保留记忆权限和已有任务,不自动迁移或删除现有定时任务。
|
|
26
|
+
|
|
7
27
|
## 1.11.1 更新
|
|
8
28
|
|
|
9
29
|
适配 DSH **0.1.2-rc.1**。修复自定义绳纹在拖动时滑动穿帮:采用固定分段的材质坐标,纹理跟随绳子移动、弯曲和拉伸;保留帧率上限与静止休眠。
|
|
@@ -47,7 +67,7 @@
|
|
|
47
67
|
|
|
48
68
|
## 兼容性
|
|
49
69
|
|
|
50
|
-
正式版 `1.
|
|
70
|
+
正式版 `1.12.0` 适配 DeepSeek Harness `0.1.2-rc.1`,需要 Node.js `^22.19.0` 或 `>=24.0.0`。DSH 官方 Agent、Session、Settings、Tools 与客户端 UI 依赖均适配 `0.1.2-rc.1` 接口族。
|
|
51
71
|
|
|
52
72
|
### 1.10.6:明确附件交付与角度高光
|
|
53
73
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Memory quality and layered processing
|
|
2
|
+
|
|
3
|
+
This branch retains existing memories and history archives, adds SQLite tables
|
|
4
|
+
without rewriting existing records, and introduces no external service or vector
|
|
5
|
+
model dependency. There are no UI/theme changes. Daily review reuses its existing
|
|
6
|
+
model request for optional scene and experience proposals.
|
|
7
|
+
|
|
8
|
+
## Responsibilities
|
|
9
|
+
|
|
10
|
+
- `memory-reflection.ts`: candidate extraction and lifecycle instructions. One-shot
|
|
11
|
+
work belongs in the daily summary; continuing observation belongs in concerns.
|
|
12
|
+
- `memory-quality.ts`: validates candidate quotes against user speech. Assistant
|
|
13
|
+
responses and generated summaries are not evidence. Ambiguous or missing sources
|
|
14
|
+
are rejected, including completion/removal proposals. Daily review uses real turn
|
|
15
|
+
IDs rather than recording its synthetic summary as evidence.
|
|
16
|
+
- `memory-store.ts`: scoped target-ID updates, lock protection and persistence.
|
|
17
|
+
Unknown, cross-scope or wrong-kind targets never fall back to inserting a row.
|
|
18
|
+
Exact subject matching remains available for legacy callers. Model-selected IDs
|
|
19
|
+
enable synonymous subject updates without destructive fuzzy automatic merging.
|
|
20
|
+
- Read-time status marks expired active entries as expired without rewriting data.
|
|
21
|
+
Renewed durable preferences/profiles/relationships clear old implicit expiration;
|
|
22
|
+
an explicit new expiration is preserved. Corrections can lower confidence.
|
|
23
|
+
- Chinese bigrams and preserved Latin word boundaries improve lexical ranking.
|
|
24
|
+
- `memory-journal.ts`: durable turn payloads, extraction checkpoints, expiring
|
|
25
|
+
leases, exponential retry backoff (30 seconds to 1 hour). Scoped FIFO prevents
|
|
26
|
+
old retries from overwriting newer work. Other scopes may continue independently.
|
|
27
|
+
- `memory-worker.ts`: lifecycle, opt-out/removal checks and background scheduling.
|
|
28
|
+
Per-turn extraction and daily review share a single model slot. Shutdown aborts
|
|
29
|
+
in-flight model work, and failed jobs remain recoverable. A crashed lease expires
|
|
30
|
+
within five minutes. Model calls retain their 60/90-second deadlines.
|
|
31
|
+
- `memory-retrieval.ts`: relevance and ranking without model calls. No unrelated
|
|
32
|
+
memory padding. At most two history fragments from the most recent 100 durable
|
|
33
|
+
turns and two scene views are included in topic context. Assistant history is
|
|
34
|
+
explicitly labeled as unverified historical output, never as a user fact.
|
|
35
|
+
- `memory-artifacts.ts`: source-linked scene views and reviewable experience
|
|
36
|
+
drafts. Scene content is derived on read, so corrections/deletions immediately
|
|
37
|
+
propagate. Drafts require positive user evidence from at least two sessions;
|
|
38
|
+
repeated tool use alone is insufficient. No auto-install, auto-binding or edits
|
|
39
|
+
to existing skills. At most 100 scenes and 100 drafts per scope are retained.
|
|
40
|
+
- `profile-domain.ts`: deterministic, versioned persona baseline. Includes up to
|
|
41
|
+
four repeatedly evidenced high-confidence preferences (or user-locked entries),
|
|
42
|
+
alongside explicit identity facts. No inferred personality or sensitive traits.
|
|
43
|
+
- `api/features/memory-layers-api.ts`: authenticated-parent management routes,
|
|
44
|
+
manual retry, paginated history, optimistic-version draft review/export.
|
|
45
|
+
|
|
46
|
+
## Transaction and recovery boundaries
|
|
47
|
+
|
|
48
|
+
Enqueue persists before returning from the session event. The stable turn ID
|
|
49
|
+
deduplicates duplicate events. Extraction is checkpointed before writing memory;
|
|
50
|
+
memory changes, daily count and the commit marker share a SQLite transaction.
|
|
51
|
+
Retries reuse checkpointed output, not another model completion. Concern batches
|
|
52
|
+
have a separate idempotency record. New concern notification is attempted before
|
|
53
|
+
the job is marked complete. Delivery is at-least-once: a process crash after delivery
|
|
54
|
+
but before commit can still duplicate a notification; it does not duplicate memory.
|
|
55
|
+
|
|
56
|
+
Daily review defers while its scope has pending turns, and checks again in the
|
|
57
|
+
write transaction. Normal retention no longer deletes active non-expiring memories
|
|
58
|
+
or locked records. Pending jobs are retained regardless of history age. Completed
|
|
59
|
+
turn payloads follow history retention; this also defines their deduplication window.
|
|
60
|
+
Maintenance runs at most once per six hours per active companion after success.
|
|
61
|
+
|
|
62
|
+
## Management endpoints
|
|
63
|
+
|
|
64
|
+
Under the existing companion API prefix, all require the parent route's existing
|
|
65
|
+
origin/access checks. Supply the exact contact `scopeId` as a query parameter:
|
|
66
|
+
|
|
67
|
+
- `GET /companions/:id/memory/layers`: scenes, drafts and pending/retrying jobs.
|
|
68
|
+
- `GET /companions/:id/memory/history`: newly journaled history, up to 30 turns.
|
|
69
|
+
Next page uses the last row's `at` as `before` and `id` as `beforeId`, including
|
|
70
|
+
ties. Older JSONL archives remain available to daily review; not bulk-migrated.
|
|
71
|
+
- `POST /companions/:id/memory/jobs/:jobId`: retry a non-running pending job now.
|
|
72
|
+
- `POST /companions/:id/memory/experiences/:draftId`: body `{action, version}`;
|
|
73
|
+
action is `approved` or `rejected`. Stale versions cannot review newer content.
|
|
74
|
+
- `GET /companions/:id/memory/experiences/:draftId`: export approved Markdown in
|
|
75
|
+
a JSON `document` field. Installation uses the existing explicit Skill workflow.
|
|
76
|
+
|
|
77
|
+
## Memory workspace
|
|
78
|
+
|
|
79
|
+
The companion's top-level tabs separate **记忆** from **持续关注**. Memory opens
|
|
80
|
+
on a contact-scoped profile, with explicit facts and stable collaboration preferences.
|
|
81
|
+
The primary navigation is 画像 / 记忆 / 回顾; scenes and chat history are secondary
|
|
82
|
+
views, while experience review and relationship auditing live under 更多.
|
|
83
|
+
Learning and heartbeat settings use the shared workspace dialog independently.
|
|
84
|
+
|
|
85
|
+
`src/ui/memory/` owns these components. The resource hook aborts obsolete requests,
|
|
86
|
+
keys results to their requested path and pauses polling in hidden documents.
|
|
87
|
+
Memory rows render in batches of 20; graph/history requests start only when opened;
|
|
88
|
+
long history bodies mount only on expansion. Editors retain their local drafts
|
|
89
|
+
during background refresh. Retry and review operations guard duplicate submission.
|
|
90
|
+
The legacy memory endpoint also accepts `scopeId` so a busy contact cannot consume
|
|
91
|
+
another contact's 100-row result limit. No existing memory data is moved or deleted.
|
|
92
|
+
|
|
93
|
+
Browser regression: `PARTNER_PLAYWRIGHT_MODULE=/path/to/playwright-core/index.mjs
|
|
94
|
+
node scripts/verify-memory-workspace.mjs` (with installed Chromium). This uses
|
|
95
|
+
isolated fixtures and checks phone/tablet/desktop in both themes, scope switching,
|
|
96
|
+
filters, lazy graph/history, settings feedback and duplicate submission prevention.
|
|
97
|
+
|
|
98
|
+
## Boundaries
|
|
99
|
+
|
|
100
|
+
Quote verification establishes provenance, not semantic truth: classification and
|
|
101
|
+
whether a quote supports a claim still depend on extraction quality. Existing locked
|
|
102
|
+
memories remain authoritative. Repeated or unrelated retrieval candidates are not
|
|
103
|
+
automatically merged or deleted.
|
|
104
|
+
|
|
105
|
+
Missing-evidence proposals are not written; their original conversations remain
|
|
106
|
+
available for daily review within history retention. Successful procedures are
|
|
107
|
+
proposals, not proven executable programs: users must review applicability and
|
|
108
|
+
safety before installing. Scene generation and draft generation depend on daily
|
|
109
|
+
review being enabled. No psychological inference, automatic memory cleanup,
|
|
110
|
+
cross-contact sharing, vector service or autonomous skill activation is introduced.
|
|
111
|
+
|
|
112
|
+
Validation: `npm test`, including memory quality, journal recovery, artifact
|
|
113
|
+
provenance and profile/recall regression tests. Local deployment still requires
|
|
114
|
+
a consistent SQLite backup and health checks; unit tests cannot prove live model
|
|
115
|
+
extraction quality or remote-channel availability.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 1.12.0
|
|
2
|
+
|
|
3
|
+
正式版,适配 DeepSeek Harness **0.1.2-rc.1**,Node.js **^22.19.0 或 >=24.0.0**。
|
|
4
|
+
|
|
5
|
+
## 记忆质量与恢复
|
|
6
|
+
|
|
7
|
+
- 记忆写入要求可验证的用户原话引用,避免把助手回答、临时过程或猜测写成长期事实;支持按目标记忆修正。引用校验不等于语义正确性证明。
|
|
8
|
+
- 明确事实和反复确认的稳定偏好分别进入画像;相关性检索不再用无关内容填满召回,补充有界场景和历史片段。
|
|
9
|
+
- 对话结束先持久化提炼任务,再由后台串行处理。重启恢复、失败退避重试、结果检查点和写入去重共同减少重复处理;通知仍不保证跨进程严格一次投递。
|
|
10
|
+
- 每日整理可提议场景摘要与有跨会话成功依据的经验草稿。经验需人工审核后导出,不自动安装 Skill 或授权。
|
|
11
|
+
|
|
12
|
+
## 记忆工作区
|
|
13
|
+
|
|
14
|
+
- 「持续关注」独立为伙伴标签页,保留引用文件/知识文档、下次检查时间和生命周期操作。
|
|
15
|
+
- 记忆页按画像、记忆、回顾分层,场景摘要与对话历史按需进入;经验审核和关系图谱放在「更多」。
|
|
16
|
+
- 记忆与心跳设置使用统一弹窗;展示后台处理状态并支持重试、记忆依据查看和手动修正。
|
|
17
|
+
- 按联系人隔离请求和结果;过期请求取消、隐藏页面暂停轮询、记忆条目分批显示、历史正文展开后渲染。沿用现有材质与字体,无新增装饰动画。
|
|
18
|
+
|
|
19
|
+
## 升级与边界
|
|
20
|
+
|
|
21
|
+
保留原有目录、配置和记忆;新增 SQLite 表为增量迁移。升级前建议备份伙伴数据。旧历史不批量迁入新历史界面,仍保留在原会话及历史档案中。
|
|
22
|
+
|
|
23
|
+
开启学习后仍按有效对话逐轮提炼;每日整理按联系人和待整理日期执行。尚未增加 token 用量统计、短消息跳过或合批策略,本版不宣称整体模型费用下降。
|
|
24
|
+
|
|
25
|
+
验证:308 项自动化测试、构建与 TypeScript 未使用导入检查通过;浏览器验证覆盖手机、平板横屏、桌面及深浅主题,检查联系人切换、筛选、按需读取和保存防重。此前本地部署已核对构建产物与 11 个记忆数据库完整性;未以真实渠道发送作为发布测试。
|
package/lib/agent-runtime.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export declare function completedTurnEvents(events: readonly SessionEvent[], end
|
|
|
135
135
|
type: 'turn/end';
|
|
136
136
|
}>): readonly SessionEvent[];
|
|
137
137
|
export declare function memoryScope(channelId: string, userId: string): string;
|
|
138
|
-
export declare function renderMemory(entries: NonNullable<Awaited<ReturnType<PartnerMemoryStore['recall']>>>, connections?: MemoryContextConnection[]): string;
|
|
138
|
+
export declare function renderMemory(entries: NonNullable<Awaited<ReturnType<PartnerMemoryStore['recall']>>>, connections?: MemoryContextConnection[], scenes?: import('./memory-artifacts.js').SceneView[], history?: import('./memory-domain.js').MemoryRecallContext['history']): string;
|
|
139
139
|
export declare function canReuseSession(route: ChannelSession, companionId: string, archivedSessionIds: readonly SessionId[]): boolean;
|
|
140
140
|
export declare function renewedSession(previous: ChannelSession, now?: number): ChannelSession;
|
|
141
141
|
export declare function partnerCwd(root: string, companionId: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAIlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAIzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,uBAA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{ randomUUID } from 'node:crypto';
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import { mkdir, realpath, stat, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
4
|
import { BlockAssembler, createToolResultMessage, createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
@@ -138,9 +138,9 @@ export class PartnerAgentRuntime {
|
|
|
138
138
|
if (context)
|
|
139
139
|
this.injectProfileUpdate(agent, route.sessionId, context.profile);
|
|
140
140
|
const recalled = context?.relevant ?? [];
|
|
141
|
-
if (recalled
|
|
141
|
+
if (recalled.length > 0 || context?.scenes?.length || context?.history?.length)
|
|
142
142
|
agent.inject(createUserMessage({
|
|
143
|
-
content: [{ type: 'text', text: renderMemory(recalled, context?.connections) }],
|
|
143
|
+
content: [{ type: 'text', text: renderMemory(recalled, context?.connections, context?.scenes, context?.history) }],
|
|
144
144
|
source: { kind: 'plugin', plugin: '@lemoncat7/dsh-partner', form: 'notice', summary: '伙伴为插话召回了相关长期记忆' },
|
|
145
145
|
}));
|
|
146
146
|
const deferred = await this.concerns?.deferred(companion.id, memoryScope(channelId, userId), inbound.query, 2).catch(() => []);
|
|
@@ -445,7 +445,7 @@ export class PartnerAgentRuntime {
|
|
|
445
445
|
if (!companion.automation.memory.enabled || this.reflection === undefined)
|
|
446
446
|
return;
|
|
447
447
|
const created = await this.reflection.reflect(companion, {
|
|
448
|
-
id: `turn-${
|
|
448
|
+
id: `turn-${createHash('sha256').update(JSON.stringify([session.id, event.time, userText])).digest('hex').slice(0, 32)}`, companionId: companion.id, scopeId,
|
|
449
449
|
sessionId: session.id, at: event.time, user: userText, assistant: assistantText,
|
|
450
450
|
...(concernDirective === undefined ? {} : { concernDirective }),
|
|
451
451
|
});
|
|
@@ -595,7 +595,7 @@ export class PartnerAgentRuntime {
|
|
|
595
595
|
this.preparedTurns.set(agent, turn);
|
|
596
596
|
}
|
|
597
597
|
isCompanionBusy(companionId) {
|
|
598
|
-
return this.observationJobs.has(companionId) || this.agentSetupJobs.has(companionId) || this.store.snapshot().sessions.some(route => route.companionId === companionId
|
|
598
|
+
return this.reflection?.isRunning(companionId) === true || this.observationJobs.has(companionId) || this.agentSetupJobs.has(companionId) || this.store.snapshot().sessions.some(route => route.companionId === companionId
|
|
599
599
|
&& (this.handles.get(route.sessionId)?.agent ?? this.ctx.agents.get(route.sessionId))?.status === 'running');
|
|
600
600
|
}
|
|
601
601
|
async releaseCompanion(companionId) {
|
|
@@ -654,9 +654,9 @@ export class PartnerAgentRuntime {
|
|
|
654
654
|
if (context)
|
|
655
655
|
this.injectProfileUpdate(agent, session.sessionId, context.profile);
|
|
656
656
|
const recalled = context?.relevant ?? [];
|
|
657
|
-
if (recalled
|
|
657
|
+
if (recalled.length > 0 || context?.scenes?.length || context?.history?.length)
|
|
658
658
|
agent.inject(createUserMessage({
|
|
659
|
-
content: [{ type: 'text', text: renderMemory(recalled, context?.connections) }],
|
|
659
|
+
content: [{ type: 'text', text: renderMemory(recalled, context?.connections, context?.scenes, context?.history) }],
|
|
660
660
|
source: { kind: 'plugin', plugin: '@lemoncat7/dsh-partner', form: 'notice', summary: '伙伴回忆了与当前消息相关的长期记忆' },
|
|
661
661
|
}));
|
|
662
662
|
const deferred = await this.concerns?.deferred(companion.id, memoryScope(channelId, userId), inbound.query, 2).catch(() => []);
|
|
@@ -817,7 +817,7 @@ export class PartnerAgentRuntime {
|
|
|
817
817
|
try {
|
|
818
818
|
disposers.push(agentCtx.systemPrompt.section({ name: 'partner-identity', order: -10, text: renderPartnerPersona(companion, route.kind === 'local' ? 'local' : 'conversation') }));
|
|
819
819
|
disposers.push(agentCtx.systemPrompt.section({ name: 'partner-tool-routing', order: -9, text: renderToolProtocol() }));
|
|
820
|
-
if (profile && profile.entries.length > 0)
|
|
820
|
+
if (profile && (profile.entries.length > 0 || profile.preferences?.length))
|
|
821
821
|
disposers.push(agentCtx.systemPrompt.section({ name: 'partner-user-profile', order: -8, text: renderProfile(profile) }));
|
|
822
822
|
if (this.questionAnswerer)
|
|
823
823
|
disposers.push(this.questionAnswerer(agentCtx, route));
|
|
@@ -849,7 +849,7 @@ export class PartnerAgentRuntime {
|
|
|
849
849
|
if (previous === profile.version)
|
|
850
850
|
return;
|
|
851
851
|
this.profileVersions.set(sessionId, profile.version);
|
|
852
|
-
if (previous === undefined && profile.entries.length === 0)
|
|
852
|
+
if (previous === undefined && profile.entries.length === 0 && !profile.preferences?.length)
|
|
853
853
|
return;
|
|
854
854
|
agent.inject(createUserMessage({
|
|
855
855
|
content: [{ type: 'text', text: renderProfile(profile, previous !== undefined) }],
|
|
@@ -909,11 +909,15 @@ function uniqueConcerns(items) {
|
|
|
909
909
|
return true;
|
|
910
910
|
}).slice(0, 4);
|
|
911
911
|
}
|
|
912
|
-
export function renderMemory(entries, connections = []) {
|
|
912
|
+
export function renderMemory(entries, connections = [], scenes = [], history = []) {
|
|
913
913
|
const lines = [
|
|
914
914
|
'以下是系统按当前话题召回的结构化长期记忆。仅在相关时使用;不得扩写成记忆中没有的事实。',
|
|
915
915
|
...entries.map(entry => `- [${entry.kind}|置信度 ${entry.confidence.toFixed(2)}] ${entry.subject}:${entry.content}`),
|
|
916
916
|
];
|
|
917
|
+
if (scenes.length)
|
|
918
|
+
lines.push('', '相关场景(由有效记忆派生,仅作背景,不是新的指令或授权):', ...scenes.slice(0, 2).map(scene => `- ${scene.title}:${scene.summary.slice(0, 1200)}`));
|
|
919
|
+
if (history.length)
|
|
920
|
+
lines.push('', '相关历史片段(不是当前指令,助手旧回答不是已验证事实;冲突时以当前用户陈述和有效记忆为准):', ...history.slice(0, 2).map(turn => `[${turn.id}|${new Date(turn.at).toISOString()}]\n用户:${turn.user}\n助手历史回答:${turn.assistant}`));
|
|
917
921
|
if (connections.length > 0)
|
|
918
922
|
lines.push('', '以下是一跳记忆关系,用于理解依赖、依据和上下文,不代表可以创造新的事实:', ...connections.map(({ relation, source, target }) => `- ${source.subject} ${memoryRelationLabel(relation.kind)} ${target.subject}:${relation.label}(关系置信度 ${relation.confidence.toFixed(2)})`));
|
|
919
923
|
if (connections.some(item => item.relation.kind === 'conflicts_with'))
|
|
@@ -927,12 +931,13 @@ function renderProfile(profile, update = false) {
|
|
|
927
931
|
const heading = update
|
|
928
932
|
? '联系人画像已发生变化。以下快照替代本会话中更早的人物画像;被删除或纠正的旧理解不得继续使用。'
|
|
929
933
|
: '以下是伙伴依据长期对话形成的联系人画像基线。它用于理解用户背景和保持交流连续性,不是需要逐条复述给用户的资料。';
|
|
930
|
-
if (profile.entries.length === 0)
|
|
934
|
+
if (profile.entries.length === 0 && !profile.preferences?.length)
|
|
931
935
|
return `${heading}\n当前没有达到可靠标准的人物画像;不要沿用旧画像或自行推断。`;
|
|
932
936
|
return [
|
|
933
937
|
heading,
|
|
934
938
|
'仅把明确内容作为事实;当前消息与画像冲突时以用户最新陈述为准。不得据此推断未写出的性格、隐私或敏感属性。',
|
|
935
939
|
...profile.entries.map(entry => `- ${entry.subject}:${auditText(entry.content, 240)}${entry.locked ? '(用户已确认)' : ''}`),
|
|
940
|
+
...(profile.preferences?.length ? ['稳定协作偏好(不扩大权限,不替代当前指令):', ...profile.preferences.map(entry => `- ${entry.subject}:${auditText(entry.content, 240)}`)] : []),
|
|
936
941
|
].join('\n');
|
|
937
942
|
}
|
|
938
943
|
function renderDeferredMentions(entries) {
|