Commit Graph

215 Commits

Author SHA1 Message Date
Youzini-afk
d39c16d8ff fix: restore missing runtime persistence helpers 2026-04-14 12:41:10 +08:00
Youzini-afk
40bf65f5a4 fix: restore chat identity helpers for graph load 2026-04-14 00:34:35 +08:00
Youzini-afk
74d661e433 Harden local store cache invalidation for storage mode switching 2026-04-13 23:03:43 +08:00
Youzini-afk
a7ded12350 feat: wire OPFS local store migration 2026-04-13 22:45:14 +08:00
Youzini-afk
e4ab3ac41d perf: optimize persist-delta snapshot reuse and diagnostics 2026-04-13 18:21:32 +08:00
Youzini-afk
67cf5fe7fa perf: add hash compact persist-delta bridge mode 2026-04-13 16:37:59 +08:00
Youzini-afk
b16785e56f perf: optimize persist delta gating and diagnostics 2026-04-13 16:11:43 +08:00
Youzini-afk
29f21857e7 perf(graph): add adaptive layout degrade and defer persist clone 2026-04-13 12:46:52 +08:00
Youzini-afk
5bd29c99d5 fix: orphan accepted commit marker self-healing — auto-clear stale marker when no recoverable graph source exists
- Add maybeResolveOrphanAcceptedCommitMarker() for conservative orphan detection:
  - Chat-state sidecar rescue first (preserves marker, keeps mismatch diagnostic)
  - Only clears marker when ALL local sources confirmed absent
  - Guards: shadow-available, migration-failed, chat-switched all block clearing
- Enhance clearCurrentChatCommitMarker() with resetAcceptedRevision option
  - Resets lastAcceptedRevision and acceptedStorageTier when marker is orphan
- Integrate orphan resolution into loadGraphFromIndexedDb() empty+mismatch branch
- Update onDeleteCurrentIdbController/onDeleteAllIdbController to resetAcceptedRevision
- Update graph-persistence regressions:
  - Orphan marker scenario now auto-heals to EMPTY_CONFIRMED (was: permanently BLOCKED)
  - Add chat-state rescue guard test: sidecar data prevents marker clearing
2026-04-12 20:36:03 +08:00
Youzini-afk
05083ef5f0 fix: clear stale accepted commit marker after deleting local IndexedDB caches
When users delete local BME IndexedDB via UI actions (delete current/all
IDB), the chat metadata's st_bme_commit_marker was not cleared. This left
an accepted high-revision promise with no local DB backing, causing
persist-mismatch:indexeddb-behind-commit-marker and blocking graph load
indefinitely.

- index.js: add clearCurrentChatCommitMarker() helper and expose via runtime
- ui-actions-controller.js: call clearCurrentChatCommitMarker before
  syncGraphLoadFromLiveContext after IDB deletion
- p0-regressions.mjs: regression test asserting marker is cleared before
  reload after current-IDB deletion
2026-04-12 20:07:05 +08:00
Youzini-afk
de7e598490 fix: graph load stuck in LOADING after IndexedDB cache deletion or commit-marker mismatch
- reconcileIndexedDbProbeFailureState now handles persist-mismatch:indexeddb-* reasons, ensuring bounded retries and transition to BLOCKED instead of hanging forever in LOADING
- expose clearCachedIndexedDbSnapshot, clearAllCachedIndexedDbSnapshots, closeBmeDb, closeAllBmeDbs, syncGraphLoadFromLiveContext in runtime context for UI actions
- onDeleteCurrentIdbController / onDeleteAllIdbController now clear in-memory caches, close DB handles, and force a fresh graph load sync after deletion
- humanize persist-mismatch:indexeddb-behind-commit-marker panel messages into user-friendly Chinese text
- add regression test for empty IndexedDB + accepted commit marker mismatch fallback-to-blocked scenario
2026-04-12 19:00:30 +08:00
Youzini-afk
47ffd5413d refactor(terminology): 层级总结为主路径,synopsis 标记为旧式全局概要
- README: 明确 summaryState 为主总结体系,legacy synopsis 为兼容兜底
- prompt-profiles: synopsis 任务标签改为「小总结」
- schema/task-graph-stats/panel: synopsis 节点显示为「全局概要(旧)」
- index.js: fallback 状态文案改为「旧式全局概要生成/更新中」
- p0-regressions: 同步更新断言字符串
2026-04-12 17:58:05 +08:00
Youzini-afk
b31088cc35 fix: IndexedDB probe 失败后不再永久卡在 loading,重试耗尽后回退到 blocked
- index.js: 新增 reconcileIndexedDbProbeFailureState,后台 probe 失败时先有限重试,耗尽后切到 blocked
- index.js: scheduleIndexedDbGraphProbe 的 .then/.catch 均接入 reconcile 逻辑
- index.js: createGraphLoadUiStatus blocked 文案更新
- ui/panel.js: _getGraphLoadLabel blocked 文案更新,不再误导为元数据未就绪
- tests/graph-persistence.mjs: 新增 manager-unavailable / read-failed 回归
- tests/graph-persistence.mjs: harness 支持 __indexedDbExportSnapshotShouldThrow / __indexedDbGetCurrentDbShouldThrow
2026-04-12 16:50:02 +08:00
Youzini-afk
96b43c7860 feat: migrate compress/consolidation/reflection graphStats to shared ranking core + prompt node refs
- New maintenance/task-graph-stats.js: shared helper wrapping rankNodesForTaskContext + createPromptNodeReferenceMap
- extractor.js: extract and reflection graphStats now use buildTaskGraphStats
- compressor.js: compression graphStats uses shared helper, excludes current batch from relevant ranking
- consolidator.js: consolidation graphStats uses shared helper, excludes new nodes from relevant ranking
- index.js: passes schema + embeddingConfig into generateReflection
- p0-regressions.mjs: added graphStats assertions for compress/consolidation/reflection (prompt-facing refs, no raw UUIDs)
2026-04-12 15:27:22 +08:00
Hao19911125
943c398fb9 Guard against Tavern Helper prompt viewer fake generations 2026-04-11 22:09:40 +08:00
Hao19911125
fb7f59c44e Skip BME on trivial user sends 2026-04-11 21:47:22 +08:00
Hao19911125
ffcad87a90 Merge branch 'Youzini-afk:main' into main 2026-04-11 21:03:40 +08:00
Hao19911125
ddbd4c3c61 Silence BME during MVU extra analysis retry 2026-04-11 20:47:46 +08:00
Youzini-afk
9becc23526 fix(ux): quiet expected history recovery toasts 2026-04-11 20:36:26 +08:00
Youzini-afk
42bd85b0aa fix(recall): reuse persisted recall on history rerolls 2026-04-11 20:02:52 +08:00
Youzini-afk
0cb95c4f2b phase2-4 recall prompt-flow hardening 2026-04-11 18:51:59 +08:00
Youzini-afk
322752bb43 feat: improve shujuku-compatible extraction and recall input 2026-04-11 16:05:34 +08:00
Youzini-afk
b42157c72d fix: clean up residual mojibake strings in index.js 2026-04-11 14:21:34 +08:00
Youzini-afk
1834bc1d24 refactor: stabilize persistence delta commit flow 2026-04-11 13:57:03 +08:00
Youzini-afk
b2d8fcc7a1 Fix processed history hash rebuild after recovery 2026-04-11 01:45:47 +08:00
Youzini-afk
f37c5de761 Fix persistence pending gating and add repair actions 2026-04-11 00:21:16 +08:00
Youzini-afk
53672fa751 Fix manual backup manifest filename handling 2026-04-10 19:49:10 +08:00
Hao19911125
9a6645609c Merge branch 'main' into main 2026-04-10 19:06:23 +08:00
Youzini-afk
7b1f125e17 Move summary clear into cleanup 2026-04-10 18:56:31 +08:00
Hao19911125
965e5dff0a Merge branch 'main' into main 2026-04-10 18:43:42 +08:00
Youzini-afk
517abc6a30 Refactor rerun and summary rebuild ranges 2026-04-10 18:38:54 +08:00
Hao19911125
f7aef9776b Merge branch 'main' into main 2026-04-10 18:09:40 +08:00
Hao19911125
09b6e1e566 Add manual cloud backup controls and manager modal 2026-04-10 17:26:57 +08:00
Youzini-afk
5a77506ab1 Add Luker chat state persistence compatibility 2026-04-10 17:00:51 +08:00
Youzini-afk
ef154b5950 Fix hidden-message leakage into plugin prompts 2026-04-10 14:06:26 +08:00
Youzini-afk
bbb44e7022 Fix multi-device sync after persistence refactor 2026-04-10 13:53:21 +08:00
Youzini-afk
f88a6cc0af Fix pending persistence confirmation deadlocks 2026-04-10 01:46:48 +08:00
Youzini-afk
7faa9cfc7f Refactor extraction persistence into two-stage status model 2026-04-10 01:19:56 +08:00
Youzini-afk
8bf01e6ff3 Tighten extraction persistence success gating 2026-04-10 00:01:55 +08:00
Youzini-afk
e4feda5471 Add hierarchical summary frontier system 2026-04-09 14:50:52 +08:00
Hao19911125
3533aeab18 Add global task regex migration and UI 2026-04-09 10:06:29 +08:00
Youzini-afk
323e1fd5b0 feat: add story timeline layer 2026-04-08 22:41:49 +08:00
Youzini-afk
d7989303d9 feat: support multi-owner scene recall anchors 2026-04-08 21:29:36 +08:00
Youzini-afk
a4fed87e6e feat(cognition): finish multi-character knowledge and monitor workflow 2026-04-08 18:21:38 +08:00
Youzini-afk
29af3d164e feat: 新增「数据清理」配置页
- 图谱清理:清空当前图谱、按楼层范围删除节点
- 缓存清理:清空向量缓存、清空提取历史
- 存储清理:清空当前/全部 IDB、清空服务端同步文件
- 高危操作全部需要 confirm 弹窗确认
- 清空全部 IDB 和清空服务端同步文件需要输入 DELETE 确认
2026-04-08 14:29:13 +08:00
Youzini-afk
9939734bcb Harden post-refactor test and check guardrails 2026-04-08 03:03:09 +08:00
Youzini-afk
50113035df Harden panel entry initialization 2026-04-08 02:00:48 +08:00
Youzini-afk
feec17f3e3 Reorganize modules into layered directories 2026-04-08 01:17:57 +08:00
Youzini-afk
c8af45bd35 Add delayed auto extraction mode and fix AGPL license 2026-04-07 22:24:04 +08:00
Youzini-afk
854e3a7a79 Harden graph recovery and shadow persistence 2026-04-07 17:18:18 +08:00