From 8301dcf9f8a96a29994a7bf50834dd9147265d1e Mon Sep 17 00:00:00 2001 From: abhay-codes07 Date: Mon, 13 Jul 2026 10:34:28 +0530 Subject: [PATCH] fix(agent-framework): restore importability on current agent-framework-core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package pins agent-framework-core>=1.0.0rc3 but imports BaseContextProvider, which only existed in the rc series — it was renamed to ContextProvider in 1.0.0 stable. Every version pip resolves today (1.0.0 through 1.11.0) satisfies the pin and lacks the symbol, so a fresh `pip install supermemory-agent-framework` yields a package that cannot even be imported: `from supermemory_agent_framework import ...` raises ImportError via the eager package __init__. The rename is interface-neutral: both classes take __init__(source_id: str) and expose before_run/after_run with byte-identical keyword-only signatures (verified with inspect against 1.0.0rc3 and 1.11.0). Fall back to ContextProvider when BaseContextProvider is absent, keeping rc3 compatibility. Verified by running the full test suite (54 tests) twice in clean venvs: once against agent-framework-core==1.0.0rc3 and once against 1.11.0 — all pass on both. --- .../src/supermemory_agent_framework/context_provider.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py b/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py index 9069630ee..5359426e2 100644 --- a/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py +++ b/packages/agent-framework-python/src/supermemory_agent_framework/context_provider.py @@ -9,7 +9,13 @@ from typing import Any, Literal, Optional -from agent_framework import BaseContextProvider +try: + from agent_framework import BaseContextProvider +except ImportError: + # Renamed in agent-framework-core 1.0.0 stable; the interface is + # unchanged (source_id __init__, before_run/after_run hooks with + # identical keyword-only signatures). + from agent_framework import ContextProvider as BaseContextProvider from .connection import AgentSupermemory from .utils import (