fix(honcho): read Honcho 3.0.x response schema — memory reads were silently empty
Nightly Build / build (push) Successful in 3m48s
Nightly Build / build (push) Successful in 3m48s
Against a self-hosted Honcho 3.0.11 every read path came back empty while the server was healthy and full of derived facts: the plugin parsed a `conclusions`/`summary` shape the API no longer emits. - honcho-client: typed models for the real schema — `PeerContext` (`representation` markdown + `peer_card`), `SessionContext` (`summary` as an object, `peer_representation`), wrapped `PeerCard` (a bare array on PUT is a 422, which also broke `honcho_profile` writes). - plugin: the turn-time injection and `honcho_context` read the representation; `honcho_search` and the page's /search now use `conclusions/query` (observer/observed scoping inside `filters`) — a real ranked semantic search with fact ids, which `peer_context?search_query` never provided; /overview returns card + representation + conclusions. - compose: pin the Honcho image by digest (3.0.11) — ghcr publishes no v3 semver tags, and an untracked `:latest` pull is what drifted the schema. - tests: fixture tests from payloads captured on the live server, plus an env-gated live smoke test (HONCHO_E2E_URL/_WS/_PEER, `cargo test -p honcho-client -- --ignored`) — run it before any future Honcho bump.
This commit is contained in:
@@ -161,14 +161,17 @@ impl HonchoClient {
|
||||
|
||||
// ── Context / Summaries ───────────────────────────────────────────────
|
||||
|
||||
/// Retrieve context for a session (messages + peer conclusions, token-budgeted).
|
||||
/// Retrieve context for a session (messages + summary + the session peer's
|
||||
/// representation, token-budgeted). The summary is a `Summary` object and
|
||||
/// the facts live in `peer_representation` — there is no `conclusions`
|
||||
/// array (see [`SessionContext`]).
|
||||
pub async fn session_context(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
session_id: &str,
|
||||
tokens: Option<u32>,
|
||||
search_query: Option<&str>,
|
||||
) -> Result<serde_json::Value> {
|
||||
) -> Result<SessionContext> {
|
||||
let mut q: Vec<(&str, String)> = vec![];
|
||||
if let Some(t) = tokens {
|
||||
q.push(("tokens", t.to_string()));
|
||||
|
||||
Reference in New Issue
Block a user