@topy-ai/maggie 0.7.52 → 0.7.53

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 (57) hide show
  1. package/README-zh-TW.md +48 -2
  2. package/README.md +66 -54
  3. package/bin/maggie.js +18 -7
  4. package/bundled-contracts/maggie-assistant-tools/booking-receptionist-example-v1.json +161 -0
  5. package/bundled-contracts/maggie-assistant-tools/tool-registry-v1.schema.json +268 -20
  6. package/bundled-contracts/maggie-deployment/bridge-host-example-v1.json +49 -7
  7. package/bundled-contracts/maggiedash/booking-email-templates-v1.json +181 -13
  8. package/bundled-contracts/maggiedash/booking-rules-v1.json +1699 -0
  9. package/bundled-contracts/maggiedash/stripe-booking-capabilities-v1.json +398 -39
  10. package/bundled-references/maggiedash-booking/PRD.md +22 -11
  11. package/bundled-references/maggiedash-booking/RULES.md +167 -0
  12. package/bundled-references/maggiedash-booking/STRIPE-INTEGRATION.md +42 -4
  13. package/bundled-references/provider-adapter-contract.md +16 -3
  14. package/bundled-skills/catalog.json +1 -1
  15. package/bundled-skills/maggie-assistant-tools/SKILL.md +54 -3
  16. package/bundled-skills/maggie-assistant-tools/references/approvals-and-audit.md +27 -0
  17. package/bundled-skills/maggie-assistant-tools/references/booking-receptionist.md +45 -0
  18. package/bundled-skills/maggie-assistant-tools/references/bridge-host.md +54 -0
  19. package/bundled-skills/maggie-auth-reference/SKILL.md +18 -0
  20. package/bundled-skills/maggie-booking/SKILL.md +47 -3
  21. package/bundled-skills/maggie-deployment/SKILL.md +21 -0
  22. package/bundled-skills/maggie-deployment/references/cloudflare.md +19 -0
  23. package/bundled-skills/maggie-deployment/references/vps.md +92 -0
  24. package/bundled-skills/maggie-design/SKILL.md +17 -3
  25. package/bundled-skills/maggie-design/references/app-ui-patterns.md +79 -0
  26. package/bundled-skills/maggie-feedback/SKILL.md +17 -0
  27. package/bundled-skills/maggie-marketplace/SKILL.md +12 -0
  28. package/bundled-skills/maggie-marketplace/references/directory-search.md +51 -0
  29. package/bundled-skills/maggie-marketplace/references/directory.mjs +112 -0
  30. package/bundled-skills/maggie-mobile-app/SKILL.md +36 -6
  31. package/bundled-skills/maggie-mobile-app/references/payments-and-push.md +78 -0
  32. package/bundled-skills/maggie-qa-workflow/SKILL.md +60 -0
  33. package/bundled-skills/maggie-seo-geo/SKILL.md +33 -0
  34. package/bundled-skills/maggie-service-booking/SKILL.md +28 -3
  35. package/bundled-skills/maggie-social-share/SKILL.md +26 -4
  36. package/bundled-skills/maggie-social-share/references/queue-and-connections.md +28 -0
  37. package/bundled-tools/clis/maggie_assistant_tools.py +84 -3
  38. package/bundled-tools/clis/maggie_booking.py +15 -4
  39. package/bundled-tools/clis/maggie_booking_connect_qa.py +136 -0
  40. package/bundled-tools/clis/maggie_booking_rules.py +476 -0
  41. package/bundled-tools/clis/maggie_bridge_host.py +77 -1
  42. package/bundled-tools/clis/maggie_deployment_ops.py +461 -0
  43. package/bundled-tools/clis/maggie_design.py +9 -2
  44. package/bundled-tools/clis/maggie_design_lint.py +75 -3
  45. package/bundled-tools/clis/maggie_feedback.py +97 -15
  46. package/bundled-tools/clis/maggie_mobile.py +136 -4
  47. package/bundled-tools/clis/maggie_qa_app_preflight.py +122 -4
  48. package/bundled-tools/clis/maggie_qa_fit.py +217 -0
  49. package/bundled-tools/clis/maggie_qa_workflow.py +5 -0
  50. package/bundled-tools/clis/maggie_schema_complexity.py +84 -0
  51. package/bundled-tools/clis/maggie_seo_routes.py +154 -0
  52. package/bundled-tools/clis/maggie_service_migration.py +272 -0
  53. package/bundled-tools/clis/maggie_social_queue.py +2 -0
  54. package/bundled-tools/clis/maggie_social_share.py +52 -6
  55. package/bundled-tools/runtime/assistant_approval.py +98 -0
  56. package/package.json +1 -1
  57. package/references/provider-adapter-contract.md +16 -3
@@ -4,47 +4,295 @@
4
4
  "title": "Maggie assistant tool registry",
5
5
  "description": "One definition per tool, exported by the product and shared by the in-app agent, MCP server and ChatGPT/Claude apps. Model-facing description and user-facing copy are separate fields. Checked by `maggie assistant registry-validate`.",
6
6
  "type": "object",
7
- "required": ["schemaVersion", "tools"],
7
+ "required": [
8
+ "schemaVersion",
9
+ "tools"
10
+ ],
8
11
  "properties": {
9
- "schemaVersion": {"const": "maggie-assistant-tool-registry.v1"},
12
+ "schemaVersion": {
13
+ "const": "maggie-assistant-tool-registry.v1"
14
+ },
10
15
  "gates": {
11
16
  "description": "Preconditions a tool may require, e.g. credits, AI generation, verified site.",
12
17
  "type": "object",
13
- "additionalProperties": {"type": "object", "required": ["label"], "properties": {"label": {"type": "string"}, "modelNote": {"type": "string"}}}
18
+ "additionalProperties": {
19
+ "type": "object",
20
+ "required": [
21
+ "label"
22
+ ],
23
+ "properties": {
24
+ "label": {
25
+ "type": "string"
26
+ },
27
+ "modelNote": {
28
+ "type": "string"
29
+ }
30
+ }
31
+ }
14
32
  },
15
33
  "tools": {
16
34
  "type": "array",
17
35
  "minItems": 1,
18
36
  "items": {
19
37
  "type": "object",
20
- "required": ["name", "description", "risk", "scope", "channels", "user"],
38
+ "required": [
39
+ "name",
40
+ "description",
41
+ "risk",
42
+ "scope",
43
+ "channels",
44
+ "user"
45
+ ],
21
46
  "properties": {
22
- "name": {"type": "string", "pattern": "^[a-z][a-z0-9_]*$", "maxLength": 64},
23
- "description": {"type": "string", "minLength": 1, "description": "Model-facing; never shown to people."},
24
- "risk": {"enum": ["read", "write-reversible", "write-spends", "write-public", "never", "R0", "W1", "W2", "W3", "W4"]},
25
- "scope": {"enum": ["account", "workspace"]},
26
- "channels": {"type": "array", "minItems": 1, "items": {"enum": ["in-app", "mcp", "chatgpt", "claude", "cli"]}},
27
- "gates": {"type": "array", "items": {"type": "string"}},
28
- "idempotent": {"type": "boolean"},
29
- "openWorld": {"type": "boolean"},
30
- "hidden": {"type": "boolean", "description": "Omit from the capability page (e.g. host-only helpers)."},
47
+ "name": {
48
+ "type": "string",
49
+ "pattern": "^[a-z][a-z0-9_]*$",
50
+ "maxLength": 64
51
+ },
52
+ "description": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "description": "Model-facing; never shown to people."
56
+ },
57
+ "risk": {
58
+ "enum": [
59
+ "read",
60
+ "write-reversible",
61
+ "write-spends",
62
+ "write-public",
63
+ "never",
64
+ "R0",
65
+ "W1",
66
+ "W2",
67
+ "W3",
68
+ "W4"
69
+ ]
70
+ },
71
+ "scope": {
72
+ "enum": [
73
+ "account",
74
+ "workspace"
75
+ ]
76
+ },
77
+ "channels": {
78
+ "type": "array",
79
+ "minItems": 1,
80
+ "items": {
81
+ "enum": [
82
+ "in-app",
83
+ "mcp",
84
+ "chatgpt",
85
+ "claude",
86
+ "cli",
87
+ "web-widget"
88
+ ]
89
+ }
90
+ },
91
+ "gates": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string"
95
+ }
96
+ },
97
+ "idempotent": {
98
+ "type": "boolean"
99
+ },
100
+ "openWorld": {
101
+ "type": "boolean"
102
+ },
103
+ "hidden": {
104
+ "type": "boolean",
105
+ "description": "Omit from the capability page (e.g. host-only helpers)."
106
+ },
31
107
  "user": {
32
108
  "type": "object",
33
- "required": ["label"],
109
+ "required": [
110
+ "label"
111
+ ],
112
+ "properties": {
113
+ "label": {
114
+ "type": "string",
115
+ "maxLength": 60
116
+ },
117
+ "detail": {
118
+ "type": "string"
119
+ },
120
+ "confirm": {
121
+ "type": "string",
122
+ "description": "Approval-card sentence; required for writes."
123
+ },
124
+ "status": {
125
+ "type": "string",
126
+ "description": "Shown while the tool runs."
127
+ }
128
+ }
129
+ },
130
+ "audit": {
131
+ "type": "object",
34
132
  "properties": {
35
- "label": {"type": "string", "maxLength": 60},
36
- "detail": {"type": "string"},
37
- "confirm": {"type": "string", "description": "Approval-card sentence; required for writes."},
38
- "status": {"type": "string", "description": "Shown while the tool runs."}
133
+ "scope": {
134
+ "enum": [
135
+ "account",
136
+ "workspace"
137
+ ]
138
+ }
39
139
  }
40
140
  },
41
- "audit": {"type": "object", "properties": {"scope": {"enum": ["account", "workspace"]}}}
141
+ "card": {
142
+ "enum": [
143
+ "place",
144
+ "slot-picker",
145
+ "booking",
146
+ "voucher",
147
+ "change-preview",
148
+ "numbers",
149
+ "draft",
150
+ "list"
151
+ ],
152
+ "description": "Optional result card the app and ChatGPT/Claude widgets render from structured content; every other surface shows the text result. The tool must still return a readable text result."
153
+ },
154
+ "mcpServers": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "string"
158
+ },
159
+ "description": "Names from registry.mcpServers that expose this tool (default: the authenticated server when the tool lists the mcp channel)."
160
+ }
42
161
  }
43
162
  }
44
163
  },
45
164
  "cantDo": {
46
165
  "type": "array",
47
- "items": {"type": "object", "required": ["text"], "properties": {"text": {"type": "string"}, "instead": {"type": "string"}}}
166
+ "items": {
167
+ "type": "object",
168
+ "required": [
169
+ "text"
170
+ ],
171
+ "properties": {
172
+ "text": {
173
+ "type": "string"
174
+ },
175
+ "instead": {
176
+ "type": "string"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "mcpServers": {
182
+ "type": "array",
183
+ "description": "MCP servers built from this registry. A public server is unauthenticated, read-only and rate-limited (AI-search distribution); an authenticated server binds tokens to its resource URL (RFC 8707 audience).",
184
+ "items": {
185
+ "type": "object",
186
+ "required": [
187
+ "name",
188
+ "auth"
189
+ ],
190
+ "properties": {
191
+ "name": {
192
+ "type": "string"
193
+ },
194
+ "auth": {
195
+ "enum": [
196
+ "none",
197
+ "oauth"
198
+ ]
199
+ },
200
+ "resource": {
201
+ "type": "string",
202
+ "description": "Canonical server URL; OAuth tokens must carry it as audience (RFC 8707 resource indicator)."
203
+ },
204
+ "audienceBinding": {
205
+ "type": "boolean",
206
+ "description": "Default true for oauth servers; false needs audienceException."
207
+ },
208
+ "audienceException": {
209
+ "type": "string"
210
+ },
211
+ "rateLimit": {
212
+ "type": "object",
213
+ "properties": {
214
+ "perIpPerMinute": {
215
+ "type": "integer"
216
+ },
217
+ "perIpPerDay": {
218
+ "type": "integer"
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "threads": {
226
+ "type": "object",
227
+ "description": "Where conversations live.",
228
+ "properties": {
229
+ "storage": {
230
+ "enum": [
231
+ "device",
232
+ "server"
233
+ ]
234
+ },
235
+ "retentionDays": {
236
+ "type": "integer"
237
+ },
238
+ "supportAccess": {
239
+ "enum": [
240
+ "none",
241
+ "with-consent"
242
+ ]
243
+ },
244
+ "deleteOnAccountDeletion": {
245
+ "type": "boolean"
246
+ }
247
+ }
248
+ },
249
+ "visitorPolicy": {
250
+ "type": "object",
251
+ "description": "Required when any tool lists the web-widget channel (a visitor-facing assistant such as an AI receptionist).",
252
+ "required": [
253
+ "enabledByDefault",
254
+ "dailyCaps",
255
+ "logAnswers",
256
+ "factsOnly",
257
+ "cardDetails"
258
+ ],
259
+ "properties": {
260
+ "enabledByDefault": {
261
+ "const": false
262
+ },
263
+ "dailyCaps": {
264
+ "type": "object",
265
+ "required": [
266
+ "perVisitor",
267
+ "perBusiness"
268
+ ],
269
+ "properties": {
270
+ "perVisitor": {
271
+ "type": "integer",
272
+ "minimum": 1
273
+ },
274
+ "perBusiness": {
275
+ "type": "integer",
276
+ "minimum": 1
277
+ }
278
+ }
279
+ },
280
+ "logAnswers": {
281
+ "const": true
282
+ },
283
+ "factsOnly": {
284
+ "const": true
285
+ },
286
+ "cardDetails": {
287
+ "const": "never"
288
+ },
289
+ "handoff": {
290
+ "type": "string"
291
+ }
292
+ }
293
+ },
294
+ "description": {
295
+ "type": "string"
48
296
  }
49
297
  }
50
298
  }
@@ -1,29 +1,71 @@
1
1
  {
2
2
  "schemaVersion": "maggie-bridge-host.v1",
3
3
  "tenantsRoot": "/srv/bridge/tenants",
4
+ "workloads": [
5
+ "chat",
6
+ "photos",
7
+ "image-generation"
8
+ ],
4
9
  "isolation": {
5
10
  "uidPerTenant": true,
6
- "uidRange": [20000, 29999],
11
+ "uidRange": [
12
+ 20000,
13
+ 29999
14
+ ],
7
15
  "tenantDirMode": "0700",
8
16
  "parentDirMode": "0711",
9
17
  "cleanEnvironment": true,
10
- "envAllowlist": ["HOME", "PATH", "LANG", "TZ"],
18
+ "envAllowlist": [
19
+ "HOME",
20
+ "PATH",
21
+ "LANG",
22
+ "TZ"
23
+ ],
11
24
  "ownerPinning": true,
12
25
  "nonDumpable": true
13
26
  },
14
- "network": {"proxy": "nginx", "publicBind": "127.0.0.1:3210", "adminBind": "127.0.0.1:3211", "adminProxied": false},
15
- "capacity": {"maxSessions": 20, "eviction": "lru-idle", "idleTimeoutMinutes": 15},
16
- "recycle": {"on": ["mcp", "skills", "cli"], "busySessions": "after-current-turn"},
27
+ "network": {
28
+ "proxy": "nginx",
29
+ "publicBind": "127.0.0.1:3210",
30
+ "adminBind": "127.0.0.1:3211",
31
+ "adminProxied": false,
32
+ "proxyLimits": {
33
+ "clientMaxBodySize": "25m",
34
+ "readTimeoutSeconds": 360
35
+ }
36
+ },
37
+ "capacity": {
38
+ "maxSessions": 20,
39
+ "eviction": "lru-idle",
40
+ "idleTimeoutMinutes": 15
41
+ },
42
+ "recycle": {
43
+ "on": [
44
+ "mcp",
45
+ "skills",
46
+ "cli"
47
+ ],
48
+ "busySessions": "after-current-turn"
49
+ },
17
50
  "image": {
18
51
  "label": "com.example.app=bridge-host",
19
52
  "retain": 2,
20
- "healthcheck": {"path": "/health", "attempts": 30, "intervalSeconds": 2},
53
+ "healthcheck": {
54
+ "path": "/health",
55
+ "attempts": 30,
56
+ "intervalSeconds": 2
57
+ },
21
58
  "rollback": true,
22
59
  "readOnlyRootfs": true,
23
60
  "capDropAll": true,
24
61
  "noNewPrivileges": true
25
62
  },
26
63
  "providers": [
27
- {"name": "assistant-cli", "accountType": "customer-own", "termsUrl": "https://example.com/terms", "termsReviewedAt": "2026-10-01"}
64
+ {
65
+ "name": "assistant-cli",
66
+ "accountType": "customer-own",
67
+ "termsUrl": "https://example.com/terms",
68
+ "termsReviewedAt": "2026-10-01"
69
+ }
28
70
  ]
29
71
  }
@@ -9,21 +9,189 @@
9
9
  "emailPassword": true,
10
10
  "passkeys": false
11
11
  },
12
- "roles": ["owner", "admin", "manager"],
12
+ "roles": [
13
+ "owner",
14
+ "admin",
15
+ "manager"
16
+ ],
13
17
  "events": [
14
- { "id": "booking.confirmed", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName", "arrivalNote"] },
15
- { "id": "booking.rescheduled", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName"] },
16
- { "id": "booking.cancelled", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "reason", "siteName"] },
17
- { "id": "booking.reminder", "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "siteName"] },
18
- { "id": "payment.action_required", "variables": ["customerName", "serviceName", "bookingId", "actionUrl", "siteName"] },
19
- { "id": "payment.refunded", "variables": ["customerName", "serviceName", "bookingId", "siteName"] },
20
- { "id": "payment.no_show_fee", "variables": ["customerName", "serviceName", "bookingId", "amount", "siteName"] },
21
- { "id": "package.purchase.confirmed", "variables": ["customerName", "packageName", "amount", "expiresAt", "siteName"] },
22
- { "id": "package.purchase.refunded", "variables": ["customerName", "packageName", "amount", "siteName"] },
23
- { "id": "booking.waitlist.available", "variables": ["customerName", "serviceName", "when", "locationName", "bookingUrl", "siteName"] }
18
+ {
19
+ "id": "booking.confirmed",
20
+ "variables": [
21
+ "customerName",
22
+ "serviceName",
23
+ "when",
24
+ "locationName",
25
+ "bookingId",
26
+ "manageUrl",
27
+ "siteName",
28
+ "arrivalNote"
29
+ ]
30
+ },
31
+ {
32
+ "id": "booking.rescheduled",
33
+ "variables": [
34
+ "customerName",
35
+ "serviceName",
36
+ "when",
37
+ "locationName",
38
+ "bookingId",
39
+ "manageUrl",
40
+ "siteName"
41
+ ]
42
+ },
43
+ {
44
+ "id": "booking.cancelled",
45
+ "variables": [
46
+ "customerName",
47
+ "serviceName",
48
+ "when",
49
+ "locationName",
50
+ "bookingId",
51
+ "reason",
52
+ "cancelledBy",
53
+ "siteName"
54
+ ]
55
+ },
56
+ {
57
+ "id": "booking.reminder",
58
+ "variables": [
59
+ "customerName",
60
+ "serviceName",
61
+ "when",
62
+ "locationName",
63
+ "bookingId",
64
+ "manageUrl",
65
+ "siteName"
66
+ ]
67
+ },
68
+ {
69
+ "id": "payment.action_required",
70
+ "variables": [
71
+ "customerName",
72
+ "serviceName",
73
+ "bookingId",
74
+ "actionUrl",
75
+ "siteName"
76
+ ]
77
+ },
78
+ {
79
+ "id": "payment.refunded",
80
+ "variables": [
81
+ "customerName",
82
+ "serviceName",
83
+ "bookingId",
84
+ "siteName"
85
+ ]
86
+ },
87
+ {
88
+ "id": "payment.no_show_fee",
89
+ "variables": [
90
+ "customerName",
91
+ "serviceName",
92
+ "bookingId",
93
+ "amount",
94
+ "siteName"
95
+ ]
96
+ },
97
+ {
98
+ "id": "package.purchase.confirmed",
99
+ "variables": [
100
+ "customerName",
101
+ "packageName",
102
+ "amount",
103
+ "expiresAt",
104
+ "siteName"
105
+ ]
106
+ },
107
+ {
108
+ "id": "package.purchase.refunded",
109
+ "variables": [
110
+ "customerName",
111
+ "packageName",
112
+ "amount",
113
+ "siteName"
114
+ ]
115
+ },
116
+ {
117
+ "id": "payment.late_refund_pending",
118
+ "variables": [
119
+ "customerName",
120
+ "serviceName",
121
+ "bookingId",
122
+ "amount",
123
+ "siteName"
124
+ ]
125
+ },
126
+ {
127
+ "id": "business.booking_cancelled",
128
+ "variables": [
129
+ "customerName",
130
+ "serviceName",
131
+ "when",
132
+ "bookingId",
133
+ "reason",
134
+ "cancelledBy",
135
+ "siteName"
136
+ ]
137
+ },
138
+ {
139
+ "id": "business.booking_rescheduled",
140
+ "variables": [
141
+ "customerName",
142
+ "serviceName",
143
+ "when",
144
+ "previousWhen",
145
+ "bookingId",
146
+ "siteName"
147
+ ]
148
+ },
149
+ {
150
+ "id": "business.late_payment_refund_required",
151
+ "variables": [
152
+ "customerName",
153
+ "serviceName",
154
+ "bookingId",
155
+ "amount",
156
+ "siteName"
157
+ ]
158
+ },
159
+ {
160
+ "id": "booking.waitlist.available",
161
+ "variables": [
162
+ "customerName",
163
+ "serviceName",
164
+ "when",
165
+ "locationName",
166
+ "bookingUrl",
167
+ "siteName"
168
+ ]
169
+ }
170
+ ],
171
+ "variables": [
172
+ "customerName",
173
+ "serviceName",
174
+ "when",
175
+ "locationName",
176
+ "bookingId",
177
+ "manageUrl",
178
+ "bookingUrl",
179
+ "reason",
180
+ "actionUrl",
181
+ "packageName",
182
+ "amount",
183
+ "expiresAt",
184
+ "siteName",
185
+ "arrivalNote",
186
+ "cancelledBy",
187
+ "previousWhen"
188
+ ],
189
+ "endpointIds": [
190
+ "booking.email-templates.read",
191
+ "booking.email-templates.draft",
192
+ "booking.email-templates.publish",
193
+ "booking.email-templates.rollback"
24
194
  ],
25
- "variables": ["customerName", "serviceName", "when", "locationName", "bookingId", "manageUrl", "bookingUrl", "reason", "actionUrl", "packageName", "amount", "expiresAt", "siteName", "arrivalNote"],
26
- "endpointIds": ["booking.email-templates.read", "booking.email-templates.draft", "booking.email-templates.publish", "booking.email-templates.rollback"],
27
195
  "canonicalRoutes": {
28
196
  "booking.email-templates.read": "GET /email-templates.json",
29
197
  "booking.email-templates.draft": "PATCH /email-templates.json?action=draft",