release: v0.11.0 — error unification, LLM tool forwarding, MCP spec compliance#52
Closed
epicsagas wants to merge 4 commits into
Closed
release: v0.11.0 — error unification, LLM tool forwarding, MCP spec compliance#52epicsagas wants to merge 4 commits into
epicsagas wants to merge 4 commits into
Conversation
Unify the public error surface: the `embedding` and `discovery` subsystems now return `crate::error::Result` (`KernelError`) instead of `anyhow::Result`, so `anyhow` no longer leaks through the library's public API. Adds `KernelError::Embedding` and `KernelError::Discovery` variants (plus `KernelError::embedding` / `::discovery` constructors). Touches the `EmbeddingProvider` / `VectorIndex` / `AsyncVectorIndex` traits, all provider and index constructors, `DiscoverySource`, `chunk_batch`, the `discovery::fetch*` functions, and `provider::sync::*`. Also guards `LazyFastembedProvider::embed_batch` against an index-out-of-bounds panic when the inner provider returns fewer vectors than inputs (a truncated or malformed response now returns a `KernelError::Embedding`). BREAKING CHANGE: embedding and discovery APIs return `KernelError` instead of `anyhow::Error`; downstream code matching on the error type must be updated.
`LLMRequest::tools` and `response_format` are now sent to the provider APIs instead of being silently dropped: OpenAI receives `tools` (`type: "function"`) and `response_format` (`json_object` / `json_schema`); Anthropic receives `tools` (with `input_schema`) and, for `ResponseFormat::JsonSchema`, `output_config.format`. Tool calls the model makes are parsed back into the new `LLMResponse::tool_calls` (from OpenAI `tool_calls` and Anthropic `tool_use` blocks); `finish_reason`, `id`, and `created` are now captured too. Also offloads the synchronous `KvStore` read/write in `CacheClient::complete` to `tokio::task::spawn_blocking`, so a slow or remote store (or a single-threaded runtime) no longer blocks the async reactor on the hot path.
- protocol-version negotiation in `initialize` (2025-06-18 / 2025-03-26 / 2024-11-05), proposing the server's latest when the client's is unsupported - `ping`, prompts (`prompts/list`, `prompts/get`, `register_prompt` / `set_prompt_handler`, `PromptDescription` / `PromptArgument`), and `resources/templates/list`; the `prompts` capability is advertised when prompts are registered - correct wire-format field names: `inputSchema` (was `input_schema`) and `mimeType` (was `mime_type`) - JSON-RPC request ids are preserved verbatim (string or number), per JSON-RPC 2.0 - `tools/call` reports execution failures in-band as a result with `isError: true`, reserving the `-32602` error path for an unknown tool Applies to both the stdio and HTTP/SSE transports.
- docs: bump version pins to 0.11.0 (README, QUICKSTART, 10 i18n READMEs); fix the MCP quick-start example (non-existent `Tool`/`JsonRpcRequest` → `ToolDescription`) across all 11 files; propagate the v0.10.0 graph-algorithm content into every feature table; refresh ROADMAP/PROGRESS; fix SECURITY supported-versions table and the CODE_OF_CONDUCT enforcement contact - ci: add isolated per-feature build/test matrix entries (mcp, mcp-http, tokens, safety, telemetry, search, federation, cache, embedding, vector-index, install, graph-* …) so a missing `#[cfg]` gate is caught even when a sibling feature is not co-enabled - Cargo.toml: document the eval/eval-full exclusion from `full` - bump version to 0.11.0, refresh CHANGELOG and lockfile
Owner
Author
|
Superseded by the rebased v0.13.0 PR — this branch was based on a stale local main (v0.10.0); v0.11.0/v0.12.0 were already released. Reopened correctly rebased onto v0.12.0 and versioned 0.13.0. |
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.
Ships v0.11.0. Addresses every finding from the quality review plus MCP spec alignment.
Highlights
embedding+discoverypublic APIs returnKernelErrorinstead ofanyhow::Result— no moreanyhowin the library's public surface.LLMRequest::toolsandresponse_formatare now forwarded to OpenAI/Anthropic (were silently dropped); tool calls are parsed back intoLLMResponse::tool_calls.ping, prompts, string/number JSON-RPC ids,tools/callin-bandisError, and correct wire format (inputSchema/mimeType).LazyFastembedProvider::embed_batchpanic on truncated provider responses;CacheClientoffloads blocking store I/O viaspawn_blocking.ToolDescription) across README + 10 i18n, graph-algorithm content propagated, ROADMAP/PROGRESS/SECURITY/CoC refreshed.Verification (local)
cargo test --all-features— 593 passed, 0 failed, 13 ignoredcargo clippy --all-features -- -D warnings— cleancargo fmt --all -- --check— cleanRUSTDOCFLAGS=-D warnings cargo doc --all-features --no-deps— clean--release --all-features— okBreaking change
Downstream code matching on
anyhow::Errorfrom embedding/discovery must switch toKernelError. See CHANGELOG for the full list.🤖 Generated with Claude Code