pub fn dispatch_edge_compact(
agents: Query<'_, '_, (Entity, &AgentState, &ContextWindow, &PendingEdgeCompact, Option<&CompactionSettings>), (With<ReadyToInfer>, Without<AwaitingCompaction>)>,
stage: Res<'_, InferenceStage>,
providers: Res<'_, Providers>,
commands: Commands<'_, '_>,
)Expand description
Edge-compaction dispatch: for each ReadyToInfer agent with a
PendingEdgeCompact (an edge transform requested LLM summarization), spawn a
compaction job for the named regions (reusing the compaction lane) and hold the
agent AwaitingCompaction. If the agent has no compaction config, nothing to
summarize, or no provider/permit, the request is dropped and the agent proceeds
to inference un-compacted (memory-pressure compaction still applies later).