@aotter/mantle 0.1.2-alpha.6 → 0.1.2-rc.1

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 (108) hide show
  1. package/README.md +11 -6
  2. package/dist/cli/generate.d.ts +9 -0
  3. package/dist/cli/generate.d.ts.map +1 -1
  4. package/dist/cli/generate.js +40 -1
  5. package/dist/cli/generate.js.map +1 -1
  6. package/dist/cli/main.d.ts +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/main.js +37 -9
  9. package/dist/cli/main.js.map +1 -1
  10. package/docs/adapter-guide.md +1 -1
  11. package/docs/adr/adr-lite-845-frontend-client.md +38 -0
  12. package/docs/agent-prompts.md +92 -0
  13. package/docs/api-mcp-authorization.md +1 -1
  14. package/docs/auth-hosting-model.md +1 -1
  15. package/docs/examples/README.md +22 -0
  16. package/docs/examples/builtin-commerce.md +269 -0
  17. package/docs/examples/builtin-intake.md +143 -0
  18. package/docs/examples/builtin-legal-documents.md +189 -0
  19. package/docs/examples/builtin-procurement.md +241 -0
  20. package/docs/examples/builtin-publication.md +241 -0
  21. package/docs/examples/builtin-reservation.md +149 -0
  22. package/docs/examples/cf-primitives-commerce-inventory.md +809 -0
  23. package/docs/examples/cf-primitives-guarded-api.md +429 -0
  24. package/docs/examples/cf-primitives-intake-hooks.md +319 -0
  25. package/docs/examples/host-chatgpt-sites/.openai/hosting.json +1 -0
  26. package/docs/examples/host-chatgpt-sites/README.md +39 -0
  27. package/docs/examples/host-chatgpt-sites/drizzle/0000_sites_users.sql +8 -0
  28. package/docs/examples/host-chatgpt-sites/drizzle/0001_mantle.sql +294 -0
  29. package/docs/examples/host-chatgpt-sites/drizzle/0002_article_cover.sql +5 -0
  30. package/docs/examples/host-chatgpt-sites/drizzle/meta/_journal.json +1 -0
  31. package/docs/examples/host-chatgpt-sites/manifests/site.yaml +27 -0
  32. package/docs/examples/host-chatgpt-sites/package-lock.json +7088 -0
  33. package/docs/examples/host-chatgpt-sites/package.json +1 -0
  34. package/docs/examples/host-chatgpt-sites/public/site.css +1 -0
  35. package/docs/examples/host-chatgpt-sites/scripts/build.mjs +12 -0
  36. package/docs/examples/host-chatgpt-sites/scripts/check.mjs +99 -0
  37. package/docs/examples/host-chatgpt-sites/scripts/migration.mjs +9 -0
  38. package/docs/examples/host-chatgpt-sites/src/chatgpt-auth.ts +63 -0
  39. package/docs/examples/host-chatgpt-sites/src/index.ts +46 -0
  40. package/docs/examples/host-chatgpt-sites/src/mcp.ts +49 -0
  41. package/docs/examples/host-chatgpt-sites/src/media.ts +109 -0
  42. package/docs/examples/host-chatgpt-sites/src/r2-lab.ts +38 -0
  43. package/docs/examples/host-chatgpt-sites/src/storage-fingerprint.json +1 -0
  44. package/docs/examples/host-chatgpt-sites/src/web.ts +35 -0
  45. package/docs/examples/host-chatgpt-sites/tsconfig.json +1 -0
  46. package/docs/examples/host-chatgpt-sites/wrangler.jsonc +10 -0
  47. package/docs/examples/host-local-admin-otp/.dev.vars.example +3 -0
  48. package/docs/examples/host-local-admin-otp/README.md +71 -0
  49. package/docs/examples/host-local-admin-otp/ensure-dev-vars.mjs +5 -0
  50. package/docs/examples/host-local-admin-otp/package.json +29 -0
  51. package/docs/examples/host-local-admin-otp/public/.gitkeep +1 -0
  52. package/docs/examples/host-local-admin-otp/smoke.mjs +141 -0
  53. package/docs/examples/host-local-admin-otp/src/index.ts +54 -0
  54. package/docs/examples/host-local-admin-otp/wrangler.jsonc +23 -0
  55. package/docs/examples/{minimal-worker → host-minimal-worker}/README.md +8 -5
  56. package/docs/examples/host-minimal-worker/manifests/site.yaml +25 -0
  57. package/docs/examples/{minimal-worker → host-minimal-worker}/package.json +3 -3
  58. package/docs/examples/host-minimal-worker/tsconfig.json +17 -0
  59. package/docs/handbook/cloudflare/authentication.md +17 -2
  60. package/docs/handbook/cloudflare/bindings.md +9 -7
  61. package/docs/handbook/cloudflare/chatgpt-sites.md +29 -0
  62. package/docs/handbook/cloudflare/conventional-worker.md +3 -3
  63. package/docs/handbook/cloudflare/deferred-hooks-queues.md +0 -1
  64. package/docs/handbook/cloudflare/deploy-and-operate.md +14 -20
  65. package/docs/handbook/cloudflare/media-r2.md +2 -2
  66. package/docs/handbook/cloudflare/public-web.md +1 -1
  67. package/docs/handbook/cloudflare/site-chrome.md +75 -0
  68. package/docs/handbook/concepts/authorization.md +2 -2
  69. package/docs/handbook/concepts/four-atoms.md +2 -2
  70. package/docs/handbook/concepts/lifecycle-and-locales.md +1 -1
  71. package/docs/handbook/concepts/mcp-and-agents.md +1 -1
  72. package/docs/handbook/concepts/procedures-and-triggers.md +1 -1
  73. package/docs/handbook/concepts/views.md +2 -2
  74. package/docs/handbook/examples/commerce-transaction.md +4 -806
  75. package/docs/handbook/examples/commerce.md +11 -0
  76. package/docs/handbook/examples/guarded-api.md +3 -420
  77. package/docs/handbook/examples/hub.md +10 -0
  78. package/docs/handbook/examples/intake-form.md +6 -313
  79. package/docs/handbook/examples/intake-hooks.md +11 -0
  80. package/docs/handbook/examples/legal-documents.md +3 -211
  81. package/docs/handbook/examples/procurement-approvals.md +3 -233
  82. package/docs/handbook/examples/publication.md +3 -233
  83. package/docs/handbook/examples/reservation.md +3 -213
  84. package/docs/handbook/navigation.json +17 -2
  85. package/docs/handbook/reference/authorization.md +1 -1
  86. package/docs/handbook/reference/procedure.md +2 -2
  87. package/docs/handbook/reference/schema.md +3 -3
  88. package/docs/handbook/reference/site-config.md +5 -16
  89. package/docs/handbook/reference/surface.md +3 -7
  90. package/docs/handbook/sites/equipment-checkout.md +231 -0
  91. package/docs/handbook/sites/host-reference.md +116 -0
  92. package/docs/handbook/sites/index.md +117 -0
  93. package/docs/handbook/start/project-and-cli.md +22 -14
  94. package/docs/handbook/start/quickstart-admin.md +239 -0
  95. package/docs/handbook/start/quickstart-worker.md +21 -22
  96. package/docs/migration-0.1.2.md +26 -0
  97. package/docs/release-process.md +90 -6
  98. package/docs/sealed-pipeline-ownership.md +1 -1
  99. package/docs/transaction-patterns.md +2 -2
  100. package/package.json +15 -15
  101. package/skills/develop/SKILL.md +32 -23
  102. package/skills/install/SKILL.md +34 -11
  103. package/skills/provision/SKILL.md +19 -5
  104. /package/docs/examples/{minimal-worker → host-local-admin-otp}/manifests/site.yaml +0 -0
  105. /package/docs/examples/{minimal-worker → host-local-admin-otp}/tsconfig.json +0 -0
  106. /package/docs/examples/{minimal-worker → host-minimal-worker}/smoke.mjs +0 -0
  107. /package/docs/examples/{minimal-worker → host-minimal-worker}/src/index.ts +0 -0
  108. /package/docs/examples/{minimal-worker → host-minimal-worker}/wrangler.jsonc +0 -0
@@ -0,0 +1 @@
1
+ {"version":"7","dialect":"sqlite","entries":[{"idx":0,"version":"6","when":1790000000000,"tag":"0000_sites_users","breakpoints":true},{"idx":1,"version":"6","when":1790000000001,"tag":"0001_mantle","breakpoints":true},{"idx":2,"version":"6","when":1790000000002,"tag":"0002_article_cover","breakpoints":true}]}
@@ -0,0 +1,27 @@
1
+ apiVersion: cms.mantle.aotter.net/v1
2
+ kind: Schema
3
+ metadata:
4
+ name: articles
5
+ spec:
6
+ title: 文章
7
+ schema:
8
+ type: object
9
+ required: [title]
10
+ properties:
11
+ title: { type: string, title: 標題, maxLength: 160 }
12
+ summary: { type: string, title: 摘要, maxLength: 1000 }
13
+ body: { type: string, title: 內容, x-mcp-hint: markdown }
14
+ coverAssetId: { type: string, title: 封面圖片, x-mantle-ref: media_assets, x-mcp-hint: media-image }
15
+ lifecycle: publishing
16
+ ---
17
+ apiVersion: cms.mantle.aotter.net/v1
18
+ kind: View
19
+ metadata:
20
+ name: published-articles
21
+ spec:
22
+ surface: public
23
+ from: articles
24
+ fields: [id, title, summary]
25
+ filter:
26
+ eq: { field: status, value: published }
27
+ limit: 20