@topy-ai/maggie 0.7.47 → 0.7.49

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 (91) hide show
  1. package/README-zh-TW.md +2 -2
  2. package/README.md +76 -15
  3. package/bin/maggie.js +23 -6
  4. package/bundled-contracts/google-integrations/capability-report-v2.schema.json +2 -1
  5. package/bundled-contracts/maggie-content/email-localization-v1.schema.json +89 -0
  6. package/bundled-contracts/maggie-content/lifecycle-email-v1.schema.json +76 -0
  7. package/bundled-contracts/maggie-deployment/readiness-v1.schema.json +6 -1
  8. package/bundled-contracts/maggie-design/palette-roles-v1.schema.json +47 -0
  9. package/bundled-contracts/maggie-marketplace/template-content-v1.schema.json +103 -0
  10. package/bundled-contracts/maggie-ops/marketing-run-v1.schema.json +89 -0
  11. package/bundled-contracts/maggie-ops/notification-catalogue-example-v1.json +941 -0
  12. package/bundled-contracts/maggie-ops/notification-catalogue-v1.schema.json +273 -0
  13. package/bundled-contracts/maggie-service-booking/fact-provenance-v1.schema.json +128 -0
  14. package/bundled-contracts/maggie-service-booking/import-stages-v1.schema.json +191 -0
  15. package/bundled-contracts/maggiedash/booking-browser-evidence-v1.json +21 -0
  16. package/bundled-contracts/maggiedash/booking-browser-evidence-v2.json +191 -0
  17. package/bundled-contracts/maggiedash/booking-email-templates-v1.json +3 -1
  18. package/bundled-contracts/maggiedash/booking-voucher-lifecycle-v1.json +85 -0
  19. package/bundled-contracts/maggiedash/execution-board.json +4629 -1553
  20. package/bundled-contracts/maggiedash/stripe-booking-capabilities-v1.json +1 -0
  21. package/bundled-marketplace/README.md +17 -0
  22. package/bundled-marketplace/catalog.json +56 -7
  23. package/bundled-references/browser-inspection.md +25 -0
  24. package/bundled-references/google-integrations-runbook.md +54 -0
  25. package/bundled-references/maggiedash-booking/CURRENT-STATE.md +128 -10
  26. package/bundled-references/maggiedash-booking/EXECUTION-BOARD.json +4629 -1553
  27. package/bundled-references/maggiedash-booking/HOST-ADAPTER.md +5 -0
  28. package/bundled-references/maggiedash-booking/ORAWELLNESS-INTEGRATION-AUDIT.md +64 -21
  29. package/bundled-references/maggiedash-booking/PRD.md +9 -1
  30. package/bundled-references/maggiedash-booking/PROGRESS.md +244 -2399
  31. package/bundled-references/maggiedash-booking/QA-TEST-PLAN.md +37 -6
  32. package/bundled-references/maggiedash-booking/README.md +23 -6
  33. package/bundled-references/maggiedash-booking/RUNTIME-OPERATIONS.md +64 -8
  34. package/bundled-references/maggiedash-booking/SKILLS-AND-CLI.md +11 -2
  35. package/bundled-references/maggiedash-booking/STRIPE-INTEGRATION.md +66 -2
  36. package/bundled-references/maggiedash-booking/TASK-RUNBOOK.md +1 -1
  37. package/bundled-references/maggiedash-booking/TASKS.md +44 -3
  38. package/bundled-references/maggiedash-booking/VOUCHERS.md +47 -0
  39. package/bundled-references/provider-adapter-contract.md +33 -0
  40. package/bundled-skills/maggie-booking/SKILL.md +8 -0
  41. package/bundled-skills/maggie-clone-to-template/SKILL.md +26 -0
  42. package/bundled-skills/maggie-content-localization/SKILL.md +17 -1
  43. package/bundled-skills/maggie-content-localization/references/email-and-lifecycle.md +83 -0
  44. package/bundled-skills/maggie-deployment/SKILL.md +141 -7
  45. package/bundled-skills/maggie-deployment/references/vps.md +74 -1
  46. package/bundled-skills/maggie-design/SKILL.md +154 -0
  47. package/bundled-skills/maggie-feedback/SKILL.md +67 -1
  48. package/bundled-skills/maggie-marketplace/SKILL.md +91 -0
  49. package/bundled-skills/maggie-ops/SKILL.md +37 -0
  50. package/bundled-skills/maggie-ops/references/notifications-operations.md +154 -0
  51. package/bundled-skills/maggie-qa-workflow/SKILL.md +41 -1
  52. package/bundled-skills/maggie-service-booking/SKILL.md +82 -0
  53. package/bundled-skills/maggie-social-share/SKILL.md +56 -7
  54. package/bundled-skills/maggie-social-share/references/marketing-run.md +57 -0
  55. package/bundled-skills/maggie-social-share/references/queue-and-connections.md +152 -0
  56. package/bundled-skills/maggie-template/SKILL.md +57 -3
  57. package/bundled-skills/maggie-template/references/template-content-v1.example.json +34 -0
  58. package/bundled-tools/clis/maggie_booking.py +199 -26
  59. package/bundled-tools/clis/maggie_booking_vouchers.py +185 -0
  60. package/bundled-tools/clis/maggie_clone_to_template.py +14 -0
  61. package/bundled-tools/clis/maggie_deployment.py +307 -18
  62. package/bundled-tools/clis/maggie_deployment_auth_canary.py +216 -0
  63. package/bundled-tools/clis/maggie_deployment_collect.py +225 -0
  64. package/bundled-tools/clis/maggie_deployment_readiness.py +53 -3
  65. package/bundled-tools/clis/maggie_design.py +17 -0
  66. package/bundled-tools/clis/maggie_design_lint.py +277 -0
  67. package/bundled-tools/clis/maggie_design_verify.py +359 -0
  68. package/bundled-tools/clis/maggie_docs.py +82 -4
  69. package/bundled-tools/clis/maggie_email_localization.py +382 -0
  70. package/bundled-tools/clis/maggie_feedback.py +115 -5
  71. package/bundled-tools/clis/maggie_icon_glyph_check.py +382 -0
  72. package/bundled-tools/clis/maggie_icon_release_gate.py +28 -1
  73. package/bundled-tools/clis/maggie_localization.py +5 -0
  74. package/bundled-tools/clis/maggie_marketing_run.py +272 -0
  75. package/bundled-tools/clis/maggie_marketplace.py +199 -5
  76. package/bundled-tools/clis/maggie_notifications.py +528 -0
  77. package/bundled-tools/clis/maggie_ops.py +87 -0
  78. package/bundled-tools/clis/maggie_palette.py +280 -0
  79. package/bundled-tools/clis/maggie_qa_workflow.py +156 -1
  80. package/bundled-tools/clis/maggie_schedule.py +12 -2
  81. package/bundled-tools/clis/maggie_service_import.py +520 -0
  82. package/bundled-tools/clis/maggie_social_queue.py +442 -0
  83. package/bundled-tools/clis/maggie_social_share.py +46 -9
  84. package/bundled-tools/clis/maggie_template_package.py +1141 -0
  85. package/bundled-tools/runtime/google_ads.py +306 -0
  86. package/bundled-tools/runtime/google_capabilities.py +18 -2
  87. package/bundled-tools/runtime/google_remediation.py +152 -0
  88. package/package.json +1 -1
  89. package/references/browser-inspection.md +25 -0
  90. package/references/google-integrations-runbook.md +54 -0
  91. package/references/provider-adapter-contract.md +33 -0
@@ -148,6 +148,11 @@ redirect cannot mark a payment paid. Use the existing outbox adapter for
148
148
  confirmation, cancellation, reschedule, and reminder email intents. The host
149
149
  stores customer token purpose explicitly: payment-return tokens are short-lived
150
150
  and the Resend worker uses a separate 30-day sealed `manage` token for links.
151
+ After the payment-return token is verified, the response also supplies that
152
+ manage token to the customer page. The page replaces the short token in its URL
153
+ and uses the manage token for history, cancellation, and rescheduling. Public
154
+ booking DTOs expose the allowlisted guest count and segment pricing fields;
155
+ hosts must not add internal metadata or the raw suitability answer.
151
156
 
152
157
  For a deterministic end-to-end public journey, run:
153
158
 
@@ -1,8 +1,8 @@
1
1
  # ORA Wellness Booking integration audit
2
2
 
3
- Date: 2026-09-21
3
+ Initial audit: 2026-09-21 · Stripe status refreshed: 2026-09-28
4
4
  Project: `/home/balalior/Dev/clients/orawellness.uk`
5
- Source: MaggieDash Booking `0.2.8` plus ORA host adapter
5
+ Source: MaggieDash Booking `0.2.10` plus ORA host adapter
6
6
 
7
7
  ## Short answer
8
8
 
@@ -12,22 +12,58 @@ tokens, Stripe payment boundary, Resend notification outbox, audit records,
12
12
  email/password login, and separate Booking roles.
13
13
 
14
14
  It is not production-ready yet. The remaining work is deployment evidence and
15
- provider operations, not another UI shell.
16
-
17
- The ORA `.env` currently contains a Stripe test secret under the existing
18
- `ST_SECRECT_KEY` compatibility name and a publishable test key under
19
- `ST_PUB_KEY`. The secret value is intentionally not recorded here. No
20
- `STRIPE_WEBHOOK_SECRET` is configured yet, so the account is not considered
21
- verified or connected for Booking.
22
-
23
- Current database gate: the existing ORA application schema check passes and the
24
- Booking migration dry-run passes transactionally, but the live Booking schema
25
- has not been applied. The 2026-09-21 read-only preflight confirmed that the
26
- core schema exists while `maggiedash_booking_allocations` and
27
- `maggiedash_booking_user_roles` are still absent. The worker therefore fails
28
- closed without touching production data. Do not enable the live dashboard or
29
- scheduler until the owner approves the migration, verifies the backup/restore
30
- path, creates the first owner, and captures runtime evidence.
15
+ provider operations, not another UI shell. A 2026-09-28 read-only Chrome smoke
16
+ found the live `/book` page advertising online booking; the direct customer
17
+ page returned availability through 00:20, past the published closing time.
18
+ No booking was submitted. The deployed version, payment readiness, and checkout
19
+ outcome are unknown, so this is an active production exposure/schedule
20
+ discrepancy to reconcile.
21
+
22
+ The source audit found that the public availability adapter still used the
23
+ generic duration-stepped query while customer hold creation used the host
24
+ schedule planner. This explains why public starts could exceed venue hours or
25
+ capacity constraints. The ORA working tree now routes both reads and holds
26
+ through the same location/staff/resource-aware planner and requires the service
27
+ to be enabled for online booking. Local adapter and rules regressions pass;
28
+ a read-only staging API recheck returned assessment starts 17:45–20:15 local,
29
+ ending by 20:50 before the 21:00 close. Production reconciliation remains open.
30
+
31
+ BK-124 completed the follow-up audit of saved location closures. The shared
32
+ planner now loads the requested tenant/location's closure intervals and applies
33
+ them to both public availability and hold revalidation, including exact-edge
34
+ boundary regressions. Local source/build checks pass; production remains
35
+ unverified and unchanged.
36
+
37
+ BK-125 also wires dated staff shifts into the same planner. Shifts constrain
38
+ staff on the selected date in addition to recurring venue/staff hours, while a
39
+ date without a shift retains the existing fallback behavior. Public slots and
40
+ hold checks share this rule; production remains unverified and unchanged.
41
+
42
+ The ORA `.env` contains a Stripe test secret under the existing
43
+ `ST_SECRECT_KEY` compatibility name, a publishable test key under `ST_PUB_KEY`,
44
+ and `STRIPE_WEBHOOK_SECRET`; no secret values are recorded here. The ai-cmo
45
+ Booking setup checklist recognizes the legacy alias and reports the key pair
46
+ as configured-pending-verification. A Stripe test-mode Checkout for £68 GBP
47
+ was completed through the customer flow; Stripe readback showed a paid Checkout
48
+ and succeeded PaymentIntent, and the staging Booking/customer history now agree
49
+ on confirmed/paid. The configured sandbox identifies as APHRODITE FASHION
50
+ LIMITED with charges disabled. Whether this is ORA's intended account and the
51
+ authenticated Booking **Verify Stripe connection** check remain unconfirmed;
52
+ test API availability is not account-identity or live-readiness evidence. A
53
+ later approved direct test-mode probe also created/read/expired a £1 Checkout
54
+ and confirmed a £1 `pm_card_visa` PaymentIntent. The account still reports
55
+ `charges_enabled=false` and `payouts_enabled=false`, so online payment remains
56
+ disabled.
57
+
58
+ Current database gate: the explicitly targeted `orawellness-staging` database
59
+ passes read-only core, Booking, and access schema checks. `DATABASE_URL` remains
60
+ unclassified and is not release evidence; the approved production target has
61
+ not been verified or migrated. The 2026-09-21 read-only preflight is historical:
62
+ it found `maggiedash_booking_allocations` and
63
+ `maggiedash_booking_user_roles` absent before the staging setup. Do not enable
64
+ the production dashboard or scheduler until the owner confirms the production
65
+ target, approves any migration, verifies backup/restore, creates the first
66
+ owner, and captures authenticated runtime evidence.
31
67
 
32
68
  ## Verified in the codebase
33
69
 
@@ -124,6 +160,11 @@ password-reset links resolve to the Astro reset page.
124
160
  20. Closed the treatment catalogue UI parity gap: the manager can now manage
125
161
  every variant under a service, including duration, price, currency, and
126
162
  active state, while preserving the existing idempotent backend write.
163
+ 21. Aligned ORA public availability reads with the host schedule planner used
164
+ for customer holds. Public options now respect location hours, mapped staff
165
+ and resources, existing occupancy, and the online-booking service flag.
166
+ Local adapter, booking/rule, route-gate, contract, and build checks pass;
167
+ staging and browser re-verification are still required.
127
168
 
128
169
  ## Installer productization update
129
170
 
@@ -159,12 +200,14 @@ migration, backup/restore, alert routing, and authenticated runtime evidence.
159
200
 
160
201
  | Priority | Work | Why it matters | Owner |
161
202
  |---|---|---|---|
162
- | P0 | Apply `maggiedash-booking-install.sql` and host role migration on staging | Current ORA database check shows core MaggieDash tables exist, but Booking and Booking-role tables are not installed | ORA deployment |
203
+ | P0 | Verify the approved production database target and Booking/access schema state | The explicitly targeted staging database has core, Booking, and access tables ready. `DATABASE_URL` is unclassified, and no production schema check or migration is accepted as release evidence. Confirm the production target and backup/restore plan; perform read-only verification first, and apply schema only after explicit approval | ORA deployment |
204
+ | P0 | Reconcile the live public Booking exposure and out-of-hours availability | Chrome read-only inspection found `/book` advertises online booking and the public page returns starts past the published close. This conflicts with the prior release assumption; deployed version, payment account, and checkout outcome are unverified | ORA + release owner |
163
205
  | P0 | Release the current MaggieDash source used by the default installer | The public `9d99de7` source is a validated `0.2.8` baseline, but the current 47-route/no-show changes remain uncommitted in the working tree | MaggieDash release owner |
164
- | P0 | Configure the Stripe webhook secret and verify the existing test account; keep `BOOKING_TOKEN_SECRET` and Resend sender available | The test secret is present through `ST_SECRECT_KEY`, but signed webhook verification and connected readiness remain unavailable | ORA deployment |
206
+ | P0 | Confirm the intended Stripe account and complete authenticated Booking connection verification | Direct test-mode Checkout and test-card PaymentIntent calls pass, but the configured sandbox reports charges/payouts disabled and is not confirmed as ORA's intended account. Keep `onlinePayment` disabled until the correct account is confirmed and the host verifies its capabilities | ORA + client |
165
207
  | P0 | Run worker every minute with alerting | Holds, payment projections, and Resend delivery otherwise remain pending; `maggie booking worker-schedule` now generates the reviewed systemd/cron artifact, but host enablement and alert routing remain pending | ORA operations |
208
+ | P0 | Review Resend activity after the staging preview incident | Two pre-fix staging previews each reported one provider-accepted notification without persisting outbox state; a duplicate submission is possible. Review provider activity and assess any duplicate before a worker `--write` run | ORA operations |
166
209
  | P0 | Capture authenticated runtime/browser/ops evidence | Local build and reference fixtures cannot prove the real host | ORA + release owner |
167
- | P1 | Run Stripe test-mode scenarios | Confirm success, failure, delayed/duplicate webhook, and refund behavior against the actual account | ORA + Stripe |
210
+ | P1 | Complete remaining Stripe test-mode scenarios | Checkout success and an expired unpaid Checkout are covered. Failure, delayed/duplicate webhook, refund, and the authenticated host connection still need evidence against the confirmed intended account | ORA + Stripe |
168
211
  | P1 | Capture Resend invitation/reset evidence | Booking notifications are wired; staff account invitation and password reset now use the same server-side Resend configuration | ORA + release owner |
169
212
  | P1 | Capture reminder delivery evidence | The worker now enqueues reminders; staging must prove scheduler timing, Resend acceptance, retry, and no duplicate send | ORA + release owner |
170
213
  | P1 | Verify customer-manage links in real Resend emails | Staging must prove the 30-day link opens the noindex customer page and reschedule/cancel remain token-bound | ORA + release owner |
@@ -96,6 +96,14 @@ The manager views a day or week calendar, filters by staff/location/status,
96
96
  opens a booking, records check-in and completion, takes an outstanding payment,
97
97
  reschedules, cancels, or starts a refund according to policy.
98
98
 
99
+ All manager appointment dates and times use the booking location's IANA timezone:
100
+ Calendar, Overview, booking lists/details, and waitlist preferred times display
101
+ venue-local values even when the manager's device is in another zone. Manager
102
+ booking creation, waitlist conversion, and reschedule `datetime-local` fields
103
+ must convert wall times to UTC using that same location timezone. Spring DST-gap
104
+ times are rejected before mutation, autumn repeated times expose earlier/later
105
+ occurrence choices, and Calendar does not offer nonexistent wall-clock slots.
106
+
99
107
  ### Payment recovery
100
108
 
101
109
  If a gateway redirect is interrupted, the customer refreshes or returns later,
@@ -191,7 +199,7 @@ booking changes to `no_show`.
191
199
  | Security | No secret or payment credential in HTML, props, browser environment, logs, or audit payloads |
192
200
  | Privacy | Customer data is tenant-scoped, minimized, exportable, and deletable according to policy |
193
201
  | Accessibility | Keyboard navigation, focus management, labels, contrast, and reduced motion are tested |
194
- | Time | UTC instants in storage; venue timezone required for wall-clock input |
202
+ | Time | UTC instants in storage; venue timezone required for wall-clock input and manager appointment display; DST gaps fail closed and repeated times are disambiguated |
195
203
  | Observability | Correlation ID through request, booking event, payment attempt, webhook, and notification |
196
204
  | Recovery | Failed webhooks, notifications, and provider reads are retryable without duplicate business effects |
197
205