@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
package/README-zh-TW.md CHANGED
@@ -29,7 +29,53 @@ npx @topy-ai/maggie init --scope project --agent all
29
29
  npx @topy-ai/maggie doctor --scope project --project .
30
30
  ```
31
31
 
32
- 目前 npm 版本為 `0.7.52`:加入三項 mobile lane 後續修正——`maggie mobile preflight` 會在 non-interactive `eas update` script 缺少 `--environment` 時失敗,並在 build 後修改 `eas.json` 可能改變 fingerprint(OTA 更新會無聲地送不到該 build)時警告;`maggie mobile plan` 一律帶 `--environment`,每次 update 前先跑 `eas fingerprint:compare`;新增 `maggie design safe-area-check`,標出 iOS modal route 與 React Native `<Modal>` 內的 `<SafeAreaView>`(可能量到 0 的 top inset)。前一版 `0.7.51` 完成 batch 28:17 條 hosted feedback,來自一個跨平台產品開發 session(同一套 Expo 程式碼支援 web、iOS、Android,加上具備 MCP 與 ChatGPT/Claude app 的 AI 助理、產品自己的 CLI/MCP 套件、第三方 skills catalog 以及多租戶 assistant bridge host)。`maggie design app-validate` 改讀每個 viewport 的 evidence(scroll owner、固定 header/footer),只有 `app-init --pane list-detail:1024:2` 宣告的多欄版面才允許多個 scroll owner,並以 PNG 實際尺寸對照 plan viewport;`app-init --capabilities none|camera,…`(或 `--camera none`)讓非相機頁面不必填相機狀態,`--pattern` 加入新的 app UI patterns 驗收規則。新增 `maggie design app-collect`:在同一個瀏覽器分頁逐一以真實尺寸渲染已登入的 app 路由、略過 React Native Web 的包裝層計算 scroll owner、證明固定 shell,並寫出 `runtime-evidence.json` 與截圖(可 `--cdp-url` 接上已登入的 Chrome,或用專用 QA profile,`--read-only` 阻擋寫入)。新增 `maggie qa app-preflight`:偵測以 `CI=1` 或從錯誤資料夾啟動的 Metro/Expo dev server,並對會輪替的 refresh token 與連到 production API 的本機 server 發出警告。新增 `maggie-mobile-app` skill 與 `maggie mobile preflight|plan`(EAS build profile、TestFlight / Play 內部測試、EAS Update channel 與 fingerprint runtime policy、上架審核規則、建置前成本提示;`--auto-submit` 缺 `ascAppId` 或 `appVersion` policy 配上 remote build number 時在花費額度前就失敗)。新增 `maggie-assistant-tools` skill 與 `maggie assistant`(單一 tool registry、風險等級與 gate、與 model description 分開的使用者文案、由風險推導 MCP annotations、自動產生「助理能做與不能做」頁面、audit 檢查與簽章一次性 approval token 參考實作)。新增 `maggie product release-check|smoke|mcp-check|review-status`(產品 npm CLI/MCP 套件 metadata、`server.json`/`mcpName`、打包檔案機密掃描、安裝後 binary smoke、OAuth protected-resource metadata、ChatGPT/Claude/商店審核追蹤)、`maggie skills scaffold|validate|package|smoke`(第三方 skills catalog 打包成分類 plugin、all-in-one plugin 與 Claude Code `marketplace.json`)、`maggie deployment bridge-plan|bridge-collect-script|bridge-check`(多租戶 bridge host);`maggie feedback session-summary` 支援多個 repo 與一般句子形式的 commit。MaggieDash 0.2.12 從 ORA host 上游通用修正。前一版 `0.7.50`:`maggie update` 改為 idempotent,內容已與套件相同的檔案不再改寫(保留時間戳),摘要分別列出 changed/unchanged/preserved 數量,只有真的保留了本機修改時才顯示 preserved 提示。前一版 `0.7.49` 完成 batch 27:33 條 2026-09-09 至 09-16 建立但從未提交的本機 feedback drafts,已逐條對照目前程式碼(其中兩條已被既有功能滿足)。新增離線 `maggie ops notifications`(通知 catalogue 合約、consent/retention/durable lead delivery 規則、provider template drift、只檢查變數名稱的 Resend preflight、queue health 門檻與 operator alerts、dry-run retention plan);`maggie localization email-matrix` 與 `maggie localization lifecycle`(locale 優先順序、未翻譯/缺漏 locale、變數與 HTML/text 一致、market CTA route、consent-aware 行銷 email 預設不發送);Deployment 的 `--keep-releases` 統一 retention policy、`auth-canary`、資料庫 owner 無法讀取 release 路徑時的 streamed migration、`collect` 單一 readiness report;Google failure remediation(`maggie ops google-diagnose`)與唯讀 `google-ads-preflight`/`google-ads-keyword-ideas`;Social Share `reconcile`(timeout 後不重複發文)、`maggie-marketing-run-v1` 合約、命名排程層與只管制對外發布的 regulated-content review;`maggie design icon-glyph-check`、`maggie design verify`、`maggie service import-stages-validate`/`import-readiness`/`fact-provenance`;以及 `--release-metadata` 版本一致性檢查、`maggie docs rollout-status` 與 stdin batch 輸入。前一版 `0.7.48` 處理 2026-10-10 的 27 條 hosted feedback(batch 26):Social Share 新增 `adapters`(每個 provider 一組 canonical OAuth scope,LinkedIn 不同 scope 會撤銷舊 token;共用 OAuth client 警告)、`connections`(撤銷或無法解密的 token 標為 `needs_reconnect`,偵測會過期的簽名頭像 URL)、`queue`(slot-based 排程:not-before、最新優先、campaign 輪流與每日上限、DST-safe)與 `campaigns`(idea stage Start gate);Deployment 新增 hash-only `secret-fingerprint`/`secret-parity`、`env-isolation`(本機 `.env` 指向 production database 時警告)、release retention 與 worker-before-enqueue 發布順序;QA 在未明確同意時阻擋對 production API 的寫入情境,並以 `maggie qa cors-preflight` 只用 OPTIONS 檢查每個 HTTP method;Design 新增 `pressable-check`、`layer-check`(Tailwind v4 unlayered CSS)、onboarding wizard/picker 模式與 `maggie-palette-roles-v1` palette generate/validate;Marketplace 加入 screenshot 完整性與像素預算、從 CSS 量測 palette、asset provenance、中性 `displayName`(全部模板已補齊)、template studio、`maggie-template-content-v1` 合約與圖片生成成本/無文字審查 gate;Booking 新增唯讀 Stripe live setup runbook 與 gift voucher lifecycle 合約(`maggie booking voucher-contract --ledger`);Feedback 新增 `improvement` 類型與 `maggie feedback session-summary`。MaggieDash 0.2.11 會保留尚未部署 template 的 outbox email 而不是 dead-letter,並從 ORA host 上游通用修正。本版也包含 Booking 十個 email events 合約與 CLI validator 同步及安全輸出的 `arrivalNote`。前一版 `0.7.47` 處理 2026-09-26 五條新 feedback:project-scope
32
+ 目前 npm 版本為 `0.7.53`:完成 feedback batch 29,共 56 條 hosted feedback,來自一個多商家預約平台與一個社群/AI 助理產品,並同步發布 MaggieDash 0.2.13。
33
+
34
+ - **預約規則與共用測試向量**:新增 `contracts/maggiedash/booking-rules-v1.json` 與 `docs/maggiedash-booking/RULES.md`,共 19 條規則、82 個測試向量,讓每個預約系統以相同方式實作:
35
+ - 客人的管理連結可以改哪些預約、預約保留時間過期後才付款的處理;
36
+ - 排班輸入一律以店家時區解讀、Postgres bigint 金額;
37
+ - 結帳金額計算(已含在項目價格內的加購不重複計價、服務費、禮券、套票、小費分配);
38
+ - 未接上金流前不能設定訂金/全額付款,以及多階段提醒與「由誰取消」的通知;
39
+ - `.ics` 檔,以及可預約時段規則(分段營業時間、輪班、每位員工不同時長、空檔規則、團體預約、尖峰價、夏令時間);
40
+ - 角色權限與 PIN 切換、客人安全、會員與點數、員工薪資,以及客人帳號。
41
+
42
+ `maggie booking rules-vectors` 可對參考實作執行,或用 `--host-command` 對你自己的引擎執行。
43
+ - **預約平台**:託管多家商家的平台改用 Stripe Connect direct charges。`maggie booking connect-qa` 準備 Connect 測試模式的完整測試:拒絕 live key、找出測試用的 connected account、印出 `stripe listen` 指令並列出付款案例。另外提供隱藏的正式環境 smoke 商家做法。`maggie service migrate-check` 可先試跑(dry run)從 Fresha 或 CSV 搬移客人、未來預約與禮物卡。
44
+ - **MaggieDash 0.2.13**:
45
+ - 管理連結只能更動已確認且尚未開始的預約;
46
+ - 晚到的付款在時段仍空著時恢復預約,否則請商家退款;
47
+ - 提醒分 24 小時與 2 小時各發一次;
48
+ - 客人取消或改期時會通知商家;
49
+ - 確認信附上 `.ics` 檔;
50
+ - 「只看自己的預約」依權限判斷,而不是角色名稱。
51
+ - **部署**:
52
+ - `maggie deployment cloudflare-preflight` 阻止部署在缺少 token 時改用 wrangler 的 OAuth 登入、跑到另一個帳號;
53
+ - `vps-release` 把 SSR Node 發布變成一個可審閱的指令,並以部署使用者身分 build;
54
+ - `file-parity` 在局部複製檔案前檢查各主機,`warm-check` 只在暖機後才判斷延遲;
55
+ - `bridge-check` 檢查 proxy 的上傳大小與逾時上限;
56
+ - 文件補上 failover 不得重送寫入請求的規則。
57
+ - **App 與 QA**:
58
+ - `maggie qa app-preflight --expect-symbol` 證明伺服器送出的 bundle 已包含剛改的程式,並指出是哪個程序佔用 port;
59
+ - `maggie mobile ota --build-ref` 以 build 當時的設定檔發布 OTA 更新;
60
+ - `maggie qa fit-check` 檢查儀表板(包含每個分頁與抽屜)是否都不用捲動整頁;
61
+ - `maggie design textinput-check` 與新的 app 介面模式涵蓋背景工作、單行輸入框、hash 分頁、右側抽屜與依螢幕大小分頁。
62
+ - **AI 助理**:
63
+ - tool registry 支援結果卡片與存在伺服器的對話;
64
+ - 公開唯讀的探索型 MCP,已登入的 MCP 伺服器預設做 RFC 8707 audience 綁定;
65
+ - 面向訪客的預約接待助理,不會代為預約也不收卡號;
66
+ - 工作流程的常設核准(standing approval);
67
+ - Codex app-server 圖片功能說明。
68
+ - **社群與 SEO**:
69
+ - 貼文只能分享本工作區自己網域的文章,有圖片的貼文以圖片貼文發出;
70
+ - 規劃失敗時不留下空的 campaign;
71
+ - `schema-check` 找出對 Gemini 太複雜的結構化輸出 schema;
72
+ - `maggie seo origin-check` 與 `fragment-check` 涵蓋路由檢查與個人化片段的快取規則。
73
+ - **其他**:
74
+ - `maggie feedback session-summary` 可指定要讀的 revision,把專案本身的 commit 與 skill 回饋分開,超過上限時依 scope 分組而不是默默截斷;
75
+ - Marketplace 目錄改用共用的城鎮解析與名稱搜尋模組;
76
+ - 移除空的 `maggie-emdash` 資料夾。
77
+
78
+ 前一版 `0.7.52` 加入 mobile 後續修正(`eas update --environment`、fingerprint 檢查、`maggie design safe-area-check`)。`0.7.51`(batch 28)新增 `maggie design app-collect`、`maggie qa app-preflight`、`maggie-mobile-app` 與 `maggie-assistant-tools` skills,以及 `maggie product`、`maggie skills`、`maggie deployment bridge-*`。前一版 `0.7.50`:`maggie update` 改為 idempotent,內容已與套件相同的檔案不再改寫(保留時間戳),摘要分別列出 changed/unchanged/preserved 數量,只有真的保留了本機修改時才顯示 preserved 提示。前一版 `0.7.49` 完成 batch 27:33 條 2026-09-09 至 09-16 建立但從未提交的本機 feedback drafts,已逐條對照目前程式碼(其中兩條已被既有功能滿足)。新增離線 `maggie ops notifications`(通知 catalogue 合約、consent/retention/durable lead delivery 規則、provider template drift、只檢查變數名稱的 Resend preflight、queue health 門檻與 operator alerts、dry-run retention plan);`maggie localization email-matrix` 與 `maggie localization lifecycle`(locale 優先順序、未翻譯/缺漏 locale、變數與 HTML/text 一致、market CTA route、consent-aware 行銷 email 預設不發送);Deployment 的 `--keep-releases` 統一 retention policy、`auth-canary`、資料庫 owner 無法讀取 release 路徑時的 streamed migration、`collect` 單一 readiness report;Google failure remediation(`maggie ops google-diagnose`)與唯讀 `google-ads-preflight`/`google-ads-keyword-ideas`;Social Share `reconcile`(timeout 後不重複發文)、`maggie-marketing-run-v1` 合約、命名排程層與只管制對外發布的 regulated-content review;`maggie design icon-glyph-check`、`maggie design verify`、`maggie service import-stages-validate`/`import-readiness`/`fact-provenance`;以及 `--release-metadata` 版本一致性檢查、`maggie docs rollout-status` 與 stdin batch 輸入。前一版 `0.7.48` 處理 2026-10-10 的 27 條 hosted feedback(batch 26):Social Share 新增 `adapters`(每個 provider 一組 canonical OAuth scope,LinkedIn 不同 scope 會撤銷舊 token;共用 OAuth client 警告)、`connections`(撤銷或無法解密的 token 標為 `needs_reconnect`,偵測會過期的簽名頭像 URL)、`queue`(slot-based 排程:not-before、最新優先、campaign 輪流與每日上限、DST-safe)與 `campaigns`(idea stage Start gate);Deployment 新增 hash-only `secret-fingerprint`/`secret-parity`、`env-isolation`(本機 `.env` 指向 production database 時警告)、release retention 與 worker-before-enqueue 發布順序;QA 在未明確同意時阻擋對 production API 的寫入情境,並以 `maggie qa cors-preflight` 只用 OPTIONS 檢查每個 HTTP method;Design 新增 `pressable-check`、`layer-check`(Tailwind v4 unlayered CSS)、onboarding wizard/picker 模式與 `maggie-palette-roles-v1` palette generate/validate;Marketplace 加入 screenshot 完整性與像素預算、從 CSS 量測 palette、asset provenance、中性 `displayName`(全部模板已補齊)、template studio、`maggie-template-content-v1` 合約與圖片生成成本/無文字審查 gate;Booking 新增唯讀 Stripe live setup runbook 與 gift voucher lifecycle 合約(`maggie booking voucher-contract --ledger`);Feedback 新增 `improvement` 類型與 `maggie feedback session-summary`。MaggieDash 0.2.11 會保留尚未部署 template 的 outbox email 而不是 dead-letter,並從 ORA host 上游通用修正。本版也包含 Booking 十個 email events 合約與 CLI validator 同步及安全輸出的 `arrivalNote`。前一版 `0.7.47` 處理 2026-09-26 五條新 feedback:project-scope
33
79
  `maggie init` 會建立本地 memory store;context 預設只讀取本 project scope;memory hook
34
80
  在 local Python adapter 不存在時 fallback 到已安裝 CLI;重複 init 保留既有檔案與時間戳;
35
81
  `maggie feedback list` 的 `--project` 可放在子命令前或後。Generated VPS runner 現在記錄
@@ -113,7 +159,7 @@ structure drift 或重複 treatment product 時 fail closed。
113
159
  deployment、memory、feedback 和 MaggieDash。內容先 draft/review,外部寫入、
114
160
  publish 與 production deployment 需要明確確認。
115
161
 
116
- 目前 npm 版本為 `0.7.52`,包含 batch 28 產品 app、assistant tools、mobile、product release、skills catalog 與 bridge host 功能、batch 26、27 feedback 修正與 idempotent `maggie update`與 Booking email-template 合約/CLI validator 同步。本版完成 2026-09-24 booking feedback batch:Calendar grid/free-slot entry 與 host modal focus-restoration evidence。本版新增 Starter marketplace provisioning plan;本版完成 feedback batches 22、23:加入 declarative browser interaction evidence、design markup/style/content-key gate、compiler source anchoring、entity double-escape protection、`update --help` read-only、noindex hypothetical indexability、可過期 baseline acknowledgement、DOM-only link extraction regression,以及 MaggieDash 0.2.10 的 content override、短期 browser session、CDN-safe public-session cache contracts。authentication 和 isolated dev server 仍由 host 負責。`maggie-booking` workflow、傳統 email/password、Stripe、Resend、public booking flow 及既有安全邊界維持不變;provider-bound video generation 與 transactional delivery 仍記錄在 issue #39,前一批延後功能仍在 issue #38,不會直接成為 active memory。0.7.33 記錄並審查一筆更正回饋;確認 0.7.32 已正確處理 batch index,沒有修改已驗證的 shared behavior。0.7.32 加入 feedback 一基索引支援、MaggieDash panel 的 source/freshness/error evidence、Consent Mode 與實際 write/no-op reconciliation、SEO baseline recapture、sitemap origin rebasing、content-diff scope、migration ledger reconciliation、deployment credential preflight、release provenance/runtime preflight、icon release gate、opt-in blog auto-publish gate,以及 least-privilege VPS deployer。也修復 top-level `maggie feedback` dispatcher parity。0.7.31 加入 update 差異摘要、atomic installer copy、subset install manifest merge,以及 inventory drift 時 doctor non-zero。0.7.30 補上 feedback tracking issue closeout gate 與 batch 14/15 audit ledger。0.7.29 修正 npm package landing page 使用英文 README;0.7.28 加入 versioned Gemini model policy、明確 fallback 與 provenance、bundled-first CLI
162
+ 目前 npm 版本為 `0.7.53`,包含 batch 29 預約規則、部署、app QA、助理與社群功能,以及 batch 28 產品 app、assistant tools、mobile、product release、skills catalog 與 bridge host 功能、batch 26、27 feedback 修正與 idempotent `maggie update`與 Booking email-template 合約/CLI validator 同步。本版完成 2026-09-24 booking feedback batch:Calendar grid/free-slot entry 與 host modal focus-restoration evidence。本版新增 Starter marketplace provisioning plan;本版完成 feedback batches 22、23:加入 declarative browser interaction evidence、design markup/style/content-key gate、compiler source anchoring、entity double-escape protection、`update --help` read-only、noindex hypothetical indexability、可過期 baseline acknowledgement、DOM-only link extraction regression,以及 MaggieDash 0.2.10 的 content override、短期 browser session、CDN-safe public-session cache contracts。authentication 和 isolated dev server 仍由 host 負責。`maggie-booking` workflow、傳統 email/password、Stripe、Resend、public booking flow 及既有安全邊界維持不變;provider-bound video generation 與 transactional delivery 仍記錄在 issue #39,前一批延後功能仍在 issue #38,不會直接成為 active memory。0.7.33 記錄並審查一筆更正回饋;確認 0.7.32 已正確處理 batch index,沒有修改已驗證的 shared behavior。0.7.32 加入 feedback 一基索引支援、MaggieDash panel 的 source/freshness/error evidence、Consent Mode 與實際 write/no-op reconciliation、SEO baseline recapture、sitemap origin rebasing、content-diff scope、migration ledger reconciliation、deployment credential preflight、release provenance/runtime preflight、icon release gate、opt-in blog auto-publish gate,以及 least-privilege VPS deployer。也修復 top-level `maggie feedback` dispatcher parity。0.7.31 加入 update 差異摘要、atomic installer copy、subset install manifest merge,以及 inventory drift 時 doctor non-zero。0.7.30 補上 feedback tracking issue closeout gate 與 batch 14/15 audit ledger。0.7.29 修正 npm package landing page 使用英文 README;0.7.28 加入 versioned Gemini model policy、明確 fallback 與 provenance、bundled-first CLI
117
163
  dispatch、`maggie --version`、feedback batch review 聚合與重複偵測、marketplace enrichment evidence、booking
118
164
  worker/resolver evidence,以及 read-only migration preflight。它也包含 host-owned mobile app surface contract、signed-in
119
165
  camera-state QA、直接 Astro route resolution、correlated feedback batch,以及
package/README.md CHANGED
@@ -89,58 +89,70 @@ Maggie keeps the existing project foundation and asks for decisions before
89
89
  shared routes, analytics, or publishing boundaries change. The current
90
90
  package ships 22 installable skills and a local-first MaggieDash foundation.
91
91
 
92
- This package is `0.7.52`. It adds three follow-ups to the mobile
93
- lane that arrived during the 0.7.51 release: `maggie mobile preflight` fails
94
- on non-interactive `eas update` scripts without `--environment` and warns
95
- when `eas.json` can change the fingerprint after a build (OTA updates would
96
- silently stop reaching it); `maggie mobile plan` always sets `--environment`
97
- and gates every update on `eas fingerprint:compare`; and the new
98
- `maggie design safe-area-check` flags `<SafeAreaView>` inside iOS modal routes
99
- and React Native `<Modal>`, where it can measure a 0 top inset.
100
-
101
- The 0.7.51 release closed batch 28: 17 hosted feedback
102
- records from a cross-platform product session (one Expo codebase for web,
103
- iOS and Android, an assistant with MCP and ChatGPT/Claude app surfaces,
104
- product CLI/MCP packages, a third-party skills catalog, and a multi-tenant
105
- assistant bridge host):
106
-
107
- - App surfaces: `maggie design app-validate` reads per-viewport evidence
108
- (scroll owners, fixed shell), accepts extra scroll owners only where
109
- `app-init --pane list-detail:1024:2` declares them, and checks each PNG's
110
- real size against the plan viewport. `app-init --capabilities none|camera,…`
111
- (or `--camera none`) drops irrelevant device states, and `--pattern` adds
112
- acceptance rules from the new [app UI patterns](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/skills/maggie-design/references/app-ui-patterns.md).
113
- - New `maggie design app-collect`: renders a signed-in app route one viewport
114
- at a time in one browser tab at the real size, counts scroll owners while
115
- skipping React Native Web wrappers, proves the fixed shell, and writes
116
- `runtime-evidence.json` plus screenshots. It can attach to your signed-in
117
- Chrome (`--cdp-url`) or use a QA profile, and can block writes (`--read-only`).
118
- - New `maggie qa app-preflight`: catches Metro/Expo dev servers started with
119
- `CI=1` or from the wrong folder, and warns about rotating refresh tokens and
120
- local servers that talk to production APIs.
121
- - New [`maggie-mobile-app`](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/skills/maggie-mobile-app/SKILL.md) skill and
122
- `maggie mobile preflight|plan`: EAS build profiles, TestFlight / Play
123
- internal testing, EAS Update channels and the fingerprint runtime policy,
124
- store-review rules, and a cost notice. It fails before quota is spent when
125
- `--auto-submit` lacks `ascAppId` or `appVersion` runtime policy is combined
126
- with remote build numbers.
127
- - New [`maggie-assistant-tools`](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/skills/maggie-assistant-tools/SKILL.md)
128
- skill and `maggie assistant`: one tool registry with risk levels, gates and
129
- user-facing copy kept apart from model descriptions, MCP annotations derived
130
- from risk, a generated "what the assistant can and can't do" page, audit
131
- checks, and reference signed one-time approval tokens.
132
- - New `maggie product release-check|smoke|mcp-check|review-status` for a
133
- product's own npm CLI and MCP packages (metadata, `server.json`/`mcpName`,
134
- packed-file secret scan, installed-binary smoke, OAuth protected-resource
135
- metadata, ChatGPT/Claude/store review tracking).
136
- - New `maggie skills scaffold|validate|package|smoke` for third-party skill
137
- catalogs, packaging category plugins, an all-in-one plugin and a Claude Code
138
- `marketplace.json` (checked with `claude plugin validate`).
139
- - New `maggie deployment bridge-plan|bridge-collect-script|bridge-check` for a
140
- multi-tenant assistant bridge host on a VPS.
141
- - `maggie feedback session-summary` reads several repositories
142
- (`--repo app=../app --since-date …`) and classifies plain commit subjects.
143
- - MaggieDash 0.2.12 upstreams generic fixes from the ORA host.
92
+ This package is `0.7.53`. It closes feedback batch 29: 56 hosted
93
+ records from a multi-business booking marketplace and a social/assistant
94
+ product, plus MaggieDash 0.2.13.
95
+
96
+ - **Booking rules with shared test vectors.** New
97
+ [`booking-rules-v1.json`](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/contracts/maggiedash/booking-rules-v1.json) and
98
+ [RULES.md](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/docs/maggiedash-booking/RULES.md): 19 rules and 82 vectors that
99
+ every booking host implements the same way. They cover:
100
+ - which bookings a client's manage link may change, and payment that arrives after the hold expired;
101
+ - schedule inputs in the venue's time zone, and Postgres bigint money;
102
+ - till maths: add-ons not charged twice, service charge, vouchers, packages, split tips;
103
+ - deposit policies only when payments are connected, plus reminder stages and who-cancelled notices;
104
+ - `.ics` files, and availability (split hours, rotas, per-staff durations, gaps, groups, peak pricing, DST);
105
+ - roles with a PIN switch, client safety, loyalty and memberships, team pay, and customer accounts.
106
+
107
+ `maggie booking rules-vectors` runs the vectors against the reference
108
+ implementation, or against your own engine with `--host-command`.
109
+ - **Booking platforms.** Stripe Connect direct charges for platforms that host
110
+ many businesses. `maggie booking connect-qa` prepares a test-mode Connect run:
111
+ it refuses live keys, finds a test connected account, prints the
112
+ `stripe listen` command and lists the payment cases. There is also a hidden
113
+ production smoke business pattern. `maggie service migrate-check` dry-runs
114
+ moving clients, future appointments and gift cards from Fresha or CSV.
115
+ - **MaggieDash 0.2.13.**
116
+ - Manage links act only on confirmed bookings that have not started.
117
+ - A late payment reinstates the booking when the time is still free; otherwise the business is asked to refund it.
118
+ - Reminders go out at 24 h and 2 h, each once.
119
+ - The business is told when a client cancels or moves a booking.
120
+ - Confirmation emails attach an `.ics` file.
121
+ - "Own bookings only" follows permissions instead of the role name.
122
+ - **Deployment.**
123
+ - `maggie deployment cloudflare-preflight` refuses a deploy that would fall back to wrangler's OAuth login on another account.
124
+ - `vps-release` runs an SSR Node release as one reviewed command and builds as the deploy user.
125
+ - `file-parity` checks hosts before a surgical copy, and `warm-check` judges latency only after warm-up.
126
+ - `bridge-check` checks the proxy's body-size and timeout limits.
127
+ - The docs now cover failover that must not replay writes.
128
+ - **Apps and QA.**
129
+ - `maggie qa app-preflight --expect-symbol` proves the served bundle contains your edit and names who holds the port.
130
+ - `maggie mobile ota --build-ref` publishes OTA updates with the build's own config files.
131
+ - `maggie qa fit-check` checks that dashboards fit the screen, tabs and drawers included.
132
+ - `maggie design textinput-check` and new app patterns cover background jobs, a one-line composer, hash tabs, right drawers and screen-sized pagers.
133
+ - **Assistants.**
134
+ - Result cards and server-stored threads in the tool registry.
135
+ - A public read-only discovery MCP, with RFC 8707 audience binding on signed-in servers.
136
+ - A visitor-facing booking receptionist that never books or takes cards.
137
+ - Standing approvals for workflows.
138
+ - Codex app-server image notes.
139
+ - **Social and SEO.**
140
+ - Posts may only share articles from the workspace's own domain, and posts with an image go out as image posts.
141
+ - Failed plans leave no empty campaigns.
142
+ - `schema-check` catches structured-output schemas that are too complex for Gemini.
143
+ - `maggie seo origin-check` and `fragment-check` cover route checks and personalised fragments.
144
+ - **Also:**
145
+ - `maggie feedback session-summary` reads a chosen revision, separates project commits from skill feedback, and groups by scope instead of silently capping.
146
+ - Marketplace directories get one shared town and name-search module.
147
+ - The empty `maggie-emdash` folder is gone.
148
+
149
+ 0.7.52 added mobile follow-ups: `eas update --environment`, a fingerprint gate,
150
+ and `maggie design safe-area-check`. 0.7.51 (batch 28) added
151
+ `maggie design app-collect`, `maggie qa app-preflight`, and the
152
+ [`maggie-mobile-app`](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/skills/maggie-mobile-app/SKILL.md) and
153
+ [`maggie-assistant-tools`](https://github.com/TOPY-AI-LTD/ai-cmo-skills/blob/main/skills/maggie-assistant-tools/SKILL.md) skills.
154
+ It also added `maggie product`, `maggie skills` and
155
+ `maggie deployment bridge-*`.
144
156
 
145
157
  The 0.7.50 release made `maggie update` idempotent: files whose content already
146
158
  matches the package are left untouched (timestamps included) and counted as
@@ -787,8 +799,8 @@ artifact schemas.
787
799
  Recommended upgrade sequence for the current release:
788
800
 
789
801
  ```bash
790
- npx @topy-ai/maggie@0.7.52 update --scope project --project . --force
791
- npx @topy-ai/maggie@0.7.52 cleanup --scope project --project .
802
+ npx @topy-ai/maggie@0.7.53 update --scope project --project . --force
803
+ npx @topy-ai/maggie@0.7.53 cleanup --scope project --project .
792
804
  ```
793
805
 
794
806
  Maintainers should pass npm credentials through the repository helper, never
package/bin/maggie.js CHANGED
@@ -43,7 +43,7 @@ function loadSkillNames() {
43
43
  // Local regression tests may invoke the wrapper before package assembly.
44
44
  // Discover real frontmatter directories and never resurrect retired content.
45
45
  return readdirSync(SKILLS_ROOT, { withFileTypes: true })
46
- .filter((entry) => entry.isDirectory() && entry.name !== "maggie-emdash" && existsSync(join(SKILLS_ROOT, entry.name, "SKILL.md")))
46
+ .filter((entry) => entry.isDirectory() && existsSync(join(SKILLS_ROOT, entry.name, "SKILL.md")))
47
47
  .map((entry) => entry.name).sort();
48
48
  }
49
49
  }
@@ -85,6 +85,7 @@ Usage:
85
85
  maggie bootstrap interview [project]
86
86
  maggie dash init|install|status|migrate|transition|variant|cms --project PATH [options]
87
87
  maggie booking install|worker-schedule|inspect|setup|contract|runtime-validate|ops-validate|release-gate|stripe-audit|tasks --project PATH [options]
88
+ maggie booking rules-vectors [--rule ID] [--host-command CMD] | connect-qa [--detect]
88
89
  maggie dash sections <validate|prompt|keys|remap-translations|fanout-validate|locale-validate|variant-copy-validate|media-validate|bindings-validate|idempotency-validate|reconcile> [options]
89
90
  maggie dash inventory --pages-file FILE [--require-page-kinds] [--require-source-coverage]
90
91
  maggie dash api-contract --spec FILE
@@ -99,9 +100,11 @@ Usage:
99
100
  maggie dash structure-validate --model FILE --evidence FILE
100
101
  maggie design progressive-check|css-check|css-cascade-check|style-check --evidence FILE
101
102
  maggie design dash-init|dash-validate|sample-init|sample-validate [options]
102
- maggie design pressable-check|layer-check|safe-area-check --project PATH
103
+ maggie design pressable-check|layer-check|safe-area-check|textinput-check --project PATH
103
104
  maggie design palette generate --canvas HEX --text HEX --accent HEX | palette validate --palette FILE
104
105
  maggie seo privacy-check --evidence FILE
106
+ maggie seo origin-check --base-url URL [--project PATH] [--expect-host HOST]
107
+ maggie seo fragment-check --url URL [--url URL2] [--cookie-env NAME]
105
108
  maggie content FILE --source PROVIDER --project PATH --confirm
106
109
  maggie agent-content write --url URL --allowed-origin ORIGIN --token-env ENV --payload FILE
107
110
  maggie bootstrap phase <start|pass|fail|status> <phase> [project]
@@ -153,6 +156,7 @@ Usage:
153
156
  maggie service validate --project PATH
154
157
  maggie service inspect --project PATH
155
158
  maggie service status --project PATH
159
+ maggie service migrate-check --timezone Europe/London [--clients F] [--appointments F] [--gift-cards F] [--service NAME] [--staff NAME]
156
160
  maggie service orchestration-validate --project PATH --manifest FILE
157
161
  maggie service import-stages-validate --project PATH --manifest FILE
158
162
  maggie service import-readiness --project PATH [--python-module M] [--browser] [--webdriver] [--env NAME] [--country LABEL]
@@ -164,7 +168,12 @@ Usage:
164
168
  maggie deployment secret-parity --manifest api-1.json --manifest api-2.json --required KEY
165
169
  maggie deployment bridge-plan|bridge-collect-script --plan bridge-host.json
166
170
  maggie deployment bridge-check --plan bridge-host.json --observed observed.json
167
- maggie mobile preflight|plan --project PATH [--app-dir apps/app] [--profile production] [--platform ios|android|all] [--auto-submit]
171
+ maggie deployment cloudflare-preflight --project PATH [--env production] [--env-file .env] [--verify-zone]
172
+ maggie deployment file-parity --host H [--host H2] --root /srv/app/current --path dist/x.mjs [--ref DEPLOYED_COMMIT]
173
+ maggie deployment warm-check --url URL [--warm 3] [--samples 5] [--budget-ms 800]
174
+ maggie deployment vps-release --host deploy@HOST --release-root /srv/app --service app --env-file /etc/app.env [--health-url URL] [--confirm]
175
+ maggie mobile preflight|plan --project PATH [--app-dir apps/app] [--profile production] [--platform ios|android|all] [--auto-submit] [--build-ref REF]
176
+ maggie mobile ota --project PATH --build-ref REF --build-id ID --message TEXT [--confirm]
168
177
  maggie assistant registry-validate|annotations|capability-page|audit-check --registry FILE [--mcp-tools FILE] [--session FILE] [--output FILE]
169
178
  maggie assistant approval-selftest
170
179
  maggie product release-check --package DIR [--server-json FILE] [--changelog FILE] [--pack]
@@ -196,7 +205,7 @@ Usage:
196
205
  maggie localization <extract|plan|generate|preview|validate|review|publish|stale|glossary|email-matrix|lifecycle> [options]
197
206
  maggie seo performance|images|sitemap|indexnow|social-cards|head-tags [options] (sitemap supports strict validate and agent-files)
198
207
  maggie feedback <collect|preview|batch|batch-review|session-summary|submit|list> [options]
199
- maggie qa <start|record|summary|export|assertion-audit|cors-preflight|app-preflight> [options]
208
+ maggie qa <start|record|summary|export|assertion-audit|cors-preflight|app-preflight|fit-check> [options]
200
209
  maggie site-audit URL [--crawl] [--access-log FILE] [--require-sitemap-request] [--languages en-GB,es-MX,ja-JP] [--check-hreflang] [--check-internal-links]
201
210
  maggie site-audit URL --crawl --save-baseline FILE --reviewer NAME
202
211
  maggie site-audit URL --crawl --baseline FILE [--reason-all REASON]
@@ -613,10 +622,10 @@ function marketplace(args) {
613
622
  function service(args) {
614
623
  const root = projectRoot(args);
615
624
  const importCommands = ["import-stages-validate", "import-readiness", "fact-provenance"];
616
- const scriptName = args[0] === "orchestration-validate" ? "maggie_service_onboarding.py" : importCommands.includes(args[0]) ? "maggie_service_import.py" : "maggie_service_booking.py";
625
+ const scriptName = args[0] === "orchestration-validate" ? "maggie_service_onboarding.py" : args[0] === "migrate-check" ? "maggie_service_migration.py" : importCommands.includes(args[0]) ? "maggie_service_import.py" : "maggie_service_booking.py";
617
626
  const script = toolScript(scriptName, root);
618
627
  if (!existsSync(script)) throw new Error(`service booking CLI is missing: ${script}`);
619
- const result = spawnSync("python3", [script, ...(scriptName === "maggie_service_onboarding.py" ? args.slice(1) : args)], { stdio: "inherit", cwd: root, env: { ...process.env, MAGGIE_VERSION: PACKAGE_VERSION } });
628
+ const result = spawnSync("python3", [script, ...(["maggie_service_onboarding.py", "maggie_service_migration.py"].includes(scriptName) ? args.slice(1) : args)], { stdio: "inherit", cwd: root, env: { ...process.env, MAGGIE_VERSION: PACKAGE_VERSION } });
620
629
  if (result.error) throw result.error;
621
630
  process.exitCode = result.status ?? 1;
622
631
  }
@@ -630,7 +639,8 @@ function seo(args) {
630
639
  const command = args[0];
631
640
  const scripts = { performance: "maggie_performance.py", images: "maggie_images.py", sitemap: "maggie_sitemap.py", indexnow: "maggie_indexnow.py", "social-cards": "maggie_social_cards.py", "head-tags": "maggie_head_tags.py" };
632
641
  if (command === "privacy-check") return workflowCli("maggie_contracts.py", ["privacy-check", ...args.slice(1)]);
633
- if (!scripts[command]) throw new Error("seo command must be performance, images, sitemap, indexnow, social-cards, head-tags, or privacy-check");
642
+ if (command === "origin-check" || command === "fragment-check") return workflowCli("maggie_seo_routes.py", args);
643
+ if (!scripts[command]) throw new Error("seo command must be performance, images, sitemap, indexnow, social-cards, head-tags, privacy-check, origin-check, or fragment-check");
634
644
  workflowCli(scripts[command], args.slice(1));
635
645
  }
636
646
 
@@ -791,6 +801,7 @@ try {
791
801
  else if (command === "seo") seo(args);
792
802
  else if (command === "ops") workflowCli("maggie_ops.py", args);
793
803
  else if (command === "deployment" && ["bridge-plan", "bridge-collect-script", "bridge-check"].includes(args[0])) workflowCli("maggie_bridge_host.py", args);
804
+ else if (command === "deployment" && ["cloudflare-preflight", "file-parity", "warm-check", "vps-release"].includes(args[0])) workflowCli("maggie_deployment_ops.py", args);
794
805
  else if (command === "mobile") workflowCli("maggie_mobile.py", args);
795
806
  else if (command === "assistant") workflowCli("maggie_assistant_tools.py", args);
796
807
  else if (command === "product") workflowCli("maggie_product_release.py", args);
@@ -0,0 +1,161 @@
1
+ {
2
+ "schemaVersion": "maggie-assistant-tool-registry.v1",
3
+ "description": "Booking receptionist and public discovery MCP for a multi-business booking marketplace. The receptionist answers visitors on one business's page from that business's facts only; it never books, cancels or takes card details \u2014 it opens the normal booking sheet at a real free time.",
4
+ "visitorPolicy": {
5
+ "enabledByDefault": false,
6
+ "dailyCaps": {
7
+ "perVisitor": 20,
8
+ "perBusiness": 300
9
+ },
10
+ "logAnswers": true,
11
+ "factsOnly": true,
12
+ "cardDetails": "never",
13
+ "handoff": "Show the business's phone and e-mail when the answer is not in its facts."
14
+ },
15
+ "mcpServers": [
16
+ {
17
+ "name": "discovery",
18
+ "auth": "none",
19
+ "rateLimit": {
20
+ "perIpPerMinute": 30,
21
+ "perIpPerDay": 2000
22
+ }
23
+ },
24
+ {
25
+ "name": "owner",
26
+ "auth": "oauth",
27
+ "resource": "https://example.com/mcp",
28
+ "audienceBinding": true
29
+ }
30
+ ],
31
+ "threads": {
32
+ "storage": "server",
33
+ "retentionDays": 90,
34
+ "supportAccess": "with-consent",
35
+ "deleteOnAccountDeletion": true
36
+ },
37
+ "tools": [
38
+ {
39
+ "name": "business_facts",
40
+ "description": "Return this business's treatments with prices and durations, opening hours, address, policies (cancellation, deposit, patch tests) and FAQs. Answer only from this data.",
41
+ "risk": "read",
42
+ "scope": "workspace",
43
+ "channels": [
44
+ "web-widget",
45
+ "in-app"
46
+ ],
47
+ "user": {
48
+ "label": "Answer from the business's details",
49
+ "detail": "Treatments, prices, opening hours and policies."
50
+ }
51
+ },
52
+ {
53
+ "name": "free_times_find",
54
+ "description": "Return up to 6 real free start times for a treatment (optionally a team member and a day) from the live availability engine.",
55
+ "risk": "read",
56
+ "scope": "workspace",
57
+ "channels": [
58
+ "web-widget",
59
+ "in-app",
60
+ "mcp"
61
+ ],
62
+ "mcpServers": [
63
+ "discovery",
64
+ "owner"
65
+ ],
66
+ "card": "slot-picker",
67
+ "user": {
68
+ "label": "Find free times",
69
+ "detail": "Real free times you can book."
70
+ }
71
+ },
72
+ {
73
+ "name": "booking_sheet_open",
74
+ "description": "Return a link that opens the business's normal booking sheet preselected at the chosen treatment and time. The visitor books and pays there; this tool never books.",
75
+ "risk": "read",
76
+ "scope": "workspace",
77
+ "channels": [
78
+ "web-widget",
79
+ "mcp"
80
+ ],
81
+ "mcpServers": [
82
+ "discovery"
83
+ ],
84
+ "user": {
85
+ "label": "Open the booking form",
86
+ "detail": "You finish the booking yourself."
87
+ }
88
+ },
89
+ {
90
+ "name": "business_search",
91
+ "description": "Search published businesses by treatment, town and name; returns names, towns, ratings and profile links.",
92
+ "risk": "read",
93
+ "scope": "workspace",
94
+ "channels": [
95
+ "mcp",
96
+ "chatgpt",
97
+ "claude"
98
+ ],
99
+ "mcpServers": [
100
+ "discovery"
101
+ ],
102
+ "card": "list",
103
+ "user": {
104
+ "label": "Search businesses",
105
+ "detail": "Published businesses only."
106
+ }
107
+ },
108
+ {
109
+ "name": "business_details",
110
+ "description": "Return one published business's profile: treatments and prices, hours, address, booking link.",
111
+ "risk": "read",
112
+ "scope": "workspace",
113
+ "channels": [
114
+ "mcp",
115
+ "chatgpt",
116
+ "claude"
117
+ ],
118
+ "mcpServers": [
119
+ "discovery"
120
+ ],
121
+ "card": "place",
122
+ "user": {
123
+ "label": "Show a business",
124
+ "detail": "Its treatments, prices and hours."
125
+ }
126
+ },
127
+ {
128
+ "name": "booking_reschedule",
129
+ "description": "Move one of the signed-in owner's bookings to a new free time after the owner approves the change preview.",
130
+ "risk": "write-reversible",
131
+ "scope": "workspace",
132
+ "channels": [
133
+ "in-app",
134
+ "mcp"
135
+ ],
136
+ "mcpServers": [
137
+ "owner"
138
+ ],
139
+ "card": "change-preview",
140
+ "user": {
141
+ "label": "Move a booking",
142
+ "detail": "Shows the old and new time first.",
143
+ "confirm": "Move this booking to the new time and tell the client?"
144
+ }
145
+ }
146
+ ],
147
+ "cantDo": [
148
+ {
149
+ "text": "Book, cancel or change an appointment for you in the chat.",
150
+ "instead": "Pick a time and finish in the booking form."
151
+ },
152
+ {
153
+ "text": "Take card details.",
154
+ "instead": "Pay securely in the booking form."
155
+ },
156
+ {
157
+ "text": "Give medical advice.",
158
+ "instead": "Ask the business, or your doctor."
159
+ }
160
+ ]
161
+ }