Commit Graph

4 Commits

Author SHA1 Message Date
can1357 ae051a6a33 Merge PR #1807: fix(hindsight): drop punctuation-only assistant turns before retain (@roboomp)
# Conflicts:
#	packages/coding-agent/src/hindsight/transcript.ts
2026-06-21 17:01:47 +02:00
can1357 24c8bb24c6 feat(session): added modular session APIs and rebuilt listing/persistence behavior
- Added session-domain modules and exports for session-entries, context, listing, loader, and migrations.
- Changed persistence to async append writes plus writeTextAtomic, removing sync line APIs.
- Added compaction-aware session context rebuild with dangling tool-call cleanup.
- Added resumable session resolution with status inference, id/stem/suffix matching, and backup recovery.
2026-06-14 02:02:53 +02:00
roboomp 662b995cc9 fix(hindsight): dropped punctuation-only assistant turns before retain
prepareRetentionTranscript only skipped messages whose stripped content
trimmed to the empty string, so single-character assistant turns like
".", "...", or pure whitespace survived as
`[role: assistant]\n.\n[assistant:end]` blocks. Repeated across a
session (each tool-call-only or thinking-only turn produces one) these
polluted the Hindsight bank, wasted retain tokens, and degraded recall
relevance. extractMessages and flattenMessagesForRecall had the same
gap, only checking length/trim truthiness.

Add hasSubstantiveContent in hindsight/content.ts (a single
\p{L}/\p{N} test) and apply it from all three call sites so retain,
recall, and pre-compaction inputs require at least one letter or digit
per message. Single-char real replies ("y", "4", "ok") still pass.

Fixes #1806
2026-06-04 00:56:35 +00:00
can1357 ce2a109c09 feat(coding-agent): added hindsight memory backends and tools
- Added `memory.backend` and `hindsight.*` settings schema with migration from `memories.enabled` legacy mode.
- Added Hindsight memory backend runtime modules for resolved config, client creation, bank ID derivation, and state lifecycle.
- Added off/local/hindsight backends and resolver wiring across SDK, commands, and compaction context.
- Added `hindsight_recall`, `hindsight_reflect`, and `hindsight_retain` tools with schema validation and backend gating.
- Added Memory tab metadata and symbols to expose backend selection in the settings UI.
- Added package export barrels and tests for bank ID, content formatting, and hindsight config env precedence.
2026-05-03 07:39:52 +02:00