Skip to content

feat(core): tool-pair summarization with visibility integration#823

Merged
bug-ops merged 4 commits intomainfrom
m31-tool-summarization
Feb 24, 2026
Merged

feat(core): tool-pair summarization with visibility integration#823
bug-ops merged 4 commits intomainfrom
m31-tool-summarization

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 24, 2026

Summary

  • Implement maybe_summarize_tool_pair() — summarize oldest tool call/response pairs when visible count exceeds tool_call_cutoff (default 6)
  • Hide originals via agent_visible=false, insert LLM-generated summary as agent_only message
  • XML-delimited prompt (<tool_request>/<tool_response>) prevents injection from tool output
  • Add [memory] tool_call_cutoff config option with validation (>= 1)
  • Integration in both legacy text and native tool_use execution paths

Closes #793, closes #811, closes #812, closes #813

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo nextest run --workspace --lib --bins — 2645 tests pass
  • Unit tests: count_tool_pairs, find_oldest_tool_pair, boundary conditions
  • E2E: above-cutoff triggers summarization with visibility updates
  • LLM failure: graceful skip without state changes
  • Config validation: cutoff=0 rejected, cutoff=1 accepted
  • Prompt structure: XML delimiters verified
  • Empty messages edge case

@github-actions github-actions bot added documentation Improvements or additions to documentation rust core enhancement New feature or request size/L labels Feb 24, 2026
…ation

Summarize oldest tool call/response pairs when visible count exceeds
tool_call_cutoff (default 6). Hides originals via agent_visible=false,
inserts LLM-generated summary. XML-delimited prompt prevents injection.
Validates tool_call_cutoff >= 1 in config.
Add tool-pair summarization to CHANGELOG, docs (context.md,
configuration.md), and READMEs (root, zeph-core). Add 4 missing
tests: config validation (cutoff=0 rejected, cutoff=1 accepted),
XML delimiter prompt validation, empty messages edge case.
@bug-ops bug-ops force-pushed the m31-tool-summarization branch from 9f45c87 to 8395fd1 Compare February 24, 2026 20:17
@bug-ops bug-ops enabled auto-merge (squash) February 24, 2026 20:17
@bug-ops bug-ops merged commit cb16be1 into main Feb 24, 2026
23 checks passed
@bug-ops bug-ops deleted the m31-tool-summarization branch February 24, 2026 20:58
bug-ops added a commit that referenced this pull request Feb 24, 2026
* feat(core): background tool-pair summarization with visibility integration

Summarize oldest tool call/response pairs when visible count exceeds
tool_call_cutoff (default 6). Hides originals via agent_visible=false,
inserts LLM-generated summary. XML-delimited prompt prevents injection.
Validates tool_call_cutoff >= 1 in config.

* docs, tests: M31 documentation, READMEs, and missing test coverage

Add tool-pair summarization to CHANGELOG, docs (context.md,
configuration.md), and READMEs (root, zeph-core). Add 4 missing
tests: config validation (cutoff=0 rejected, cutoff=1 accepted),
XML delimiter prompt validation, empty messages edge case.
bug-ops added a commit that referenced this pull request Feb 24, 2026
* chore: pin tempfile to 3.26, add SPDX header script

* release: prepare v0.12.0

* ci: add CLA check for external contributors

* ci: fix CLA check — store signatures in dedicated branch

* chore: add SPDX license headers (MIT OR Apache-2.0) to all .rs files

* docs: add CLA section to CONTRIBUTING.md

* feat(core): tool-pair summarization with visibility integration (#823)

* feat(core): background tool-pair summarization with visibility integration

Summarize oldest tool call/response pairs when visible count exceeds
tool_call_cutoff (default 6). Hides originals via agent_visible=false,
inserts LLM-generated summary. XML-delimited prompt prevents injection.
Validates tool_call_cutoff >= 1 in config.

* docs, tests: M31 documentation, READMEs, and missing test coverage

Add tool-pair summarization to CHANGELOG, docs (context.md,
configuration.md), and READMEs (root, zeph-core). Add 4 missing
tests: config validation (cutoff=0 rejected, cutoff=1 accepted),
XML delimiter prompt validation, empty messages edge case.

* feat(acp): model switching and extension management (#824)

* feat(acp): model switching and extension management

Implement set_session_config_option for runtime model switching with
provider allowlist validation and ProviderFactory closure-based creation.
Add ext_method handler for MCP extension management (_agent/mcp/add,
_agent/mcp/remove, _agent/mcp/list) via McpManager integration.

Closes #785

* docs: update changelog, readmes, docs for model switching and ext_method

* chore: add SPDX header to custom.rs

* chore: add SPDX headers to new transport module files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core documentation Improvements or additions to documentation enhancement New feature or request rust size/L

Projects

None yet

1 participant