@restregular/dsh-memory 0.25.3 → 0.25.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  本项目的版本记录。安装 id 与 npm 版本一一对应。
4
4
 
5
+ ## 0.25.4 — 授权撤销与列表重排都改到「保存」之后;已选计数只算可见范围
6
+
7
+ - **取消勾选只是草稿**:勾选 AI 授权的行后取消勾选,不再立刻调用 `POST /memory/api/grants`;改成标记「AI·待撤销」气泡,点「保存」时才先撤销授权、再保存可见范围。再勾回去会恢复原状。
8
+ - **保存后才重排**:列表的「已勾选在上」按**保存过的状态**排序,草稿勾选 / 取消勾选期间顺序不动,保存后(重开面板)才按新状态重排。
9
+ - **计数口径**:面板头部的「已选」只统计你自己勾选的可见范围(与输入框按钮的范围数字同口径),AI 授权不算进去;授权只以勾选 + 气泡体现。
10
+ - **取消全选**:把可撤销的授权标记为待撤销,不立即撤销;继承自父会话的授权给出提示。
11
+ - 测试:改写两个面板用例——取消勾选不触发 `/grants`、气泡变「AI·待撤销」、顺序与计数不变;点保存后才 `POST /grants` + `POST /visibility`,且重开后按新状态重排;全套 494 tests / 493 pass / 1 skipped。
12
+
5
13
  ## 0.25.3 — Agent 授权改用「勾选 + AI 气泡」呈现,取消勾选即撤销
6
14
 
7
15
  - **授权结果 = 勾选**:作用域被 Agent 申请并审批通过后,该作用域直接显示为**已勾选**(即使它不在你设置的可见范围内),列表里同样排在已勾选分组。浮窗打开期间每 3 秒刷新授权,Agent 刚拿到的权限不用重开面板就能看到。
package/README.md CHANGED
@@ -47,7 +47,7 @@ JSONL 落盘 · 本机向量检索 · 五个模型工具 · 自动召回 · 硬
47
47
  | **自动召回** | 每轮按用户问题召回;新会话第一步注入项目 / global 摘要;发布、部署、工具失败等行为按标签触发定向召回 |
48
48
  | **印象形态** | 每轮只给每条记忆的短摘要;模型判断相关但需要细节时再 `memory_get` 取全文,省 token 也不丢信息 |
49
49
  | **硬性规则** | `kind: rule` 进系统提示常驻段;行首带 8 位 id,注入的是摘要,需要全文时用 `memory_get`;旧会话会收到新增 / 编辑提醒;超预算有明确警告,不静默丢弃 |
50
- | **记忆权限** | 输入框旁的「记忆权限」按钮设置本会话可读的作用域 + 限制等级(绝对 / 普通 / 无限制);每个作用域一行就是一条设置:**勾选**表示本会话可访问,行内**【绑定】/【可读】/【可写】**控制工作区默认可见与读写权限——绑定到当前工作区后新会话默认可见,可读 / 可写独立影响工具读写;Agent 通过 `memory_scopes request` 申请到的范围外授权**也用勾选呈现**(名称右边挂一个「AI」气泡),**取消勾选即撤销**,撤销后气泡自动消失(0.25.3 起);Agent 及其子 Agent 都按它检索、注入与 `memory_get` |
50
+ | **记忆权限** | 输入框旁的「记忆权限」按钮设置本会话可读的作用域 + 限制等级(绝对 / 普通 / 无限制);每个作用域一行就是一条设置:**勾选**表示本会话可访问,行内**【绑定】/【可读】/【可写】**控制工作区默认可见与读写权限——绑定到当前工作区后新会话默认可见,可读 / 可写独立影响工具读写;Agent 通过 `memory_scopes request` 申请到的范围外授权**也用勾选呈现**(名称右边挂一个「AI」气泡),取消勾选只是草稿,**点「保存」才真正撤销**(0.25.4 起);Agent 及其子 Agent 都按它检索、注入与 `memory_get` |
51
51
  | **修正版编辑** | 面板里编辑一条记忆 = 新建一条修正版并通过 `supersedes` 指向旧记录,旧记录不原地修改;记录页「是否被修正」筛选默认隐藏旧版本,可切到全部 / 只看已修正 |
52
52
  | **范围外审批** | 普通限制下,工具命中可见域外的记忆时会在**对应会话的输入框上方**出现审批卡(样式与系统权限审批一致):展示工具、Agent 说明、查询关键词与范围外记忆摘要,支持逐条勾选 / 全选 / 取消全选(「允许选中的 N 条」或整单「允许一次」)或「拒绝」;点记忆 ID 直接跳到面板「记录」页并展开该条 |
53
53
  | **上下文去重** | `memory_search` / `memory_list` 返回过的条目记进会话上下文状态;同一版本再次命中只回记忆 ID(`memory_search` 的裸 ID 与带摘要条目之间空一行),并提示用 `memory_get` 取全文(内容更新后重新给摘要) |
@@ -97,7 +97,7 @@ JSONL 落盘 · 本机向量检索 · 五个模型工具 · 自动召回 · 硬
97
97
  - **绝对限制**:可见域外的读取 / 写入 / 删除一律不执行;命中被挡住时会明确告诉 Agent 是「绝对限制」以及怎么调整(不再假装记忆不存在)。
98
98
  - **普通限制**(默认):可见域内正常返回;命中范围外记忆时,工具会暂停并在**该会话**的输入框上方显示审批卡,展示 Agent 的查询关键词与范围外记忆摘要;读审批可以逐条勾选,只允许其中一条或多条。用户拒绝 / 5 分钟未回答时,工具结果里会明确写出真实原因(「用户拒绝了本次访问」/「审批超时」),模型不会误以为记忆不存在。范围外写入 / 删除同样走审批。
99
99
  - **无限制**:不启用范围白名单,可以读写任意作用域(选择仍会保存,供下次切换)。
100
- - **Agent 授权 = 勾选 + 「AI」气泡(0.25.3)**:作用域行就是「勾选该作用域 + 【绑定】/【可读】/【可写】」这一组控件,不再有独立的「Agent 授权」行与浮窗上方的解释文本。Agent 通过 `memory_scopes request` 审批得到的授权,直接体现为该作用域的**勾选**,并在名称右边挂一个「AI」气泡(`title` 写明只读 / 可写);**用户取消勾选 = 撤销授权**,撤销后气泡与勾选一起消失,Agent 下一次 pre-step 收到「记忆权限已更新」。继承自父会话的授权标「AI·继承」,本会话取消勾选会被拒绝并提示到父会话操作;「取消全选」会一并撤销可撤销的授权。目录里已不可见的作用域仍占一行(标「目录中已不可见」),方便取消勾选撤销。列表里**已勾选的(含授权来的)排在上面、未勾选的排在下面**,组内按名称字母排序,勾选状态一变立即重排。
100
+ - **Agent 授权 = 勾选 + 「AI」气泡(0.25.3 / 0.25.4)**:作用域行就是「勾选该作用域 + 【绑定】/【可读】/【可写】」这一组控件,不再有独立的「Agent 授权」行与浮窗上方的解释文本。Agent 通过 `memory_scopes request` 审批得到的授权直接体现为该作用域的**勾选**,名称右边挂「AI」气泡(`title` 写明只读 / 可写);**取消勾选只是草稿**——气泡改标「AI·待撤销」、列表顺序与「已选」计数都不变,**点「保存」才真正撤销**(保存时先 `POST /grants` 撤销,再保存可见范围),Agent 下一次 pre-step 收到「记忆权限已更新」。继承自父会话的授权标「AI·继承」,本会话取消勾选会被拒绝并提示到父会话操作;「取消全选」只是把可撤销的授权标记为待撤销。「已选」只统计你自己勾选的可见范围,AI 授权不计数(与输入框按钮的范围数字同口径)。目录里已不可见的作用域仍占一行(标「目录中已不可见」)。列表里**已勾选(按保存过的状态)的排在上面、未勾选的排在下面**,组内按名称字母排序;**保存后才按新状态重排**。
101
101
  - **不再按记忆类型收窄**:0.19.1 起只按作用域限制;旧配置里的 `kinds` 会被忽略,同一作用域下的事实 / 规则 / 流程等都可读。
102
102
  - **审批卡(0.21.0 / 0.22.x)**:注册在会话内的 `conversation.input.dock`,**只在发起审批的那个会话里显示**,切到别的会话看不到;视觉与系统自带的权限审批弹窗一致(警告色 strip、卡片、右对齐动作行,同一批主题 token)。按动作分为「记忆读取 / 写入 / 删除审批」。读审批默认全部勾选:可逐条取消、用「全选 / 取消全选」批量操作,**点条目任意位置即可切换选中**,再点「允许选中的 N 条」,工具只放行勾选的 id、其余写入 `withheld.reason='partial'`;全选时等价于原来的「允许一次」。strip 右侧可**折叠 / 展开**详情,折叠后仍保留「拒绝 / 允许」动作。写 / 删审批是单条,隐藏勾选框。**0.22.0 起**卡片展示工具调用的 `description`(普通限制下工具层强制模型提供),点记忆 ID 会打开记忆面板的「记录」标签页、选中并滚动到该条、自动展开;**0.22.2 起**查询与说明固定显示在条目列表上方,条目再多也不会被列表挤没(两行锁 `flex:none`,只有列表滚动);**0.22.3 起**审批卡高度只受 composer 文本区上限约束(与宿主审批卡同口径),矮窗口下列表也有空间。拒绝、超时或无法发起审批都会把原因告诉模型。Enter = 允许、Esc = 拒绝(焦点在卡片内时)。
103
103
  - 子 Agent 自动继承父会话 / 根会话的设置;在子 Agent 自己的会话里再设置,只影响那一个会话。
package/lib/client.js CHANGED
@@ -543,6 +543,7 @@ window.__ModuleLoader__.load({
543
543
  // 0.25.3:Agent 授权用「勾选 + AI 气泡」呈现,气泡挂在作用域名称右边。
544
544
  '.mem-scope-ai{flex:none;font-size:9.5px;line-height:1.7;padding:0 6px;border-radius:999px;border:1px solid color-mix(in srgb,var(--dsw-alias-state-business-primary,#4176e6) 45%,var(--dsw-alias-border-l1));background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4176e6) 12%,transparent);color:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4176e6) 78%,var(--dsw-alias-label-primary));white-space:nowrap;cursor:help}',
545
545
  '.mem-scope-ai.inherited{border-style:dashed;background:transparent;color:var(--dsw-alias-label-secondary)}',
546
+ '.mem-scope-ai.pending{opacity:.62;border-style:dashed;text-decoration:line-through}',
546
547
  '.mem-scope-foot{display:flex;align-items:center;gap:8px}',
547
548
  '.mem-scope-foot .spacer{flex:1}',
548
549
  '.mem-scope-reset{padding:6px 13px;border:1px solid var(--dsw-alias-border-l1);border-radius:9px;background:transparent;color:var(--dsw-alias-label-secondary);font-size:12px;cursor:pointer;transition:border-color .12s ease,color .12s ease}',
@@ -4574,6 +4575,8 @@ window.__ModuleLoader__.load({
4574
4575
  const [data, setData] = React.useState(null)
4575
4576
  const [level, setLevel] = React.useState('normal')
4576
4577
  const [entries, setEntries] = React.useState({})
4578
+ const [savedEntries, setSavedEntries] = React.useState({})
4579
+ const [pendingRevoke, setPendingRevoke] = React.useState({})
4577
4580
  const [perms, setPerms] = React.useState({})
4578
4581
  const [bound, setBound] = React.useState({})
4579
4582
  const [defaultBound, setDefaultBound] = React.useState({})
@@ -4679,6 +4682,8 @@ window.__ModuleLoader__.load({
4679
4682
  }
4680
4683
  setCatalog(nextCatalog)
4681
4684
  setEntries(nextEntries)
4685
+ // 保存过的勾选基线:排序与「已选」都以它为准,草稿改动不立刻重排。
4686
+ setSavedEntries({ ...nextEntries })
4682
4687
  setPerms(nextPerms)
4683
4688
  setBound(nextBound)
4684
4689
  setDefaultBound(nextDefaultBound)
@@ -4754,20 +4759,30 @@ window.__ModuleLoader__.load({
4754
4759
  .finally(() => setGrantBusy(''))
4755
4760
  }
4756
4761
 
4762
+ /**
4763
+ * 勾选 / 取消勾选作用域 —— 都是草稿状态,点「保存」才生效。
4764
+ * 取消勾选一条 AI 授权的行 = 标记为「待撤销」,保存时才真正撤销授权。
4765
+ */
4757
4766
  const toggleScope = (scope) => {
4758
4767
  const grant = grantsByScope.get(scope)
4759
4768
  if (!grant) {
4760
4769
  setEntries((prev) => ({ ...prev, [scope]: !prev[scope] }))
4761
4770
  return
4762
4771
  }
4763
- // 勾选里有 Agent 授权:取消勾选 = 撤销授权(撤销后「AI」气泡一起消失)。
4764
4772
  if (grant.inherited === true) {
4765
4773
  setEntries((prev) => ({ ...prev, [scope]: true }))
4766
4774
  setGrantError('继承自父会话的授权需要到父会话撤销')
4767
4775
  return
4768
4776
  }
4769
- setEntries((prev) => ({ ...prev, [scope]: false }))
4770
- revokeGrant(grant)
4777
+ const pending = Boolean(pendingRevoke[scope])
4778
+ setPendingRevoke((prev) => {
4779
+ const next = { ...prev }
4780
+ if (pending) delete next[scope]
4781
+ else next[scope] = true
4782
+ return next
4783
+ })
4784
+ // 取消勾选先清掉草稿里的范围勾选;再勾回来时恢复到保存时的勾选状态。
4785
+ setEntries((prev) => ({ ...prev, [scope]: pending ? Boolean(savedEntries[scope]) : false }))
4771
4786
  }
4772
4787
 
4773
4788
  /** 切换某个作用域的可读 / 可写状态(会话级)。 */
@@ -4789,6 +4804,8 @@ window.__ModuleLoader__.load({
4789
4804
  for (const key of Object.keys(next)) next[key] = true
4790
4805
  return next
4791
4806
  })
4807
+ // 全选 = 不再撤销任何授权(草稿里取消的重新勾回来)。
4808
+ setPendingRevoke({})
4792
4809
  }
4793
4810
 
4794
4811
  const clearAll = () => {
@@ -4797,29 +4814,36 @@ window.__ModuleLoader__.load({
4797
4814
  for (const key of Object.keys(next)) next[key] = false
4798
4815
  return next
4799
4816
  })
4800
- // 取消全选 = 把这些作用域全部取消勾选,所以 Agent 授权也一并撤销;
4817
+ // 取消全选也是草稿:AI 授权只标记「待撤销」,点保存才真正撤销;
4801
4818
  // 继承自父会话的授权撤销不了,只提示去父会话操作。
4819
+ const next = {}
4802
4820
  let inherited = 0
4803
- let chain = Promise.resolve()
4804
4821
  for (const grant of Array.isArray(grants) ? grants : []) {
4805
4822
  if (!grant || typeof grant.scope !== 'string' || grant.scope === '') continue
4806
4823
  if (grant.inherited === true) { inherited += 1; continue }
4807
- chain = chain.then(() => revokeGrant(grant))
4824
+ next[grant.scope] = true
4808
4825
  }
4826
+ setPendingRevoke(next)
4809
4827
  if (inherited > 0) setGrantError('继承自父会话的授权需要到父会话撤销')
4810
- chain.catch(() => { /* revokeGrant 自己会记录错误 */ })
4811
4828
  }
4812
4829
 
4813
- const save = (config) => {
4830
+ const save = (config, revokeFirst) => {
4814
4831
  setBusy(true)
4815
4832
  setError('')
4816
4833
  // 只提交**额外**绑定:默认范围自带的会话 / 项目 / global 不需要也不允许写入。
4817
4834
  const bindings = catalog
4818
4835
  .filter((item) => bound[item.scope] && !defaultBound[item.scope] && !String(item.scope).startsWith('session:'))
4819
4836
  .map((item) => item.scope)
4820
- api('visibility', { session: sessionId, visibility: config, bindings })
4837
+ // 保存时先撤销草稿里取消勾选的 AI 授权,再写可见范围。
4838
+ let chain = Promise.resolve()
4839
+ for (const grant of Array.isArray(revokeFirst) ? revokeFirst : []) {
4840
+ chain = chain.then(() => revokeGrant(grant))
4841
+ }
4842
+ chain
4843
+ .then(() => api('visibility', { session: sessionId, visibility: config, bindings }))
4821
4844
  .then((value) => {
4822
4845
  applyPayload(value)
4846
+ setPendingRevoke({})
4823
4847
  setOpen(false)
4824
4848
  })
4825
4849
  .catch((e) => setError(String((e && e.message) || e)))
@@ -4833,7 +4857,11 @@ window.__ModuleLoader__.load({
4833
4857
  write: perms[item.scope]?.write !== false,
4834
4858
  }))
4835
4859
  if (scopes.length === 0) { setError('至少选择一个可见范围'); return }
4836
- save({ scopes, level })
4860
+ const pendingGrants = Object.keys(pendingRevoke)
4861
+ .filter((scope) => pendingRevoke[scope])
4862
+ .map((scope) => grantsByScope.get(scope))
4863
+ .filter(Boolean)
4864
+ save({ scopes, level }, pendingGrants)
4837
4865
  }
4838
4866
 
4839
4867
  if (typeof sessionId !== 'string' || sessionId === '') return null
@@ -4849,15 +4877,20 @@ window.__ModuleLoader__.load({
4849
4877
  : (data && Array.isArray(data.defaults) ? data.defaults.length : 0)
4850
4878
  const selectedCount = catalog.filter((item) => entries[item.scope]).length
4851
4879
  const needle = search.trim().toLowerCase()
4852
- // 0.25.3:Agent 授权的结果也用勾选呈现 —— 勾选 = 本会话可访问,授权来的作用域
4853
- // 在名称右边挂一个「AI」气泡;取消勾选即撤销,撤销后气泡自动消失。
4880
+ // 0.25.4:Agent 授权的结果用勾选呈现 —— 勾选 = 本会话可访问,授权来的作用域
4881
+ // 在名称右边挂一个「AI」气泡。取消勾选只是草稿(标「待撤销」),点「保存」才撤销;
4882
+ // 列表顺序按**已保存**的勾选排序,保存后才重排。
4854
4883
  const grantList = Array.isArray(grants) ? grants : []
4855
4884
  const grantsByScope = new Map()
4856
4885
  for (const grant of grantList) {
4857
4886
  if (!grant || typeof grant.scope !== 'string' || grant.scope === '') continue
4858
4887
  if (!grantsByScope.has(grant.scope)) grantsByScope.set(grant.scope, grant)
4859
4888
  }
4860
- const isChecked = (scope) => Boolean(entries[scope]) || grantsByScope.has(scope)
4889
+ /** 当前草稿里的勾选状态(取消勾选的 AI 授权算未勾选)。 */
4890
+ const isChecked = (scope) => Boolean(entries[scope])
4891
+ || (grantsByScope.has(scope) && !pendingRevoke[scope])
4892
+ /** 已保存状态的勾选(排序只看它,草稿改动不立刻重排)。 */
4893
+ const savedChecked = (scope) => Boolean(savedEntries[scope]) || grantsByScope.has(scope)
4861
4894
  const matches = (label, scope) => !needle
4862
4895
  || String(label || scope).toLowerCase().includes(needle) || String(scope).toLowerCase().includes(needle)
4863
4896
  const visibleScopes = catalog.filter((item) => matches(item.label || item.scope, item.scope))
@@ -4865,24 +4898,26 @@ window.__ModuleLoader__.load({
4865
4898
  const catalogScopes = new Set(catalog.map((item) => item.scope))
4866
4899
  const orphanGrants = grantList.filter((grant) => grant && typeof grant.scope === 'string' && grant.scope !== ''
4867
4900
  && !catalogScopes.has(grant.scope) && matches(grant.label || grant.scope, grant.scope))
4868
- const orphanCount = grantList.filter((grant) => grant && typeof grant.scope === 'string'
4869
- && grant.scope !== '' && !catalogScopes.has(grant.scope)).length
4870
- const checkedCount = catalog.filter((item) => isChecked(item.scope)).length + orphanCount
4871
- // 已勾选的排上面、未勾选的排下面,组内按名称字母排序(授权行同样算已勾选)。
4901
+ // 已勾选的排上面、未勾选的排下面,组内按名称字母排序;顺序以保存过的状态为准。
4872
4902
  const rows = [
4873
4903
  ...visibleScopes.map((item) => ({ scope: item.scope, name: String(item.label || item.scope), item })),
4874
4904
  ...orphanGrants.map((grant) => ({ scope: grant.scope, name: String(grant.label || grant.scope), grant })),
4875
4905
  ]
4876
- rows.sort((a, b) => (Number(isChecked(b.scope)) - Number(isChecked(a.scope)))
4906
+ rows.sort((a, b) => (Number(savedChecked(b.scope)) - Number(savedChecked(a.scope)))
4877
4907
  || a.name.localeCompare(b.name, 'zh-Hans-CN', { sensitivity: 'base', numeric: true })
4878
4908
  || a.scope.localeCompare(b.scope))
4879
4909
  /** 作用域名称右边的「AI」气泡:表示这条勾选来自 Agent 申请的授权。 */
4880
- const grantTag = (grant) => h('span', {
4881
- className: `mem-scope-ai${grant.inherited === true ? ' inherited' : ''}`,
4882
- title: grant.inherited === true
4883
- ? `Agent 申请的范围外授权(${grantPermissionText(grant.permissions)})· 继承自父会话,要到父会话撤销`
4884
- : `Agent 申请的范围外授权(${grantPermissionText(grant.permissions)});取消勾选即撤销`,
4885
- }, grant.inherited === true ? 'AI·继承' : 'AI')
4910
+ const grantTag = (grant, scope) => {
4911
+ const pending = Boolean(pendingRevoke[scope])
4912
+ return h('span', {
4913
+ className: `mem-scope-ai${grant.inherited === true ? ' inherited' : ''}${pending ? ' pending' : ''}`,
4914
+ title: pending
4915
+ ? `Agent 申请的范围外授权(${grantPermissionText(grant.permissions)});点「保存」后撤销`
4916
+ : (grant.inherited === true
4917
+ ? `Agent 申请的范围外授权(${grantPermissionText(grant.permissions)})· 继承自父会话,要到父会话撤销`
4918
+ : `Agent 申请的范围外授权(${grantPermissionText(grant.permissions)});取消勾选后点「保存」即撤销`),
4919
+ }, pending ? 'AI·待撤销' : (grant.inherited === true ? 'AI·继承' : 'AI'))
4920
+ }
4886
4921
  let popStyle = {}
4887
4922
  if (anchor) {
4888
4923
  const width = 340
@@ -4926,7 +4961,7 @@ window.__ModuleLoader__.load({
4926
4961
  h('div', { className: 'mem-scope-head' },
4927
4962
  h('h4', null, '记忆权限'),
4928
4963
  h('span', { className: 'spacer' }),
4929
- h('span', { className: 'mem-scope-count' }, `已选 ${checkedCount}`),
4964
+ h('span', { className: 'mem-scope-count' }, `已选 ${selectedCount}`),
4930
4965
  ),
4931
4966
  data && data.inherited
4932
4967
  ? h('div', { className: 'hint' }, '当前继承自父会话;保存后在本会话独立生效。')
@@ -4977,7 +5012,7 @@ window.__ModuleLoader__.load({
4977
5012
  title: grant
4978
5013
  ? (grant.inherited === true
4979
5014
  ? 'AI 申请的授权(继承自父会话,要到父会话撤销)'
4980
- : '取消勾选会撤销 AI 申请的这条授权')
5015
+ : (pendingRevoke[row.scope] ? '已标记撤销,点「保存」生效' : '取消勾选后点「保存」撤销 AI 申请的这条授权'))
4981
5016
  : null,
4982
5017
  }, h('span', { className: 'box' }, checked ? h('svg', { width: 11, height: 11, viewBox: '0 0 12 12', 'aria-hidden': 'true' }, h('path', { d: 'M2 6.2 4.7 9 10 3.4', fill: 'none', stroke: 'currentColor', strokeWidth: 1.8, strokeLinecap: 'round', strokeLinejoin: 'round' })) : null)),
4983
5018
  h('button', {
@@ -4986,7 +5021,7 @@ window.__ModuleLoader__.load({
4986
5021
  title: item ? row.scope : `${row.scope}(目录中已不可见)`,
4987
5022
  onClick: () => toggleScope(row.scope),
4988
5023
  }, item ? (item.label || item.scope) : (row.grant.label || row.grant.scope)),
4989
- grant ? grantTag(grant) : null,
5024
+ grant ? grantTag(grant, row.scope) : null,
4990
5025
  h('span', { className: 'cnt' }, item ? `${item.records ?? 0}` : '目录中已不可见'),
4991
5026
  ),
4992
5027
  item
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restregular/dsh-memory",
3
- "version": "0.25.3",
3
+ "version": "0.25.4",
4
4
  "description": "DeepSeek Harness 记忆系统(单包单入口):JSONL 存储 + 本地向量检索(BGE-M3)+ 五个模型工具 + 自动召回注入 + 管理面板。",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",