Skip to content

mentra 0.28.0 / mentra-provider 0.9.0

Choose a tag to compare

@WendellXY WendellXY released this 09 Sep 02:38
· 83 commits to main since this release
Immutable release. Only release title and notes can be modified.

Removed the RegisteredProvider alias

  • Breaking: mentra_provider::RegisteredProvider is removed. It was a bare
    pub use Provider as RegisteredProvider; with no callers outside the crate's
    own provider impls; use Provider.

Folded ModelCatalog and ProviderSessionFactory into Provider

  • Breaking: the ModelCatalog and ProviderSessionFactory traits are
    removed; list_models and create_session are now required methods on
    Provider itself. Every implementor in the workspace already implemented all
    three traits on the same type, and neither trait was ever used as a dyn type
    or a generic bound. External implementors merge their two impl blocks into
    their Provider impl.

Removed the unread RetryPolicy provider config

  • Breaking: mentra::RetryPolicy / mentra_provider::RetryPolicy and the
    ProviderDefinition::retry field are removed. No code in the workspace ever
    read the policy; per-run retry behavior is configured with
    RunOptions::provider_retry (mentra::runtime::ProviderRetry) and is
    unchanged. Serialized ProviderDefinition JSON carrying a retry key still
    deserializes (the key is ignored).

Removed two unused OAuth credential-source constructors

  • Breaking (feature openai-oauth):
    OpenAIOAuthCredentialSource::from_default_persistent_store and
    ::from_default_persistent_store_or_authorize are removed. Both were
    one-line defaults with no callers; pass PersistentTokenStoreKind::Auto to
    from_persistent_store / from_persistent_store_or_authorize for the
    identical behavior.

Removed the test-only MemoryTokenStore

  • Breaking (feature openai-oauth): mentra::auth::openai::MemoryTokenStore
    is removed. Nothing in the crate constructed it outside its own unit test; the
    in-memory store now lives in that test module. The TokenStore trait stays
    public, so an in-memory store is a few lines to write.

Removed the duplicate provider::model re-export module

  • Breaking: mentra::provider::model is removed. Every item it re-exported
    is already re-exported one level up at mentra::provider::* (and at
    mentra::provider_core::*); import from there instead.

Builtin providers are constructor functions, not forwarding types

  • Breaking: the seven forwarding wrapper types in mentra::provider are
    removed: openai::OpenAIProvider, openrouter::OpenRouterProvider,
    anthropic::AnthropicProvider, gemini::GeminiProvider,
    openai_compatible::OpenAiCompatibleProvider, ollama::OllamaProvider and
    lmstudio::LmStudioProvider. Each held a single Arc<dyn Provider> and
    forwarded every trait method to it verbatim.
  • Free functions returning Arc<dyn Provider> replace them, with the same
    arguments and the same resulting descriptor and capabilities:
    openai::provider, openai::with_credential_source,
    openai::with_shared_credential_source, openrouter::provider,
    anthropic::provider, gemini::provider, openai_compatible::new,
    openai_compatible::without_credentials, ollama::provider,
    ollama::with_base_url, lmstudio::provider, lmstudio::with_base_url.
  • Provider is now implemented for Arc<dyn Provider>, so the results go
    straight into RuntimeBuilder::with_provider_instance and
    Runtime::register_provider_instance as before.
  • Behavior change (Anthropic, Gemini): the removed AnthropicProvider and
    GeminiProvider wrappers did not forward compact, so provider-native
    history compaction always failed with UnsupportedCapability and the
    compaction engine silently fell back to local summarization even though both
    providers advertise supports_history_compaction. Without the wrappers the
    compact call now reaches the real provider, so runtimes built with
    with_anthropic / with_gemini compact remotely under
    CompactionMode::PreferRemote and report CompactionExecutionMode::Remote
    where they previously reported Local. Set CompactionMode::LocalOnly (the default) to keep
    the old behavior.

Agent state no longer carries an empty compaction key

  • The always-empty CompactionState placeholder is gone from
    AgentMemoryState and from the state.json / SQLite state payload. Agent
    state written by older versions still loads; state written now cannot be
    read by an older build.

Removed the unused SearchRequest conversion struct

  • Breaking: mentra::memory::SearchRequest is removed. Nothing
    constructed it; every caller builds a MemorySearchRequest directly.
  • MemoryEngine::search now takes MemorySearchRequest by value instead of
    impl Into<MemorySearchRequest>.

Removed the never-read MemorySearchRequest::mode knob

  • Breaking: mentra::memory::MemorySearchMode and the
    MemorySearchRequest::mode field are removed. No MemoryStore
    implementation ever branched on the value, so search results are unchanged.

Removed unreachable McpServerStatus variants

  • Breaking: McpServerStatus::Disconnected and ::Connecting are removed
    from the mentra::McpServerStatus re-export. Nothing ever constructed them:
    list_servers reports Connected for a live server and Error for a name
    that only failed to connect, and a disconnected server is dropped from the
    listing rather than reported. Out-of-repo match arms on those variants must
    be deleted.

MCP clients share one dispatch mechanism

  • McpBridgedTool::new is no longer generic over the transport; it takes
    Arc<dyn McpToolClient>. Call sites passing a concrete Arc<McpStdioClient>
    or Arc<McpSseClient> are unaffected, because the Arc coerces at the
    argument position.
  • The sealed McpToolClient trait gains a shutdown method, replacing the
    manager's private transport enum. The trait is sealed, so no out-of-crate
    implementor exists to update.

Resumed sessions can opt into a different runtime namespace

  • SessionResumeOptions::runtime_identifier lets a host rehome a legacy or
    renamed-workspace session on its next persist. None keeps the stored tag;
    Some(id) replaces it for that resumed session without retagging other
    agents or changing the shared runtime's identifier
    (#59).
  • Source-breaking: exhaustive SessionResumeOptions struct literals must
    add runtime_identifier: None or use ..Default::default().

Removed unused PermissionRequest type

  • Source-breaking: the public mentra::PermissionRequest struct is removed.
    Nothing produced or consumed it; the live path is the
    SessionEvent::PermissionRequested variant and its inline fields.

Removed duplicate SubagentHandle::task_id

  • Source-breaking: SubagentHandle::task_id is removed. It always held the
    same value as agent_id, which is the identifier reported as the task_id
    of the subagent's SessionEvent::TaskUpdated events.

Removed unused CancellationFlag alias

  • Source-breaking: the mentra::runtime::CancellationFlag type alias is
    removed; use mentra::runtime::CancellationToken, which it aliased.

Removed unused compaction type aliases

  • Source-breaking: the mentra::agent aliases ContextCompactionConfig,
    ContextCompactionTrigger and ContextCompactionDetails are removed; use
    CompactionConfig, CompactionTrigger and CompactionDetails. The persisted
    context_compaction field name keeps working through its serde alias.