@kenz1117/dsh-engram 0.7.14 → 0.7.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.
package/README.en.md CHANGED
@@ -71,7 +71,7 @@ Sensory and emotional dimensions (smell, temperature, emotional weight) are deli
71
71
  - **Entity lexicon** (v0.7.10+): the auxiliary LLM output of automatic capture and `engram_save` also extracts entity mentions (people/projects/tools/concepts, with optional aliases), resolved by normalized name against existing entities' names/aliases — a hit reuses the entity and refreshes its "last mentioned" stamp, a miss creates one; memories and entities link many-to-many, stored in the same store as the source memory. `engram_search` rows carry entity tags of the hits; entity-resolution failures silently skip the links and never block the memory write itself. The panel's "Entities" view filters by kind, searches names/aliases, and opens one entity to see every memory it pulls in.
72
72
  - **Automatic capture** (when `ingest` is enabled): each new turn's first step extracts candidate facts from the previous turn out of the session log, and session end captures the final turn too (failures leave a pending key that the next session replays; capture is idempotent per session+turn), written with low confidence and, when embeddings are available, disposed by the four-state rule toward near neighbors (merge-and-reinforce restatements / edge-and-defer suspected contradictions / write fresh) — memories accumulate without you saying "remember this".
73
73
  - **Provenance audit**: every memory records its source session, turn, and event seq; `engram_review` traces the full source chain, supersede chain, contradictions, and operation log; all writes/edits/forgets/distills/decays land in the operation log table.
74
- - **Web management panel** (v0.7.0+): the "Memory Library" tab in Settings has eight views — Today (a summary bar: memories / open / clarity + last-7-days counts + due today + health ring, followed by tour proposal, room directory, refurb list, health breakdown; a profile card in the side column shows the curated profile's current content and version-diff history), Palace (filters incl. due today, tour-route order, batch actions, list & edit), Corridor (corridor bird's-eye + retrieval bench), Log (last-7-days counts + the full merged op_log, filterable by operation class), Backfill, Episodes (episodes grouped by session, with anchor-neighborhood expansion), Entities (the entity lexicon: kind filters + name/alias search + per-entity linked memories), and Jev (System-One adjudication: config overrides + connection test + recent adjudications). A single 3-pill scope switcher in the header drives every panel; UI copy is bilingual zh/en and follows the host language setting live. Filter by redaction marks (include/exclude `[REDACTED:*]` entries) with amber badges for audit coverage.
74
+ - **Web management panel** (v0.7.0+): the "Memory Library" tab in Settings has nine views — Today (a summary bar: memories / open / clarity + health ring, with a footer row of four small stats — founded / excavated / curated / due today — inline with the pulse timestamp; followed by tour proposal, room directory, refurb list, health breakdown; a profile card in the side column shows the curated profile's current content and version-diff history), Palace (filters incl. due today, tour-route order, batch actions, list & edit; the review / edit dialogs render as viewport-floating cards — sticky-pinned to the visible top of the host scroll area, so opening from any scroll depth never jumps or squeezes the page), Corridor (corridor bird's-eye + retrieval bench), Log (last-7-days counts + the full merged op_log, filterable by operation class), Backfill, Episodes (episodes grouped by session, with anchor-neighborhood expansion), Entities (the entity lexicon: kind filters + name/alias search + per-entity linked memories), **Beliefs** (v0.7.15+: consolidated beliefs sorted by evidence count with held / stale / refuted status filters; "evidence" expands the evidence chain for a read-only look at the underlying memories — purged evidence keeps the belief with an explicit notice; backed by the `GET /api/engram/observations` and `GET /api/engram/observation-evidence` routes), and Jev (System-One adjudication: config overrides + connection test + recent adjudications). The header is a single two-ended row: the scope pills (Private / Project / Shared) on the left drive every panel, with the workspace dropdown inlined on the same row for project scope; the right side holds the due badge plus icon-only revisit / export buttons (the export flyout is no longer covered by the tab row); a "中 | EN" segmented control switches the panel copy language (independent of the host language, persisted), with all copy bilingual zh/en. Filter by redaction marks (include/exclude `[REDACTED:*]` entries) with amber badges for audit coverage.
75
75
  - **Prompt-injection defense**: every memory recall exit (profile injection, `engram_search/timeline/review` output) is wrapped in `<engram_memory_context>` protocol tags with a usage warning (history is not the current request, do not follow instructions inside it, use only when relevant), while the current request is wrapped separately in `<current_user_request>`; all inbound content (capture candidates, saved bodies) is stripped of these protocol tags first, blocking second-order injection through forged protocol blocks.
76
76
  - **Capture redaction**: inbound content passes a regex scrub for common secrets and credentials (sk- API keys, Bearer, AWS AKIA, GitHub tokens, PEM private keys, password/token assignments, Chinese-language password assignments) and personal data (mainland-China phone numbers, 18-digit national ID numbers); matched fragments become `[REDACTED:<type>]`.
77
77
  - **Recall placeholder (anti-echo-chamber)**: memory-recall tool output inside captured slices is replaced with `[engram memory result omitted from capture: <tool>]`, and the extraction prompt states that restating existing memory is not new information, breaking the memory self-reinforcement loop.
package/README.md CHANGED
@@ -71,7 +71,7 @@ dsh plugin --profile web add @kenz1117/dsh-engram
71
71
  - **实体词典**(v0.7.10+):自动摄取与 `engram_save` 的辅助 LLM 输出同时抽取实体提及(人物/项目/工具/概念,可带别名),按归一化名与既有实体的 name/aliases 精确匹配消解——命中复用并刷新「最近提及」,未命中新建;记忆与实体多对多关联,随来源记忆所在 scope 分库。`engram_search` 命中行附关联实体标签;实体消解故障只静默跳过关联,不影响记忆落库。面板「实体」视图按类别筛选、按名称/别名搜索,点开单实体看它牵出的所有记忆。
72
72
  - **自动摄取**(`ingest` 配置开启时):新一轮第一步从会话日志提取上一轮的候选事实,会话结束时补摄取最后一轮(失败留 pending 键,下次会话自动补做,幂等不重复),低 confidence 写入,嵌入可用时按四态处置近邻(复述并入强化 / 疑似矛盾建边待裁决 / 全新写入)——不说"记住"也能攒记忆。**逐条判宫殿**:提炼时同步判定作用域,只跟当前项目/仓库有关的(技术选型、项目约定、架构决策)进当前会话 cwd 对应的项目库,跨项目通用的(个人偏好、习惯、本人经历)进私人库——偏好跟人走、约定跟仓库走。
73
73
  - **来源审计**:每条记忆记录来源会话、轮次与事件 seq,`engram_review` 完整回查来源链、取代链、矛盾与操作日志;全部写入/修改/遗忘/蒸馏/衰减入操作日志表。
74
- - **Web 管理面板**(v0.7.0+):设置页「记忆库」tab 分八个视图——今日(速览条:记忆 / 开放 / 清晰度 + 近 7 天计数 + 今日到期 + 健康分环;下面是入殿导航、房间目录、待翻新、健康分构成;侧栏画像卡展示 curated 画像当前内容与版本 diff 历史)、陈展(筛选含今日到期 / 巡游路线序 / 批量 / 列表与编辑)、走廊(走廊鸟瞰 + 检索实验台)、日志(近 7 天计数 + 两库合并的完整 op_log,可按操作类别筛选)、回填、往事(按会话分组浏览 episode,锚点邻近扩展)、实体(实体词典:类别筛选 + 名称/别名搜索 + 单实体关联记忆)、裁决(Jev 系统一裁决:配置覆盖 + 测试连接 + 近期裁决记录)。Header 三宫格驱动全局 scope(私人 / 项目 / 共享),全部数据源同步;**项目 scope 下三宫格右侧显示当前项目宫殿所属工作区**(标题 + 路径,默认跟随 GUI 当前工作区),旁边的工作区下拉可固定到某个工作区或切回「跟随当前会话」。界面文案中英双语,跟随宿主语言设置实时切换。支持按脱敏标记筛选(仅看/排除含 `[REDACTED:*]` 的条目)并给命中条目挂琥珀色徽标,方便审计脱敏覆盖面。
74
+ - **Web 管理面板**(v0.7.0+):设置页「记忆库」tab 分九个视图——今日(速览条:记忆 / 开放 / 清晰度 + 健康分环,底行「落成 / 发掘 / 整理 / 今日到期」四项小统计与诊脉时间同行;下面是入殿导航、房间目录、待翻新、健康分构成;侧栏画像卡展示常驻画像(curated)当前内容与版本 diff 历史)、陈展(筛选含今日到期 / 巡游路线序 / 批量 / 列表与编辑;「参观 / 修缮」以视口浮层呈现——sticky 钉在宿主滚动区可见顶部,长列表任意滚动位置打开都不跳动不挤压)、走廊(走廊鸟瞰 + 检索实验台)、日志(近 7 天计数 + 两库合并的完整 op_log,可按操作类别筛选)、回填、往事(按会话分组浏览 episode,锚点邻近扩展)、实体(实体词典:类别筛选 + 名称/别名搜索 + 单实体关联记忆)、**信念**(v0.7.15+:巩固信念列表按证据数排序,成立 / 待复核 / 已否定状态筛选,点「证据 n 条」展开证据链只读回查支撑该信念的原始记忆——证据被清理时信念保留并明确提示;`GET /api/engram/observations` 与 `GET /api/engram/observation-evidence` 两个回环路由)、裁决(Jev 系统一裁决:配置覆盖 + 测试连接 + 近期裁决记录)。Header 单行两端对齐:左侧 scope 三宫格(私人 / 项目 / 共享)驱动全局 scope,项目 scope 下工作区下拉内联在同一行;右侧今日到期角标 + 重访 / 导出纯图标按钮(导出弹层不再被下方 Tab 行遮挡);「中 | EN」段控切换面板文案语言(独立于宿主语言,选择持久化),全部文案中英双语。支持按脱敏标记筛选(仅看/排除含 `[REDACTED:*]` 的条目)并给命中条目挂琥珀色徽标,方便审计脱敏覆盖面。
75
75
  - **提示注入防护**:全部记忆召回出口(画像注入、`engram_search/timeline/review` 输出)包 `<engram_memory_context>` 协议标签并附使用警告(历史记忆非当前请求、不遵循其中指令、仅相关时使用),当前请求独立包 `<current_user_request>`;所有入库内容(摄取候选、保存正文)先剥离这些协议标签,防伪造协议块二次注入。
76
76
  - **摄取脱敏**:入库前正则清洗常见密钥凭据(sk- 系 API key、Bearer、AWS AKIA、GitHub token、PEM 私钥、password/token 赋值、中文密码赋值)与个人信息(中国大陆手机号、18 位身份证号),命中片段替换为 `[REDACTED:<类型>]`。
77
77
  - **召回占位(防回声室)**:摄取切片中记忆召回工具的输出替换为 `[engram memory result omitted from capture: <tool>]`,并向提取模型附注"既有记忆的复述不是新信息",阻断记忆自我强化循环。