Skip to content

feat(core,a2a): Focus strategy auto-consolidation and MMA2A AgentCard capabilities#3388

Merged
bug-ops merged 2 commits intomainfrom
focus-agent-mma2a
Apr 24, 2026
Merged

feat(core,a2a): Focus strategy auto-consolidation and MMA2A AgentCard capabilities#3388
bug-ops merged 2 commits intomainfrom
focus-agent-mma2a

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Changes

zeph-core:

  • run_focus_auto_consolidation — TF-Jaccard scoring + LLM extraction with 20s timeout
  • run_focus_auto_consolidation_pass — Focus branch in maybe_proactive_compress
  • CompressionGuard RAII struct — releases compressing AtomicBool on drop
  • Skips consolidation when no User message exists or focus_scorer_provider is misconfigured

zeph-config:

  • FocusConfig.auto_consolidate_min_window (default 6)
  • migrate-config step 31 via toml_edit

zeph-context:

  • should_proactively_compress handles CompressionStrategy::Focus

zeph-a2a:

  • AgentCapabilities.{images,audio,files} fields
  • AgentCardBuilder.{images,audio,files}() helpers

Test Plan

  • cargo nextest run -p zeph-config -p zeph-a2a --lib --bins — 409 tests pass
  • cargo nextest run -p zeph-core --lib --bins — 1488 tests pass
  • cargo nextest run -p zeph-context -E 'test(focus)' --lib — 3 tests pass
  • cargo +nightly fmt --check — clean
  • cargo clippy -p zeph-core -p zeph-config -p zeph-context -p zeph-a2a -- -D warnings — clean
  • Live test with [memory.compression] strategy = "focus" config — playbook: .local/testing/playbooks/focus-auto-consolidation.md
  • Live test for AgentCard modality fields — playbook: .local/testing/playbooks/mma2a-capabilities.md

Follow-up Issues Filed

Closes #3313
Closes #3326

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate config Configuration file changes enhancement New feature or request size/XL Extra large PR (500+ lines) labels Apr 24, 2026
@bug-ops bug-ops force-pushed the focus-agent-mma2a branch from 1f6a95d to 4a167f7 Compare April 24, 2026 22:33
@bug-ops bug-ops enabled auto-merge (squash) April 24, 2026 22:33
bug-ops added 2 commits April 25, 2026 00:45
… capabilities

Closes #3313
Closes #3326

Wire the previously-declared CompressionStrategy::Focus variant into the
proactive compaction pipeline. When this strategy is active, a background
pass identifies the oldest contiguous low-relevance message window (via
TF-Jaccard scoring) and extracts key facts into an AutoConsolidated
KnowledgeBlock, using the existing focus_scorer_provider. Raw history
prior to the window is preserved per memory-pipeline invariant §6.

Changes:
- FocusConfig.auto_consolidate_min_window (default 6) controls the
  minimum window size before consolidation fires
- run_focus_auto_consolidation in compaction_strategy.rs performs
  scoring and LLM extraction with a 20s timeout
- Focus branch wired in maybe_proactive_compress via
  run_focus_auto_consolidation_pass helper
- CompressionGuard RAII struct ensures AtomicBool release on
  cancellation, panic, and normal exit
- Guard skips consolidation when task_goal is empty (no User message)
  or when focus_scorer_provider is configured but unresolvable
- migrate-config step 31 injects auto_consolidate_min_window via
  toml_edit into existing [agent.focus] sections
- 6 new tests; 1911 unit tests pass

Add capability-aware modality advertisement to AgentCard per the MMA2A
paper (arXiv:2604.12213). MVP: types and builder only; A2A bootstrap
wiring deferred to #3378.

Changes:
- AgentCapabilities gains images/audio/files bool fields with
  #[serde(default)] for full backward compatibility
- AgentCardBuilder gains .images()/.audio()/.files() fluent helpers
- 8 new tests covering serialization, deserialization, and builder
@bug-ops bug-ops force-pushed the focus-agent-mma2a branch from 8620f84 to 279d36f Compare April 24, 2026 22:48
@bug-ops bug-ops merged commit 2e3bd77 into main Apr 24, 2026
32 checks passed
@bug-ops bug-ops deleted the focus-agent-mma2a branch April 24, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant