acontext 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. acontext-0.0.10/PKG-INFO +34 -0
  2. acontext-0.0.10/README.md +19 -0
  3. {acontext-0.0.9 → acontext-0.0.10}/pyproject.toml +1 -1
  4. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/async_sessions.py +2 -2
  5. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/sessions.py +2 -2
  6. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/session.py +33 -1
  7. acontext-0.0.9/PKG-INFO +0 -661
  8. acontext-0.0.9/README.md +0 -646
  9. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/__init__.py +0 -0
  10. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/_constants.py +0 -0
  11. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/_utils.py +0 -0
  12. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/agent/__init__.py +0 -0
  13. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/agent/base.py +0 -0
  14. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/agent/disk.py +0 -0
  15. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/async_client.py +0 -0
  16. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/client.py +0 -0
  17. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/client_types.py +0 -0
  18. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/errors.py +0 -0
  19. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/messages.py +0 -0
  20. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/py.typed +0 -0
  21. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/__init__.py +0 -0
  22. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/async_blocks.py +0 -0
  23. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/async_disks.py +0 -0
  24. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/async_spaces.py +0 -0
  25. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/async_tools.py +0 -0
  26. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/blocks.py +0 -0
  27. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/disks.py +0 -0
  28. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/spaces.py +0 -0
  29. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/resources/tools.py +0 -0
  30. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/__init__.py +0 -0
  31. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/block.py +0 -0
  32. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/disk.py +0 -0
  33. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/space.py +0 -0
  34. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/types/tool.py +0 -0
  35. {acontext-0.0.9 → acontext-0.0.10}/src/acontext/uploads.py +0 -0
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.3
2
+ Name: acontext
3
+ Version: 0.0.10
4
+ Summary: Python SDK for the Acontext API
5
+ Keywords: acontext,sdk,client,api
6
+ Requires-Dist: httpx>=0.28.1
7
+ Requires-Dist: openai>=2.6.1
8
+ Requires-Dist: anthropic>=0.72.0
9
+ Requires-Dist: pydantic>=2.12.3
10
+ Requires-Python: >=3.10
11
+ Project-URL: Homepage, https://github.com/memodb-io/Acontext
12
+ Project-URL: Issues, https://github.com/memodb-io/Acontext/issues
13
+ Project-URL: Repository, https://github.com/memodb-io/Acontext
14
+ Description-Content-Type: text/markdown
15
+
16
+ ## acontext client for python
17
+
18
+ Python SDK for interacting with the Acontext REST API.
19
+
20
+ ### Installation
21
+
22
+ ```bash
23
+ pip install acontext
24
+ ```
25
+
26
+ > Requires Python 3.10 or newer.
27
+
28
+
29
+
30
+
31
+
32
+ # 🔍 Document
33
+
34
+ To understand more about this SDK, please view [our docs](https://docs.acontext.io/) and [api references](https://docs.acontext.io/api-reference/introduction)
@@ -0,0 +1,19 @@
1
+ ## acontext client for python
2
+
3
+ Python SDK for interacting with the Acontext REST API.
4
+
5
+ ### Installation
6
+
7
+ ```bash
8
+ pip install acontext
9
+ ```
10
+
11
+ > Requires Python 3.10 or newer.
12
+
13
+
14
+
15
+
16
+
17
+ # 🔍 Document
18
+
19
+ To understand more about this SDK, please view [our docs](https://docs.acontext.io/) and [api references](https://docs.acontext.io/api-reference/introduction)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "acontext"
3
- version = "0.0.9"
3
+ version = "0.0.10"
4
4
  description = "Python SDK for the Acontext API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -167,7 +167,7 @@ class AsyncSessionsAPI:
167
167
  )
168
168
  return GetTasksOutput.model_validate(data)
169
169
 
170
- async def send_message(
170
+ async def store_message(
171
171
  self,
172
172
  session_id: str,
173
173
  *,
@@ -181,7 +181,7 @@ class AsyncSessionsAPI:
181
181
  | None
182
182
  ) = None,
183
183
  ) -> Message:
184
- """Send a message to a session.
184
+ """Store a message to a session.
185
185
 
186
186
  Args:
187
187
  session_id: The UUID of the session.
@@ -171,7 +171,7 @@ class SessionsAPI:
171
171
  )
172
172
  return GetTasksOutput.model_validate(data)
173
173
 
174
- def send_message(
174
+ def store_message(
175
175
  self,
176
176
  session_id: str,
177
177
  *,
@@ -185,7 +185,7 @@ class SessionsAPI:
185
185
  | None
186
186
  ) = None,
187
187
  ) -> Message:
188
- """Send a message to a session.
188
+ """Store a message to a session.
189
189
 
190
190
  Args:
191
191
  session_id: The UUID of the session.
@@ -30,6 +30,34 @@ class RemoveToolResultStrategy(TypedDict):
30
30
  params: RemoveToolResultParams
31
31
 
32
32
 
33
+ class RemoveToolCallParamsParams(TypedDict, total=False):
34
+ """Parameters for the remove_tool_call_params edit strategy.
35
+
36
+ Attributes:
37
+ keep_recent_n_tool_calls: Number of most recent tool calls to keep with full parameters.
38
+ Defaults to 3 if not specified.
39
+ """
40
+
41
+ keep_recent_n_tool_calls: NotRequired[int]
42
+
43
+
44
+
45
+ class RemoveToolCallParamsStrategy(TypedDict):
46
+ """Edit strategy to remove parameters from old tool-call parts.
47
+
48
+ Keeps the most recent N tool calls with full parameters, replacing older
49
+ tool call arguments with empty JSON "{}". The tool call ID and name remain
50
+ intact so tool-results can still reference them.
51
+
52
+ Example:
53
+ {"type": "remove_tool_call_params", "params": {"keep_recent_n_tool_calls": 5}}
54
+ """
55
+
56
+ type: Literal["remove_tool_call_params"]
57
+ params: RemoveToolCallParamsParams
58
+
59
+
60
+
33
61
  class TokenLimitParams(TypedDict):
34
62
  """Parameters for the token_limit edit strategy.
35
63
 
@@ -59,7 +87,7 @@ class TokenLimitStrategy(TypedDict):
59
87
 
60
88
  # Union type for all edit strategies
61
89
  # When adding new strategies, add them to this Union: EditStrategy = Union[RemoveToolResultStrategy, OtherStrategy, ...]
62
- EditStrategy = Union[RemoveToolResultStrategy, TokenLimitStrategy]
90
+ EditStrategy = Union[RemoveToolResultStrategy, RemoveToolCallParamsStrategy, TokenLimitStrategy]
63
91
 
64
92
 
65
93
  class Asset(BaseModel):
@@ -187,6 +215,10 @@ class GetMessagesOutput(BaseModel):
187
215
  ...,
188
216
  description="List of messages in the requested format (Message, OpenAI format, or Anthropic format)",
189
217
  )
218
+ ids: list[str] = Field(
219
+ ...,
220
+ description="List of message UUIDs corresponding to each item in the same order",
221
+ )
190
222
  next_cursor: str | None = Field(None, description="Cursor for pagination")
191
223
  has_more: bool = Field(..., description="Whether there are more items")
192
224
  public_urls: dict[str, PublicURL] | None = Field(