@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
@@ -0,0 +1,191 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggiedash.topy.ai/contracts/booking-browser-evidence-v2.json",
4
+ "title": "MaggieDash Booking production browser evidence v2",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "baseUrl",
9
+ "generatedAt",
10
+ "viewports",
11
+ "screens",
12
+ "consoleErrors",
13
+ "failedRequests",
14
+ "layoutErrors"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "const": "maggiedash-booking-browser-evidence.v2"
19
+ },
20
+ "baseUrl": {
21
+ "type": "string",
22
+ "pattern": "^https://"
23
+ },
24
+ "generatedAt": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "version": {
29
+ "type": "string"
30
+ },
31
+ "viewports": {
32
+ "type": "array",
33
+ "minItems": 3,
34
+ "items": {
35
+ "type": "object",
36
+ "required": [
37
+ "name",
38
+ "width",
39
+ "height"
40
+ ]
41
+ }
42
+ },
43
+ "screens": {
44
+ "type": "array",
45
+ "minItems": 51,
46
+ "items": {
47
+ "type": "object",
48
+ "required": [
49
+ "route",
50
+ "viewport",
51
+ "httpStatus",
52
+ "finalPath",
53
+ "heading",
54
+ "screenshot",
55
+ "ready"
56
+ ],
57
+ "properties": {
58
+ "route": {
59
+ "type": "string",
60
+ "enum": [
61
+ "/_maggie/booking/",
62
+ "/_maggie/booking/calendar",
63
+ "/_maggie/booking/bookings",
64
+ "/_maggie/booking/customers",
65
+ "/_maggie/booking/waitlist",
66
+ "/_maggie/booking/locations",
67
+ "/_maggie/booking/catalog",
68
+ "/_maggie/booking/packages",
69
+ "/_maggie/booking/staff",
70
+ "/_maggie/booking/resources",
71
+ "/_maggie/booking/schedule",
72
+ "/_maggie/booking/payments",
73
+ "/_maggie/booking/notifications",
74
+ "/_maggie/booking/email-templates",
75
+ "/_maggie/booking/reports",
76
+ "/_maggie/booking/settings",
77
+ "/_maggie/booking/audit"
78
+ ]
79
+ },
80
+ "viewport": {
81
+ "type": "string",
82
+ "enum": [
83
+ "mobile",
84
+ "tablet",
85
+ "desktop"
86
+ ]
87
+ },
88
+ "httpStatus": {
89
+ "type": "integer",
90
+ "minimum": 200,
91
+ "maximum": 399
92
+ },
93
+ "finalPath": {
94
+ "type": "string",
95
+ "pattern": "^/_maggie/booking(?:/|$)"
96
+ },
97
+ "heading": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "screenshot": {
102
+ "type": "string",
103
+ "minLength": 1
104
+ },
105
+ "ready": {
106
+ "const": true
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "consoleErrors": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ }
116
+ },
117
+ "failedRequests": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "string"
121
+ }
122
+ },
123
+ "layoutErrors": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "notes": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string"
133
+ }
134
+ }
135
+ },
136
+ "x-required-routes": [
137
+ "/_maggie/booking/",
138
+ "/_maggie/booking/calendar",
139
+ "/_maggie/booking/bookings",
140
+ "/_maggie/booking/customers",
141
+ "/_maggie/booking/waitlist",
142
+ "/_maggie/booking/locations",
143
+ "/_maggie/booking/catalog",
144
+ "/_maggie/booking/packages",
145
+ "/_maggie/booking/staff",
146
+ "/_maggie/booking/resources",
147
+ "/_maggie/booking/schedule",
148
+ "/_maggie/booking/payments",
149
+ "/_maggie/booking/notifications",
150
+ "/_maggie/booking/email-templates",
151
+ "/_maggie/booking/reports",
152
+ "/_maggie/booking/settings",
153
+ "/_maggie/booking/audit"
154
+ ],
155
+ "x-required-viewports": [
156
+ {
157
+ "name": "mobile",
158
+ "width": 390,
159
+ "height": 844
160
+ },
161
+ {
162
+ "name": "tablet",
163
+ "width": 768,
164
+ "height": 1024
165
+ },
166
+ {
167
+ "name": "desktop",
168
+ "width": 1440,
169
+ "height": 1000
170
+ }
171
+ ],
172
+ "x-required-headings": {
173
+ "/_maggie/booking/": "Overview",
174
+ "/_maggie/booking/calendar": "Calendar",
175
+ "/_maggie/booking/bookings": "Bookings",
176
+ "/_maggie/booking/customers": "Customers",
177
+ "/_maggie/booking/waitlist": "Waitlist",
178
+ "/_maggie/booking/locations": "Locations",
179
+ "/_maggie/booking/catalog": "Catalogue",
180
+ "/_maggie/booking/packages": "Packages",
181
+ "/_maggie/booking/staff": "Staff",
182
+ "/_maggie/booking/resources": "Resources",
183
+ "/_maggie/booking/schedule": "Schedule",
184
+ "/_maggie/booking/payments": "Payments",
185
+ "/_maggie/booking/notifications": "Notifications",
186
+ "/_maggie/booking/email-templates": "Email templates",
187
+ "/_maggie/booking/reports": "Reports",
188
+ "/_maggie/booking/settings": "Settings",
189
+ "/_maggie/booking/audit": "Audit"
190
+ }
191
+ }
@@ -11,16 +11,18 @@
11
11
  },
12
12
  "roles": ["owner", "admin", "manager"],
13
13
  "events": [
14
- { "id": "booking.confirmed", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName"] },
14
+ { "id": "booking.confirmed", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName", "arrivalNote"] },
15
15
  { "id": "booking.rescheduled", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName"] },
16
16
  { "id": "booking.cancelled", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "reason", "siteName"] },
17
17
  { "id": "booking.reminder", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName"] },
18
18
  { "id": "payment.action_required", "variables": ["customerName", "serviceName", "bookingId", "actionUrl", "siteName"] },
19
19
  { "id": "payment.refunded", "variables": ["customerName", "serviceName", "bookingId", "siteName"] },
20
+ { "id": "payment.no_show_fee", "variables": ["customerName", "serviceName", "bookingId", "amount", "siteName"] },
20
21
  { "id": "package.purchase.confirmed", "variables": ["customerName", "packageName", "amount", "expiresAt", "siteName"] },
21
22
  { "id": "package.purchase.refunded", "variables": ["customerName", "packageName", "amount", "siteName"] },
22
23
  { "id": "booking.waitlist.available", "variables": ["customerName", "serviceName", "when", "locationName", "bookingUrl", "siteName"] }
23
24
  ],
25
+ "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "bookingUrl", "reason", "actionUrl", "packageName", "amount", "expiresAt", "siteName", "arrivalNote"],
24
26
  "endpointIds": ["booking.email-templates.read", "booking.email-templates.draft", "booking.email-templates.publish", "booking.email-templates.rollback"],
25
27
  "canonicalRoutes": {
26
28
  "booking.email-templates.read": "GET /email-templates.json",
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggiedash.topy.ai/contracts/booking-voucher-lifecycle-v1.json",
4
+ "title": "MaggieDash Booking gift voucher lifecycle v1",
5
+ "schemaVersion": "maggiedash-booking-voucher-lifecycle.v1",
6
+ "status": "contract",
7
+ "runtime": {
8
+ "owner": "host",
9
+ "maggieDashRuntime": false,
10
+ "note": "This contract fixes the provider-neutral voucher lifecycle. MaggieDash does not ship a voucher runtime in this release; a host implements it and proves it with a sanitized ledger fixture."
11
+ },
12
+ "apiPrefix": "/api/maggie/booking/vouchers.json",
13
+ "auth": { "managerSession": "host-session-cookie", "emailPassword": true, "passkeys": false },
14
+ "permissions": ["vouchers.read", "vouchers.sell", "vouchers.redeem", "vouchers.void", "vouchers.refund"],
15
+ "money": { "unit": "minor", "integerOnly": true, "singleCurrencyPerVoucher": true },
16
+ "channels": {
17
+ "online": {
18
+ "funding": "provider-payment",
19
+ "issueAfter": "verified payment success webhook",
20
+ "provider": "stripe",
21
+ "providerObjects": ["checkout_sessions", "payment_intents", "refunds"],
22
+ "nativeGiftCards": false
23
+ },
24
+ "till": {
25
+ "funding": "recorded-in-shop-payment",
26
+ "paymentMethods": ["cash", "card-terminal", "external"],
27
+ "requiredPermission": "vouchers.sell"
28
+ }
29
+ },
30
+ "codeFormat": {
31
+ "online": {
32
+ "pattern": "^[A-Z]{2,4}-[A-Z2-9]{4}-[A-Z2-9]{4}-[A-Z2-9]{4}$",
33
+ "alphabet": "ABCDEFGHJKLMNPQRSTUVWXYZ23456789",
34
+ "check": "hmac-sha256",
35
+ "checkSegment": "last segment is a truncated HMAC of the body under a server-only secret; verify in constant time before any database lookup"
36
+ },
37
+ "till": {
38
+ "pattern": "^[A-Z]{1,4}[0-9]{6,10}$",
39
+ "check": "luhn",
40
+ "checkSegment": "final digit is a Luhn check digit so mistyped printed codes fail before lookup"
41
+ },
42
+ "storage": "store only codeHash and codeLast4; never persist or return the full code after delivery"
43
+ },
44
+ "states": ["pending_payment", "active", "exhausted", "expired", "voided", "refunded"],
45
+ "ledger": {
46
+ "appendOnly": true,
47
+ "entryTypes": ["issue", "redeem", "undo_redeem", "void", "expire", "refund"],
48
+ "balanceRule": "balance = issue - redeem + undo_redeem - refund; it never becomes negative",
49
+ "fields": ["id", "voucherId", "type", "amount", "at", "actorId", "idempotencyKey", "reverses", "bookingId", "paymentRef", "refundMethod", "reason"]
50
+ },
51
+ "rules": {
52
+ "issue": "exactly one issue entry, first in the ledger, equal to faceValue; online vouchers stay pending_payment until the verified payment webhook",
53
+ "partialRedemption": "a redemption may be any positive amount up to the remaining balance; the remainder stays redeemable",
54
+ "undo": "undo_redeem reverses exactly one earlier redeem entry by id, for the same amount, at most once, and never after void",
55
+ "void": "void requires a reason and blocks every later redemption, undo, and refund; the remaining balance is reported but unusable",
56
+ "expiry": "no redemption at or after expiresAt; an expire entry records the unused balance without changing the ledger history",
57
+ "refund": "refund amount is capped by the remaining balance and by the funded amount minus earlier refunds; online refunds reference the original provider payment; till refunds record refundMethod",
58
+ "fullRefund": "a refund that brings the balance to zero before any redemption moves the voucher to refunded"
59
+ },
60
+ "notifications": [
61
+ { "id": "voucher.purchase.confirmed", "recipient": "buyer", "variables": ["customerName", "amount", "voucherLast4", "expiresAt", "siteName"] },
62
+ { "id": "voucher.delivered", "recipient": "recipient", "variables": ["recipientName", "senderName", "message", "amount", "voucherCode", "expiresAt", "redeemUrl", "siteName"] },
63
+ { "id": "voucher.redeemed", "recipient": "buyer-or-recipient", "variables": ["amount", "remainingBalance", "voucherLast4", "siteName"] },
64
+ { "id": "voucher.refunded", "recipient": "buyer", "variables": ["customerName", "amount", "voucherLast4", "siteName"] },
65
+ { "id": "voucher.expiry_reminder", "recipient": "recipient", "variables": ["recipientName", "remainingBalance", "expiresAt", "redeemUrl", "siteName"] }
66
+ ],
67
+ "endpointIds": ["booking.vouchers.read", "booking.vouchers.sell", "booking.vouchers.redeem", "booking.vouchers.undo", "booking.vouchers.void", "booking.vouchers.refund"],
68
+ "canonicalRoutes": {
69
+ "booking.vouchers.read": "GET /vouchers.json",
70
+ "booking.vouchers.sell": "POST /vouchers.json?action=sell",
71
+ "booking.vouchers.redeem": "POST /vouchers.json?action=redeem",
72
+ "booking.vouchers.undo": "POST /vouchers.json?action=undo",
73
+ "booking.vouchers.void": "POST /vouchers.json?action=void",
74
+ "booking.vouchers.refund": "POST /vouchers.json?action=refund"
75
+ },
76
+ "policy": {
77
+ "tenantScoped": true,
78
+ "auditRequired": true,
79
+ "idempotencyRequiredForMutations": true,
80
+ "fullCodeOnlyInDeliveryEmail": true,
81
+ "providerCredentialsRemainServerOnly": true,
82
+ "expiryPolicyDeclaredByHost": true
83
+ },
84
+ "ledgerFixtureSchemaVersion": "maggiedash-booking-voucher-ledger.v1"
85
+ }