acontext 0.1.6__tar.gz → 0.1.7__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 (41) hide show
  1. {acontext-0.1.6 → acontext-0.1.7}/PKG-INFO +1 -1
  2. {acontext-0.1.6 → acontext-0.1.7}/pyproject.toml +1 -1
  3. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_sessions.py +13 -0
  4. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/sessions.py +13 -0
  5. {acontext-0.1.6 → acontext-0.1.7}/README.md +0 -0
  6. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/__init__.py +0 -0
  7. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/_constants.py +0 -0
  8. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/_utils.py +0 -0
  9. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/__init__.py +0 -0
  10. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/base.py +0 -0
  11. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/disk.py +0 -0
  12. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/prompts.py +0 -0
  13. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/sandbox.py +0 -0
  14. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/skill.py +0 -0
  15. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/agent/text_editor.py +0 -0
  16. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/async_client.py +0 -0
  17. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/client.py +0 -0
  18. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/client_types.py +0 -0
  19. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/errors.py +0 -0
  20. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/messages.py +0 -0
  21. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/py.typed +0 -0
  22. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/__init__.py +0 -0
  23. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_disks.py +0 -0
  24. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_sandboxes.py +0 -0
  25. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_skills.py +0 -0
  26. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_tools.py +0 -0
  27. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/async_users.py +0 -0
  28. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/disks.py +0 -0
  29. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/sandboxes.py +0 -0
  30. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/skills.py +0 -0
  31. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/tools.py +0 -0
  32. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/resources/users.py +0 -0
  33. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/__init__.py +0 -0
  34. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/common.py +0 -0
  35. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/disk.py +0 -0
  36. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/sandbox.py +0 -0
  37. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/session.py +0 -0
  38. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/skill.py +0 -0
  39. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/tool.py +0 -0
  40. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/types/user.py +0 -0
  41. {acontext-0.1.6 → acontext-0.1.7}/src/acontext/uploads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: acontext
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Python SDK for the Acontext API
5
5
  Keywords: acontext,sdk,client,api
6
6
  Requires-Dist: httpx>=0.28.1
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "acontext"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "Python SDK for the Acontext API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -40,6 +40,7 @@ class AsyncSessionsAPI:
40
40
  limit: int | None = None,
41
41
  cursor: str | None = None,
42
42
  time_desc: bool | None = None,
43
+ filter_by_configs: Mapping[str, Any] | None = None,
43
44
  ) -> ListSessionsOutput:
44
45
  """List all sessions in the project.
45
46
 
@@ -48,13 +49,25 @@ class AsyncSessionsAPI:
48
49
  limit: Maximum number of sessions to return. Defaults to None.
49
50
  cursor: Cursor for pagination. Defaults to None.
50
51
  time_desc: Order by created_at descending if True, ascending if False. Defaults to None.
52
+ filter_by_configs: Filter by session configs using JSONB containment.
53
+ Only sessions where configs contains all key-value pairs in this
54
+ dict will be returned. Supports nested objects.
55
+ Note: Matching is case-sensitive and type-sensitive.
56
+ Sessions with NULL configs are excluded from filtered results.
57
+ Defaults to None.
51
58
 
52
59
  Returns:
53
60
  ListSessionsOutput containing the list of sessions and pagination information.
61
+
62
+ Example:
63
+ >>> sessions = await client.sessions.list(filter_by_configs={"agent": "bot1"})
54
64
  """
55
65
  params: dict[str, Any] = {}
56
66
  if user:
57
67
  params["user"] = user
68
+ # Handle filter_by_configs - JSON encode, skip empty dict
69
+ if filter_by_configs is not None and len(filter_by_configs) > 0:
70
+ params["filter_by_configs"] = json.dumps(filter_by_configs)
58
71
  params.update(
59
72
  build_params(
60
73
  limit=limit,
@@ -40,6 +40,7 @@ class SessionsAPI:
40
40
  limit: int | None = None,
41
41
  cursor: str | None = None,
42
42
  time_desc: bool | None = None,
43
+ filter_by_configs: Mapping[str, Any] | None = None,
43
44
  ) -> ListSessionsOutput:
44
45
  """List all sessions in the project.
45
46
 
@@ -48,13 +49,25 @@ class SessionsAPI:
48
49
  limit: Maximum number of sessions to return. Defaults to None.
49
50
  cursor: Cursor for pagination. Defaults to None.
50
51
  time_desc: Order by created_at descending if True, ascending if False. Defaults to None.
52
+ filter_by_configs: Filter by session configs using JSONB containment.
53
+ Only sessions where configs contains all key-value pairs in this
54
+ dict will be returned. Supports nested objects.
55
+ Note: Matching is case-sensitive and type-sensitive.
56
+ Sessions with NULL configs are excluded from filtered results.
57
+ Defaults to None.
51
58
 
52
59
  Returns:
53
60
  ListSessionsOutput containing the list of sessions and pagination information.
61
+
62
+ Example:
63
+ >>> sessions = client.sessions.list(filter_by_configs={"agent": "bot1"})
54
64
  """
55
65
  params: dict[str, Any] = {}
56
66
  if user:
57
67
  params["user"] = user
68
+ # Handle filter_by_configs - JSON encode, skip empty dict
69
+ if filter_by_configs is not None and len(filter_by_configs) > 0:
70
+ params["filter_by_configs"] = json.dumps(filter_by_configs)
58
71
  params.update(
59
72
  build_params(
60
73
  limit=limit,
File without changes
File without changes