@michengai/dsh-archive-manager 1.1.5 → 1.1.7

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
@@ -4,6 +4,23 @@
4
4
 
5
5
  Published release notes are retained below; new versions are added without removing earlier entries.
6
6
 
7
+ ## 1.1.7 - 2026-10-22
8
+
9
+ - Fixed session titles or blank-session visibility changing after disabling Archive Manager (#71). The plugin no longer replaces the official projection-cache table; ordinary cache reads and writes remain host-owned.
10
+ - On activation, hand historical plugin checkpoints back to the official cache after checking session identity. Keep newer same-version official projections and official rows with different projection versions. Failed handoffs can retry on later activation; source cache files are retained.
11
+ - Archive and restore now use the official workspace APIs. Archiving an unknown session reports the official error instead of being skipped, and restore no longer reattaches a session that the workspace no longer lists. The plugin no longer blocks the official workspace update from dropping a member that has no path index.
12
+ - Preserve restore wrappers and validation installed before Archive Manager is enabled, and restore the original method and property descriptor on disable.
13
+ - Batch archive and restore share one serial loop. When one session gets an official error, the list or confirmation card keeps that reason and the rest continue. Successful items are not repeated. Batch delete still uses the official scoped call.
14
+ - Batch results no longer show a permanent zero for unprocessed items. The retry count is the failed items, so the organizer summary matches the retry button.
15
+ - Keep only the tombstones and in-flight write barrier needed for permanent deletion. Disabling removes those guards without closing the official cache service. The barrier tracks only tasks that entered through the guards; official cache writes started before activation cannot be reliably drained and may leave an orphan cache row after disabling in an exceptional interleaving. Closing this gap requires host-side write-drain support.
16
+ - Session repair parses individual Zstandard frames using an explicit boundary scanner, ensuring reliable single-frame header extraction and verification across Node 24.22+ and earlier versions.
17
+ - Upgrade note: users who disabled an older version must activate the fixed version at least once to hand off old records. Keys rejected by the official backend, such as IDs containing colons, remain in the legacy domain and return to native host behavior instead of receiving a replacement cache.
18
+
19
+ ## 1.1.6 - 2026-10-19
20
+
21
+ - Fixed the "Archive all conversations" action appearing in a single session's action menu. The workspace menu context is now recorded only from workspace rows and cleared by session rows, other rows, or empty areas, so a stale workspace binding can no longer leak into a session menu.
22
+ - "Archive all conversations" now matches the official sidebar visibility: IM channel and scheduled-task sessions are no longer excluded; only archived, subagent, blank placeholder, and missing-summary sessions are skipped.
23
+
7
24
  ## 1.1.5 - 2026-10-19
8
25
 
9
26
  - Let the archive settings page fill the host content column by removing the 760px cap and the dead centering override.
@@ -4,6 +4,23 @@
4
4
 
5
5
  以下发布说明会持续保留;新增版本时不再删除较早记录。
6
6
 
7
+ ## 1.1.7 - 2026-10-22
8
+
9
+ - 修复停用归档插件后会话标题或空白会话显示异常的问题(#71):插件不再替换官方投影缓存表,日常读写始终由宿主负责。
10
+ - 启用修复版时,将历史插件缓存按会话身份核验后交接至官方缓存;保留官方更新的同版本投影,不覆盖不同投影版本,失败可在后续启用时重试,旧缓存原文件不删除。
11
+ - 归档和恢复改走官方工作区接口。未知会话归档会按官方结果报错,不再静默跳过;恢复不再把已不在工作区记账里的会话按目录挂回去。官方改工作区时丢掉没有路径索引的成员,插件不再拦截。
12
+ - 恢复会话保留启用归档插件前已有的包装和校验,停用后还原原方法及属性描述符。
13
+ - 批量归档和恢复共用同一条串行循环。某一条遇到官方报错时,列表或确认卡片留下这条原因,并继续处理后面的会话;已成功的不会重做。批量删除仍走官方一次作用域接口。
14
+ - 批量结果不再显示恒为零的「未处理」。失败项用重试数量表示,整理面板的计数与重试按钮一致。
15
+ - 保留永久删除所需的墓碑和在途写入屏障,停用只撤回这些守护,不关闭官方缓存服务。屏障仅跟踪经过守护入口的任务;启用前已启动的官方缓存写入无法被可靠排空,极端时序下停用后仍可能留下孤儿缓存行,该缺口需要宿主提供写入排空能力。
16
+ - 会话修复使用显式帧边界扫描解析单帧 Zstandard 数据,确保在 Node 24.22+ 及更早版本下均能可靠提取首帧头部并完成工件校验。
17
+ - 升级说明:曾停用旧版的用户需要至少启用一次修复版以完成交接。官方后端不接受的缓存 key(如含冒号的 ID)保留在旧域,恢复宿主原生行为,不再额外接管。
18
+
19
+ ## 1.1.6 - 2026-10-19
20
+
21
+ - 修复单条会话的操作菜单错误出现「归档全部会话」的问题:工作区菜单上下文现在只从工作区行记录,点击会话行、其他行或空白区域会立即清空,避免复用上一次的工作区绑定。
22
+ - 「归档全部会话」的候选条件与官方侧栏对齐:不再排除 IM 渠道和定时任务会话,仅排除已归档、子代理、空白占位和缺失摘要的会话。
23
+
7
24
  ## 1.1.5 - 2026-10-19
8
25
 
9
26
  - 设置页占满宿主内容区:移除 760px 宽度上限及失效的居中覆盖,归档列表与其他设置页对齐。
package/README.md CHANGED
@@ -125,7 +125,7 @@ Compact project groups can be collapsed. Stars and restore/archive icons appear
125
125
 
126
126
  - Use the star on either tab and the **Favorites only** dropdown to find important chats. Favorites persist on the host across archive, restore, and browser changes. Reopen management to see changes made in other pages. Unknown or unreadable sessions retain their stored favorite IDs; cleanup requires confirmed artifact absence.
127
127
  - On Unarchived, enter 1–36,500 whole idle days and preview candidates under the current filters. Deselect individual candidates before confirmation. Favorites, the current chat, running sessions (including subagents), and pending interactions are protected; sessions without a valid activity time are excluded.
128
- - Archive rechecks favorites and activity. Batch archive, restore, and delete report successful, skipped, failed, and remaining items; the first failure stops the batch. Retry only the remainder. Delete retries still require confirmation.
128
+ - Archive rechecks favorites and activity. Batch archive, restore, and delete report progress plus successful, skipped, and failed counts. A failure does not stop the rest; retry only the failed items. Delete retries still require confirmation.
129
129
  - **Undo this archive** restores sessions archived by the current batch, including successful retries. It is available only while the current management page remains open; refreshing or closing clears it. Permanent deletion cannot be undone.
130
130
  - Favorites can still be archived manually. Protection applies to idle cleanup only. There is no scheduled or automatic background cleanup.
131
131
 
@@ -161,6 +161,12 @@ dsh --profile web --dump-config
161
161
 
162
162
  The configuration should include `ui-workspace-archive-manager` and must not disable official `workspace` or `session-projection-cache`. A leftover `archive-manager-host` override can be removed. On current DSH hosts the official `ui-settings-unarchive-sessions` entry is gone, so this plugin no longer disables it (doing so only warned that the patch entry was missing). If your profile's `cordis.patch.yml` still disables `workspace`, `session-projection-cache`, or `ui-workspace`, remove those overrides and restart.
163
163
 
164
+ ### Does disabling the fixed version lose session titles?
165
+
166
+ The fixed version no longer takes over the official projection-cache table. On activation it checks session identity and hands compatible historical plugin checkpoints back to the official cache, retaining the original cache files. **If you disabled an older version, activate the fixed version at least once to perform this handoff**; replacing the package while it stays disabled cannot run the migration.
167
+
168
+ Failed handoffs can retry on later activation. Keys rejected by the official backend, such as session IDs containing colons, remain in the old plugin domain rather than being forced into the official cache. Those sessions return to native host cache behavior; their conversation logs are not deleted. See the [changelog](CHANGELOG.md) for details.
169
+
164
170
  ### How is archiving different from deletion?
165
171
 
166
172
  Archiving puts a conversation away so you can restore it later. **Permanent deletion cannot be undone** and may also remove that session's attachments. It does not delete your project working directory. Deletion requires confirmation.
package/README.ru.md CHANGED
@@ -125,7 +125,7 @@ dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=ht
125
125
 
126
126
  - Используйте звезду на любой вкладке и выпадающий список **Только избранное**, чтобы найти важные чаты. Избранное сохраняется на хосте при архивировании, восстановлении и смене браузера. Переоткройте управление, чтобы увидеть изменения, сделанные на других страницах. Неизвестные или нечитаемые сессии сохраняют свои сохранённые ID избранного; очистка требует подтверждённого отсутствия артефакта.
127
127
  - На вкладке **Незаархивированные** введите 1–36 500 целых дней в поле **Дни простоя** и просмотрите кандидатов при текущих фильтрах. Снимите отдельных кандидатов перед подтверждением. Избранное, текущий чат, запущенные сессии (включая субагентов) и ожидающие взаимодействия защищены; сессии без корректного времени активности исключаются.
128
- - Архив повторно проверяет избранное и активность. Пакетное архивирование, восстановление и удаление сообщают об успешных, пропущенных, неудачных и оставшихся элементах; первый сбой останавливает пакет. Повторяйте только оставшиеся элементы. Повторное удаление всё равно требует подтверждения.
128
+ - Архив повторно проверяет избранное и активность. Пакетное архивирование, восстановление и удаление показывают ход и число успешных, пропущенных и неудачных элементов. Ошибка одной записи не останавливает остальные; повтор затрагивает только неудачные. Повторное удаление всё равно требует подтверждения.
129
129
  - **Отменить эту архивацию** восстанавливает сессии, архивированные текущим пакетом, включая успешные повторы. Доступно, пока открыта текущая страница управления; обновление или закрытие очищает его. Постоянное удаление отменить нельзя.
130
130
  - Избранное всё ещё можно архивировать вручную. Защита относится только к очистке неактивных. Плановой или автоматической фоновой очистки нет.
131
131
 
@@ -161,6 +161,12 @@ dsh --profile web --dump-config
161
161
 
162
162
  В конфигурации должен присутствовать `ui-workspace-archive-manager`, и он не должен отключать официальные `workspace` или `session-projection-cache`. Оставшийся override `archive-manager-host` можно удалить. В текущих хостах DSH официальной записи `ui-settings-unarchive-sessions` уже нет, поэтому плагин больше её не отключает (иначе dump-config предупреждает, что запись патча не найдена). Если `cordis.patch.yml` вашего профиля всё ещё отключает `workspace`, `session-projection-cache` или `ui-workspace`, удалите эти override и перезапустите.
163
163
 
164
+ ### Сохраняются ли названия после отключения исправленной версии?
165
+
166
+ Исправленная версия больше не заменяет официальную таблицу кэша проекций. При включении она проверяет идентичность сессии и переносит совместимые старые записи плагина в официальный кэш, сохраняя исходные файлы. **Если старая версия была отключена, исправленную версию нужно включить хотя бы один раз для переноса**; замена пакета в отключённом состоянии не запускает миграцию.
167
+
168
+ Неудачный перенос можно повторить при следующем включении. Ключи, которые официальный backend не принимает (например, ID с двоеточием), остаются в старом домене плагина. Для этих сессий восстанавливается штатное поведение кэша хоста; журналы разговоров не удаляются. Подробности — в [журнале изменений](CHANGELOG.md).
169
+
164
170
  ### Чем архивирование отличается от удаления?
165
171
 
166
172
  Архивирование убирает беседу, чтобы позже её можно было восстановить. **Постоянное удаление отменить нельзя** и оно может также удалить вложения этой сессии. Оно не удаляет рабочую директорию вашего проекта. Удаление требует подтверждения.
package/README.zh-CN.md CHANGED
@@ -125,7 +125,7 @@ dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=ht
125
125
 
126
126
  - 在已归档或未归档会话行右侧点击星标,通过收藏下拉菜单中的「只看收藏」找回重要会话。收藏保存在宿主数据中,归档、恢复或更换浏览器不会清除;其他页面修改的收藏可在重新打开管理页后读取。
127
127
  - 在「未归档」设置 1~36500 的整数闲置天数,结合当前项目、搜索、日期和收藏筛选,点击「预览闲置归档」。确认清单允许逐条取消,默认排除收藏、当前打开、正在执行(含子代理)以及等待交互的会话;缺少有效最后活动时间的会话不参与。
128
- - 归档前再次检查收藏和活动状态。批量归档、恢复、删除显示进度与成功/跳过/失败/未处理数量;首个失败后停止,支持只重试剩余项。删除重试仍需确认。
128
+ - 归档前再次检查收藏和活动状态。批量归档、恢复、删除显示进度与成功、跳过、失败数量;某一条失败后继续处理后续,只重试失败项。删除重试仍需确认。
129
129
  - 「撤回本次归档」只恢复最近一批实际归档成功的会话,包括该批重试成功的部分。仅在本次打开管理页期间有效,关闭页面或刷新会清除记录;不会撤回原有归档,也不能恢复永久删除的会话。
130
130
  - 收藏会话仍可手动归档;收藏保护只针对闲置整理。没有定时自动归档,不会在后台自行整理。
131
131
 
@@ -165,6 +165,12 @@ dsh --profile web --dump-config
165
165
 
166
166
  配置中应包含 `ui-workspace-archive-manager`,且不应再禁用官方 `workspace` 或 `session-projection-cache`。若还留着 `archive-manager-host` 的禁用覆盖,可以删掉。当前 DSH 宿主已无官方 `ui-settings-unarchive-sessions` 入口,本插件不再对其 disable(否则 dump-config 会告警条目不存在)。若 profile 的 `cordis.patch.yml` 仍禁用 `workspace`、`session-projection-cache` 或 `ui-workspace`,请移除这些覆盖,再重启。
167
167
 
168
+ ### 从旧版升级后,停用时标题还会丢吗?
169
+
170
+ 修复版不再接管官方投影缓存表。启用时会核验历史插件缓存对应的会话身份,并将可接受的记录交接给官方缓存;旧缓存文件保留,不会自动删除。**之前已停用旧版的用户,需要至少启用一次修复版完成交接**,不能只在禁用状态下替换安装包。
171
+
172
+ 交接失败可在后续启用时重试。官方后端不接受的 key(例如含冒号的会话 ID)不会强行迁入,仍保留在旧插件域;这些会话恢复宿主原生缓存行为,不代表其聊天日志被删除。完整边界见[更新日志](CHANGELOG.zh-CN.md)。
173
+
168
174
  ### 归档和删除有什么区别?
169
175
 
170
176
  归档只是收起会话,可以恢复。**永久删除无法撤销**,并可能一并清理该会话的附件;不会删除你的项目工作目录。删除前会要求确认。
@@ -46,18 +46,15 @@ function idleArchiveCandidate(session, { days, now = Date.now(), favorites = /*
46
46
  }
47
47
  async function runSessionBatch(ids, operate, { onProgress, refresh } = {}) {
48
48
  const requested = [...new Set(ids.map(checkedId))];
49
- const result = { requested, succeeded: [], skipped: [], failures: [], unprocessed: [], remaining: [], refreshError: null };
49
+ const result = { requested, succeeded: [], skipped: [], failures: [], remaining: [], refreshError: null };
50
50
  const report = () => onProgress?.({ total: requested.length, done: result.succeeded.length + result.skipped.length + result.failures.length, succeeded: result.succeeded.length, skipped: result.skipped.length, failed: result.failures.length });
51
51
  report();
52
- for (const [index, id] of requested.entries()) {
52
+ for (const id of requested) {
53
53
  try {
54
54
  (await operate(id) ? result.succeeded : result.skipped).push(id);
55
55
  } catch (error) {
56
56
  result.failures.push({ sessionId: id, message: error instanceof Error ? error.message : String(error) });
57
- result.unprocessed = requested.slice(index + 1);
58
- result.remaining = requested.slice(index);
59
- report();
60
- break;
57
+ result.remaining.push(id);
61
58
  }
62
59
  report();
63
60
  }