@aotter/mantle 0.1.5-alpha.1 → 0.2.0-alpha.10
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.
- package/README.md +166 -298
- package/dist/auth/adapter.d.ts +32 -0
- package/dist/auth/adapter.js +288 -0
- package/dist/auth/admin.d.ts +3 -0
- package/dist/auth/admin.js +21 -0
- package/dist/auth/caller.d.ts +86 -0
- package/dist/auth/caller.js +155 -0
- package/dist/auth/hardening.d.ts +24 -0
- package/dist/auth/hardening.js +40 -0
- package/dist/auth/identity.d.ts +121 -0
- package/dist/auth/identity.js +203 -0
- package/dist/auth/oauth.d.ts +63 -0
- package/dist/auth/oauth.js +217 -0
- package/dist/auth/resource-seeds.js +10 -0
- package/dist/auth/routes.d.ts +32 -0
- package/dist/auth/routes.js +226 -0
- package/dist/build/compiler.d.ts +721 -0
- package/dist/build/compiler.js +7029 -0
- package/dist/build/spec/domain/model/ManifestGrammar.d.ts +439 -0
- package/dist/build/spec/domain/model/RuntimePlan.d.ts +168 -0
- package/dist/build/spec/domain/model/SqlIr.d.ts +129 -0
- package/dist/build/spec/domain/model/UserFields.d.ts +21 -0
- package/dist/build/spec/domain/service/PlanFingerprint.d.ts +7 -0
- package/dist/build/spec/kernel/diagnostic.d.ts +108 -0
- package/dist/bun/assets.d.ts +2 -0
- package/dist/bun/assets.js +24 -0
- package/dist/domain/adminOrder.js +24 -0
- package/dist/domain/columns.js +57 -0
- package/dist/domain/describe/chunk-ZVXBGP7Y.js +424 -0
- package/dist/domain/describe/index.d.ts +58 -0
- package/dist/domain/describe/index.js +115 -0
- package/dist/domain/describe/target-hash.d.ts +8 -0
- package/dist/domain/describe/target-hash.js +12 -0
- package/dist/domain/describe/targets.d.ts +40 -0
- package/dist/domain/entry.js +33 -0
- package/dist/domain/generated-tools.js +19 -0
- package/dist/domain/generation.d.ts +16 -0
- package/dist/domain/generation.js +1 -0
- package/dist/domain/input.js +17 -0
- package/dist/domain/model.js +1 -0
- package/dist/domain/paging.js +230 -0
- package/dist/domain/recipes.js +24 -0
- package/dist/domain/userReferences.js +5 -0
- package/dist/domain/wireScalars.js +47 -0
- package/dist/infrastructure/adminEntries.js +153 -0
- package/dist/infrastructure/adminPaging.js +72 -0
- package/dist/infrastructure/artifacts.js +71 -0
- package/dist/infrastructure/authSchema.js +83 -0
- package/dist/infrastructure/bundle.js +188 -0
- package/dist/infrastructure/cli.js +118 -0
- package/dist/infrastructure/generate.d.ts +12 -0
- package/dist/infrastructure/generate.js +189 -0
- package/dist/infrastructure/generateAuth.d.ts +8 -0
- package/dist/infrastructure/generateAuth.js +74 -0
- package/dist/infrastructure/help.js +60 -0
- package/dist/infrastructure/init.js +54 -0
- package/dist/infrastructure/inputs.js +41 -0
- package/dist/infrastructure/mounts.js +25 -0
- package/dist/infrastructure/wrangler.js +109 -0
- package/dist/kernel/authorization.d.ts +4 -0
- package/dist/kernel/authorization.js +16 -0
- package/dist/kernel/binds.d.ts +60 -0
- package/dist/kernel/binds.js +49 -0
- package/dist/kernel/caller-identity.d.ts +24 -0
- package/dist/kernel/caller-identity.js +22 -0
- package/dist/kernel/contract-error.d.ts +12 -0
- package/dist/kernel/contract-error.js +14 -0
- package/dist/kernel/contracts.d.ts +143 -0
- package/dist/kernel/contracts.js +97 -0
- package/dist/kernel/cron.d.ts +1 -0
- package/dist/kernel/cron.js +58 -0
- package/dist/kernel/dialect/common.d.ts +38 -0
- package/dist/kernel/dialect/common.js +6 -0
- package/dist/kernel/dialect/postgres.d.ts +16 -0
- package/dist/kernel/dialect/postgres.js +18 -0
- package/dist/kernel/dialect/sqlite.d.ts +20 -0
- package/dist/kernel/dialect/sqlite.js +34 -0
- package/dist/kernel/drain.d.ts +5 -0
- package/dist/kernel/drain.js +35 -0
- package/dist/kernel/driver/bun-sqlite.d.ts +19 -0
- package/dist/kernel/driver/bun-sqlite.js +77 -0
- package/dist/kernel/driver/d1.d.ts +24 -0
- package/dist/kernel/driver/d1.js +22 -0
- package/dist/kernel/driver/postgres.d.ts +25 -0
- package/dist/kernel/driver/postgres.js +99 -0
- package/dist/kernel/driver/transaction-context.d.ts +10 -0
- package/dist/kernel/driver/transaction-context.js +29 -0
- package/dist/kernel/email.d.ts +28 -0
- package/dist/kernel/email.js +38 -0
- package/dist/kernel/host-access.d.ts +10 -0
- package/dist/kernel/host-access.js +65 -0
- package/dist/kernel/host-caller.d.ts +39 -0
- package/dist/kernel/host-caller.js +56 -0
- package/dist/kernel/json-body.d.ts +4 -0
- package/dist/kernel/json-body.js +44 -0
- package/dist/kernel/mcp-apps.d.ts +69 -0
- package/dist/kernel/mcp-apps.js +40 -0
- package/dist/kernel/mcp-call.d.ts +5 -0
- package/dist/kernel/mcp-call.js +25 -0
- package/dist/kernel/mcp-handler.js +371 -0
- package/dist/kernel/mcp.d.ts +110 -0
- package/dist/kernel/mcp.js +50 -0
- package/dist/kernel/media.d.ts +27 -0
- package/dist/kernel/media.js +216 -0
- package/dist/kernel/paging.d.ts +55 -0
- package/dist/kernel/paging.js +95 -0
- package/dist/kernel/publishing.d.ts +4 -0
- package/dist/kernel/publishing.js +16 -0
- package/dist/kernel/r2-media.d.ts +42 -0
- package/dist/kernel/r2-media.js +78 -0
- package/dist/kernel/rest-dispatch.js +38 -0
- package/dist/kernel/rest-router.js +64 -0
- package/dist/kernel/rest.d.ts +58 -0
- package/dist/kernel/rest.js +41 -0
- package/dist/kernel/scalars.d.ts +6 -0
- package/dist/kernel/scalars.js +44 -0
- package/dist/kernel/search.js +5 -0
- package/dist/kernel/site-types.d.ts +146 -0
- package/dist/kernel/site-types.js +1 -0
- package/dist/kernel/site.d.ts +39 -0
- package/dist/kernel/site.js +32 -0
- package/dist/kernel/store.d.ts +175 -0
- package/dist/kernel/store.js +269 -0
- package/dist/kernel/surface.d.ts +10 -0
- package/dist/kernel/surface.js +19 -0
- package/dist/kernel/sweep.d.ts +17 -0
- package/dist/kernel/sweep.js +27 -0
- package/dist/kernel/translations.d.ts +1 -0
- package/dist/kernel/translations.js +13 -0
- package/dist/kernel/user-caller.d.ts +31 -0
- package/dist/kernel/user-caller.js +67 -0
- package/dist/kernel/user-field-name.js +3 -0
- package/dist/kernel/user-fields.d.ts +35 -0
- package/dist/kernel/user-fields.js +81 -0
- package/dist/kernel/validation.d.ts +15 -0
- package/dist/kernel/validation.js +54 -0
- package/dist/kernel/web-gateway.js +68 -0
- package/dist/kernel/web-head.js +15 -0
- package/dist/kernel/web-index.js +40 -0
- package/dist/kernel/web-response.js +8 -0
- package/dist/kernel/web.d.ts +77 -0
- package/dist/kernel/web.js +124 -0
- package/dist/kernel/where.js +27 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +1 -0
- package/dist/usecase/adminBindings.js +143 -0
- package/dist/usecase/adminClient.js +87 -0
- package/dist/usecase/adminDescriptors.js +107 -0
- package/dist/usecase/generate.js +166 -0
- package/dist/usecase/handlers.js +21 -0
- package/dist/usecase/mcp-media.js +17 -0
- package/dist/usecase/mcp.js +100 -0
- package/dist/usecase/paging.js +71 -0
- package/dist/usecase/publishing.js +63 -0
- package/dist/usecase/refusals.js +27 -0
- package/dist/usecase/rest.js +54 -0
- package/dist/usecase/search.js +7 -0
- package/dist/usecase/site.js +39 -0
- package/dist/usecase/stores.js +64 -0
- package/dist/usecase/tool-version.js +9 -0
- package/dist/usecase/translations.js +78 -0
- package/dist/usecase/ttl.js +20 -0
- package/dist/usecase/validation.js +241 -0
- package/dist/usecase/web.js +23 -0
- package/docs/examples/README.md +39 -18
- package/docs/examples/app-shell/.dev.vars.example +4 -0
- package/docs/examples/app-shell/README.md +121 -0
- package/docs/examples/app-shell/accept.mjs +91 -0
- package/docs/examples/app-shell/gitignore +7 -0
- package/docs/examples/app-shell/package.json +43 -0
- package/docs/examples/app-shell/pnpm-workspace.yaml +8 -0
- package/docs/examples/app-shell/smoke-kit.mjs +168 -0
- package/docs/examples/app-shell/src/auth.ts +58 -0
- package/docs/examples/app-shell/src/handlers.ts +5 -0
- package/docs/examples/app-shell/src/index.ts +4 -0
- package/docs/examples/app-shell/src/routes.ts +14 -0
- package/docs/examples/app-shell/src/schedule.ts +8 -0
- package/docs/examples/app-shell/src/service.ts +70 -0
- package/docs/examples/app-shell/src/sign-in.ts +41 -0
- package/docs/examples/app-shell/src/signup.ts +8 -0
- package/docs/examples/app-shell/tsconfig.json +26 -0
- package/docs/examples/app-shell/worker-configuration.d.ts +22 -0
- package/docs/examples/app-shell/wrangler.jsonc +62 -0
- package/docs/examples/club-events/README.md +65 -0
- package/docs/examples/club-events/manifests/club-events.yaml +247 -0
- package/docs/examples/club-events/smoke.mjs +127 -0
- package/docs/examples/club-events/src/handlers.ts +25 -0
- package/docs/examples/club-events/src/signup.ts +9 -0
- package/docs/examples/generated-web/README.md +78 -0
- package/docs/examples/generated-web/posts.yaml +38 -0
- package/docs/examples/generated-web/seed.sql +6 -0
- package/docs/examples/generated-web/src/worker.ts +43 -0
- package/docs/examples/generated-web/tsconfig.json +8 -0
- package/docs/examples/generated-web/wrangler.jsonc +8 -0
- package/docs/examples/purchasing/.dev.vars.example +6 -0
- package/docs/examples/purchasing/README.md +99 -0
- package/docs/examples/purchasing/manifests/purchasing.yaml +374 -0
- package/docs/examples/purchasing/seed.sql +4 -0
- package/docs/examples/purchasing/smoke.mjs +191 -0
- package/docs/examples/purchasing/src/admin.tsx +13 -0
- package/docs/examples/purchasing/src/handlers.ts +33 -0
- package/docs/examples/purchasing/src/notify.ts +29 -0
- package/docs/examples/purchasing/src/requests-page.ts +57 -0
- package/docs/examples/purchasing/src/routes.ts +53 -0
- package/docs/examples/purchasing/src/schedule.ts +31 -0
- package/docs/examples/purchasing/src/signup.ts +5 -0
- package/docs/examples/purchasing/src/supplier.ts +32 -0
- package/docs/examples/purchasing/wrangler.jsonc +69 -0
- package/docs/examples/recipes/README.md +60 -0
- package/docs/examples/recipes/manifests/recipes.yaml +75 -0
- package/docs/examples/recipes/smoke.mjs +102 -0
- package/docs/examples/recipes/src/media.ts +13 -0
- package/docs/examples/recipes/src/pages.ts +99 -0
- package/docs/examples/recipes/src/routes.ts +71 -0
- package/docs/examples/recipes/src/site-config.ts +12 -0
- package/docs/examples/recipes/wrangler.jsonc +74 -0
- package/docs/handbook/cloudflare/authentication.md +180 -322
- package/docs/handbook/cloudflare/chatgpt-sites.md +5 -23
- package/docs/handbook/cloudflare/deploy-and-operate.md +55 -77
- package/docs/handbook/cloudflare/media-r2.md +61 -205
- package/docs/handbook/cloudflare/service-entry.md +239 -0
- package/docs/handbook/concepts/authorization.md +10 -107
- package/docs/handbook/concepts/four-atoms.md +9 -168
- package/docs/handbook/concepts/lifecycle-and-locales.md +9 -132
- package/docs/handbook/concepts/mcp-and-agents.md +24 -121
- package/docs/handbook/concepts/procedures-and-triggers.md +5 -217
- package/docs/handbook/concepts/runtime-and-adapters.md +15 -169
- package/docs/handbook/concepts/views.md +10 -185
- package/docs/handbook/examples/hub.md +3 -8
- package/docs/handbook/guides/adapter-guide.md +11 -0
- package/docs/handbook/guides/admin-ui.md +115 -133
- package/docs/handbook/guides/agent-setup.md +64 -74
- package/docs/handbook/guides/agent-workflow-acceptance.md +232 -0
- package/docs/handbook/guides/email.md +86 -0
- package/docs/handbook/guides/local-testing.md +40 -0
- package/docs/handbook/guides/mcp-apps.md +560 -0
- package/docs/handbook/guides/native-admin.md +566 -0
- package/docs/handbook/guides/native-execution.md +133 -0
- package/docs/handbook/guides/oauth.md +219 -0
- package/docs/handbook/guides/postgres-adapters.md +56 -0
- package/docs/handbook/guides/public-pages.md +87 -0
- package/docs/handbook/guides/size-and-startup.md +9 -0
- package/docs/handbook/guides/sql-patterns.md +266 -0
- package/docs/handbook/guides/typed-queries.md +211 -107
- package/docs/handbook/navigation.json +176 -55
- package/docs/handbook/reference/admin-descriptors.md +53 -0
- package/docs/handbook/reference/authorization.md +39 -266
- package/docs/handbook/reference/describe.md +56 -0
- package/docs/handbook/reference/diagnostics.md +19 -186
- package/docs/handbook/reference/features.md +45 -55
- package/docs/handbook/reference/manifest.md +6 -129
- package/docs/handbook/reference/procedure.md +11 -303
- package/docs/handbook/reference/schema.md +64 -240
- package/docs/handbook/reference/site-config.md +5 -218
- package/docs/handbook/reference/sql.md +64 -0
- package/docs/handbook/reference/surface.md +392 -201
- package/docs/handbook/reference/trigger.md +56 -192
- package/docs/handbook/reference/view.md +24 -243
- package/docs/handbook/releases/index.md +244 -77
- package/docs/handbook/start/agents.md +45 -0
- package/docs/handbook/start/overview.md +9 -48
- package/docs/handbook/start/project-and-cli.md +51 -104
- package/docs/handbook/start/quickstart-worker.md +43 -178
- package/docs/skills/develop/SKILL.md +79 -249
- package/docs/skills/integrate/SKILL.md +39 -50
- package/docs/skills/media-gc/SKILL.md +34 -10
- package/docs/skills/provision/SKILL.md +36 -186
- package/docs/skills/update/SKILL.md +23 -38
- package/docs/source/scripts/postgres-adapter.ts +101 -0
- package/docs/upgrade-0.1-to-0.2.md +227 -0
- package/package.json +120 -131
- package/skills/README.md +48 -108
- package/skills/mantle/SKILL.md +76 -0
- package/dist/admin-ui.d.ts +0 -2
- package/dist/admin-ui.d.ts.map +0 -1
- package/dist/admin-ui.js +0 -2
- package/dist/admin-ui.js.map +0 -1
- package/dist/admin.d.ts +0 -2
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js +0 -2
- package/dist/admin.js.map +0 -1
- package/dist/auth.d.ts +0 -2
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -2
- package/dist/auth.js.map +0 -1
- package/dist/bun.d.ts +0 -2
- package/dist/bun.d.ts.map +0 -1
- package/dist/bun.js +0 -2
- package/dist/bun.js.map +0 -1
- package/dist/cli/generate-cloudflare.d.ts +0 -7
- package/dist/cli/generate-cloudflare.d.ts.map +0 -1
- package/dist/cli/generate-cloudflare.js +0 -123
- package/dist/cli/generate-cloudflare.js.map +0 -1
- package/dist/cli/generate-project.d.ts +0 -25
- package/dist/cli/generate-project.d.ts.map +0 -1
- package/dist/cli/generate-project.js +0 -282
- package/dist/cli/generate-project.js.map +0 -1
- package/dist/cli/generate-sites.d.ts +0 -8
- package/dist/cli/generate-sites.d.ts.map +0 -1
- package/dist/cli/generate-sites.js +0 -273
- package/dist/cli/generate-sites.js.map +0 -1
- package/dist/cli/generate.d.ts +0 -20
- package/dist/cli/generate.d.ts.map +0 -1
- package/dist/cli/generate.js +0 -299
- package/dist/cli/generate.js.map +0 -1
- package/dist/cli/harness.d.ts +0 -3
- package/dist/cli/harness.d.ts.map +0 -1
- package/dist/cli/harness.js +0 -214
- package/dist/cli/harness.js.map +0 -1
- package/dist/cli/main.d.ts +0 -3
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -77
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/skills.d.ts +0 -3
- package/dist/cli/skills.d.ts.map +0 -1
- package/dist/cli/skills.js +0 -128
- package/dist/cli/skills.js.map +0 -1
- package/dist/cloudflare.d.ts +0 -2
- package/dist/cloudflare.d.ts.map +0 -1
- package/dist/cloudflare.js +0 -2
- package/dist/cloudflare.js.map +0 -1
- package/dist/codegen/emitMantleModule.d.ts +0 -22
- package/dist/codegen/emitMantleModule.d.ts.map +0 -1
- package/dist/codegen/emitMantleModule.js +0 -291
- package/dist/codegen/emitMantleModule.js.map +0 -1
- package/dist/codegen.d.ts +0 -2
- package/dist/codegen.d.ts.map +0 -1
- package/dist/codegen.js +0 -2
- package/dist/codegen.js.map +0 -1
- package/dist/runtime-testing.d.ts +0 -2
- package/dist/runtime-testing.d.ts.map +0 -1
- package/dist/runtime-testing.js +0 -2
- package/dist/runtime-testing.js.map +0 -1
- package/dist/runtime.d.ts +0 -2
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js +0 -2
- package/dist/runtime.js.map +0 -1
- package/dist/spec.d.ts +0 -2
- package/dist/spec.d.ts.map +0 -1
- package/dist/spec.js +0 -2
- package/dist/spec.js.map +0 -1
- package/dist/vercel-libsql.d.ts +0 -2
- package/dist/vercel-libsql.d.ts.map +0 -1
- package/dist/vercel-libsql.js +0 -2
- package/dist/vercel-libsql.js.map +0 -1
- package/dist/vercel.d.ts +0 -2
- package/dist/vercel.d.ts.map +0 -1
- package/dist/vercel.js +0 -2
- package/dist/vercel.js.map +0 -1
- package/dist/web.d.ts +0 -2
- package/dist/web.d.ts.map +0 -1
- package/dist/web.js +0 -2
- package/dist/web.js.map +0 -1
- package/docs/adapter-guide.md +0 -222
- package/docs/adr/0001-four-atom-manifest-model.md +0 -440
- package/docs/adr/0002-closed-enums-for-bindings.md +0 -253
- package/docs/adr/0007-ai-as-primary-author.md +0 -473
- package/docs/adr/0008-structured-diagnostic-shape.md +0 -338
- package/docs/adr/0009-consumer-supplied-manifests.md +0 -149
- package/docs/adr/0010-locale-and-translates.md +0 -453
- package/docs/adr/0011-adapter-port-spec.md +0 -281
- package/docs/adr/0012-views-as-public-rest.md +0 -161
- package/docs/adr/0013-agent-provisioned-consumer-projects.md +0 -154
- package/docs/adr/0014-auth-better-auth-and-multi-tenant-mcp.md +0 -900
- package/docs/adr/0016-site-semantic-layer.md +0 -70
- package/docs/adr/0017-media-multi-variant-agent-side-optimization.md +0 -181
- package/docs/adr/0018-core-starters-repository-boundary.md +0 -179
- package/docs/adr/0019-sealed-manifest-runtime-pipeline.md +0 -240
- package/docs/adr/0020-builtin-handler-contracts-and-matched-upsert.md +0 -199
- package/docs/adr/0021-retire-starter-scaffolding.md +0 -30
- package/docs/adr/0022-caller-observed-version-occ.md +0 -212
- package/docs/adr/0023-port-failure-contract.md +0 -69
- package/docs/adr/0024-manifest-native-schema-tables.md +0 -264
- package/docs/adr/0025-reserved-native-columns-and-published-only-public-views.md +0 -105
- package/docs/adr/0026-progressive-generate.md +0 -36
- package/docs/adr/0027-scheduled-procedure-triggers.md +0 -31
- package/docs/adr/0028-schema-ttl-expiry.md +0 -33
- package/docs/adr/README.md +0 -81
- package/docs/adr/adr-lite-803-request-diagnostics.md +0 -38
- package/docs/adr/adr-lite-808-route-readiness.md +0 -47
- package/docs/adr/adr-lite-809-bounded-public-content.md +0 -71
- package/docs/adr/adr-lite-812-native-parity.md +0 -150
- package/docs/adr/adr-lite-823-home-statistics.md +0 -64
- package/docs/adr/adr-lite-842-mcp-authoring.md +0 -30
- package/docs/adr/adr-lite-845-frontend-client.md +0 -38
- package/docs/adr/adr-lite-861-admin-webmcp.md +0 -42
- package/docs/adr/adr-lite-909-admin-ui-kit.md +0 -37
- package/docs/agent-prompts.md +0 -64
- package/docs/api-mcp-authorization.md +0 -5
- package/docs/assets/mantle-admin-developer.png +0 -0
- package/docs/assets/mantle-admin-operations.png +0 -0
- package/docs/assets/mantle-hero.jpg +0 -0
- package/docs/auth-hosting-model.md +0 -166
- package/docs/cloudflare-low-level-composition.md +0 -5
- package/docs/consumer-onboarding-audit.md +0 -65
- package/docs/deferred-lifecycle-queues.md +0 -5
- package/docs/design-atoms.md +0 -16
- package/docs/design-references/editorial-blog-2026-05-05.md +0 -218
- package/docs/direct-authoring.md +0 -5
- package/docs/examples/builtin-commerce.md +0 -269
- package/docs/examples/builtin-intake.md +0 -143
- package/docs/examples/builtin-legal-documents.md +0 -189
- package/docs/examples/builtin-procurement.md +0 -241
- package/docs/examples/builtin-publication.md +0 -241
- package/docs/examples/builtin-reservation.md +0 -149
- package/docs/examples/cf-primitives-commerce-inventory.md +0 -809
- package/docs/examples/cf-primitives-guarded-api.md +0 -429
- package/docs/examples/cf-primitives-intake-hooks.md +0 -319
- package/docs/examples/host-chatgpt-sites/.openai/hosting.json +0 -1
- package/docs/examples/host-chatgpt-sites/README.md +0 -70
- package/docs/examples/host-chatgpt-sites/drizzle/0000_sites_users.sql +0 -8
- package/docs/examples/host-chatgpt-sites/drizzle/0001_mantle.sql +0 -294
- package/docs/examples/host-chatgpt-sites/drizzle/0002_article_cover.sql +0 -5
- package/docs/examples/host-chatgpt-sites/drizzle/0003_store_instance_id.sql +0 -1
- package/docs/examples/host-chatgpt-sites/drizzle/0004_mantle.sql +0 -10
- package/docs/examples/host-chatgpt-sites/drizzle/0005_mantle.sql +0 -24
- package/docs/examples/host-chatgpt-sites/drizzle/meta/_journal.json +0 -1
- package/docs/examples/host-chatgpt-sites/drizzle/meta/mantle-state.json +0 -60
- package/docs/examples/host-chatgpt-sites/manifests/site.yaml +0 -27
- package/docs/examples/host-chatgpt-sites/package.json +0 -1
- package/docs/examples/host-chatgpt-sites/public/site.css +0 -1
- package/docs/examples/host-chatgpt-sites/scripts/build.mjs +0 -13
- package/docs/examples/host-chatgpt-sites/scripts/check.mjs +0 -101
- package/docs/examples/host-chatgpt-sites/scripts/migration.mjs +0 -43
- package/docs/examples/host-chatgpt-sites/src/chatgpt-auth.ts +0 -66
- package/docs/examples/host-chatgpt-sites/src/index.ts +0 -46
- package/docs/examples/host-chatgpt-sites/src/mcp.ts +0 -49
- package/docs/examples/host-chatgpt-sites/src/media.ts +0 -109
- package/docs/examples/host-chatgpt-sites/src/r2-lab.ts +0 -38
- package/docs/examples/host-chatgpt-sites/src/storage-fingerprint.json +0 -1
- package/docs/examples/host-chatgpt-sites/src/web.ts +0 -35
- package/docs/examples/host-chatgpt-sites/tsconfig.json +0 -1
- package/docs/examples/host-chatgpt-sites/wrangler.jsonc +0 -10
- package/docs/examples/host-local-admin-otp/.dev.vars.example +0 -3
- package/docs/examples/host-local-admin-otp/README.md +0 -80
- package/docs/examples/host-local-admin-otp/ensure-dev-vars.mjs +0 -5
- package/docs/examples/host-local-admin-otp/manifests/site.yaml +0 -25
- package/docs/examples/host-local-admin-otp/package.json +0 -29
- package/docs/examples/host-local-admin-otp/public/.gitkeep +0 -1
- package/docs/examples/host-local-admin-otp/smoke.mjs +0 -141
- package/docs/examples/host-local-admin-otp/src/index.ts +0 -54
- package/docs/examples/host-local-admin-otp/tsconfig.json +0 -17
- package/docs/examples/host-local-admin-otp/wrangler.jsonc +0 -23
- package/docs/examples/host-minimal-worker/README.md +0 -41
- package/docs/examples/host-minimal-worker/manifests/site.yaml +0 -25
- package/docs/examples/host-minimal-worker/package.json +0 -26
- package/docs/examples/host-minimal-worker/smoke.mjs +0 -23
- package/docs/examples/host-minimal-worker/src/index.ts +0 -4
- package/docs/examples/host-minimal-worker/tsconfig.json +0 -17
- package/docs/examples/host-minimal-worker/wrangler.jsonc +0 -22
- package/docs/handbook/chatgpt-sites/equipment-checkout.md +0 -231
- package/docs/handbook/chatgpt-sites/generated-app.md +0 -84
- package/docs/handbook/chatgpt-sites/host-reference.md +0 -113
- package/docs/handbook/chatgpt-sites/index.md +0 -133
- package/docs/handbook/cloudflare/bindings.md +0 -291
- package/docs/handbook/cloudflare/conventional-worker.md +0 -166
- package/docs/handbook/cloudflare/deferred-hooks-queues.md +0 -170
- package/docs/handbook/cloudflare/low-level-composition.md +0 -169
- package/docs/handbook/cloudflare/public-web.md +0 -144
- package/docs/handbook/cloudflare/site-chrome.md +0 -75
- package/docs/handbook/examples/commerce-transaction.md +0 -11
- package/docs/handbook/examples/commerce.md +0 -11
- package/docs/handbook/examples/guarded-api.md +0 -10
- package/docs/handbook/examples/intake-form.md +0 -12
- package/docs/handbook/examples/intake-hooks.md +0 -11
- package/docs/handbook/examples/legal-documents.md +0 -10
- package/docs/handbook/examples/procurement-approvals.md +0 -10
- package/docs/handbook/examples/publication.md +0 -10
- package/docs/handbook/examples/reservation.md +0 -10
- package/docs/handbook/start/quickstart-admin.md +0 -52
- package/docs/labels.md +0 -71
- package/docs/media-uploads.md +0 -5
- package/docs/migration-0.1.2.md +0 -13
- package/docs/performance-harness.md +0 -228
- package/docs/release-process.md +0 -244
- package/docs/schema-indexes.md +0 -5
- package/docs/sealed-pipeline-ownership.md +0 -101
- package/docs/skills/plugin/SKILL.md +0 -132
- package/docs/skills/theme/SKILL.md +0 -77
- package/docs/spec-only-host-adoption.md +0 -157
- package/docs/transaction-patterns.md +0 -5
- package/skills/develop/SKILL.md +0 -258
- package/skills/install/SKILL.md +0 -112
- package/skills/integrate/SKILL.md +0 -60
- package/skills/media-gc/SKILL.md +0 -85
- package/skills/plugin/SKILL.md +0 -132
- package/skills/provision/SKILL.md +0 -194
- package/skills/theme/SKILL.md +0 -77
- package/skills/update/SKILL.md +0 -51
- package/templates/chatgpt-sites/auth.ts +0 -66
- package/templates/chatgpt-sites/build.mjs +0 -14
- package/templates/chatgpt-sites/env.ts +0 -1
- package/templates/chatgpt-sites/mcp.ts +0 -48
- package/templates/chatgpt-sites/public-mcp.ts +0 -29
- package/templates/chatgpt-sites/smoke-local.mjs +0 -20
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Auth Hosting Model
|
|
2
|
-
|
|
3
|
-
Mantle treats authentication as a runtime capability, not a paywall on
|
|
4
|
-
basic login. The split is:
|
|
5
|
-
|
|
6
|
-
- **Mantle SDK** gives every generated site the primitives needed to
|
|
7
|
-
run its own auth.
|
|
8
|
-
- **Mantle's conventional Cloudflare adapter** runs the generated site's
|
|
9
|
-
selected self-hosted or Mantle Platform hosted client configuration.
|
|
10
|
-
- **The application owner/host** declares the explicit auth mode and provider
|
|
11
|
-
configuration.
|
|
12
|
-
- **Mantle Platform** can sell hosted identity, provider setup, email,
|
|
13
|
-
and billing convenience for site owners who do not want to operate
|
|
14
|
-
those pieces.
|
|
15
|
-
|
|
16
|
-
This document is the source of truth for the product and SDK boundary.
|
|
17
|
-
Do not duplicate this model in starter handoff copy or landing prose;
|
|
18
|
-
link here and keep downstream docs short.
|
|
19
|
-
|
|
20
|
-
## Free Self-Hosted Auth
|
|
21
|
-
|
|
22
|
-
A free Mantle site can run every login method the SDK exposes through
|
|
23
|
-
`createAuth()`:
|
|
24
|
-
|
|
25
|
-
- social OAuth providers supported by Better Auth;
|
|
26
|
-
- provider-specific options through Better Auth's native `socialProviders` types;
|
|
27
|
-
- email OTP;
|
|
28
|
-
- magic link;
|
|
29
|
-
- passkey or another Better Auth method through the raw `plugins` path when the
|
|
30
|
-
application owns its callback and UI;
|
|
31
|
-
- first-party same-domain or same-parent-domain SSO when the site owner
|
|
32
|
-
controls every participating subdomain.
|
|
33
|
-
|
|
34
|
-
The site owner supplies their own provider client ids/secrets,
|
|
35
|
-
transactional email sender, DNS, cookie policy, and operational
|
|
36
|
-
maintenance. Mantle must not block self-hosted login behind a paid
|
|
37
|
-
feature flag.
|
|
38
|
-
|
|
39
|
-
## Hosted Platform Auth
|
|
40
|
-
|
|
41
|
-
Paid hosted auth is a convenience and operations product. The value is
|
|
42
|
-
that Mantle Platform can:
|
|
43
|
-
|
|
44
|
-
- hold OAuth provider configuration;
|
|
45
|
-
- hold email provider credentials;
|
|
46
|
-
- send OTP and magic-link email;
|
|
47
|
-
- manage deliverability and provider rotation;
|
|
48
|
-
- register generated sites as clients;
|
|
49
|
-
- check billing/license entitlements before hosted capabilities are
|
|
50
|
-
enabled;
|
|
51
|
-
- expose a stable hosted identity broker for generated sites.
|
|
52
|
-
|
|
53
|
-
The generated site still owns local grants, member records, content,
|
|
54
|
-
orders, forms, and legal copy. Platform returns identity. The site maps
|
|
55
|
-
that identity into `ctx.user`, `ctx.staff`, and its own grant model.
|
|
56
|
-
|
|
57
|
-
## Same Parent Domain SSO
|
|
58
|
-
|
|
59
|
-
When the apps share a parent domain that the same party controls, SSO
|
|
60
|
-
can use browser cookies:
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
createAuth({
|
|
64
|
-
// ...
|
|
65
|
-
trustedOrigins: ["https://mantle.tools", "https://www.mantle.tools"],
|
|
66
|
-
cookiePrefix: "mantle-platform",
|
|
67
|
-
crossSubDomainCookies: {
|
|
68
|
-
enabled: true,
|
|
69
|
-
domain: "mantle.tools",
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Use this only for a trusted first-party app family, for example
|
|
75
|
-
`platform.mantle.tools` and `mantle.tools`.
|
|
76
|
-
|
|
77
|
-
`cookiePrefix` is required whenever more than one Better Auth app can
|
|
78
|
-
write cookies under the same parent domain. Without it, Platform and
|
|
79
|
-
Landing can overwrite each other's default Better Auth cookie names.
|
|
80
|
-
|
|
81
|
-
`trustedOrigins` is a Better Auth auth-flow trust list. It is not a
|
|
82
|
-
general API CORS policy and must not be documented as one.
|
|
83
|
-
|
|
84
|
-
## Customer Domain SSO
|
|
85
|
-
|
|
86
|
-
Shared cookies do not work across different registrable domains:
|
|
87
|
-
|
|
88
|
-
```text
|
|
89
|
-
platform.mantle.tools -> customer.com
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Browsers will not send a `mantle.tools` cookie to `customer.com`. For a
|
|
93
|
-
customer-owned domain, hosted auth must use OAuth/OIDC:
|
|
94
|
-
|
|
95
|
-
```text
|
|
96
|
-
customer.com/login
|
|
97
|
-
-> platform.mantle.tools/api/auth/oauth2/authorize
|
|
98
|
-
-> user signs in with Platform-supported methods
|
|
99
|
-
-> customer.com/api/auth/callback/mantle
|
|
100
|
-
-> customer.com verifies the authorization response
|
|
101
|
-
-> customer.com creates its own local session
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
That local session is the customer's site session. Platform remains the
|
|
105
|
-
identity broker and entitlement authority; it does not become the
|
|
106
|
-
customer site's member database or authorization system.
|
|
107
|
-
|
|
108
|
-
## Landing Provisioning Split
|
|
109
|
-
|
|
110
|
-
Landing should branch before GitHub or Cloudflare side effects:
|
|
111
|
-
|
|
112
|
-
- **Continue free**: commit a self-hosted auth-ready site with docs,
|
|
113
|
-
env placeholders, and the user's own provider setup path.
|
|
114
|
-
- **Use hosted auth**: check Platform entitlement, register the site as
|
|
115
|
-
a Platform auth client, and commit the generated site's Platform auth
|
|
116
|
-
client config.
|
|
117
|
-
|
|
118
|
-
Landing can probe Platform staff/session state, but provisioning's
|
|
119
|
-
GitHub OAuth token is still Landing-owned unless a separate token
|
|
120
|
-
handoff design is introduced.
|
|
121
|
-
|
|
122
|
-
The conventional hosted-auth client wiring belongs in Core's Cloudflare
|
|
123
|
-
adapter. Applications declare its environment bindings; a provisioning host supplies an
|
|
124
|
-
allocated client. A site can still replace Auth construction through
|
|
125
|
-
`createMantleWorker({ auth })` when it needs a different curated identity
|
|
126
|
-
design. Core continues to own the normalized manifest/runtime credential
|
|
127
|
-
vocabulary (`ctx.user`, `ctx.staff`, `ctx.auth`) and guard orchestration.
|
|
128
|
-
|
|
129
|
-
## API and MCP Authorization
|
|
130
|
-
|
|
131
|
-
Login hosting and business API authorization are related but separate. Core
|
|
132
|
-
provides a normalized verified-credential context (`ctx.auth`), closed scope
|
|
133
|
-
predicates, one Cloudflare consumer credential resolver seam, and a
|
|
134
|
-
Procedure-backed guard that REST and MCP both execute. A generated site owns
|
|
135
|
-
API keys, personal tokens, grants, transactions, subscriptions, and the guard
|
|
136
|
-
handler that checks current business state.
|
|
137
|
-
|
|
138
|
-
Mantle Platform may be the identity or OAuth token authority for a hosted
|
|
139
|
-
flow. That does not make token claims the generated site's live membership or
|
|
140
|
-
entitlement authority. The target site's guard reads its authoritative state
|
|
141
|
-
on every call. See [API and MCP authorization](examples/cf-primitives-guarded-api.md) for
|
|
142
|
-
the exact public API and four consumer examples.
|
|
143
|
-
|
|
144
|
-
## SDK Surface Rule
|
|
145
|
-
|
|
146
|
-
Mantle owns only integration fields with a real Mantle use case. Method
|
|
147
|
-
configuration uses Better Auth's official provider/plugin option types; do not
|
|
148
|
-
copy those unions or add a generic `Partial<BetterAuthOptions>` deep merge.
|
|
149
|
-
|
|
150
|
-
The current first-party SSO use case justifies these optional fields on
|
|
151
|
-
`CreateAuthConfig`:
|
|
152
|
-
|
|
153
|
-
- `trustedOrigins`
|
|
154
|
-
- `crossSubDomainCookies`
|
|
155
|
-
- `cookiePrefix`
|
|
156
|
-
|
|
157
|
-
The cross-site API use case additionally justifies these fields and facades:
|
|
158
|
-
|
|
159
|
-
- native generic OAuth `authorizationUrlParams`, `tokenUrlParams`, and
|
|
160
|
-
`refreshTokenParams` for RFC 8707 `resource`
|
|
161
|
-
- OAuth provider `resources` and the curated `mcpResource`
|
|
162
|
-
- `Auth.getProviderAccessToken(request, providerId)`
|
|
163
|
-
- `Auth.verifyOAuthAccessToken(tokenOrRequest, { audience, scopes })`
|
|
164
|
-
|
|
165
|
-
Generic OAuth providers use Better Auth 1.7's official `GenericOAuthConfig`,
|
|
166
|
-
standard social sign-in and `/api/auth/callback/:id` path.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Cloudflare low-level composition
|
|
2
|
-
|
|
3
|
-
This guide moved into the handbook: [`docs/handbook/cloudflare/low-level-composition.md`](handbook/cloudflare/low-level-composition.md).
|
|
4
|
-
|
|
5
|
-
The handbook ships inside the `@aotter/mantle` package under `node_modules/@aotter/mantle/docs/handbook/` and describes the installed release.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Consumer onboarding audit for 0.1.3
|
|
2
|
-
|
|
3
|
-
Scope: source skill install → pinned npm package → CLI → generated skills and
|
|
4
|
-
handbook → application manifest and Admin customization. This is maintainer
|
|
5
|
-
evidence, not a release announcement. Baseline: develop `b90cebbd`, package
|
|
6
|
-
version `0.1.3-alpha.5`; the package version alone does not identify unreleased
|
|
7
|
-
commits on develop. Tracking: [#1042](https://github.com/aotter/mantle/issues/1042).
|
|
8
|
-
|
|
9
|
-
## Clean source install
|
|
10
|
-
|
|
11
|
-
Executed in an empty temporary directory:
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npx --yes skills add aotter/mantle --skill install --agent codex --yes
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Observed output: repository cloned, **7 skills found**, **1 selected**, copied
|
|
18
|
-
to `./.agents/skills/install`. `skills-lock.json` records source `aotter/mantle`,
|
|
19
|
-
source type `github`, and source path `skills/install/SKILL.md`. The installed
|
|
20
|
-
file's hash in that lock was
|
|
21
|
-
`8a6fd26aea97ae8bdf3e05fef22196c247b3f95aa049204a6ac51259d87e4e29`.
|
|
22
|
-
No SDK, handbook or application is installed by that command. The explicit
|
|
23
|
-
Codex and noninteractive flags make the audited destination reproducible;
|
|
24
|
-
other selected agents/global scope can use another destination.
|
|
25
|
-
|
|
26
|
-
This source install follows the repository's default ref. It does not test the
|
|
27
|
-
unreleased edits in this PR or establish an npm version. The packed-consumer
|
|
28
|
-
check below tests this branch's shipped instructions separately.
|
|
29
|
-
|
|
30
|
-
## White-box path and fixes
|
|
31
|
-
|
|
32
|
-
| Stage / owner | Finding before this change | Correction |
|
|
33
|
-
|---|---|---|
|
|
34
|
-
| README → external skills installer | Prompt told the agent to read `skills/install/SKILL.md` and `docs/agent-prompts.md`, neither installed there. | Read the installer-reported destination, then the installed SDK's embedded docs. |
|
|
35
|
-
| `skills/install/SKILL.md` | Bootstrap Git instructions did not explicitly hand off to the installed package's own install skill; `docs/...` root was implicit. Host interview was repeated. | Explicit package-root resolution and version authority; ask only for missing requirements. |
|
|
36
|
-
| Install → CLI | It was possible to try the local CLI before installing Core; `generate` in an empty directory fails rather than creating a project. | Spell out package installation before CLI and manifest authoring before generation. |
|
|
37
|
-
| Quickstart versions | Floating `latest` dependency examples contradicted exact-pin advice. | Resolve the requested channel once and save exact Mantle versions before the first build. |
|
|
38
|
-
| `mantle skills` | Correctly projected four project skills, but success output did not tell the agent what to read next. | Print the projected develop skill and installed handbook entry. Document overwrite, drift and opt-in behavior. |
|
|
39
|
-
| `sync-package-docs.mjs` → npm `files` | Docs and all seven skills already shipped; presence checks did not protect the new entry paths or exercise projection from the tarball. | Assert handbook/skill files and byte-identical `.agents`/`.claude` projection in the existing packed-consumer check. |
|
|
40
|
-
| View concepts → grammar/runtime | Concepts denied internal Views and recommended SQL for every new View; reference `surface` table omitted `internal`. SQL admission text was stale. | Match implemented surfaces, typed declarative reads, SQLite admission sandbox and native-dialect limits. |
|
|
41
|
-
| Manifest reference | View's allowed spec keys omitted `cache`; Schema list-column prose omitted native columns. | Reconcile with parser and Admin UI checker. |
|
|
42
|
-
| Plugin/update skills | Assumed conventional source paths, missed regeneration after plugin manifest edits, and treated every View as publicly callable. | Use actual project paths, regenerate the plan, verify the declared surface and distinguish stable index from target prerelease docs. |
|
|
43
|
-
| Feature discovery | No task-to-manifest capability map or usable human entry; reference was buried after host-specific sections. | Add overview, capability table and task guides; move reference before host guides without breaking existing URLs. |
|
|
44
|
-
| Typed query discovery | APIs existed but lacked a complete internal-View calling example or clear reader authorization distinction. | Explain generated params/results, runtime `result` versus REST `data`, SQL `unknown`, indexed reader limits and plan-based emission. |
|
|
45
|
-
| Admin requests → theme/develop skills | Theme skill targeted visitor source; no routing from an Admin request to manifest-controlled presentation. | Route to Admin guide, with Schema/View/Procedure rendering table and supported customization ceiling. |
|
|
46
|
-
| Auth operations | Store-bound session cache behavior existed in code/ADR but was missing from the handbook. | Explain store identity, preparation order and KV propagation limits. |
|
|
47
|
-
|
|
48
|
-
## Verification and regression coverage
|
|
49
|
-
|
|
50
|
-
- `packages/mantle-spec/test/handbook-contract.test.ts`: complete handbook YAML
|
|
51
|
-
examples parse and validate; navigation covers pages; relative links resolve.
|
|
52
|
-
- `packages/mantle/test/cli/generate.test.ts`: extracts the new internal-View
|
|
53
|
-
YAML and TypeScript directly from the handbook, generates bindings and runs
|
|
54
|
-
strict TypeScript checking on the real example.
|
|
55
|
-
- CLI surface/projection tests assert the concrete next-read destinations;
|
|
56
|
-
existing drift checks verify `--check` is read-only.
|
|
57
|
-
- `scripts/check-optional-packages.mjs`: packs and installs the actual Core
|
|
58
|
-
tarball, checks embedded entry pages/skills, runs `skills` and `skills --check`,
|
|
59
|
-
and compares each project projection byte-for-byte with the installed package.
|
|
60
|
-
- Repository gate: `pnpm check`. Exact execution results and any environment
|
|
61
|
-
limitations are recorded in the PR, rather than frozen as a future guarantee.
|
|
62
|
-
|
|
63
|
-
No npm publish, tag, deployment or grammar change is part of this audit. Source
|
|
64
|
-
skill consumers receive the corrections only once they reach the installed Git
|
|
65
|
-
ref; npm consumers receive them only in a package built from the corrected tree.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Deferred lifecycle hooks on Cloudflare Queues
|
|
2
|
-
|
|
3
|
-
This guide moved into the handbook: [`docs/handbook/cloudflare/deferred-hooks-queues.md`](handbook/cloudflare/deferred-hooks-queues.md).
|
|
4
|
-
|
|
5
|
-
The handbook ships inside the `@aotter/mantle` package under `node_modules/@aotter/mantle/docs/handbook/` and describes the installed release.
|
package/docs/design-atoms.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Manifest reference has moved
|
|
2
|
-
|
|
3
|
-
The version-matched [handbook](handbook/reference/manifest.md) is the single
|
|
4
|
-
grammar reference. This compatibility URL contains no duplicate grammar.
|
|
5
|
-
|
|
6
|
-
- [Four atoms](handbook/concepts/four-atoms.md)
|
|
7
|
-
- [Schema](handbook/reference/schema.md)
|
|
8
|
-
- [View](handbook/reference/view.md)
|
|
9
|
-
- [Procedure and builtin handlers](handbook/reference/procedure.md)
|
|
10
|
-
- [Trigger](handbook/reference/trigger.md)
|
|
11
|
-
- [Authorization](handbook/reference/authorization.md)
|
|
12
|
-
- [Diagnostics](handbook/reference/diagnostics.md)
|
|
13
|
-
|
|
14
|
-
Builder consumers must load these pages from the same installed SDK as their
|
|
15
|
-
runtime. The old Markdown section headings are retired; see
|
|
16
|
-
[#837](https://github.com/aotter/mantle/issues/837).
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# Editorial Blog Design Reference (2026-05-05)
|
|
2
|
-
|
|
3
|
-
This document preserves the visual system from the retired
|
|
4
|
-
`blog-editorial-2026-05-05` starter. The runnable starter was removed because
|
|
5
|
-
it looked like a maintained template, but the design work is still useful as a
|
|
6
|
-
reference for future themes.
|
|
7
|
-
|
|
8
|
-
Use this as a design specimen, not as implementation guidance. Apply it through
|
|
9
|
-
the version-matched `mantle:theme` workflow and the generated project's owned
|
|
10
|
-
theme paths, such as `styles/globals.css`, `components/`, and `src/web/`.
|
|
11
|
-
|
|
12
|
-
## Design Thesis
|
|
13
|
-
|
|
14
|
-
The direction was a quiet literary journal: warm paper, dark ink, a narrow
|
|
15
|
-
reading measure, editorial serif typography, and one vermilion accent. The UI
|
|
16
|
-
avoided dashboard styling and treated the site chrome as magazine furniture:
|
|
17
|
-
small caps, rules, careful spacing, and minimal controls.
|
|
18
|
-
|
|
19
|
-
The design was intentionally opinionated. That is why it should be reused as a
|
|
20
|
-
theme preset or design prompt, not shipped as the default blog starter.
|
|
21
|
-
|
|
22
|
-
## Visual Tokens
|
|
23
|
-
|
|
24
|
-
| Token | Light | Dark | Role |
|
|
25
|
-
|---|---:|---:|---|
|
|
26
|
-
| `paper` | `#f6f1e7` | `#1a1814` | Page background |
|
|
27
|
-
| `ink` | `#1a1814` | `#f1ebdf` | Primary text |
|
|
28
|
-
| `rule` | `#d4c8b3` | `#3d342a` | Hairlines, subtle borders |
|
|
29
|
-
| `rule-strong` | `#3d342a` | `#5a4d40` | Form underlines, stronger separators |
|
|
30
|
-
| `mute` | `#7a6d5e` | `#9a8d7e` | Metadata and secondary copy |
|
|
31
|
-
| `accent` | `#a3331f` | `#e6594a` | Links, drop caps, error states, preview banner |
|
|
32
|
-
| `accent-soft` | `#c9614a` | `#c9614a` | Secondary accent |
|
|
33
|
-
| `selection` | `#f0d6a3` | `#4a3520` | Text selection background |
|
|
34
|
-
|
|
35
|
-
Layout tokens:
|
|
36
|
-
|
|
37
|
-
| Token | Value | Role |
|
|
38
|
-
|---|---:|---|
|
|
39
|
-
| `measure` | `38rem` | Main article measure |
|
|
40
|
-
| `main max-width` | `48rem` | Single-column shell, slightly wider than the article |
|
|
41
|
-
| `gutter` | `clamp(1.25rem, 4vw, 3rem)` | Responsive page padding |
|
|
42
|
-
| `base font size` | `18px` | Reading-first default |
|
|
43
|
-
| `line height` | `1.65` | Long-form prose rhythm |
|
|
44
|
-
|
|
45
|
-
## Typography
|
|
46
|
-
|
|
47
|
-
The type system used four families:
|
|
48
|
-
|
|
49
|
-
| Use | Font stack |
|
|
50
|
-
|---|---|
|
|
51
|
-
| Display | `Fraunces`, `Noto Serif TC`, `Source Serif 4`, `Georgia`, `serif` |
|
|
52
|
-
| Body | `Source Serif 4`, `Noto Serif TC`, `Georgia`, `serif` |
|
|
53
|
-
| Mono/meta | `JetBrains Mono`, `ui-monospace`, `SF Mono`, `Menlo`, `monospace` |
|
|
54
|
-
| CJK fallback | `Noto Serif TC` |
|
|
55
|
-
|
|
56
|
-
Important behaviors:
|
|
57
|
-
|
|
58
|
-
- Body text enables `kern`, `liga`, and `onum`.
|
|
59
|
-
- Headings use Fraunces variable optical sizing with `opsz` and `SOFT`.
|
|
60
|
-
- `h1` scales from `2.2rem` to `3.4rem`; hero `h1` scales up to `4rem`.
|
|
61
|
-
- Metadata uses JetBrains Mono at `0.75rem`, uppercase, and `0.04em` tracking.
|
|
62
|
-
- Paragraphs indent after the first paragraph with `p + p { text-indent: 1.5em; }`.
|
|
63
|
-
- Post bodies reset the first paragraph indent and add a vermilion drop cap.
|
|
64
|
-
|
|
65
|
-
## Page Chrome
|
|
66
|
-
|
|
67
|
-
Header:
|
|
68
|
-
|
|
69
|
-
- Sticky top header with a one-pixel rule.
|
|
70
|
-
- Warm translucent paper background using `color-mix`, `saturate(140%)`, and
|
|
71
|
-
`blur(10px)`.
|
|
72
|
-
- Wordmark uses display serif and inserts a vermilion middle dot between the
|
|
73
|
-
first word and the remaining brand words.
|
|
74
|
-
- Navigation is centered, uppercase, display serif, and tracked at `0.18em`.
|
|
75
|
-
- Current nav item is shown by a one-pixel underline in `ink`; hover uses
|
|
76
|
-
`accent`.
|
|
77
|
-
|
|
78
|
-
Controls:
|
|
79
|
-
|
|
80
|
-
- Language and theme are small popovers in the header.
|
|
81
|
-
- Popover trigger typography follows mono/meta styling.
|
|
82
|
-
- The language trigger shows a globe icon, full locale label, and chevron.
|
|
83
|
-
- The theme trigger is icon-only and supports system, light, and dark.
|
|
84
|
-
- Menu items use `menuitemradio` semantics and show a check icon for the active
|
|
85
|
-
value.
|
|
86
|
-
- Popovers close on outside click and `Escape`.
|
|
87
|
-
|
|
88
|
-
Footer:
|
|
89
|
-
|
|
90
|
-
- One-pixel top rule.
|
|
91
|
-
- Mono text at `0.75rem`.
|
|
92
|
-
- Left side shows `site.brand` and `site.description`.
|
|
93
|
-
- Right side links to `mantle`.
|
|
94
|
-
|
|
95
|
-
## Templates
|
|
96
|
-
|
|
97
|
-
Home:
|
|
98
|
-
|
|
99
|
-
- Starts with a `hero` block: mono eyebrow, large display title, muted intro,
|
|
100
|
-
and markdown body.
|
|
101
|
-
- Recent posts appear below the hero as an `entry-list`.
|
|
102
|
-
|
|
103
|
-
Post:
|
|
104
|
-
|
|
105
|
-
- Uses a narrow `article` measure.
|
|
106
|
-
- Header contains optional publish date and title.
|
|
107
|
-
- Optional cover image is bordered by `rule`.
|
|
108
|
-
- Body markdown supports headings, blockquotes, inline code, code blocks, and
|
|
109
|
-
lists.
|
|
110
|
-
- First body paragraph gets an editorial drop cap.
|
|
111
|
-
|
|
112
|
-
Post list:
|
|
113
|
-
|
|
114
|
-
- Reuses the hero grammar with an index eyebrow.
|
|
115
|
-
- Entries render as a two-column grid: fixed `7rem` date rail plus flexible
|
|
116
|
-
title/excerpt column.
|
|
117
|
-
- On narrow screens, entries collapse to one column.
|
|
118
|
-
|
|
119
|
-
Page:
|
|
120
|
-
|
|
121
|
-
- Same article shell as posts.
|
|
122
|
-
- Uses page `intro` as muted mono metadata under the title.
|
|
123
|
-
- `about` and `contact` slugs drive active nav hints.
|
|
124
|
-
|
|
125
|
-
Contact:
|
|
126
|
-
|
|
127
|
-
- Article intro and body are followed by a vertical form.
|
|
128
|
-
- Field labels are uppercase mono.
|
|
129
|
-
- Text inputs use underline-only styling; textarea uses a bordered box.
|
|
130
|
-
- Submit button uses display serif, uppercase tracking, and an inverted
|
|
131
|
-
`ink`/`paper` fill.
|
|
132
|
-
- Cloudflare Turnstile is mounted explicitly so it can re-render when the site
|
|
133
|
-
theme changes.
|
|
134
|
-
|
|
135
|
-
404:
|
|
136
|
-
|
|
137
|
-
- Centered block with a huge display-serif `404` glyph in `accent`.
|
|
138
|
-
- Copy follows the same i18n bundle pattern as the rest of the chrome.
|
|
139
|
-
|
|
140
|
-
## Interaction Model
|
|
141
|
-
|
|
142
|
-
Theme preference is a three-way choice:
|
|
143
|
-
|
|
144
|
-
- `system`: no stored value, follows `prefers-color-scheme`.
|
|
145
|
-
- `light`: explicit localStorage override.
|
|
146
|
-
- `dark`: explicit localStorage override.
|
|
147
|
-
|
|
148
|
-
A bootstrap script runs in `<head>` before paint to avoid theme flash. Runtime
|
|
149
|
-
theme changes dispatch a `mantle:theme` event. The contact page listens to that
|
|
150
|
-
event and re-renders Turnstile with the resolved light/dark value.
|
|
151
|
-
|
|
152
|
-
Language switching rewrites the leading locale segment in the current path. It
|
|
153
|
-
does not translate content itself; it navigates to the equivalent route under
|
|
154
|
-
the selected locale.
|
|
155
|
-
|
|
156
|
-
## I18n Surface
|
|
157
|
-
|
|
158
|
-
The archived design included two UI bundles:
|
|
159
|
-
|
|
160
|
-
| Locale | Label |
|
|
161
|
-
|---|---|
|
|
162
|
-
| `en` | `English` |
|
|
163
|
-
| `zh-TW` | `繁體中文` |
|
|
164
|
-
|
|
165
|
-
The bundles covered:
|
|
166
|
-
|
|
167
|
-
- Header labels: posts, about, contact.
|
|
168
|
-
- Theme labels: auto, light, dark.
|
|
169
|
-
- Language aria label.
|
|
170
|
-
- Home and post-list eyebrows.
|
|
171
|
-
- 404 title, body, and return link.
|
|
172
|
-
- Contact labels, submit states, success message, and error prefix.
|
|
173
|
-
|
|
174
|
-
Content translations were intentionally separate from UI chrome translations.
|
|
175
|
-
Posts and pages came from CMS entries; nav and form labels came from the local
|
|
176
|
-
i18n bundles.
|
|
177
|
-
|
|
178
|
-
## Icons
|
|
179
|
-
|
|
180
|
-
The icon system was deliberately tiny:
|
|
181
|
-
|
|
182
|
-
- Inline SVG strings injected by templates.
|
|
183
|
-
- Monochrome `currentColor` stroke.
|
|
184
|
-
- Default size `16`.
|
|
185
|
-
- Default stroke width `2`, with check icons at `2.5`.
|
|
186
|
-
- No runtime icon dependency until the set grows beyond roughly 20 icons.
|
|
187
|
-
|
|
188
|
-
The archived set included `sun`, `moon`, `monitor`, `globe`,
|
|
189
|
-
`chevron-down`, `check`, `menu`, and `x`.
|
|
190
|
-
|
|
191
|
-
## Reuse With The Current Theme Stack
|
|
192
|
-
|
|
193
|
-
Map the design into the maintained starter layers instead of reviving the old
|
|
194
|
-
runnable starter:
|
|
195
|
-
|
|
196
|
-
| Current layer | What to reuse |
|
|
197
|
-
|---|---|
|
|
198
|
-
| L1 tokens | Colors, font stacks, measure, gutter, base rhythm |
|
|
199
|
-
| L2 components | Popover styling, entry list, post body, drop cap, contact form |
|
|
200
|
-
| L3 slots | Header, footer, language switcher, theme switcher |
|
|
201
|
-
| L4 templates | Home, post, post list, page, contact, 404 composition |
|
|
202
|
-
|
|
203
|
-
Do not copy the old package metadata, Wrangler config, fixtures, workspace
|
|
204
|
-
dependencies, or smoke tests. Those belonged to the removed runnable starter and
|
|
205
|
-
will drift from the maintained SDK packages.
|
|
206
|
-
|
|
207
|
-
## If Reviving This Direction
|
|
208
|
-
|
|
209
|
-
Revive it as one of these:
|
|
210
|
-
|
|
211
|
-
- A documented visual preset selectable during agent seeding.
|
|
212
|
-
- A project-owned theme preset applied through `mantle:theme`.
|
|
213
|
-
- A generated design prompt that tells the provisioning agent how to style a
|
|
214
|
-
user's own brand.
|
|
215
|
-
|
|
216
|
-
Do not bring it back as a runnable starter in this SDK repository. Agents treat
|
|
217
|
-
runnable code as current product surface, so the preserved design belongs only
|
|
218
|
-
in this reference.
|
package/docs/direct-authoring.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Direct authoring
|
|
2
|
-
|
|
3
|
-
This guide moved into the handbook: [`docs/handbook/start/project-and-cli.md`](handbook/start/project-and-cli.md).
|
|
4
|
-
|
|
5
|
-
The handbook ships inside the `@aotter/mantle` package under `node_modules/@aotter/mantle/docs/handbook/` and describes the installed release.
|