Commit Graph

241 Commits

Author SHA1 Message Date
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
4b9668fdc5 Clear restored backup dirty history markers 2026-04-12 15:09:11 +08:00
Youzini-afk
dc5051f2ef feat: shared ranking core + prompt node references; recall reuses shared core for base query/vector/diffusion; remove retriever-local duplicate helpers; add regression tests 2026-04-12 14:59:37 +08:00
Youzini-afk
f40b03c306 feat: hide assistant card names in extraction transcript, split sectioned recentMessages into 2 system messages 2026-04-12 13:33:41 +08:00
Youzini-afk
559312c1b6 fix: preserve isContextOnly context/target dividers in final prompt transcript rendering
Root cause: formatPromptMessageTranscript in prompt-builder.js ignored
isContextOnly, so context review and extraction target sections were
flattened into plain transcript even though the flag was correctly set
in intermediate layers. Additionally, userPromptSections (which
contained the dividers) was only a fallback that never reached the
final prompt when block-based profiles had user blocks.

Fix:
- getPromptMessageLikeDescriptor now preserves isContextOnly flag
- formatPromptMessageTranscript now inserts context/target section
  dividers when messages carry isContextOnly, ensuring the final
  LLM prompt always shows the distinction regardless of which
  rendering path (recentMessages, chatMessages, dialogueText) is used

Regression tests:
- prompt-builder-mixed-transcript: verify recentMessages block content
  includes context review and extraction target dividers
- extractor-phase3-layered-context: end-to-end test proving default
  extract profile + default structured mode produces final promptMessages
  with context/target section dividers
2026-04-12 13:04:04 +08:00
Youzini-afk
3f7dd0d727 feat: persist extract action mode selection across panel sessions
- Add extractActionMode setting (default: pending) to settings-defaults.js
- Panel refresh restores dropdown from settings.extractActionMode
- Dropdown change event persists selection via _patchSettings
- Extract button reads settings as fallback when DOM value missing
- Add default value assertion in tests/default-settings.mjs
2026-04-12 12:53:08 +08:00
Youzini-afk
a8e3169002 feat: add isContextOnly flag to extraction messages to prevent repeated extraction
- buildExtractionMessages marks messages with isContextOnly (seq < startIdx)
- formatExtractionTranscript inserts section dividers for mixed context/target
- extractor.js Layer 1 prompt splits context review vs extraction target with guidance
- Add tests/extraction-context-only-flag.mjs (7 test cases)
2026-04-12 12:46:05 +08:00
Hao19911125
288c33f3c3 Rebind restored backup history hashes locally 2026-04-12 11:49:34 +08:00
Hao19911125
580a049442 Slim manual cloud backups and guard truncated journal rollback 2026-04-12 10:43:38 +08:00
Youzini-afk
fdfc15303b fix: stabilize mobile graph dragging and resize 2026-04-11 23:20:26 +08:00
Youzini-afk
898698364e perf: reduce graph panel refresh churn during streaming 2026-04-11 23:07:06 +08:00
Youzini-afk
b06f49f7f9 merge: sync main into dev after PR #29 2026-04-11 22:30:46 +08:00
Youzini-afk
1a2e9ac33d feat: auto-detect dedicated memory llm providers 2026-04-11 22:23:18 +08:00
Youzini-afk
7d23552ff3 fix(ci): support node 20 module hook fallback 2026-04-11 20:43:18 +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
30046dd66b feat(regex): move contamination cleanup to default global preset 2026-04-11 19:38:17 +08:00
Youzini-afk
0cb95c4f2b phase2-4 recall prompt-flow hardening 2026-04-11 18:51:59 +08:00
Youzini-afk
3e37600399 feat: integrate phase3/4 settings UI and add phase4/5 regressions 2026-04-11 16:39:38 +08:00
Youzini-afk
322752bb43 feat: improve shujuku-compatible extraction and recall input 2026-04-11 16:05:34 +08:00
Youzini-afk
1834bc1d24 refactor: stabilize persistence delta commit flow 2026-04-11 13:57:03 +08:00
Youzini-afk
418679541a Restore cognition references during history rollback 2026-04-11 03:07:18 +08:00
Youzini-afk
59668decda Stop role card names from populating cognition owners 2026-04-11 02:50:54 +08:00
Youzini-afk
628652309a Deduplicate character cognition owners by alias 2026-04-11 02:40:43 +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
5eaf8aaeb9 Enable candidate text regex stage by default 2026-04-10 20:13:34 +08:00
Youzini-afk
53672fa751 Fix manual backup manifest filename handling 2026-04-10 19:49:10 +08:00
Hao19911125
965e5dff0a Merge branch 'main' into main 2026-04-10 18:43:42 +08:00
Hao19911125
4423034007 Fix stale pending persistence gate 2026-04-10 18:42:15 +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
6882087c67 Refactor recall LLM selection protocol 2026-04-10 16:24:53 +08:00
Youzini-afk
eaac52473e Fix CI test compatibility on Node 20 2026-04-10 15:14:19 +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
5c9a8a9df1 Normalize mistaken user owners across extraction and cognition 2026-04-09 23:38:40 +08:00
Youzini-afk
3e90c64310 Fix cognition owner label collisions in UI 2026-04-09 23:12:24 +08:00
Youzini-afk
ab99ca4fcc Fix world info at-depth chat injection ordering 2026-04-09 22:50:52 +08:00
Youzini-afk
e891b35c00 fix: delay automatic summary rollup until above threshold 2026-04-09 21:32:16 +08:00
Youzini-afk
23624122f3 Fix stable CI regressions 2026-04-09 15:17:01 +08:00
Youzini-afk
e4feda5471 Add hierarchical summary frontier system 2026-04-09 14:50:52 +08:00
Youzini-afk
14a0dbe59d Fix legacy task regex migration compatibility 2026-04-09 12:11:57 +08:00
Hao19911125
3533aeab18 Add global task regex migration and UI 2026-04-09 10:06:29 +08:00
Youzini-afk
922b716ff6 Fix host regex reuse for extraction inputs 2026-04-09 00:28:29 +08:00
Youzini-afk
60b754559c test: update llm token field assertions 2026-04-08 23:19:56 +08:00