remove hive and agent apis nothing calls: build-log routes, /api/compact, host.sock list, mcp.sock wake
This commit is contained in:
parent
cbfd7b2174
commit
36c7781245
1 changed files with 115 additions and 801 deletions
|
|
@ -11,9 +11,8 @@
|
|||
//! reminder op then returns `Response::Err`); a reminder *firing* is a
|
||||
//! separate path (`reminder_timer`), not driven through this socket.
|
||||
//! `Request::Compact` is the odd one out — it doesn't touch any store, just
|
||||
//! the harness's [`Bus`] (gate-checked context usage, then the same
|
||||
//! deferred `compact_pending` flag the operator dashboard's `/compact`
|
||||
//! button sets). No hive-c0re round-trip, no broker long-poll, no marker
|
||||
//! the harness's [`Bus`] (gate-checked context usage, then the deferred
|
||||
//! `compact_pending` flag). No hive-c0re round-trip, no broker long-poll, no marker
|
||||
//! files.
|
||||
//!
|
||||
//! One request/response line per connection, matching the producers'
|
||||
|
|
@ -39,8 +38,7 @@ use crate::todos::{Todo, Todos};
|
|||
/// Context-usage floor for `Request::Compact`: below this fraction of the
|
||||
/// effective context window, an agent-initiated compact is refused (nothing
|
||||
/// meaningful to reclaim yet, and it'd just burn a compaction pass on a
|
||||
/// near-empty session). Same number a human operator would eyeball off the
|
||||
/// dashboard's `ctx·Nk` badge before hitting the `/compact` button.
|
||||
/// near-empty session).
|
||||
const COMPACT_MIN_USAGE_FRACTION: f64 = 0.66;
|
||||
|
||||
/// Pause after a failed `accept`, so a failure that persists (fd exhaustion)
|
||||
|
|
@ -434,13 +432,10 @@ fn mark_todos_done(store: &Todos, ids: &[i64]) -> Response {
|
|||
}
|
||||
}
|
||||
|
||||
/// `Request::Compact` handler: gate on context usage, then queue the same
|
||||
/// deferred `compact_pending` flag the operator's `/compact` button sets.
|
||||
/// Mirrors `hive-agent::web_ui::actions::post_compact` but reachable from
|
||||
/// the agent's own MCP tool instead of the dashboard, and refuses below
|
||||
/// [`COMPACT_MIN_USAGE_FRACTION`] instead of always honouring the request —
|
||||
/// an agent can call this speculatively, a human clicking the dashboard
|
||||
/// button already made the judgment call. `wake_prompt`, when set, is
|
||||
/// `Request::Compact` handler: gate on context usage, then queue the
|
||||
/// deferred `compact_pending` flag. Refuses below
|
||||
/// [`COMPACT_MIN_USAGE_FRACTION`] because an agent can call this
|
||||
/// speculatively. `wake_prompt`, when set, is
|
||||
/// forwarded to `Bus::request_compact` so the turn loop drives a synthetic
|
||||
/// follow-up turn once the compaction actually finishes.
|
||||
fn compact(bus: &Bus, wake_prompt: Option<String>) -> Response {
|
||||
|
|
|
|||
Loading…
Reference in a new issue