honcho/src
ajspig 14538cfc90
Abigail/conclusions level filter (#851)
* feat(conclusions): expose reasoning level + allow filtering by level

The `level` of a conclusion (explicit / deductive / inductive /
contradiction) was filterable server-side but stripped from the
`Conclusion` response and not surfaced in either SDK. This adds it
end-to-end so callers can list explicit-only ("not dreamed on")
conclusions without dropping to raw HTTP.

- api: add `level` to the Conclusion response schema
- python sdk: `ConclusionLevel` type, `level` on Conclusion/response,
  `level=` kwarg on ConclusionScope.list() and the async variant
- ts sdk: `ConclusionLevel` type, `level` on Conclusion/response,
  `level` option on list()
- tests: assert level is exposed; add level-filter list test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(conclusions): use generic filters= on list() instead of level= kwarg

Match the documented SDK convention (peers/sessions/messages all take a
generic `filters` dict passed through to the same dynamic server-side
filter logic) instead of a one-off `level=` kwarg. `level` filtering now
works as `list(filters={"level": "explicit"})` alongside any other
supported filter/operator.

The `level` field on the Conclusion response (added in the previous
commit) is kept — it's still not otherwise returned by the API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(conclusions): allow filtering by level on query() in py + ts SDKs

The branch's level-filter work exposed `filters=` on `list()` but left
`query()` (semantic search) hardcoding `{observer, observed}`, so callers
could filter the list endpoint by reasoning level but not semantic search —
asymmetric in both SDKs.

- Python: add keyword-only `filters` to `ConclusionScope.query` and
  `ConclusionScopeAio.query`, merged over the scope's observer/observed.
- TypeScript: add optional `filters` arg to `ConclusionScope.query`,
  mirroring the existing `list()` change.

The server `/conclusions/query` endpoint already honors filters in the body
(verified against production), so this is purely SDK surface parity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(filters): document filtering conclusions by reasoning level

The using-filters page covered workspaces/peers/sessions/messages but not
conclusions. Add a "Filtering Conclusions" section showing level-based
filtering on both list() and query(), including the common "explicit only"
(exclude dream-derived) case and the in[deductive,inductive] inverse.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(conclusions): simplify filter merge to a single dict spread

Replace the merged_filters + if-block pattern in list()/query() (py sync,
aio, ts) with a single dict spread that layers the caller's filters over the
scope's observer/observed (and session). No behavior change — same merge
order (caller wins) — just less code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(conclusions): reject scope-managed keys in SDK conclusion filters

The generic filters= argument on ConclusionScope.list()/query() spread
user-supplied filters last, so a stray observer/observed/session key
silently overrode the scope and returned data from a different peer
pair. Add a fail-loud guard in both the Python and TypeScript SDKs that
rejects scope-managed filter keys with a clear error, directing callers
to peer.conclusions / conclusions_of(target) and the session= parameter.
session_id remains a valid filter on query() (which has no dedicated
session parameter).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2026-07-01 10:48:01 -04:00
..
cache perf: add redis caching and reduce embedding API calls (#372) 2026-02-13 00:53:46 -05:00
crud feat: add exact content deduplication in document creation (#861) 2026-07-01 10:42:56 -04:00
deriver fix: compact honcho logging (#836) 2026-06-23 15:55:03 -04:00
dialectic Track user and session ID on Langfuse traces (#814) 2026-06-23 00:03:21 -04:00
dreamer fix: compact honcho logging (#836) 2026-06-23 15:55:03 -04:00
llm fix: translate canonical tool_choice in OpenAI backend for cross-provider fallback (#850) 2026-06-26 12:48:02 -04:00
reconciler fix: compact honcho logging (#836) 2026-06-23 15:55:03 -04:00
routers Fix scoped JWTs (#679) 2026-06-22 17:30:00 -04:00
schemas Abigail/conclusions level filter (#851) 2026-07-01 10:48:01 -04:00
startup Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
telemetry fix(llm): stop capturing live LLM clients in Langfuse generation spans (#849) 2026-06-26 11:25:26 -04:00
utils fix: checker bug_fix (#840) 2026-06-24 10:55:45 -04:00
vector_store feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00
webhooks Tighten Transaction Scopes (#525) 2026-04-08 11:14:50 -04:00
__init__.py v0.0.8 Documentation Updates (#55) 2024-05-15 00:07:25 -04:00
_version.py feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00
config.py fix: compact honcho logging (#836) 2026-06-23 15:55:03 -04:00
db.py add read db (#773) 2026-06-10 13:28:36 -04:00
dependencies.py add read db (#773) 2026-06-10 13:28:36 -04:00
embedding_client.py feat: defer embedding messages (#704) 2026-06-11 10:31:04 -04:00
exceptions.py Turbopuffer and LanceDB Integration (#287) 2026-01-16 17:04:01 -05:00
main.py feat: add route-level latency metrics (#837) 2026-06-23 14:41:33 -04:00
models.py Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
security.py Fix scoped JWTs (#679) 2026-06-22 17:30:00 -04:00