spms 1.2.1__py3-none-any.whl

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 (89) hide show
  1. app_core/__init__.py +1 -0
  2. app_core/assistant/__init__.py +70 -0
  3. app_core/assistant/action_validation.py +970 -0
  4. app_core/assistant/actions.py +473 -0
  5. app_core/assistant/common.py +265 -0
  6. app_core/assistant/engine.py +571 -0
  7. app_core/assistant/feedback.py +175 -0
  8. app_core/assistant/formatting.py +1299 -0
  9. app_core/assistant/nlu.py +186 -0
  10. app_core/assistant/runtime.py +387 -0
  11. app_core/assistant/tools.py +1154 -0
  12. app_core/barcodes.py +248 -0
  13. app_core/db.py +1540 -0
  14. app_core/doctor.py +686 -0
  15. app_core/domain/__init__.py +10 -0
  16. app_core/domain/availability.py +64 -0
  17. app_core/domain/dates.py +162 -0
  18. app_core/domain/metrics.py +119 -0
  19. app_core/domain/money.py +106 -0
  20. app_core/domain/tax.py +66 -0
  21. app_core/paths.py +223 -0
  22. app_core/services/__init__.py +36 -0
  23. app_core/services/_monolith.py +7846 -0
  24. app_core/services/_seed_data.py +214 -0
  25. app_core/services/billing_docs.py +245 -0
  26. app_core/services/reports_metrics.py +180 -0
  27. app_core/support.py +389 -0
  28. app_core/updater.py +478 -0
  29. spms-1.2.1.dist-info/METADATA +298 -0
  30. spms-1.2.1.dist-info/RECORD +89 -0
  31. spms-1.2.1.dist-info/WHEEL +5 -0
  32. spms-1.2.1.dist-info/entry_points.txt +3 -0
  33. spms-1.2.1.dist-info/licenses/LICENSE +14 -0
  34. spms-1.2.1.dist-info/top_level.txt +4 -0
  35. ui/__init__.py +1 -0
  36. ui/web/__init__.py +1 -0
  37. ui/web/deps.py +614 -0
  38. ui/web/rendering.py +81 -0
  39. ui/web/route_utils.py +48 -0
  40. ui/web/routes/__init__.py +1 -0
  41. ui/web/routes/accounting.py +168 -0
  42. ui/web/routes/assistant.py +585 -0
  43. ui/web/routes/dashboard.py +33 -0
  44. ui/web/routes/files.py +28 -0
  45. ui/web/routes/guests.py +115 -0
  46. ui/web/routes/housekeeping.py +158 -0
  47. ui/web/routes/pos_inventory.py +492 -0
  48. ui/web/routes/reports_analytics.py +80 -0
  49. ui/web/routes/reservations.py +628 -0
  50. ui/web/routes/settings_branding.py +910 -0
  51. ui/web/routes/support.py +55 -0
  52. ui/web/server.py +273 -0
  53. ui/web/static/app.css +142 -0
  54. ui/web/static/app.js +80 -0
  55. ui/web/static/assistant_widget.js +284 -0
  56. ui/web/static/icons/apple-touch-icon.png +0 -0
  57. ui/web/static/icons/icon-192.png +0 -0
  58. ui/web/static/icons/icon-512.png +0 -0
  59. ui/web/static/manifest.webmanifest +25 -0
  60. ui/web/static/sw.js +63 -0
  61. ui/web/templates/accounting/index.html +163 -0
  62. ui/web/templates/assistant/_messages.html +102 -0
  63. ui/web/templates/assistant/index.html +80 -0
  64. ui/web/templates/base.html +94 -0
  65. ui/web/templates/dashboard.html +95 -0
  66. ui/web/templates/errors/500.html +29 -0
  67. ui/web/templates/guests/detail.html +132 -0
  68. ui/web/templates/guests/list.html +23 -0
  69. ui/web/templates/housekeeping/index.html +94 -0
  70. ui/web/templates/partials/forms.html +7 -0
  71. ui/web/templates/partials/ui.html +24 -0
  72. ui/web/templates/pos/index.html +378 -0
  73. ui/web/templates/reports/index.html +51 -0
  74. ui/web/templates/reports/view.html +7 -0
  75. ui/web/templates/reservations/detail.html +249 -0
  76. ui/web/templates/reservations/groups.html +89 -0
  77. ui/web/templates/reservations/list.html +71 -0
  78. ui/web/templates/settings/approvals.html +70 -0
  79. ui/web/templates/settings/health.html +25 -0
  80. ui/web/templates/settings/index.html +230 -0
  81. ui/web/templates/settings/packages.html +69 -0
  82. ui/web/templates/settings/rate_plans.html +89 -0
  83. ui/web/templates/settings/service_catalog.html +56 -0
  84. ui/web/templates/settings/users.html +55 -0
  85. ui/web/templates/settings/vouchers.html +56 -0
  86. ui/web/templates/setup_wizard.html +41 -0
  87. ui/web/templates/support/report.html +322 -0
  88. ui/web/templates/unlock.html +14 -0
  89. ui/web/templates/unlock_recovery.html +17 -0
app_core/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """Shared backend core (db, services, paths)."""
@@ -0,0 +1,70 @@
1
+ """Manager assistant package (compatibility facade preserving public API)."""
2
+ from __future__ import annotations
3
+
4
+ import datetime as _datetime_mod
5
+ from datetime import datetime as _dt_class, timedelta # exported names used historically
6
+
7
+ # Expose module-like datetime for tests that monkeypatch `assistant.datetime`
8
+ datetime = _datetime_mod
9
+
10
+ from . import common, feedback, formatting, nlu, tools, engine, runtime
11
+
12
+ # star imports (won't include underscore names, but include public API)
13
+ from .common import * # noqa: F401,F403
14
+ from .feedback import * # noqa: F401,F403
15
+ from .formatting import * # noqa: F401,F403
16
+ from .nlu import * # noqa: F401,F403
17
+ from .tools import * # noqa: F401,F403
18
+ from .engine import * # noqa: F401,F403
19
+ from .runtime import * # noqa: F401,F403
20
+
21
+ # Explicit exports for underscore/private APIs relied upon by callers/tests
22
+ from .common import (
23
+ _fmt_money, _format_data, _iso, _norm_text, _parse_date_range, _parse_iso,
24
+ _prev_period, _resolve_guest_from_text, _safe_int, _short, _sim,
25
+ _token_set, _val, _yn,
26
+ )
27
+ from .formatting import (
28
+ _apply_proactive, _format_for_intent, _friendly_open, _local_talking_rephrase, _proactive_suggestions,
29
+ )
30
+ from .nlu import _INTENT_CUES, classify_intent, rule_classify
31
+ from .feedback import (
32
+ _EXEMPLAR_CACHE, _SETFIT_CACHE, _SKLEARN_CACHE,
33
+ exemplar_match, get_correction_exemplars, list_feedback, record_feedback,
34
+ )
35
+ from .engine import _answer, _execute_compound, _execute_single, _guest_disambiguation
36
+ from .runtime import (
37
+ _LOCAL_LLM_CACHE, _get_local_llm, _llm_config, _local_llm_generate,
38
+ chat, deterministic_route, get_llm_config, llm_route, talking_rephrase,
39
+ )
40
+ from .tools import TOOLS, execute_tool
41
+
42
+ # Patchable helpers: ensure they observe assistant.datetime monkeypatches
43
+ def _today():
44
+ dt = datetime
45
+ # support both stdlib datetime module and fake modules providing now()
46
+ if hasattr(dt, "now"):
47
+ now = dt.now()
48
+ elif hasattr(dt, "datetime") and hasattr(dt.datetime, "now"):
49
+ now = dt.datetime.now()
50
+ else:
51
+ now = _datetime_mod.datetime.now()
52
+ if hasattr(now, "date") and not isinstance(now, _dt_class):
53
+ # FakeDatetime returns datetime but date() may behave; handle both
54
+ return now.date() if callable(getattr(now, "date", None)) else now
55
+ # if it's a datetime instance
56
+ try:
57
+ return now.date()
58
+ except Exception:
59
+ return now
60
+
61
+ # propagate to modules that use these
62
+ common._today = _today
63
+ common.datetime = datetime
64
+ # ensure re-exported names point to canonical functions
65
+ _parse_date_range = common._parse_date_range
66
+ _format_data = common._format_data
67
+ _resolve_guest_from_text = common._resolve_guest_from_text
68
+
69
+ # legacy/compat names some code may expect
70
+ _today_mod = datetime