turnstack 0.1.0__tar.gz → 0.1.1__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 (28) hide show
  1. {turnstack-0.1.0 → turnstack-0.1.1}/PKG-INFO +1 -1
  2. {turnstack-0.1.0 → turnstack-0.1.1}/pyproject.toml +1 -1
  3. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/engine.py +6 -5
  4. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/PKG-INFO +1 -1
  5. {turnstack-0.1.0 → turnstack-0.1.1}/README.md +0 -0
  6. {turnstack-0.1.0 → turnstack-0.1.1}/setup.cfg +0 -0
  7. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/__init__.py +0 -0
  8. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/exceptions.py +0 -0
  9. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/__init__.py +0 -0
  10. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/action.py +0 -0
  11. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/base.py +0 -0
  12. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/confirm.py +0 -0
  13. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/input.py +0 -0
  14. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/list_handler.py +0 -0
  15. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/media_handler.py +0 -0
  16. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/menu.py +0 -0
  17. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/render_helpers.py +0 -0
  18. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/handlers/router.py +0 -0
  19. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/message.py +0 -0
  20. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/nodes.py +0 -0
  21. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/reply.py +0 -0
  22. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/session.py +0 -0
  23. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/stores/__init__.py +0 -0
  24. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/stores/memory.py +0 -0
  25. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack/tree.py +0 -0
  26. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/SOURCES.txt +0 -0
  27. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/dependency_links.txt +0 -0
  28. {turnstack-0.1.0 → turnstack-0.1.1}/turnstack.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: turnstack
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: WhatsApp bot engine with node-based flows and interactive replies
5
5
  Author-email: IdrisFallout <dev@waithakasam.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "turnstack"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "WhatsApp bot engine with node-based flows and interactive replies"
5
5
  authors = [{ name = "IdrisFallout", email = "dev@waithakasam.com" }]
6
6
  license = { text = "MIT" }
@@ -189,6 +189,8 @@ class BotEngine:
189
189
  if incoming.type == "text" and incoming.text:
190
190
  cmd_reply = await self._handle_global_command(session, incoming.text.strip().lower())
191
191
  if cmd_reply:
192
+ if cmd_reply.type == "end":
193
+ return [cmd_reply]
192
194
  # Command handled – render the resulting node
193
195
  reply = await self._render_current(session)
194
196
  if reply is None:
@@ -246,14 +248,13 @@ class BotEngine:
246
248
  """
247
249
  # Exit / reset
248
250
  if text in self.exit_keywords:
249
- session.reset(self.tree.entry)
250
- # Optionally send a goodbye message (could be configured)
251
+ await self.session_store.delete(session.user_id)
251
252
  return Reply(
252
- type="text",
253
- body="👋 Session reset. Type anything to start over.",
253
+ type="end",
254
+ body="👋 Goodbye! Send us a message anytime to start a new session.",
254
255
  phone=session.user_id,
255
256
  node_type="text",
256
- current_node=session.current_node,
257
+ current_node=None,
257
258
  )
258
259
 
259
260
  # Go home
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: turnstack
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: WhatsApp bot engine with node-based flows and interactive replies
5
5
  Author-email: IdrisFallout <dev@waithakasam.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes