diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 49716a9..5b9eb92 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.47.0" + ".": "3.48.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8e10da6..07becdc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 26 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-3e34ab6d0648da8c95f7cc0721a76f19137c7b165c14e038f67e5070e6f85200.yml -openapi_spec_hash: d940a39080b2245905ef1117d9d4f16e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-62ed5d466e259c8e4311abe68915161cd0a01d1cc6d9079945eb8a0ebf73f690.yml +openapi_spec_hash: 9622631943e5355eb6923e0c2e12f772 config_hash: cde97ef3188581c5f4924c633ec33ddb diff --git a/CHANGELOG.md b/CHANGELOG.md index 11da98e..6ce7b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.48.0 (2026-06-20) + +Full Changelog: [v3.47.0...v3.48.0](https://github.com/supermemoryai/python-sdk/compare/v3.47.0...v3.48.0) + +### Features + +* **api:** api update ([9ed1cba](https://github.com/supermemoryai/python-sdk/commit/9ed1cba81d04a41687621bc6ce66217527b06a31)) + ## 3.47.0 (2026-06-18) Full Changelog: [v3.46.0...v3.47.0](https://github.com/supermemoryai/python-sdk/compare/v3.46.0...v3.47.0) diff --git a/pyproject.toml b/pyproject.toml index 6d13cc8..31c609c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.47.0" +version = "3.48.0" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/supermemory/_client.py b/src/supermemory/_client.py index d71473d..b6f5e0a 100644 --- a/src/supermemory/_client.py +++ b/src/supermemory/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import TYPE_CHECKING, Any, Dict, Union, Mapping +from typing import TYPE_CHECKING, Any, Dict, List, Union, Mapping from typing_extensions import Self, Literal, override import httpx @@ -334,7 +334,9 @@ def profile( self, *, container_tag: str, + buckets: SequenceNotStr[str] | Omit = omit, filters: client_profile_params.Filters | Omit = omit, + include: List[Literal["static", "dynamic", "buckets"]] | Omit = omit, q: str | Omit = omit, threshold: float | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -351,9 +353,15 @@ def profile( container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter memories. + buckets: Specific bucket keys to return. Omit to return all configured buckets. Only + relevant when "buckets" is included. + filters: Optional metadata filters to apply to profile results and search results. Supports complex AND/OR queries with multiple conditions. + include: Profile sections to return. Omit to return all sections. Pass a subset to reduce + payload — e.g. ["buckets"] skips static and dynamic entirely. + q: Optional search query to include search results in the response threshold: Threshold for search results. Only results with a score above this threshold @@ -372,7 +380,9 @@ def profile( body=maybe_transform( { "container_tag": container_tag, + "buckets": buckets, "filters": filters, + "include": include, "q": q, "threshold": threshold, }, @@ -681,7 +691,9 @@ async def profile( self, *, container_tag: str, + buckets: SequenceNotStr[str] | Omit = omit, filters: client_profile_params.Filters | Omit = omit, + include: List[Literal["static", "dynamic", "buckets"]] | Omit = omit, q: str | Omit = omit, threshold: float | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -698,9 +710,15 @@ async def profile( container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter memories. + buckets: Specific bucket keys to return. Omit to return all configured buckets. Only + relevant when "buckets" is included. + filters: Optional metadata filters to apply to profile results and search results. Supports complex AND/OR queries with multiple conditions. + include: Profile sections to return. Omit to return all sections. Pass a subset to reduce + payload — e.g. ["buckets"] skips static and dynamic entirely. + q: Optional search query to include search results in the response threshold: Threshold for search results. Only results with a score above this threshold @@ -719,7 +737,9 @@ async def profile( body=await async_maybe_transform( { "container_tag": container_tag, + "buckets": buckets, "filters": filters, + "include": include, "q": q, "threshold": threshold, }, diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index e41acad..4635866 100644 --- a/src/supermemory/_version.py +++ b/src/supermemory/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "supermemory" -__version__ = "3.47.0" # x-release-please-version +__version__ = "3.48.0" # x-release-please-version diff --git a/src/supermemory/resources/settings.py b/src/supermemory/resources/settings.py index 9bde5d5..d191459 100644 --- a/src/supermemory/resources/settings.py +++ b/src/supermemory/resources/settings.py @@ -65,6 +65,7 @@ def update( onedrive_client_id: Optional[str] | Omit = omit, onedrive_client_secret: Optional[str] | Omit = omit, onedrive_custom_key_enabled: Optional[bool] | Omit = omit, + profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit, should_llm_filter: Optional[bool] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -77,6 +78,8 @@ def update( Update settings for an organization Args: + profile_buckets: Profile bucket definitions + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -105,6 +108,7 @@ def update( "onedrive_client_id": onedrive_client_id, "onedrive_client_secret": onedrive_client_secret, "onedrive_custom_key_enabled": onedrive_custom_key_enabled, + "profile_buckets": profile_buckets, "should_llm_filter": should_llm_filter, }, setting_update_params.SettingUpdateParams, @@ -176,6 +180,7 @@ async def update( onedrive_client_id: Optional[str] | Omit = omit, onedrive_client_secret: Optional[str] | Omit = omit, onedrive_custom_key_enabled: Optional[bool] | Omit = omit, + profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit, should_llm_filter: Optional[bool] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -188,6 +193,8 @@ async def update( Update settings for an organization Args: + profile_buckets: Profile bucket definitions + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -216,6 +223,7 @@ async def update( "onedrive_client_id": onedrive_client_id, "onedrive_client_secret": onedrive_client_secret, "onedrive_custom_key_enabled": onedrive_custom_key_enabled, + "profile_buckets": profile_buckets, "should_llm_filter": should_llm_filter, }, setting_update_params.SettingUpdateParams, diff --git a/src/supermemory/types/client_profile_params.py b/src/supermemory/types/client_profile_params.py index c4f5daa..5e9f03b 100644 --- a/src/supermemory/types/client_profile_params.py +++ b/src/supermemory/types/client_profile_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import List, Union, Iterable from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo __all__ = [ @@ -335,12 +336,25 @@ class ClientProfileParams(TypedDict, total=False): to use to filter memories. """ + buckets: SequenceNotStr[str] + """Specific bucket keys to return. + + Omit to return all configured buckets. Only relevant when "buckets" is included. + """ + filters: Filters """Optional metadata filters to apply to profile results and search results. Supports complex AND/OR queries with multiple conditions. """ + include: List[Literal["static", "dynamic", "buckets"]] + """Profile sections to return. + + Omit to return all sections. Pass a subset to reduce payload — e.g. ["buckets"] + skips static and dynamic entirely. + """ + q: str """Optional search query to include search results in the response""" diff --git a/src/supermemory/types/profile_response.py b/src/supermemory/types/profile_response.py index 0dc06cc..3ddaf6b 100644 --- a/src/supermemory/types/profile_response.py +++ b/src/supermemory/types/profile_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from pydantic import Field as FieldInfo @@ -10,10 +10,13 @@ class Profile(BaseModel): - dynamic: List[str] + buckets: Optional[Dict[str, List[str]]] = None + """Per-bucket memory lists, keyed by bucket key""" + + dynamic: Optional[List[str]] = None """Dynamic profile information (recent memories)""" - static: List[str] + static: Optional[List[str]] = None """Static profile information that remains relevant long-term""" diff --git a/src/supermemory/types/setting_get_response.py b/src/supermemory/types/setting_get_response.py index 4debad8..f558944 100644 --- a/src/supermemory/types/setting_get_response.py +++ b/src/supermemory/types/setting_get_response.py @@ -6,7 +6,17 @@ from .._models import BaseModel -__all__ = ["SettingGetResponse"] +__all__ = ["SettingGetResponse", "ProfileBucket"] + + +class ProfileBucket(BaseModel): + """Definition of a single profile bucket""" + + key: str + """Stable slug for the bucket, stored on each memory""" + + description: Optional[str] = None + """What belongs in this bucket — used to guide the ingestion classifier.""" class SettingGetResponse(BaseModel): @@ -46,4 +56,7 @@ class SettingGetResponse(BaseModel): onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None) + profile_buckets: Optional[List[ProfileBucket]] = FieldInfo(alias="profileBuckets", default=None) + """Profile bucket definitions""" + should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None) diff --git a/src/supermemory/types/setting_update_params.py b/src/supermemory/types/setting_update_params.py index 36ea3c6..5e9d2c9 100644 --- a/src/supermemory/types/setting_update_params.py +++ b/src/supermemory/types/setting_update_params.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["SettingUpdateParams"] +__all__ = ["SettingUpdateParams", "ProfileBucket"] class SettingUpdateParams(TypedDict, total=False): @@ -47,4 +47,17 @@ class SettingUpdateParams(TypedDict, total=False): onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")] + profile_buckets: Annotated[Iterable[ProfileBucket], PropertyInfo(alias="profileBuckets")] + """Profile bucket definitions""" + should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")] + + +class ProfileBucket(TypedDict, total=False): + """Definition of a single profile bucket""" + + key: Required[str] + """Stable slug for the bucket, stored on each memory""" + + description: str + """What belongs in this bucket — used to guide the ingestion classifier.""" diff --git a/src/supermemory/types/setting_update_response.py b/src/supermemory/types/setting_update_response.py index 7fd1e58..11f8080 100644 --- a/src/supermemory/types/setting_update_response.py +++ b/src/supermemory/types/setting_update_response.py @@ -6,7 +6,17 @@ from .._models import BaseModel -__all__ = ["SettingUpdateResponse", "Updated"] +__all__ = ["SettingUpdateResponse", "Updated", "UpdatedProfileBucket"] + + +class UpdatedProfileBucket(BaseModel): + """Definition of a single profile bucket""" + + key: str + """Stable slug for the bucket, stored on each memory""" + + description: Optional[str] = None + """What belongs in this bucket — used to guide the ingestion classifier.""" class Updated(BaseModel): @@ -46,6 +56,9 @@ class Updated(BaseModel): onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None) + profile_buckets: Optional[List[UpdatedProfileBucket]] = FieldInfo(alias="profileBuckets", default=None) + """Profile bucket definitions""" + should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None) diff --git a/tests/api_resources/test_client.py b/tests/api_resources/test_client.py index c4511bd..4af3e8c 100644 --- a/tests/api_resources/test_client.py +++ b/tests/api_resources/test_client.py @@ -81,6 +81,7 @@ def test_method_profile(self, client: Supermemory) -> None: def test_method_profile_with_all_params(self, client: Supermemory) -> None: client_ = client.profile( container_tag="containerTag", + buckets=["string"], filters={ "or_": [ { @@ -93,6 +94,7 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None: } ] }, + include=["static"], q="q", threshold=0, ) @@ -194,6 +196,7 @@ async def test_method_profile(self, async_client: AsyncSupermemory) -> None: async def test_method_profile_with_all_params(self, async_client: AsyncSupermemory) -> None: client = await async_client.profile( container_tag="containerTag", + buckets=["string"], filters={ "or_": [ { @@ -206,6 +209,7 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo } ] }, + include=["static"], q="q", threshold=0, ) diff --git a/tests/api_resources/test_settings.py b/tests/api_resources/test_settings.py index 6aa9fde..ce41b4f 100644 --- a/tests/api_resources/test_settings.py +++ b/tests/api_resources/test_settings.py @@ -43,6 +43,12 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: onedrive_client_id="onedriveClientId", onedrive_client_secret="onedriveClientSecret", onedrive_custom_key_enabled=True, + profile_buckets=[ + { + "key": "key", + "description": "description", + } + ], should_llm_filter=True, ) assert_matches_type(SettingUpdateResponse, setting, path=["response"]) @@ -129,6 +135,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor onedrive_client_id="onedriveClientId", onedrive_client_secret="onedriveClientSecret", onedrive_custom_key_enabled=True, + profile_buckets=[ + { + "key": "key", + "description": "description", + } + ], should_llm_filter=True, ) assert_matches_type(SettingUpdateResponse, setting, path=["response"])