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.
- app_core/__init__.py +1 -0
- app_core/assistant/__init__.py +70 -0
- app_core/assistant/action_validation.py +970 -0
- app_core/assistant/actions.py +473 -0
- app_core/assistant/common.py +265 -0
- app_core/assistant/engine.py +571 -0
- app_core/assistant/feedback.py +175 -0
- app_core/assistant/formatting.py +1299 -0
- app_core/assistant/nlu.py +186 -0
- app_core/assistant/runtime.py +387 -0
- app_core/assistant/tools.py +1154 -0
- app_core/barcodes.py +248 -0
- app_core/db.py +1540 -0
- app_core/doctor.py +686 -0
- app_core/domain/__init__.py +10 -0
- app_core/domain/availability.py +64 -0
- app_core/domain/dates.py +162 -0
- app_core/domain/metrics.py +119 -0
- app_core/domain/money.py +106 -0
- app_core/domain/tax.py +66 -0
- app_core/paths.py +223 -0
- app_core/services/__init__.py +36 -0
- app_core/services/_monolith.py +7846 -0
- app_core/services/_seed_data.py +214 -0
- app_core/services/billing_docs.py +245 -0
- app_core/services/reports_metrics.py +180 -0
- app_core/support.py +389 -0
- app_core/updater.py +478 -0
- spms-1.2.1.dist-info/METADATA +298 -0
- spms-1.2.1.dist-info/RECORD +89 -0
- spms-1.2.1.dist-info/WHEEL +5 -0
- spms-1.2.1.dist-info/entry_points.txt +3 -0
- spms-1.2.1.dist-info/licenses/LICENSE +14 -0
- spms-1.2.1.dist-info/top_level.txt +4 -0
- ui/__init__.py +1 -0
- ui/web/__init__.py +1 -0
- ui/web/deps.py +614 -0
- ui/web/rendering.py +81 -0
- ui/web/route_utils.py +48 -0
- ui/web/routes/__init__.py +1 -0
- ui/web/routes/accounting.py +168 -0
- ui/web/routes/assistant.py +585 -0
- ui/web/routes/dashboard.py +33 -0
- ui/web/routes/files.py +28 -0
- ui/web/routes/guests.py +115 -0
- ui/web/routes/housekeeping.py +158 -0
- ui/web/routes/pos_inventory.py +492 -0
- ui/web/routes/reports_analytics.py +80 -0
- ui/web/routes/reservations.py +628 -0
- ui/web/routes/settings_branding.py +910 -0
- ui/web/routes/support.py +55 -0
- ui/web/server.py +273 -0
- ui/web/static/app.css +142 -0
- ui/web/static/app.js +80 -0
- ui/web/static/assistant_widget.js +284 -0
- ui/web/static/icons/apple-touch-icon.png +0 -0
- ui/web/static/icons/icon-192.png +0 -0
- ui/web/static/icons/icon-512.png +0 -0
- ui/web/static/manifest.webmanifest +25 -0
- ui/web/static/sw.js +63 -0
- ui/web/templates/accounting/index.html +163 -0
- ui/web/templates/assistant/_messages.html +102 -0
- ui/web/templates/assistant/index.html +80 -0
- ui/web/templates/base.html +94 -0
- ui/web/templates/dashboard.html +95 -0
- ui/web/templates/errors/500.html +29 -0
- ui/web/templates/guests/detail.html +132 -0
- ui/web/templates/guests/list.html +23 -0
- ui/web/templates/housekeeping/index.html +94 -0
- ui/web/templates/partials/forms.html +7 -0
- ui/web/templates/partials/ui.html +24 -0
- ui/web/templates/pos/index.html +378 -0
- ui/web/templates/reports/index.html +51 -0
- ui/web/templates/reports/view.html +7 -0
- ui/web/templates/reservations/detail.html +249 -0
- ui/web/templates/reservations/groups.html +89 -0
- ui/web/templates/reservations/list.html +71 -0
- ui/web/templates/settings/approvals.html +70 -0
- ui/web/templates/settings/health.html +25 -0
- ui/web/templates/settings/index.html +230 -0
- ui/web/templates/settings/packages.html +69 -0
- ui/web/templates/settings/rate_plans.html +89 -0
- ui/web/templates/settings/service_catalog.html +56 -0
- ui/web/templates/settings/users.html +55 -0
- ui/web/templates/settings/vouchers.html +56 -0
- ui/web/templates/setup_wizard.html +41 -0
- ui/web/templates/support/report.html +322 -0
- ui/web/templates/unlock.html +14 -0
- 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
|