pushary 2.3.0__tar.gz → 2.4.0__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 (26) hide show
  1. {pushary-2.3.0 → pushary-2.4.0}/PKG-INFO +1 -1
  2. {pushary-2.3.0 → pushary-2.4.0}/pyproject.toml +1 -1
  3. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/__init__.py +1 -1
  4. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/reminders.py +7 -2
  5. {pushary-2.3.0 → pushary-2.4.0}/tests/test_reminders.py +4 -2
  6. {pushary-2.3.0 → pushary-2.4.0}/.gitignore +0 -0
  7. {pushary-2.3.0 → pushary-2.4.0}/LICENSE +0 -0
  8. {pushary-2.3.0 → pushary-2.4.0}/README.md +0 -0
  9. {pushary-2.3.0 → pushary-2.4.0}/examples/agno/README.md +0 -0
  10. {pushary-2.3.0 → pushary-2.4.0}/examples/dify/README.md +0 -0
  11. {pushary-2.3.0 → pushary-2.4.0}/examples/llamaindex/README.md +0 -0
  12. {pushary-2.3.0 → pushary-2.4.0}/examples/microsoft/README.md +0 -0
  13. {pushary-2.3.0 → pushary-2.4.0}/examples/strands/README.md +0 -0
  14. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/_types.py +0 -0
  15. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/_util.py +0 -0
  16. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/adapters.py +0 -0
  17. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/client.py +0 -0
  18. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/decisions.py +0 -0
  19. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/errors.py +0 -0
  20. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/keys.py +0 -0
  21. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/py.typed +0 -0
  22. {pushary-2.3.0 → pushary-2.4.0}/src/pushary/webhook.py +0 -0
  23. {pushary-2.3.0 → pushary-2.4.0}/tests/test_adapters.py +0 -0
  24. {pushary-2.3.0 → pushary-2.4.0}/tests/test_agent.py +0 -0
  25. {pushary-2.3.0 → pushary-2.4.0}/tests/test_client.py +0 -0
  26. {pushary-2.3.0 → pushary-2.4.0}/tests/test_webhook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pushary
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: The decision layer for AI agents. Your agent asks, your user decides on their phone.
5
5
  Project-URL: Homepage, https://pushary.com
6
6
  Project-URL: Documentation, https://pushary.com/docs
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pushary"
7
- version = "2.3.0"
7
+ version = "2.4.0"
8
8
  description = "The decision layer for AI agents. Your agent asks, your user decides on their phone."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -23,7 +23,7 @@ from .reminders import RemindersResource
23
23
  from .errors import PusharyError
24
24
  from .webhook import SIGNATURE_HEADER, parse_decision_callback, verify_webhook_signature
25
25
 
26
- __version__ = "2.3.0"
26
+ __version__ = "2.4.0"
27
27
 
28
28
  __all__ = [
29
29
  "PusharyServer",
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
  from typing import Callable, Dict, Optional
3
+ from uuid import uuid4
3
4
 
4
5
  RequestFn = Callable[..., Dict[str, object]]
5
6
 
@@ -12,10 +13,11 @@ class RemindersResource:
12
13
  self, body: str, *, in_minutes: Optional[int] = None, at: Optional[str] = None,
13
14
  title: Optional[str] = None, agent_name: Optional[str] = None,
14
15
  session_id: Optional[str] = None, machine_id: Optional[str] = None,
15
- env: Optional[str] = None,
16
+ env: Optional[str] = None, request_id: Optional[str] = None,
16
17
  ) -> Dict[str, object]:
17
18
  values = {"body": body, "inMinutes": in_minutes, "at": at, "title": title,
18
- "agentName": agent_name, "sessionId": session_id, "machineId": machine_id, "env": env}
19
+ "agentName": agent_name, "sessionId": session_id, "machineId": machine_id, "env": env,
20
+ "requestId": str(uuid4()) if request_id is None else request_id}
19
21
  return self._request("POST", "/reminders", body={key: value for key, value in values.items() if value is not None})
20
22
 
21
23
  def list(self) -> Dict[str, object]:
@@ -23,3 +25,6 @@ class RemindersResource:
23
25
 
24
26
  def cancel(self, reminder_id: str) -> Dict[str, object]:
25
27
  return self._request("POST", "/reminders", body={"cancelReminderId": reminder_id})
28
+
29
+ def get(self, reminder_id: str) -> Dict[str, object]:
30
+ return self._request("POST", "/reminders", body={"reminderId": reminder_id})
@@ -7,11 +7,13 @@ class ReminderTests(unittest.TestCase):
7
7
  def test_schedule_list_and_cancel_use_authenticated_reminder_resource(self):
8
8
  with mock.patch.object(PusharyServer, '_request', return_value={'pending': []}) as request:
9
9
  client = PusharyServer('pk_test.secret')
10
- client.reminders.schedule('Check deploy', in_minutes=30)
10
+ client.reminders.schedule('Check deploy', in_minutes=30, request_id='stable-request')
11
11
  client.reminders.list()
12
12
  client.reminders.cancel('id')
13
+ client.reminders.get('id')
13
14
  self.assertEqual(request.call_args_list, [
14
- mock.call('POST', '/reminders', body={'body': 'Check deploy', 'inMinutes': 30}),
15
+ mock.call('POST', '/reminders', body={'body': 'Check deploy', 'inMinutes': 30, 'requestId': 'stable-request'}),
15
16
  mock.call('GET', '/reminders'),
16
17
  mock.call('POST', '/reminders', body={'cancelReminderId': 'id'}),
18
+ mock.call('POST', '/reminders', body={'reminderId': 'id'}),
17
19
  ])
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes