Conversation
…UI spinners (#1904) Add four integration points for context compression features: - CLI: --focus/--no-focus, --sidequest/--no-sidequest, --pruning-strategy flags override agent.focus.enabled, memory.sidequest.enabled, and memory.compression.pruning_strategy per session without editing config. --focus/--no-focus and --sidequest/--no-sidequest are mutually exclusive. PruningStrategy implements FromStr (snake_case + kebab-case variants) in zeph-core with no clap dependency added to the library crate. - Init wizard: step_context_compression() inserts between step_memory and step_channel, asking 5 questions about Focus Agent, SideQuest, and pruning strategy. Interval inputs validated >= 1 via validate_with(). - Debug dumps: dump_pruning_scores (context-compression gated), dump_focus_knowledge, dump_sidequest_eviction added to DebugDumper. Pruning scores captured before eviction loop; focus knowledge after append_knowledge(); sidequest eviction with cursor list and evicted-flag per entry. - TUI spinners: Agent gains optional status_tx field (cloned from build_provider() before provider.set_status_tx() consumes it). Sends "Extracting task goal..." on background task spawn, clears on all completion paths (success, None, Err). Sends "SideQuest: scoring tool outputs..." on spawn, clears on no-cursors/panic/ freed==0 paths, sends "SideQuest evicted N tokens" on success.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1904.
Summary
Adds four integration points for the context compression subsystem, making Focus Agent, SideQuest eviction, and pruning strategy configurable without editing
config.toml.CLI flags:
--focus/--no-focus,--sidequest/--no-sidequest,--pruning-strategy <reactive|task_aware|mig|task_aware_mig>overrideagent.focus.enabled,memory.sidequest.enabled, andmemory.compression.pruning_strategyper session. Mutually-exclusive pairs enforced by clapconflicts_with.PruningStrategyimplementsFromStr(snake_case + kebab-case) inzeph-core— noclapdependency added to the library crate.--initwizard: newstep_context_compression()step betweenstep_memoryandstep_channel, asking about Focus Agent interval, SideQuest interval (both validated ≥ 1), and pruning strategy via aSelectmenu.Debug dumps: three new
DebugDumpermethods:dump_pruning_scores(feature-gated, fires before eviction loop),dump_focus_knowledge(afterappend_knowledge()),dump_sidequest_eviction(cursor list with per-entry evicted flag). All follow the existing Trace-skip /next_id()/write()pattern.TUI spinners:
Agentgains an optionalstatus_txfield (cloned frombuild_provider()beforeset_status_tx()consumes it). Sends "Extracting task goal..." on background task spawn and clears on all completion paths. Sends "SideQuest: scoring tool outputs..." on eviction spawn; clears on no-cursors / panic / freed==0 paths; sends "SideQuest evicted N tokens" on success.Changes
src/cli.rssrc/runner.rsstatus_txto agentsrc/init.rsstep_context_compression()+build_configwiring + 7 testssrc/acp.rs,src/commands/ingest.rs,src/daemon.rsbuild_provider()3-tuple destructurecrates/zeph-core/src/config/types/memory.rsFromStr+CopyforPruningStrategycrates/zeph-core/src/debug_dump/mod.rscrates/zeph-core/src/agent/mod.rsstatus_txfield; SideQuest spinners;evicted_indicesrenamecrates/zeph-core/src/agent/builder.rswith_status_tx()builder methodcrates/zeph-core/src/bootstrap/mod.rsbuild_provider()returns 3-tuplecrates/zeph-core/src/agent/context/summarization.rscrates/zeph-core/src/agent/tool_execution/native.rsappend_knowledge()CHANGELOG.md[Unreleased]entriesTest plan
cargo +nightly fmt --check— cleancargo clippy --workspace --features full -- -D warnings— 0 warningscargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 6071 passed, 12 skippedcargo run --features full -- --focus --pruning-strategy task_awareenables Focus Agent for the sessioncargo run --features full -- --initshows the "Context Compression" stepcargo run --features full -- --debug-dump .local/debugproduces*-pruning-scores.json/*-focus-knowledge.txt/*-sidequest-eviction.jsonfiles during a compressed session