hermes-agent/acp_adapter
Israel Lot 24e4c6fbf6 fix(acp): flag replayed compaction summaries via _meta
A context-compaction handoff is persisted as an ordinary history message
but is not a real turn. The ACP history replay streamed it as a bare
user/agent message chunk, dropping the in-process _compressed_summary
marker, so ACP frontends (editors, vscode-hermes) rendered the entire
handoff as a regular message.

Tag replayed summary chunks under _meta.hermes (ACP's extensibility
channel), covering all three persistence shapes the compressor emits:

- standalone role="user" handoff -> compactionSummary: true
- standalone role="assistant" handoff (alternation-driven role pick)
  -> compactionSummary: true
- merge-into-tail message (preserved tail content + appended summary)
  -> containsCompactionSummary: true, a distinct key so clients that
  collapse standalone summaries cannot hide the preserved real content

Detection honors the in-process metadata flag and falls back to a new
ContextCompressor.classify_summary_content() content classifier
(standalone/merged/None), so it also works for a DB-reloaded session
that lost the in-memory flag. _is_context_summary_content is now a thin
wrapper over the classifier, keeping existing callers unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 16:58:35 -07:00
..
__init__.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
__main__.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
auth.py feat(azure-foundry): add Microsoft Entra ID auth 2026-05-18 10:14:38 -07:00
edit_approval.py fix: bound threat-pattern/FTS5 regex input and cover V4A Move-File edits 2026-07-01 01:05:28 -07:00
entry.py rip out brew + pip/PyPI wheel support (#68217) 2026-07-22 16:51:01 -04:00
events.py fix(acp): use modes for edit auto-approval 2026-05-18 01:19:55 -07:00
permissions.py fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
provenance.py feat(acp): emit session provenance metadata for compression rotation (#41724) 2026-06-07 22:22:21 -07:00
server.py fix(acp): flag replayed compaction summaries via _meta 2026-07-22 16:58:35 -07:00
session.py fix(state): heal alternation at the ACP / CLI-resume / TUI-resume restore sites too 2026-07-17 06:53:38 -07:00
tools.py fix(code-exec): expose truncated stdout metadata 2026-07-16 04:25:19 -07:00