@aotter/mantle 0.2.0-alpha.6 → 0.2.0-alpha.7
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 +152 -45
- package/dist/auth/adapter.d.ts +32 -0
- package/dist/auth/adapter.js +285 -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 +154 -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 +31 -0
- package/dist/auth/oauth.js +124 -0
- package/dist/auth/resource-seeds.js +10 -0
- package/dist/auth/routes.d.ts +32 -0
- package/dist/auth/{createAuthRoutes.js → routes.js} +130 -35
- package/dist/build/compiler.d.ts +790 -0
- package/dist/build/compiler.js +6971 -0
- package/dist/{spec → build/spec}/domain/model/ManifestGrammar.d.ts +24 -42
- package/dist/{spec → build/spec}/domain/model/RuntimePlan.d.ts +77 -3
- package/dist/{spec → build/spec}/domain/model/SqlIr.d.ts +35 -6
- package/dist/build/spec/domain/model/UserFields.d.ts +20 -0
- package/dist/{spec → build/spec}/domain/service/PlanFingerprint.d.ts +2 -1
- package/dist/{spec → build/spec}/kernel/diagnostic.d.ts +1 -30
- 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 +55 -0
- package/dist/domain/describe/chunk-ZIQVLA7X.js +363 -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 +17 -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 +204 -0
- package/dist/domain/recipes.js +19 -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 +84 -0
- package/dist/infrastructure/cli.js +101 -0
- package/dist/infrastructure/generate.d.ts +14 -0
- package/dist/infrastructure/generate.js +174 -0
- package/dist/infrastructure/generateAuth.d.ts +8 -0
- package/dist/infrastructure/generateAuth.js +17 -0
- package/dist/infrastructure/inputs.js +36 -0
- package/dist/infrastructure/wrangler.js +71 -0
- package/dist/kernel/authorization.d.ts +4 -0
- package/dist/kernel/authorization.js +16 -0
- package/dist/kernel/binds.d.ts +51 -0
- package/dist/kernel/binds.js +45 -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 +139 -0
- package/dist/kernel/contracts.js +92 -0
- package/dist/{spec/domain/service/CloudflareCron.d.ts → kernel/cron.d.ts} +0 -1
- package/dist/{spec/domain/service/CloudflareCron.js → kernel/cron.js} +1 -6
- package/dist/kernel/dialect/common.d.ts +39 -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/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 +95 -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/{auth/emailTemplates.js → kernel/email.js} +13 -2
- package/dist/kernel/host-access.d.ts +10 -0
- package/dist/kernel/host-access.js +65 -0
- package/dist/kernel/host-caller.d.ts +38 -0
- package/dist/kernel/host-caller.js +55 -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 +49 -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 +288 -0
- package/dist/kernel/mcp.d.ts +101 -0
- package/dist/kernel/mcp.js +25 -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/{cloudflare/r2Media.d.ts → kernel/r2-media.d.ts} +4 -5
- package/dist/kernel/r2-media.js +78 -0
- package/dist/kernel/rest-dispatch.js +38 -0
- package/dist/kernel/rest-router.js +63 -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 +43 -0
- package/dist/kernel/search.js +5 -0
- package/dist/{core/site.d.ts → kernel/site-types.d.ts} +38 -9
- package/dist/kernel/site-types.js +1 -0
- package/dist/kernel/site.d.ts +41 -0
- package/dist/kernel/site.js +32 -0
- package/dist/kernel/store.d.ts +165 -0
- package/dist/kernel/store.js +257 -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 +34 -0
- package/dist/kernel/user-fields.js +71 -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-response.js +8 -0
- package/dist/kernel/web.d.ts +75 -0
- package/dist/kernel/web.js +155 -0
- package/dist/kernel/where.js +27 -0
- package/dist/testing/index.d.ts +1 -37
- package/dist/testing/index.js +1 -43
- package/dist/usecase/adminBindings.js +142 -0
- package/dist/usecase/adminDescriptors.js +153 -0
- package/dist/usecase/generate.js +164 -0
- package/dist/usecase/handlers.js +21 -0
- package/dist/usecase/mcp-media.js +17 -0
- package/dist/usecase/mcp.js +96 -0
- package/dist/usecase/paging.js +72 -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 +40 -0
- package/dist/usecase/stores.js +62 -0
- package/dist/usecase/translations.js +78 -0
- package/dist/usecase/ttl.js +20 -0
- package/dist/usecase/validation.js +132 -0
- package/dist/usecase/web.js +22 -0
- package/docs/examples/README.md +31 -16
- package/docs/examples/app-shell/README.md +48 -0
- package/docs/examples/app-shell/package.json +34 -0
- package/docs/examples/app-shell/pnpm-workspace.yaml +8 -0
- package/docs/examples/app-shell/smoke-kit.mjs +100 -0
- package/docs/examples/app-shell/src/admin.ts +10 -0
- package/docs/examples/app-shell/src/auth.ts +55 -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 +13 -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/{reference-service → app-shell}/tsconfig.json +2 -1
- package/docs/examples/app-shell/worker-configuration.d.ts +22 -0
- package/docs/examples/app-shell/wrangler.jsonc +61 -0
- package/docs/examples/club-events/README.md +60 -0
- package/docs/examples/club-events/manifests/club-events.yaml +225 -0
- package/docs/examples/club-events/smoke.mjs +121 -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 +74 -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 +7 -0
- package/docs/examples/purchasing/.dev.vars.example +6 -0
- package/docs/examples/purchasing/README.md +90 -0
- package/docs/examples/purchasing/manifests/purchasing.yaml +341 -0
- package/docs/examples/purchasing/seed.sql +4 -0
- package/docs/examples/purchasing/smoke.mjs +171 -0
- package/docs/examples/purchasing/src/admin.ts +12 -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 +68 -0
- package/docs/examples/recipes/README.md +58 -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 +73 -0
- package/docs/handbook/cloudflare/authentication.md +142 -212
- package/docs/handbook/cloudflare/chatgpt-sites.md +4 -113
- package/docs/handbook/cloudflare/deploy-and-operate.md +20 -106
- package/docs/handbook/cloudflare/media-r2.md +62 -133
- package/docs/handbook/cloudflare/service-entry.md +180 -116
- package/docs/handbook/concepts/authorization.md +10 -123
- package/docs/handbook/concepts/four-atoms.md +9 -92
- package/docs/handbook/concepts/lifecycle-and-locales.md +9 -80
- package/docs/handbook/concepts/mcp-and-agents.md +10 -141
- package/docs/handbook/concepts/procedures-and-triggers.md +5 -162
- package/docs/handbook/concepts/runtime-and-adapters.md +15 -224
- package/docs/handbook/concepts/views.md +10 -109
- package/docs/handbook/examples/hub.md +2 -18
- package/docs/handbook/guides/adapter-guide.md +11 -0
- package/docs/handbook/guides/admin-extensions.md +12 -183
- package/docs/handbook/guides/admin-ui.md +5 -164
- package/docs/handbook/guides/agent-setup.md +5 -18
- package/docs/handbook/guides/email.md +86 -0
- package/docs/handbook/guides/mcp-apps.md +44 -0
- package/docs/handbook/guides/native-admin.md +298 -0
- package/docs/handbook/guides/native-execution.md +132 -0
- package/docs/handbook/guides/oauth.md +105 -0
- package/docs/handbook/guides/postgres-adapters.md +56 -0
- package/docs/handbook/guides/public-pages.md +53 -0
- package/docs/handbook/guides/size-and-startup.md +9 -0
- package/docs/handbook/guides/typed-queries.md +39 -102
- package/docs/handbook/navigation.json +164 -31
- package/docs/handbook/reference/admin-descriptors.md +88 -0
- package/docs/handbook/reference/authorization.md +44 -52
- package/docs/handbook/reference/describe.md +56 -0
- package/docs/handbook/reference/diagnostics.md +15 -79
- package/docs/handbook/reference/features.md +45 -53
- package/docs/handbook/reference/manifest.md +6 -69
- package/docs/handbook/reference/procedure.md +9 -118
- package/docs/handbook/reference/schema.md +75 -185
- package/docs/handbook/reference/site-config.md +5 -65
- package/docs/handbook/reference/surface.md +279 -97
- package/docs/handbook/reference/trigger.md +24 -93
- package/docs/handbook/reference/view.md +32 -160
- package/docs/handbook/releases/index.md +48 -13
- package/docs/handbook/start/overview.md +9 -56
- package/docs/handbook/start/project-and-cli.md +40 -149
- package/docs/handbook/start/quickstart-worker.md +38 -116
- package/docs/skills/develop/SKILL.md +34 -123
- package/docs/skills/develop/mcp-app.md +37 -77
- package/docs/skills/integrate/SKILL.md +42 -84
- package/docs/skills/media-gc/SKILL.md +14 -3
- package/docs/skills/provision/SKILL.md +25 -91
- package/docs/skills/update/SKILL.md +19 -43
- package/docs/source/scripts/postgres-adapter.ts +101 -0
- package/docs/upgrade-0.1-to-0.2.md +25 -9
- package/package.json +96 -112
- package/skills/.keep +0 -0
- package/skills/README.md +72 -0
- package/skills/mantle/SKILL.md +135 -0
- package/skills/mantle/references/local-testing.md +11 -0
- package/skills/mantle/references/web.md +41 -0
- package/skills/mantle/references/website.md +47 -0
- package/dist/admin/consent.d.ts +0 -17
- package/dist/admin/consent.d.ts.map +0 -1
- package/dist/admin/consent.js +0 -17
- package/dist/admin/consent.js.map +0 -1
- package/dist/admin/createAdminSurface.d.ts +0 -25
- package/dist/admin/createAdminSurface.d.ts.map +0 -1
- package/dist/admin/createAdminSurface.js +0 -635
- package/dist/admin/createAdminSurface.js.map +0 -1
- package/dist/admin/design.d.ts +0 -7
- package/dist/admin/design.d.ts.map +0 -1
- package/dist/admin/design.js +0 -18
- package/dist/admin/design.js.map +0 -1
- package/dist/admin/developerConsole.d.ts +0 -267
- package/dist/admin/developerConsole.d.ts.map +0 -1
- package/dist/admin/developerConsole.js +0 -136
- package/dist/admin/developerConsole.js.map +0 -1
- package/dist/admin/extensions.d.ts +0 -290
- package/dist/admin/extensions.d.ts.map +0 -1
- package/dist/admin/extensions.js +0 -532
- package/dist/admin/extensions.js.map +0 -1
- package/dist/admin/identity.d.ts +0 -62
- package/dist/admin/identity.d.ts.map +0 -1
- package/dist/admin/identity.js +0 -7
- package/dist/admin/identity.js.map +0 -1
- package/dist/admin/index.d.ts +0 -7
- package/dist/admin/index.d.ts.map +0 -1
- package/dist/admin/index.js +0 -7
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/procedureFlow.d.ts +0 -38
- package/dist/admin/procedureFlow.d.ts.map +0 -1
- package/dist/admin/procedureFlow.js +0 -188
- package/dist/admin/procedureFlow.js.map +0 -1
- package/dist/auth/ConsoleEmailSender.d.ts +0 -15
- package/dist/auth/ConsoleEmailSender.d.ts.map +0 -1
- package/dist/auth/ConsoleEmailSender.js +0 -19
- package/dist/auth/ConsoleEmailSender.js.map +0 -1
- package/dist/auth/appleClientSecret.d.ts +0 -75
- package/dist/auth/appleClientSecret.d.ts.map +0 -1
- package/dist/auth/appleClientSecret.js +0 -116
- package/dist/auth/appleClientSecret.js.map +0 -1
- package/dist/auth/buildAuth.d.ts +0 -4568
- package/dist/auth/buildAuth.d.ts.map +0 -1
- package/dist/auth/buildAuth.js +0 -312
- package/dist/auth/buildAuth.js.map +0 -1
- package/dist/auth/callerResolver.d.ts +0 -52
- package/dist/auth/callerResolver.d.ts.map +0 -1
- package/dist/auth/callerResolver.js +0 -52
- package/dist/auth/callerResolver.js.map +0 -1
- package/dist/auth/createAuthRoutes.d.ts +0 -22
- package/dist/auth/createAuthRoutes.d.ts.map +0 -1
- package/dist/auth/createAuthRoutes.js.map +0 -1
- package/dist/auth/createMantleAuth.d.ts +0 -3
- package/dist/auth/createMantleAuth.d.ts.map +0 -1
- package/dist/auth/createMantleAuth.js +0 -504
- package/dist/auth/createMantleAuth.js.map +0 -1
- package/dist/auth/db.d.ts +0 -18
- package/dist/auth/db.d.ts.map +0 -1
- package/dist/auth/db.js +0 -27
- package/dist/auth/db.js.map +0 -1
- package/dist/auth/emailTemplates.d.ts +0 -7
- package/dist/auth/emailTemplates.d.ts.map +0 -1
- package/dist/auth/emailTemplates.js.map +0 -1
- package/dist/auth/index.d.ts +0 -9
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -7
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/methods.d.ts +0 -717
- package/dist/auth/methods.d.ts.map +0 -1
- package/dist/auth/methods.js +0 -321
- package/dist/auth/methods.js.map +0 -1
- package/dist/auth/oauthTokens.d.ts +0 -24
- package/dist/auth/oauthTokens.d.ts.map +0 -1
- package/dist/auth/oauthTokens.js +0 -146
- package/dist/auth/oauthTokens.js.map +0 -1
- package/dist/auth/setupIncomplete.d.ts +0 -16
- package/dist/auth/setupIncomplete.d.ts.map +0 -1
- package/dist/auth/setupIncomplete.js +0 -50
- package/dist/auth/setupIncomplete.js.map +0 -1
- package/dist/auth/types.d.ts +0 -440
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -10
- package/dist/auth/types.js.map +0 -1
- package/dist/bun/index.d.ts +0 -21
- package/dist/bun/index.d.ts.map +0 -1
- package/dist/bun/index.js +0 -46
- package/dist/bun/index.js.map +0 -1
- package/dist/cli/emitModule.d.ts +0 -7
- package/dist/cli/emitModule.d.ts.map +0 -1
- package/dist/cli/emitModule.js +0 -127
- package/dist/cli/emitModule.js.map +0 -1
- package/dist/cli/generate.d.ts +0 -8
- package/dist/cli/generate.d.ts.map +0 -1
- package/dist/cli/generate.js +0 -391
- package/dist/cli/generate.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 -21
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/preset.d.ts +0 -18
- package/dist/cli/preset.d.ts.map +0 -1
- package/dist/cli/preset.js +0 -405
- package/dist/cli/preset.js.map +0 -1
- package/dist/cloudflare/index.d.ts +0 -25
- package/dist/cloudflare/index.d.ts.map +0 -1
- package/dist/cloudflare/index.js +0 -16
- package/dist/cloudflare/index.js.map +0 -1
- package/dist/cloudflare/r2Media.d.ts.map +0 -1
- package/dist/cloudflare/r2Media.js +0 -69
- package/dist/cloudflare/r2Media.js.map +0 -1
- package/dist/core/caller.d.ts +0 -35
- package/dist/core/caller.d.ts.map +0 -1
- package/dist/core/caller.js +0 -3
- package/dist/core/caller.js.map +0 -1
- package/dist/core/createMantle.d.ts +0 -22
- package/dist/core/createMantle.d.ts.map +0 -1
- package/dist/core/createMantle.js +0 -117
- package/dist/core/createMantle.js.map +0 -1
- package/dist/core/dialect.d.ts +0 -53
- package/dist/core/dialect.d.ts.map +0 -1
- package/dist/core/dialect.js +0 -7
- package/dist/core/dialect.js.map +0 -1
- package/dist/core/driver.d.ts +0 -24
- package/dist/core/driver.d.ts.map +0 -1
- package/dist/core/driver.js +0 -2
- package/dist/core/driver.js.map +0 -1
- package/dist/core/email.d.ts +0 -17
- package/dist/core/email.d.ts.map +0 -1
- package/dist/core/email.js +0 -2
- package/dist/core/email.js.map +0 -1
- package/dist/core/index.d.ts +0 -16
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -16
- package/dist/core/index.js.map +0 -1
- package/dist/core/invocation.d.ts +0 -66
- package/dist/core/invocation.d.ts.map +0 -1
- package/dist/core/invocation.js +0 -3
- package/dist/core/invocation.js.map +0 -1
- package/dist/core/observation.d.ts +0 -3
- package/dist/core/observation.d.ts.map +0 -1
- package/dist/core/observation.js +0 -10
- package/dist/core/observation.js.map +0 -1
- package/dist/core/runtime/auth.d.ts +0 -9
- package/dist/core/runtime/auth.d.ts.map +0 -1
- package/dist/core/runtime/auth.js +0 -39
- package/dist/core/runtime/auth.js.map +0 -1
- package/dist/core/runtime/createRuntime.d.ts +0 -23
- package/dist/core/runtime/createRuntime.d.ts.map +0 -1
- package/dist/core/runtime/createRuntime.js +0 -214
- package/dist/core/runtime/createRuntime.js.map +0 -1
- package/dist/core/runtime/verifyPlan.d.ts +0 -34
- package/dist/core/runtime/verifyPlan.d.ts.map +0 -1
- package/dist/core/runtime/verifyPlan.js +0 -301
- package/dist/core/runtime/verifyPlan.js.map +0 -1
- package/dist/core/service.d.ts +0 -45
- package/dist/core/service.d.ts.map +0 -1
- package/dist/core/service.js +0 -2
- package/dist/core/service.js.map +0 -1
- package/dist/core/sessionUser.d.ts +0 -14
- package/dist/core/sessionUser.d.ts.map +0 -1
- package/dist/core/sessionUser.js +0 -4
- package/dist/core/sessionUser.js.map +0 -1
- package/dist/core/site.d.ts.map +0 -1
- package/dist/core/site.js +0 -2
- package/dist/core/site.js.map +0 -1
- package/dist/core/siteConfig.d.ts +0 -5
- package/dist/core/siteConfig.d.ts.map +0 -1
- package/dist/core/siteConfig.js +0 -24
- package/dist/core/siteConfig.js.map +0 -1
- package/dist/core/sql/allowlist.d.ts +0 -67
- package/dist/core/sql/allowlist.d.ts.map +0 -1
- package/dist/core/sql/allowlist.js +0 -737
- package/dist/core/sql/allowlist.js.map +0 -1
- package/dist/core/sql/ast.d.ts +0 -24
- package/dist/core/sql/ast.d.ts.map +0 -1
- package/dist/core/sql/ast.js +0 -32
- package/dist/core/sql/ast.js.map +0 -1
- package/dist/core/sql/compile.d.ts +0 -50
- package/dist/core/sql/compile.d.ts.map +0 -1
- package/dist/core/sql/compile.js +0 -48
- package/dist/core/sql/compile.js.map +0 -1
- package/dist/core/sql/policy.d.ts +0 -123
- package/dist/core/sql/policy.d.ts.map +0 -1
- package/dist/core/sql/policy.js +0 -398
- package/dist/core/sql/policy.js.map +0 -1
- package/dist/core/sql/positions.d.ts +0 -30
- package/dist/core/sql/positions.d.ts.map +0 -1
- package/dist/core/sql/positions.js +0 -22
- package/dist/core/sql/positions.js.map +0 -1
- package/dist/core/sql/run.d.ts +0 -68
- package/dist/core/sql/run.d.ts.map +0 -1
- package/dist/core/sql/run.js +0 -384
- package/dist/core/sql/run.js.map +0 -1
- package/dist/core/store/createStore.d.ts +0 -49
- package/dist/core/store/createStore.d.ts.map +0 -1
- package/dist/core/store/createStore.js +0 -227
- package/dist/core/store/createStore.js.map +0 -1
- package/dist/core/store/cursor.d.ts +0 -4
- package/dist/core/store/cursor.d.ts.map +0 -1
- package/dist/core/store/cursor.js +0 -22
- package/dist/core/store/cursor.js.map +0 -1
- package/dist/core/store/json.d.ts +0 -80
- package/dist/core/store/json.d.ts.map +0 -1
- package/dist/core/store/json.js +0 -342
- package/dist/core/store/json.js.map +0 -1
- package/dist/core/store.d.ts +0 -160
- package/dist/core/store.d.ts.map +0 -1
- package/dist/core/store.js +0 -2
- package/dist/core/store.js.map +0 -1
- package/dist/core/wire.d.ts +0 -20
- package/dist/core/wire.d.ts.map +0 -1
- package/dist/core/wire.js +0 -84
- package/dist/core/wire.js.map +0 -1
- package/dist/core/withCaller.d.ts +0 -24
- package/dist/core/withCaller.d.ts.map +0 -1
- package/dist/core/withCaller.js +0 -35
- package/dist/core/withCaller.js.map +0 -1
- package/dist/d1/adapter.d.ts +0 -12
- package/dist/d1/adapter.d.ts.map +0 -1
- package/dist/d1/adapter.js +0 -23
- package/dist/d1/adapter.js.map +0 -1
- package/dist/d1/codec.d.ts +0 -14
- package/dist/d1/codec.d.ts.map +0 -1
- package/dist/d1/codec.js +0 -136
- package/dist/d1/codec.js.map +0 -1
- package/dist/d1/compile/index.d.ts +0 -9
- package/dist/d1/compile/index.d.ts.map +0 -1
- package/dist/d1/compile/index.js +0 -9
- package/dist/d1/compile/index.js.map +0 -1
- package/dist/d1/dialect.d.ts +0 -4
- package/dist/d1/dialect.d.ts.map +0 -1
- package/dist/d1/dialect.js +0 -13
- package/dist/d1/dialect.js.map +0 -1
- package/dist/d1/executor.d.ts +0 -15
- package/dist/d1/executor.d.ts.map +0 -1
- package/dist/d1/executor.js +0 -96
- package/dist/d1/executor.js.map +0 -1
- package/dist/d1/index.d.ts +0 -6
- package/dist/d1/index.d.ts.map +0 -1
- package/dist/d1/index.js +0 -6
- package/dist/d1/index.js.map +0 -1
- package/dist/d1/lower.d.ts +0 -8
- package/dist/d1/lower.d.ts.map +0 -1
- package/dist/d1/lower.js +0 -167
- package/dist/d1/lower.js.map +0 -1
- package/dist/d1/media.d.ts +0 -5
- package/dist/d1/media.d.ts.map +0 -1
- package/dist/d1/media.js +0 -157
- package/dist/d1/media.js.map +0 -1
- package/dist/d1/migrations.d.ts +0 -12
- package/dist/d1/migrations.d.ts.map +0 -1
- package/dist/d1/migrations.js +0 -111
- package/dist/d1/migrations.js.map +0 -1
- package/dist/d1/print.d.ts +0 -28
- package/dist/d1/print.d.ts.map +0 -1
- package/dist/d1/print.js +0 -54
- package/dist/d1/print.js.map +0 -1
- package/dist/d1/site.d.ts +0 -17
- package/dist/d1/site.d.ts.map +0 -1
- package/dist/d1/site.js +0 -63
- package/dist/d1/site.js.map +0 -1
- package/dist/d1/storage.d.ts +0 -34
- package/dist/d1/storage.d.ts.map +0 -1
- package/dist/d1/storage.js +0 -288
- package/dist/d1/storage.js.map +0 -1
- package/dist/d1/tz.d.ts +0 -21
- package/dist/d1/tz.d.ts.map +0 -1
- package/dist/d1/tz.js +0 -54
- package/dist/d1/tz.js.map +0 -1
- package/dist/d1/validator.d.ts +0 -10
- package/dist/d1/validator.d.ts.map +0 -1
- package/dist/d1/validator.js +0 -33
- package/dist/d1/validator.js.map +0 -1
- package/dist/mcp/apps.d.ts +0 -43
- package/dist/mcp/apps.d.ts.map +0 -1
- package/dist/mcp/apps.js +0 -57
- package/dist/mcp/apps.js.map +0 -1
- package/dist/mcp/catalog.d.ts +0 -55
- package/dist/mcp/catalog.d.ts.map +0 -1
- package/dist/mcp/catalog.js +0 -81
- package/dist/mcp/catalog.js.map +0 -1
- package/dist/mcp/createMcpSurface.d.ts +0 -60
- package/dist/mcp/createMcpSurface.d.ts.map +0 -1
- package/dist/mcp/createMcpSurface.js +0 -182
- package/dist/mcp/createMcpSurface.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -4
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -4
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/media.d.ts +0 -9
- package/dist/mcp/media.d.ts.map +0 -1
- package/dist/mcp/media.js +0 -33
- package/dist/mcp/media.js.map +0 -1
- package/dist/postgres/adapter.d.ts +0 -23
- package/dist/postgres/adapter.d.ts.map +0 -1
- package/dist/postgres/adapter.js +0 -50
- package/dist/postgres/adapter.js.map +0 -1
- package/dist/postgres/codec.d.ts +0 -13
- package/dist/postgres/codec.d.ts.map +0 -1
- package/dist/postgres/codec.js +0 -110
- package/dist/postgres/codec.js.map +0 -1
- package/dist/postgres/compile/index.d.ts +0 -9
- package/dist/postgres/compile/index.d.ts.map +0 -1
- package/dist/postgres/compile/index.js +0 -9
- package/dist/postgres/compile/index.js.map +0 -1
- package/dist/postgres/driver.d.ts +0 -109
- package/dist/postgres/driver.d.ts.map +0 -1
- package/dist/postgres/driver.js +0 -186
- package/dist/postgres/driver.js.map +0 -1
- package/dist/postgres/executor.d.ts +0 -28
- package/dist/postgres/executor.d.ts.map +0 -1
- package/dist/postgres/executor.js +0 -96
- package/dist/postgres/executor.js.map +0 -1
- package/dist/postgres/index.d.ts +0 -8
- package/dist/postgres/index.d.ts.map +0 -1
- package/dist/postgres/index.js +0 -8
- package/dist/postgres/index.js.map +0 -1
- package/dist/postgres/lower.d.ts +0 -6
- package/dist/postgres/lower.d.ts.map +0 -1
- package/dist/postgres/lower.js +0 -152
- package/dist/postgres/lower.js.map +0 -1
- package/dist/postgres/print.d.ts +0 -11
- package/dist/postgres/print.d.ts.map +0 -1
- package/dist/postgres/print.js +0 -108
- package/dist/postgres/print.js.map +0 -1
- package/dist/postgres/session.d.ts +0 -9
- package/dist/postgres/session.d.ts.map +0 -1
- package/dist/postgres/session.js +0 -111
- package/dist/postgres/session.js.map +0 -1
- package/dist/postgres/storage.d.ts +0 -32
- package/dist/postgres/storage.d.ts.map +0 -1
- package/dist/postgres/storage.js +0 -283
- package/dist/postgres/storage.js.map +0 -1
- package/dist/postgres/validator.d.ts +0 -13
- package/dist/postgres/validator.d.ts.map +0 -1
- package/dist/postgres/validator.js +0 -53
- package/dist/postgres/validator.js.map +0 -1
- package/dist/spec/domain/index.d.ts +0 -3
- package/dist/spec/domain/index.d.ts.map +0 -1
- package/dist/spec/domain/index.js +0 -3
- package/dist/spec/domain/index.js.map +0 -1
- package/dist/spec/domain/model/ContentState.d.ts +0 -8
- package/dist/spec/domain/model/ContentState.d.ts.map +0 -1
- package/dist/spec/domain/model/ContentState.js +0 -7
- package/dist/spec/domain/model/ContentState.js.map +0 -1
- package/dist/spec/domain/model/Entry.d.ts +0 -29
- package/dist/spec/domain/model/Entry.d.ts.map +0 -1
- package/dist/spec/domain/model/Entry.js +0 -16
- package/dist/spec/domain/model/Entry.js.map +0 -1
- package/dist/spec/domain/model/Locale.d.ts +0 -30
- package/dist/spec/domain/model/Locale.d.ts.map +0 -1
- package/dist/spec/domain/model/Locale.js +0 -33
- package/dist/spec/domain/model/Locale.js.map +0 -1
- package/dist/spec/domain/model/ManifestGrammar.d.ts.map +0 -1
- package/dist/spec/domain/model/ManifestGrammar.js +0 -153
- package/dist/spec/domain/model/ManifestGrammar.js.map +0 -1
- package/dist/spec/domain/model/MediaMimeAccept.d.ts +0 -55
- package/dist/spec/domain/model/MediaMimeAccept.d.ts.map +0 -1
- package/dist/spec/domain/model/MediaMimeAccept.js +0 -90
- package/dist/spec/domain/model/MediaMimeAccept.js.map +0 -1
- package/dist/spec/domain/model/RuntimePlan.d.ts.map +0 -1
- package/dist/spec/domain/model/RuntimePlan.js +0 -4
- package/dist/spec/domain/model/RuntimePlan.js.map +0 -1
- package/dist/spec/domain/model/SiteConfig.d.ts +0 -173
- package/dist/spec/domain/model/SiteConfig.d.ts.map +0 -1
- package/dist/spec/domain/model/SiteConfig.js +0 -13
- package/dist/spec/domain/model/SiteConfig.js.map +0 -1
- package/dist/spec/domain/model/SqlIr.d.ts.map +0 -1
- package/dist/spec/domain/model/SqlIr.js +0 -95
- package/dist/spec/domain/model/SqlIr.js.map +0 -1
- package/dist/spec/domain/model/index.d.ts +0 -14
- package/dist/spec/domain/model/index.d.ts.map +0 -1
- package/dist/spec/domain/model/index.js +0 -14
- package/dist/spec/domain/model/index.js.map +0 -1
- package/dist/spec/domain/service/CloudflareCron.d.ts.map +0 -1
- package/dist/spec/domain/service/CloudflareCron.js.map +0 -1
- package/dist/spec/domain/service/CrossSchemaChecker.d.ts +0 -34
- package/dist/spec/domain/service/CrossSchemaChecker.d.ts.map +0 -1
- package/dist/spec/domain/service/CrossSchemaChecker.js +0 -114
- package/dist/spec/domain/service/CrossSchemaChecker.js.map +0 -1
- package/dist/spec/domain/service/EntryDataValidator.d.ts +0 -56
- package/dist/spec/domain/service/EntryDataValidator.d.ts.map +0 -1
- package/dist/spec/domain/service/EntryDataValidator.js +0 -88
- package/dist/spec/domain/service/EntryDataValidator.js.map +0 -1
- package/dist/spec/domain/service/JsonSchemaToZod.d.ts +0 -29
- package/dist/spec/domain/service/JsonSchemaToZod.d.ts.map +0 -1
- package/dist/spec/domain/service/JsonSchemaToZod.js +0 -156
- package/dist/spec/domain/service/JsonSchemaToZod.js.map +0 -1
- package/dist/spec/domain/service/LifecycleStateMachine.d.ts +0 -75
- package/dist/spec/domain/service/LifecycleStateMachine.d.ts.map +0 -1
- package/dist/spec/domain/service/LifecycleStateMachine.js +0 -76
- package/dist/spec/domain/service/LifecycleStateMachine.js.map +0 -1
- package/dist/spec/domain/service/LocaleCanonicalizer.d.ts +0 -29
- package/dist/spec/domain/service/LocaleCanonicalizer.d.ts.map +0 -1
- package/dist/spec/domain/service/LocaleCanonicalizer.js +0 -96
- package/dist/spec/domain/service/LocaleCanonicalizer.js.map +0 -1
- package/dist/spec/domain/service/ManifestFieldChecks.d.ts +0 -60
- package/dist/spec/domain/service/ManifestFieldChecks.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestFieldChecks.js +0 -116
- package/dist/spec/domain/service/ManifestFieldChecks.js.map +0 -1
- package/dist/spec/domain/service/ManifestGraphValidator.d.ts +0 -15
- package/dist/spec/domain/service/ManifestGraphValidator.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestGraphValidator.js +0 -225
- package/dist/spec/domain/service/ManifestGraphValidator.js.map +0 -1
- package/dist/spec/domain/service/ManifestLinker.d.ts +0 -45
- package/dist/spec/domain/service/ManifestLinker.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestLinker.js +0 -92
- package/dist/spec/domain/service/ManifestLinker.js.map +0 -1
- package/dist/spec/domain/service/ManifestLocaleTrimmer.d.ts +0 -16
- package/dist/spec/domain/service/ManifestLocaleTrimmer.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestLocaleTrimmer.js +0 -76
- package/dist/spec/domain/service/ManifestLocaleTrimmer.js.map +0 -1
- package/dist/spec/domain/service/ManifestParser.d.ts +0 -49
- package/dist/spec/domain/service/ManifestParser.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestParser.js +0 -203
- package/dist/spec/domain/service/ManifestParser.js.map +0 -1
- package/dist/spec/domain/service/ManifestPartition.d.ts +0 -9
- package/dist/spec/domain/service/ManifestPartition.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestPartition.js +0 -19
- package/dist/spec/domain/service/ManifestPartition.js.map +0 -1
- package/dist/spec/domain/service/ManifestPathDiagnoser.d.ts +0 -33
- package/dist/spec/domain/service/ManifestPathDiagnoser.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestPathDiagnoser.js +0 -43
- package/dist/spec/domain/service/ManifestPathDiagnoser.js.map +0 -1
- package/dist/spec/domain/service/ManifestSourceSpans.d.ts +0 -10
- package/dist/spec/domain/service/ManifestSourceSpans.d.ts.map +0 -1
- package/dist/spec/domain/service/ManifestSourceSpans.js +0 -76
- package/dist/spec/domain/service/ManifestSourceSpans.js.map +0 -1
- package/dist/spec/domain/service/McpToolNaming.d.ts +0 -25
- package/dist/spec/domain/service/McpToolNaming.d.ts.map +0 -1
- package/dist/spec/domain/service/McpToolNaming.js +0 -50
- package/dist/spec/domain/service/McpToolNaming.js.map +0 -1
- package/dist/spec/domain/service/PlanFingerprint.d.ts.map +0 -1
- package/dist/spec/domain/service/PlanFingerprint.js +0 -14
- package/dist/spec/domain/service/PlanFingerprint.js.map +0 -1
- package/dist/spec/domain/service/ProcedureViewSpecChecks.d.ts +0 -4
- package/dist/spec/domain/service/ProcedureViewSpecChecks.d.ts.map +0 -1
- package/dist/spec/domain/service/ProcedureViewSpecChecks.js +0 -211
- package/dist/spec/domain/service/ProcedureViewSpecChecks.js.map +0 -1
- package/dist/spec/domain/service/SchemaAdminUiChecker.d.ts +0 -44
- package/dist/spec/domain/service/SchemaAdminUiChecker.d.ts.map +0 -1
- package/dist/spec/domain/service/SchemaAdminUiChecker.js +0 -333
- package/dist/spec/domain/service/SchemaAdminUiChecker.js.map +0 -1
- package/dist/spec/domain/service/SchemaIndexChecker.d.ts +0 -33
- package/dist/spec/domain/service/SchemaIndexChecker.d.ts.map +0 -1
- package/dist/spec/domain/service/SchemaIndexChecker.js +0 -256
- package/dist/spec/domain/service/SchemaIndexChecker.js.map +0 -1
- package/dist/spec/domain/service/SchemaSearchChecker.d.ts +0 -11
- package/dist/spec/domain/service/SchemaSearchChecker.d.ts.map +0 -1
- package/dist/spec/domain/service/SchemaSearchChecker.js +0 -78
- package/dist/spec/domain/service/SchemaSearchChecker.js.map +0 -1
- package/dist/spec/domain/service/SchemaSpecChecks.d.ts +0 -31
- package/dist/spec/domain/service/SchemaSpecChecks.d.ts.map +0 -1
- package/dist/spec/domain/service/SchemaSpecChecks.js +0 -445
- package/dist/spec/domain/service/SchemaSpecChecks.js.map +0 -1
- package/dist/spec/domain/service/SiteDefaultsValidator.d.ts +0 -39
- package/dist/spec/domain/service/SiteDefaultsValidator.d.ts.map +0 -1
- package/dist/spec/domain/service/SiteDefaultsValidator.js +0 -194
- package/dist/spec/domain/service/SiteDefaultsValidator.js.map +0 -1
- package/dist/spec/domain/service/SqlClassify.d.ts +0 -19
- package/dist/spec/domain/service/SqlClassify.d.ts.map +0 -1
- package/dist/spec/domain/service/SqlClassify.js +0 -42
- package/dist/spec/domain/service/SqlClassify.js.map +0 -1
- package/dist/spec/domain/service/SqlRefusal.d.ts +0 -16
- package/dist/spec/domain/service/SqlRefusal.d.ts.map +0 -1
- package/dist/spec/domain/service/SqlRefusal.js +0 -20
- package/dist/spec/domain/service/SqlRefusal.js.map +0 -1
- package/dist/spec/domain/service/SqlTypes.d.ts +0 -40
- package/dist/spec/domain/service/SqlTypes.d.ts.map +0 -1
- package/dist/spec/domain/service/SqlTypes.js +0 -110
- package/dist/spec/domain/service/SqlTypes.js.map +0 -1
- package/dist/spec/domain/service/StaffRoleHierarchy.d.ts +0 -3
- package/dist/spec/domain/service/StaffRoleHierarchy.d.ts.map +0 -1
- package/dist/spec/domain/service/StaffRoleHierarchy.js +0 -19
- package/dist/spec/domain/service/StaffRoleHierarchy.js.map +0 -1
- package/dist/spec/domain/service/TriggerGraphChecks.d.ts +0 -16
- package/dist/spec/domain/service/TriggerGraphChecks.d.ts.map +0 -1
- package/dist/spec/domain/service/TriggerGraphChecks.js +0 -337
- package/dist/spec/domain/service/TriggerGraphChecks.js.map +0 -1
- package/dist/spec/domain/service/TriggerSpecChecks.d.ts +0 -4
- package/dist/spec/domain/service/TriggerSpecChecks.d.ts.map +0 -1
- package/dist/spec/domain/service/TriggerSpecChecks.js +0 -89
- package/dist/spec/domain/service/TriggerSpecChecks.js.map +0 -1
- package/dist/spec/domain/service/ValidatedAdminUiProjection.d.ts +0 -11
- package/dist/spec/domain/service/ValidatedAdminUiProjection.d.ts.map +0 -1
- package/dist/spec/domain/service/ValidatedAdminUiProjection.js +0 -26
- package/dist/spec/domain/service/ValidatedAdminUiProjection.js.map +0 -1
- package/dist/spec/domain/service/ViewAdminUiChecker.d.ts +0 -14
- package/dist/spec/domain/service/ViewAdminUiChecker.d.ts.map +0 -1
- package/dist/spec/domain/service/ViewAdminUiChecker.js +0 -58
- package/dist/spec/domain/service/ViewAdminUiChecker.js.map +0 -1
- package/dist/spec/domain/service/index.d.ts +0 -24
- package/dist/spec/domain/service/index.d.ts.map +0 -1
- package/dist/spec/domain/service/index.js +0 -24
- package/dist/spec/domain/service/index.js.map +0 -1
- package/dist/spec/index.d.ts +0 -10
- package/dist/spec/index.d.ts.map +0 -1
- package/dist/spec/index.js +0 -12
- package/dist/spec/index.js.map +0 -1
- package/dist/spec/infrastructure/cli/parseArgsError.d.ts +0 -16
- package/dist/spec/infrastructure/cli/parseArgsError.d.ts.map +0 -1
- package/dist/spec/infrastructure/cli/parseArgsError.js +0 -34
- package/dist/spec/infrastructure/cli/parseArgsError.js.map +0 -1
- package/dist/spec/infrastructure/index.d.ts +0 -2
- package/dist/spec/infrastructure/index.d.ts.map +0 -1
- package/dist/spec/infrastructure/index.js +0 -2
- package/dist/spec/infrastructure/index.js.map +0 -1
- package/dist/spec/infrastructure/sql/PgQueryParser.d.ts +0 -18
- package/dist/spec/infrastructure/sql/PgQueryParser.d.ts.map +0 -1
- package/dist/spec/infrastructure/sql/PgQueryParser.js +0 -17
- package/dist/spec/infrastructure/sql/PgQueryParser.js.map +0 -1
- package/dist/spec/infrastructure/sql/compilePlan.d.ts +0 -37
- package/dist/spec/infrastructure/sql/compilePlan.d.ts.map +0 -1
- package/dist/spec/infrastructure/sql/compilePlan.js +0 -287
- package/dist/spec/infrastructure/sql/compilePlan.js.map +0 -1
- package/dist/spec/infrastructure/sql/compileSql.d.ts +0 -35
- package/dist/spec/infrastructure/sql/compileSql.d.ts.map +0 -1
- package/dist/spec/infrastructure/sql/compileSql.js +0 -92
- package/dist/spec/infrastructure/sql/compileSql.js.map +0 -1
- package/dist/spec/infrastructure/sql/frontEnd.d.ts +0 -8
- package/dist/spec/infrastructure/sql/frontEnd.d.ts.map +0 -1
- package/dist/spec/infrastructure/sql/frontEnd.js +0 -100
- package/dist/spec/infrastructure/sql/frontEnd.js.map +0 -1
- package/dist/spec/infrastructure/sql/index.d.ts +0 -4
- package/dist/spec/infrastructure/sql/index.d.ts.map +0 -1
- package/dist/spec/infrastructure/sql/index.js +0 -4
- package/dist/spec/infrastructure/sql/index.js.map +0 -1
- package/dist/spec/kernel/diagnostic.d.ts.map +0 -1
- package/dist/spec/kernel/diagnostic.js +0 -301
- package/dist/spec/kernel/diagnostic.js.map +0 -1
- package/dist/spec/kernel/index.d.ts +0 -8
- package/dist/spec/kernel/index.d.ts.map +0 -1
- package/dist/spec/kernel/index.js +0 -8
- package/dist/spec/kernel/index.js.map +0 -1
- package/dist/spec/usecase/EmitTypes.d.ts +0 -22
- package/dist/spec/usecase/EmitTypes.d.ts.map +0 -1
- package/dist/spec/usecase/EmitTypes.js +0 -182
- package/dist/spec/usecase/EmitTypes.js.map +0 -1
- package/dist/spec/usecase/ValidateManifestsUseCase.d.ts +0 -8
- package/dist/spec/usecase/ValidateManifestsUseCase.d.ts.map +0 -1
- package/dist/spec/usecase/ValidateManifestsUseCase.js +0 -101
- package/dist/spec/usecase/ValidateManifestsUseCase.js.map +0 -1
- package/dist/spec/usecase/dto/ValidateManifestsRequest.d.ts +0 -27
- package/dist/spec/usecase/dto/ValidateManifestsRequest.d.ts.map +0 -1
- package/dist/spec/usecase/dto/ValidateManifestsRequest.js +0 -2
- package/dist/spec/usecase/dto/ValidateManifestsRequest.js.map +0 -1
- package/dist/spec/usecase/dto/ValidateManifestsResponse.d.ts +0 -14
- package/dist/spec/usecase/dto/ValidateManifestsResponse.d.ts.map +0 -1
- package/dist/spec/usecase/dto/ValidateManifestsResponse.js +0 -2
- package/dist/spec/usecase/dto/ValidateManifestsResponse.js.map +0 -1
- package/dist/spec/usecase/dto/index.d.ts +0 -3
- package/dist/spec/usecase/dto/index.d.ts.map +0 -1
- package/dist/spec/usecase/dto/index.js +0 -3
- package/dist/spec/usecase/dto/index.js.map +0 -1
- package/dist/spec/usecase/index.d.ts +0 -10
- package/dist/spec/usecase/index.d.ts.map +0 -1
- package/dist/spec/usecase/index.js +0 -10
- package/dist/spec/usecase/index.js.map +0 -1
- package/dist/testing/cases/before-hook.d.ts +0 -4
- package/dist/testing/cases/before-hook.d.ts.map +0 -1
- package/dist/testing/cases/before-hook.js +0 -71
- package/dist/testing/cases/before-hook.js.map +0 -1
- package/dist/testing/cases/corpus.d.ts +0 -14
- package/dist/testing/cases/corpus.d.ts.map +0 -1
- package/dist/testing/cases/corpus.js +0 -93
- package/dist/testing/cases/corpus.js.map +0 -1
- package/dist/testing/cases/policy.d.ts +0 -87
- package/dist/testing/cases/policy.d.ts.map +0 -1
- package/dist/testing/cases/policy.js +0 -143
- package/dist/testing/cases/policy.js.map +0 -1
- package/dist/testing/cases/printer.d.ts +0 -4
- package/dist/testing/cases/printer.d.ts.map +0 -1
- package/dist/testing/cases/printer.js +0 -34
- package/dist/testing/cases/printer.js.map +0 -1
- package/dist/testing/cases/report-view.d.ts +0 -5
- package/dist/testing/cases/report-view.d.ts.map +0 -1
- package/dist/testing/cases/report-view.js +0 -51
- package/dist/testing/cases/report-view.js.map +0 -1
- package/dist/testing/cases/requisition.d.ts +0 -4
- package/dist/testing/cases/requisition.d.ts.map +0 -1
- package/dist/testing/cases/requisition.js +0 -38
- package/dist/testing/cases/requisition.js.map +0 -1
- package/dist/testing/cases/search-places.d.ts +0 -4
- package/dist/testing/cases/search-places.d.ts.map +0 -1
- package/dist/testing/cases/search-places.js +0 -60
- package/dist/testing/cases/search-places.js.map +0 -1
- package/dist/testing/cases/stock.d.ts +0 -4
- package/dist/testing/cases/stock.d.ts.map +0 -1
- package/dist/testing/cases/stock.js +0 -35
- package/dist/testing/cases/stock.js.map +0 -1
- package/dist/testing/cases/store.d.ts +0 -4
- package/dist/testing/cases/store.d.ts.map +0 -1
- package/dist/testing/cases/store.js +0 -100
- package/dist/testing/cases/store.js.map +0 -1
- package/dist/testing/harness.d.ts +0 -94
- package/dist/testing/harness.d.ts.map +0 -1
- package/dist/testing/harness.js +0 -168
- package/dist/testing/harness.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/report.d.ts +0 -15
- package/dist/testing/report.d.ts.map +0 -1
- package/dist/testing/report.js +0 -22
- package/dist/testing/report.js.map +0 -1
- package/dist/web/createRestSurface.d.ts +0 -7
- package/dist/web/createRestSurface.d.ts.map +0 -1
- package/dist/web/createRestSurface.js +0 -41
- package/dist/web/createRestSurface.js.map +0 -1
- package/dist/web/index.d.ts +0 -2
- package/dist/web/index.d.ts.map +0 -1
- package/dist/web/index.js +0 -2
- package/dist/web/index.js.map +0 -1
- 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 -939
- 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 -244
- 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/0029-mcp-apps-interaction-contracts.md +0 -324
- package/docs/adr/0030-store.md +0 -40
- package/docs/adr/0031-host-cloud-core-contract.md +0 -102
- package/docs/adr/0032-store-centric-core-and-service-contract.md +0 -384
- package/docs/adr/0033-storage-converges-to-the-plan.md +0 -92
- package/docs/adr/0034-store-is-authored-as-sql.md +0 -192
- package/docs/adr/0035-sql-dialects.md +0 -154
- package/docs/adr/0036-host-and-dialect.md +0 -65
- package/docs/adr/0037-postgresql-is-the-reference-dialect.md +0 -125
- package/docs/adr/0038-bun-native-host.md +0 -63
- package/docs/adr/0039-postgresql-is-native.md +0 -130
- package/docs/adr/README.md +0 -98
- package/docs/adr/adr-lite-1376-admin-extensions.md +0 -330
- 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 -48
- package/docs/adr/adr-lite-909-admin-ui-kit.md +0 -37
- package/docs/examples/commerce-inventory.md +0 -498
- package/docs/examples/commerce.md +0 -254
- package/docs/examples/guarded-api.md +0 -238
- package/docs/examples/intake-hooks.md +0 -237
- package/docs/examples/intake.md +0 -127
- package/docs/examples/legal-documents.md +0 -218
- package/docs/examples/procurement.md +0 -226
- package/docs/examples/publication.md +0 -211
- package/docs/examples/reference-service/.mantle/generated/mantle.ts +0 -174
- package/docs/examples/reference-service/.mantle/generated/plan.json +0 -1936
- package/docs/examples/reference-service/README.md +0 -33
- package/docs/examples/reference-service/manifests/catalog.yaml +0 -103
- package/docs/examples/reference-service/manifests/orders.yaml +0 -120
- package/docs/examples/reference-service/mantle.config.json +0 -1
- package/docs/examples/reference-service/package.json +0 -27
- package/docs/examples/reference-service/smoke.mjs +0 -160
- package/docs/examples/reference-service/src/handlers.ts +0 -36
- package/docs/examples/reference-service/src/index.ts +0 -33
- package/docs/examples/reference-service/src/service.ts +0 -78
- package/docs/examples/reference-service/wrangler.jsonc +0 -26
- package/docs/examples/reservation.md +0 -142
- /package/docs/examples/{reference-service → app-shell}/.dev.vars.example +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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AAC,qBAAqB,EAAE,KAAK,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACjG,CAAC;oBAAS,CAAC;gBACT,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QACnD,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC;KAC5F,CAAC;AACJ,CAAC"}
|
package/dist/testing/report.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type Check = {
|
|
2
|
-
case: string;
|
|
3
|
-
name: string;
|
|
4
|
-
ok: boolean;
|
|
5
|
-
detail?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class Report {
|
|
8
|
-
checks: Check[];
|
|
9
|
-
current: string;
|
|
10
|
-
section(title: string): void;
|
|
11
|
-
check(name: string, ok: boolean, detail?: unknown): void;
|
|
12
|
-
equal(name: string, actual: unknown, expected: unknown): void;
|
|
13
|
-
get failed(): Check[];
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=report.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/testing/report.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjF,qBAAa,MAAM;IACjB,MAAM,EAAE,KAAK,EAAE,CAAM;IACrB,OAAO,SAAM;IACb,OAAO,CAAC,KAAK,EAAE,MAAM;IAGrB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO;IAIjD,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO;IAItD,IAAI,MAAM,YAET;CACF"}
|
package/dist/testing/report.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// A tiny recorder: every claim in the report is a `check` that ran, with its evidence.
|
|
2
|
-
// @ts-nocheck test code over loosely typed IR and rows
|
|
3
|
-
import { isDeepStrictEqual } from 'node:util';
|
|
4
|
-
export class Report {
|
|
5
|
-
checks = [];
|
|
6
|
-
current = '';
|
|
7
|
-
section(title) {
|
|
8
|
-
this.current = title;
|
|
9
|
-
}
|
|
10
|
-
check(name, ok, detail) {
|
|
11
|
-
const d = detail === undefined ? undefined : typeof detail === 'string' ? detail : JSON.stringify(detail);
|
|
12
|
-
this.checks.push({ case: this.current, name, ok, detail: d });
|
|
13
|
-
}
|
|
14
|
-
equal(name, actual, expected) {
|
|
15
|
-
const ok = isDeepStrictEqual(JSON.parse(JSON.stringify(actual)), JSON.parse(JSON.stringify(expected)));
|
|
16
|
-
this.check(name, ok, ok ? JSON.stringify(actual) : { expected, actual });
|
|
17
|
-
}
|
|
18
|
-
get failed() {
|
|
19
|
-
return this.checks.filter((c) => !c.ok);
|
|
20
|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AAM;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MantleRuntime, Surface } from "../core/index.js";
|
|
2
|
-
export interface RestSurfaceOptions {
|
|
3
|
-
/** Where the Views are mounted, e.g. `/api`. HTTP Trigger paths are absolute. */
|
|
4
|
-
readonly basePath: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function createRestSurface(runtime: MantleRuntime, options: RestSurfaceOptions): Surface;
|
|
7
|
-
//# sourceMappingURL=createRestSurface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createRestSurface.d.ts","sourceRoot":"","sources":["../../src/web/createRestSurface.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAkC9F"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { coerce, failure, json, match, readJsonObject, viewQuery, wireError } from "../core/wire.js";
|
|
2
|
-
// Public routing does not imply public data: Views and Triggers can depend on the Caller.
|
|
3
|
-
const NO_STORE = { "cache-control": "private, no-store" };
|
|
4
|
-
export function createRestSurface(runtime, options) {
|
|
5
|
-
const base = options.basePath.replace(/\/+$/, "");
|
|
6
|
-
const { plan } = runtime;
|
|
7
|
-
const params = (path) => path.split("/").filter((s) => s.startsWith("{")).length;
|
|
8
|
-
// a route with fewer path params is more specific, so `/items/search` is never shadowed by `/items/{id}`
|
|
9
|
-
const routes = Object.entries(plan.triggers)
|
|
10
|
-
.flatMap(([name, t]) => (t.source.kind === "http" ? [{ name, method: t.source.method, path: t.source.path, procedure: t.procedure }] : []))
|
|
11
|
-
.sort((a, b) => params(a.path) - params(b.path));
|
|
12
|
-
return async (request, caller) => {
|
|
13
|
-
try {
|
|
14
|
-
const url = new URL(request.url);
|
|
15
|
-
const path = url.pathname;
|
|
16
|
-
const view = request.method === "GET" ? match(`${base}/views/{name}`, path)?.name : undefined;
|
|
17
|
-
if (view !== undefined) {
|
|
18
|
-
const v = plan.views[view];
|
|
19
|
-
if (!v || v.surface !== "public")
|
|
20
|
-
throw wireError("NOT_FOUND", `no public View '${view}'`, "rest");
|
|
21
|
-
return json(await runtime.store.as(caller).view(view, viewQuery(view, v, url.searchParams, "rest")), 200, NO_STORE);
|
|
22
|
-
}
|
|
23
|
-
for (const route of routes) {
|
|
24
|
-
if (route.method !== request.method)
|
|
25
|
-
continue;
|
|
26
|
-
const params = match(route.path, path);
|
|
27
|
-
if (!params)
|
|
28
|
-
continue;
|
|
29
|
-
const props = plan.procedures[route.procedure]?.input.properties ?? {};
|
|
30
|
-
const body = await readJsonObject(request, "rest");
|
|
31
|
-
const input = { ...body, ...Object.fromEntries(Object.entries(params).map(([k, v]) => [k, coerce(v, props[k], k, "rest")])) };
|
|
32
|
-
return json(await runtime.invokeProcedure({ procedure: route.procedure, input, caller, cause: { kind: "http", id: crypto.randomUUID() } }), 200, NO_STORE);
|
|
33
|
-
}
|
|
34
|
-
throw wireError("NOT_FOUND", "no such route", "rest");
|
|
35
|
-
}
|
|
36
|
-
catch (e) {
|
|
37
|
-
return failure(e, "rest", NO_STORE);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=createRestSurface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createRestSurface.js","sourceRoot":"","sources":["../../src/web/createRestSurface.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,E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,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAA2B,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACxJ,OAAO,IAAI,CAAC,MAAM,OAAO,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC7J,CAAC;YACD,MAAM,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/web/index.d.ts
DELETED
package/dist/web/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
package/dist/web/index.js
DELETED
package/dist/web/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
# ADR-0001: 4-atom YAML manifest model under `cms.mantle.aotter.net/v1`
|
|
2
|
-
|
|
3
|
-
**Status:** Accepted for the four-atom grammar and multi-document YAML;
|
|
4
|
-
the fixed `site.yaml` file contract is superseded by ADR-0019.
|
|
5
|
-
|
|
6
|
-
**Date**: 2026-04-30 (POC origin); last amended 2026-08-16
|
|
7
|
-
|
|
8
|
-
**Deciders**: phsu
|
|
9
|
-
|
|
10
|
-
**Related**: ADR-0002 (closed enums for bindings),
|
|
11
|
-
[ADR-0019](0019-sealed-manifest-runtime-pipeline.md) (caller-owned source boundary)
|
|
12
|
-
|
|
13
|
-
> **2026-08-16 amendment:** the four atoms and multi-document YAML remain
|
|
14
|
-
> normative. Core no longer assigns source file names: its parser accepts
|
|
15
|
-
> caller-owned source IDs, and its CLI reads immediate `.yaml` / `.yml` files
|
|
16
|
-
> in lexicographic order. `manifests/site.yaml` remains only a starter
|
|
17
|
-
> convention. Fixed-file statements below are retained as decision history.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Context
|
|
22
|
-
|
|
23
|
-
The SDK's surface area to consumers is YAML manifests. The
|
|
24
|
-
question is: what set of resource kinds does that surface
|
|
25
|
-
expose? Too few and authors find themselves cramming concepts
|
|
26
|
-
into the wrong atom; too many and consumers face a long enum of
|
|
27
|
-
"what kind do I write today" with overlapping semantics.
|
|
28
|
-
|
|
29
|
-
Earlier iterations of this CMS experimented with 11 domain-shaped
|
|
30
|
-
kinds (`ContentSchema`, `ContentView`, `Form`, `Membership`,
|
|
31
|
-
`Email`, `Webhook`, `Workflow`, `ScheduledJob`, etc.). Two
|
|
32
|
-
problems surfaced:
|
|
33
|
-
|
|
34
|
-
1. **Authors couldn't find the right atom for a new feature.**
|
|
35
|
-
"Is a contact form a `Form`, a `Workflow`, an `Email`, or all
|
|
36
|
-
three?" Real features cross domain boundaries.
|
|
37
|
-
2. **Atoms drifted toward overlap.** A `Form` developed an
|
|
38
|
-
`email:` block; a `Webhook` developed a `validation:` block;
|
|
39
|
-
each new kind grew to subsume neighbors.
|
|
40
|
-
|
|
41
|
-
A multi-round design experiment (6 rounds + R6.5 falsification +
|
|
42
|
-
R7 reframing, run as a 4-agent debate over a blog feature
|
|
43
|
-
progression: like button → threaded comments → private posts →
|
|
44
|
-
rate-limited writes → cross-Schema invariants) reduced the kind
|
|
45
|
-
count to 4 and tested those 4 against 6 increasingly demanding
|
|
46
|
-
features without needing a 5th.
|
|
47
|
-
|
|
48
|
-
The relevant history that this ADR records (so future readers
|
|
49
|
-
don't re-litigate it):
|
|
50
|
-
|
|
51
|
-
- **R0 — "atoms ≡ PG primitives" claim**: the experiment opened
|
|
52
|
-
with the heuristic "4 kinds because Postgres has 4
|
|
53
|
-
application-developer primitives." Held for 6 rounds without
|
|
54
|
-
challenge.
|
|
55
|
-
- **R6.5 — falsification round**: an agent proposed cutting to
|
|
56
|
-
3 atoms by folding `Procedure` into `Schema.operations` (PG
|
|
57
|
-
functions attach to schemas in pg_proc). 92→58 LOC reduction
|
|
58
|
-
in the worked example by adding a default-CRUD shortcut.
|
|
59
|
-
Accepted by the round's judge.
|
|
60
|
-
- **R7 — user reframing**: reverted to 4 atoms, but for a
|
|
61
|
-
different reason than R0. The right axis isn't "PG
|
|
62
|
-
primitive"; it's "contract vs implementation × state vs
|
|
63
|
-
event":
|
|
64
|
-
|
|
65
|
-
| | request | event |
|
|
66
|
-
|---|---|---|
|
|
67
|
-
| external API | View (read) / write-API atom | (empty in v0.1) |
|
|
68
|
-
| internal | (Schema's writes are via the write-API atom) | Trigger (reaction) / Schema (state) |
|
|
69
|
-
|
|
70
|
-
**Design lesson** (worth surfacing because it shaped both this
|
|
71
|
-
ADR and the multi-doc YAML decision below): in multi-round
|
|
72
|
-
agent-team debates, decisions ratified in early rounds tend to
|
|
73
|
-
inherit forward through later rounds even when the local
|
|
74
|
-
conditions that justified them have changed. The orchestrator
|
|
75
|
-
must re-test prior naming / structural decisions whenever the
|
|
76
|
-
spec surface materially shifts; agent-team consensus is a strong
|
|
77
|
-
signal but not authoritative.
|
|
78
|
-
|
|
79
|
-
## Decision
|
|
80
|
-
|
|
81
|
-
The SDK exposes exactly **four declarative resource kinds** under
|
|
82
|
-
the `cms.mantle.aotter.net/v1` API group:
|
|
83
|
-
|
|
84
|
-
| Atom | Postgres equivalent | Externally exposed by itself? | Has user code? |
|
|
85
|
-
|---|---|---|---|
|
|
86
|
-
| `Schema` | `CREATE TABLE` | no | no |
|
|
87
|
-
| `View` | `CREATE VIEW` | yes (auto-mounted at `GET /api/views/<name>`; see ADR-0012) | no |
|
|
88
|
-
| `Procedure` | `CREATE FUNCTION ... LANGUAGE plpgsql` | **no** (transport-agnostic; needs a Trigger to bind) | **yes — handler ref to consumer's TS** |
|
|
89
|
-
| `Trigger` | `CREATE TRIGGER` + route/tool binding | yes (the binding atom) | no |
|
|
90
|
-
|
|
91
|
-
### Path A: Trigger does all binding
|
|
92
|
-
|
|
93
|
-
A Procedure is **not externally exposed by itself**. To make it
|
|
94
|
-
callable over HTTP / MCP / lifecycle, declare a
|
|
95
|
-
`Trigger` whose `target.procedure` points at it. The same
|
|
96
|
-
Procedure can be bound by multiple Triggers (HTTP + MCP,
|
|
97
|
-
all sharing one handler).
|
|
98
|
-
|
|
99
|
-
This is "Path A" relative to an alternative considered (and
|
|
100
|
-
rejected — see below) where Procedures carried an inline
|
|
101
|
-
`expose:` block.
|
|
102
|
-
|
|
103
|
-
### PG-1:1 mapping is the primary onboarding pitch
|
|
104
|
-
|
|
105
|
-
The mapping above is what new authors see first. Authors with
|
|
106
|
-
Postgres background orient instantly. Authors without it get a
|
|
107
|
-
mental anchor with 30 years of Codd/SQL/PostgREST literature
|
|
108
|
-
behind it.
|
|
109
|
-
|
|
110
|
-
### Composition rule
|
|
111
|
-
|
|
112
|
-
Anything more domain-shaped than these 4 (a `Form`,
|
|
113
|
-
`Membership`, `Email`, `Webhook`, `Workflow`, `ScheduledJob`)
|
|
114
|
-
is **not** an atom. It is composed in the consumer project by
|
|
115
|
-
combining the 4 atoms with consumer TypeScript. If a proposed
|
|
116
|
-
new feature wants a 5th kind, the proposer must show the 4
|
|
117
|
-
existing atoms cannot express it.
|
|
118
|
-
|
|
119
|
-
## Consequences
|
|
120
|
-
|
|
121
|
-
### Pros
|
|
122
|
-
|
|
123
|
-
- One question — "is it state, a query, an operation, or an
|
|
124
|
-
event-binding?" — picks the atom every time. No "form vs
|
|
125
|
-
workflow" gray zone.
|
|
126
|
-
- Read/write asymmetry (Views auto-mount, Procedures require
|
|
127
|
-
Triggers) matches HTTP safe-vs-unsafe semantics. Authors don't
|
|
128
|
-
have to remember which kinds the SDK auto-routes; the rule is
|
|
129
|
-
derivable from the atom's nature.
|
|
130
|
-
- PG mapping gives the spec 30 years of literature and battle
|
|
131
|
-
testing as background. Postgres has shipped these primitives
|
|
132
|
-
in the same shape since SQL-92 (Schema, View, Procedure) plus
|
|
133
|
-
Active Database / ECA rules from the 1990s (Trigger).
|
|
134
|
-
- Closed atom count makes the SDK's testing surface tractable:
|
|
135
|
-
every code path can be enumerated as
|
|
136
|
-
Schema-creation / View-query / Procedure-invocation /
|
|
137
|
-
Trigger-firing combinations.
|
|
138
|
-
|
|
139
|
-
### Costs
|
|
140
|
-
|
|
141
|
-
- Atoms are coarse. A "form-with-validation-and-email" feature
|
|
142
|
-
is 3 manifests (Schema + Procedure + Trigger), not 1. Mitigated
|
|
143
|
-
by multi-doc YAML grouping (see § Authoring shape below).
|
|
144
|
-
- "Procedure is not directly exposed" is a teaching point; new
|
|
145
|
-
authors initially try to call a Procedure URL and get 404.
|
|
146
|
-
- The PG-1:1 pitch breaks down once authors look at the actual
|
|
147
|
-
storage layer (D1 today). The mapping is conceptual; the
|
|
148
|
-
runtime is SQLite + JSON.
|
|
149
|
-
|
|
150
|
-
### Risks
|
|
151
|
-
|
|
152
|
-
- **Authors try to subsume domain concepts into the 4 atoms by
|
|
153
|
-
cramming.** A `Form` becomes "a Schema + a Procedure + an
|
|
154
|
-
ad-hoc validator block in the handler." Mitigated by
|
|
155
|
-
multi-doc YAML keeping atoms separate while the file count
|
|
156
|
-
stays low; reviewers should push back when a single Procedure's
|
|
157
|
-
handler becomes a workflow engine.
|
|
158
|
-
- **Trigger.source.kind expansion pressure.** v0.1 ships `http`, `mcp`,
|
|
159
|
-
and `lifecycle`. Each new source kind requires a complete grammar and
|
|
160
|
-
runtime design pass.
|
|
161
|
-
- **The PG-1:1 pitch may become a constraint.** If a future
|
|
162
|
-
capability has no PG analogue, framing pressure will push to
|
|
163
|
-
shoehorn it into the table or to break the pitch. Either is
|
|
164
|
-
defensible; the discipline is to flag the choice consciously.
|
|
165
|
-
|
|
166
|
-
## Alternatives considered
|
|
167
|
-
|
|
168
|
-
**(a) 11 domain-shaped kinds (early scaffolding)**.
|
|
169
|
-
Rejected: cross-cutting features didn't fit single kinds;
|
|
170
|
-
adjacent kinds drifted toward overlap. Authors couldn't pick.
|
|
171
|
-
|
|
172
|
-
**(b) 5 kinds — keep `Policy` as a separate atom**.
|
|
173
|
-
Rejected: row/field-level policy is sub-spec on the atom whose
|
|
174
|
-
data it concerns (Schema-attached visibility, Procedure-attached
|
|
175
|
-
auth gate). Lifting Policy to a kind invented a 5th locator
|
|
176
|
-
authors had to consult; folding it kept the locator count down.
|
|
177
|
-
|
|
178
|
-
**(c) 3 kinds — fold Procedure into `Schema.operations`** (R6.5).
|
|
179
|
-
Rejected: under R7's reframing, the right axis is contract /
|
|
180
|
-
implementation × state / event, not "PG attachment." Schema
|
|
181
|
-
holds state; Procedure holds operations against state; folding
|
|
182
|
-
them conflates "what data exists" with "what can happen to data."
|
|
183
|
-
Also the LOC win that motivated the fold (92→58 via default CRUD)
|
|
184
|
-
was recovered without folding through the shipped
|
|
185
|
-
`handler.kind: builtin` shortcut.
|
|
186
|
-
|
|
187
|
-
**(d) 4 kinds with `Procedure` retaining inline
|
|
188
|
-
`expose: { http: ... }` for single-source bindings**.
|
|
189
|
-
Rejected: created two ways to bind HTTP (inline `expose:` for
|
|
190
|
-
single-source, separate `Trigger` for multi-source). Doctrine
|
|
191
|
-
tax forever. Multi-doc YAML solves the file-count complaint
|
|
192
|
-
that motivated `expose:` without inventing redundant grammar.
|
|
193
|
-
See § Authoring shape below for the full retirement rationale.
|
|
194
|
-
|
|
195
|
-
## How to apply
|
|
196
|
-
|
|
197
|
-
- Adding a new feature: ask which of the 4 atoms holds each
|
|
198
|
-
piece. Use the "external by itself?" column to settle "do I
|
|
199
|
-
need a Trigger here?"
|
|
200
|
-
- Adding a new top-level kind: do not. First express as a
|
|
201
|
-
composition of the 4 + consumer TS. If the composition is
|
|
202
|
-
awkward, look for sub-spec on an existing atom before adding
|
|
203
|
-
a 5th kind.
|
|
204
|
-
- Renaming an atom: do not. The names are public surface; even
|
|
205
|
-
internally-motivated renames tend to drag schema-revise effort
|
|
206
|
-
across consumers, code, docs, and agent training data. Bias
|
|
207
|
-
toward keeping the names.
|
|
208
|
-
- Reading the spec: Schema = state, View = read API,
|
|
209
|
-
Procedure = write API (internal), Trigger = binding. That
|
|
210
|
-
4-word gloss covers ~90% of the questions authors ask.
|
|
211
|
-
|
|
212
|
-
## Implementation status
|
|
213
|
-
|
|
214
|
-
Names + PG-1:1 framing are documented in this ADR and the manifest grammar
|
|
215
|
-
reference. Manifest TS types live in `packages/mantle-spec/`. The external
|
|
216
|
-
[`aotter/mantle-starters`](https://github.com/aotter/mantle-starters)
|
|
217
|
-
repository declared alpha-era consumer instances of each atom; new applications
|
|
218
|
-
are authored directly under [ADR-0021](0021-retire-starter-scaffolding.md).
|
|
219
|
-
Runtime dispatcher, View executor, and Procedure dispatcher live in this repository.
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## Grammar changes
|
|
224
|
-
|
|
225
|
-
The parser accepts only grammar implemented by the current SDK. Unknown keys and
|
|
226
|
-
closed-enum values fail validation; Mantle does not reserve speculative syntax.
|
|
227
|
-
Add new grammar only alongside a concrete use case, runtime behavior, validation,
|
|
228
|
-
and an ADR update. Earlier experiments remain available in git history.
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Authoring shape: multi-doc YAML (was POC ADR-0006)
|
|
233
|
-
|
|
234
|
-
> Folded in 2026-05-03 from POC ADR-0006 ("Multi-doc YAML over
|
|
235
|
-
> inline shortcuts for atom co-location"). The decision below
|
|
236
|
-
> defines how authors lay manifests out on disk; it is the
|
|
237
|
-
> direct corollary of "Trigger does all binding" above.
|
|
238
|
-
|
|
239
|
-
### Context
|
|
240
|
-
|
|
241
|
-
The 4-atom model means a single user-visible feature commonly
|
|
242
|
-
bundles multiple atoms. A contact form is at minimum:
|
|
243
|
-
|
|
244
|
-
- A `Schema` for `contact-messages`
|
|
245
|
-
- A `Procedure` `send-contact-message` (handler validates +
|
|
246
|
-
inserts)
|
|
247
|
-
- A `Trigger` binding the Procedure to `POST /api/contact`
|
|
248
|
-
|
|
249
|
-
Three atoms, three documents. With one file per atom, a
|
|
250
|
-
small site with 10 features has 30+ manifest files. An early
|
|
251
|
-
design-experiment vibe-user called this out:
|
|
252
|
-
|
|
253
|
-
> 4 個 manifest 為了一顆 like 按鈕?要寫成這樣才能用?
|
|
254
|
-
|
|
255
|
-
(Translation: 4 manifests just for a like button? You have to
|
|
256
|
-
write all this to make it work?)
|
|
257
|
-
|
|
258
|
-
Two paths surfaced to address the file count:
|
|
259
|
-
|
|
260
|
-
#### Path A — Multi-doc YAML
|
|
261
|
-
|
|
262
|
-
YAML's standard `---` separator allows multiple documents in
|
|
263
|
-
one file. The fixed site manifest carries all atoms:
|
|
264
|
-
|
|
265
|
-
```yaml
|
|
266
|
-
# manifests/site.yaml
|
|
267
|
-
apiVersion: cms.mantle.aotter.net/v1
|
|
268
|
-
kind: Schema
|
|
269
|
-
metadata: { name: contact-messages }
|
|
270
|
-
spec:
|
|
271
|
-
schema: { ... }
|
|
272
|
-
|
|
273
|
-
---
|
|
274
|
-
apiVersion: cms.mantle.aotter.net/v1
|
|
275
|
-
kind: Procedure
|
|
276
|
-
metadata: { name: send-contact-message }
|
|
277
|
-
spec:
|
|
278
|
-
input: { ... }
|
|
279
|
-
output: { ... }
|
|
280
|
-
handler: { kind: ref, ref: send-contact-message }
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
apiVersion: cms.mantle.aotter.net/v1
|
|
284
|
-
kind: Trigger
|
|
285
|
-
metadata: { name: contact-http }
|
|
286
|
-
spec:
|
|
287
|
-
source: { kind: http, method: POST, path: /api/contact }
|
|
288
|
-
target: { procedure: send-contact-message }
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
One file, three atoms, conceptual separation preserved. The
|
|
292
|
-
loader reads `site.yaml` and parses each `---` block as a separate
|
|
293
|
-
manifest.
|
|
294
|
-
|
|
295
|
-
#### Path B — Inline shortcut on Procedure (`expose:`)
|
|
296
|
-
|
|
297
|
-
Add a `Procedure.expose:` block that absorbs single-source HTTP
|
|
298
|
-
binding inline, eliminating the Trigger for the 1:1 case:
|
|
299
|
-
|
|
300
|
-
```yaml
|
|
301
|
-
apiVersion: cms.mantle.aotter.net/v1
|
|
302
|
-
kind: Procedure
|
|
303
|
-
metadata: { name: send-contact-message }
|
|
304
|
-
spec:
|
|
305
|
-
expose:
|
|
306
|
-
http: { method: POST, path: /api/contact }
|
|
307
|
-
input: { ... }
|
|
308
|
-
output: { ... }
|
|
309
|
-
handler: { kind: ref, ref: send-contact-message }
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
The two paths solve the same surface concern (file count) but
|
|
313
|
-
have very different structural implications.
|
|
314
|
-
|
|
315
|
-
### Decision
|
|
316
|
-
|
|
317
|
-
**Path A: Multi-doc YAML.** `Procedure.expose:` is permanently
|
|
318
|
-
retired. Trigger does ALL transport binding. Co-locate related
|
|
319
|
-
atoms in one file via `---`.
|
|
320
|
-
|
|
321
|
-
#### Why Path B was retired
|
|
322
|
-
|
|
323
|
-
Path B created **two ways to bind a Procedure to HTTP**:
|
|
324
|
-
|
|
325
|
-
- For a Procedure with one HTTP transport: inline `expose:` on
|
|
326
|
-
Procedure
|
|
327
|
-
- For a Procedure with multiple transports (HTTP + MCP):
|
|
328
|
-
separate `Trigger` per transport
|
|
329
|
-
|
|
330
|
-
This is the exact "two ways to do the same thing" failure mode.
|
|
331
|
-
Doctrine resolves it on paper ("expose for single, Trigger for
|
|
332
|
-
multi") but creates permanent tax:
|
|
333
|
-
|
|
334
|
-
- Authors must remember which form to use, and switch when
|
|
335
|
-
cardinality changes (a single-HTTP Procedure that later
|
|
336
|
-
needs an MCP binding has to be refactored from `expose:` to
|
|
337
|
-
`Trigger`).
|
|
338
|
-
- The validator must understand both forms; OpenAPI emission
|
|
339
|
-
has two source paths to walk.
|
|
340
|
-
- The PG-1:1 mapping is muddied: "Procedure ≡ pg_proc" is clean
|
|
341
|
-
only if Procedure is internal-callable (no transport surface);
|
|
342
|
-
`expose:` gives Procedure transport semantics, weakening the
|
|
343
|
-
analogy.
|
|
344
|
-
- AI authors trying to introspect the manifest model get
|
|
345
|
-
conflicting signals about what the atom does.
|
|
346
|
-
|
|
347
|
-
#### What multi-doc YAML accomplishes
|
|
348
|
-
|
|
349
|
-
- File count drops without inventing redundancy. A site has one
|
|
350
|
-
authored manifest file regardless of how many atoms it requires.
|
|
351
|
-
- Atom separation stays honest. Every atom has its own
|
|
352
|
-
envelope (`apiVersion`, `kind`, `metadata`, `spec`); there
|
|
353
|
-
is no "shortcut form."
|
|
354
|
-
- Related atoms sit next to each other for readers reviewing the site.
|
|
355
|
-
- The PG-1:1 framing stays clean: Procedure is
|
|
356
|
-
internal-callable, Trigger is the binding atom.
|
|
357
|
-
|
|
358
|
-
#### Fixed file contract
|
|
359
|
-
|
|
360
|
-
The authored file is always `manifests/site.yaml`. The common loader rejects
|
|
361
|
-
a missing or differently named file, and every `---` document becomes one
|
|
362
|
-
atom. This is enforced so humans and agents never need a file-discovery rule.
|
|
363
|
-
|
|
364
|
-
### Consequences
|
|
365
|
-
|
|
366
|
-
#### Pros
|
|
367
|
-
|
|
368
|
-
- Single mechanism for HTTP binding (Trigger). Validator,
|
|
369
|
-
OpenAPI emitter, runtime dispatcher all walk one shape.
|
|
370
|
-
- Conceptual atom separation preserved. The 4-atom story holds
|
|
371
|
-
for every feature.
|
|
372
|
-
- File count is fixed at one authored manifest.
|
|
373
|
-
- Cardinality changes (1 HTTP → HTTP + cron) are additive (add
|
|
374
|
-
a Trigger); no refactor needed.
|
|
375
|
-
- AI authors learn one mental model, not two.
|
|
376
|
-
|
|
377
|
-
#### Costs
|
|
378
|
-
|
|
379
|
-
- Author must learn YAML's multi-doc syntax (`---`). This is
|
|
380
|
-
standard YAML 1.2 and supported by every loader, but it is
|
|
381
|
-
one more piece of syntax than "one file = one document."
|
|
382
|
-
- Some loaders (older / non-compliant) don't handle multi-doc.
|
|
383
|
-
Standard `js-yaml` / `yaml` libraries do; the SDK uses
|
|
384
|
-
`yaml` (already a dependency).
|
|
385
|
-
- Authors use `grep` by atom name inside `manifests/site.yaml` instead of
|
|
386
|
-
discovering feature-specific filenames.
|
|
387
|
-
- Editor support: YAML language servers handle multi-doc, but
|
|
388
|
-
some IDE features (e.g. JSON Schema validation per document
|
|
389
|
-
in a multi-doc file) work less smoothly than in single-doc
|
|
390
|
-
files. Acceptable for v0.1.
|
|
391
|
-
|
|
392
|
-
#### Risks
|
|
393
|
-
|
|
394
|
-
- **Author convenience pressure to reintroduce `expose:`.**
|
|
395
|
-
Someone shows up with "but for the 80% case where I have one
|
|
396
|
-
HTTP binding, the inline form is so much shorter!" The
|
|
397
|
-
argument is real; the answer is: doctrine that creates two
|
|
398
|
-
ways is permanent tax that grows with the codebase.
|
|
399
|
-
Mitigation: this section is the answer to that argument; flag
|
|
400
|
-
attempts and link here.
|
|
401
|
-
- **`site.yaml` can grow.** Search by `kind` plus `metadata.name`; reconsider
|
|
402
|
-
splitting only when real projects show that one deterministic location is
|
|
403
|
-
worse than file discovery.
|
|
404
|
-
|
|
405
|
-
### Alternatives considered
|
|
406
|
-
|
|
407
|
-
**(a) Path B: `Procedure.expose:`**.
|
|
408
|
-
Rejected (this section's main subject). Doctrine tax forever; PG
|
|
409
|
-
analogy weakened; cardinality refactor required when
|
|
410
|
-
single-source becomes multi-source.
|
|
411
|
-
|
|
412
|
-
**(b) One file per atom (early scaffolding default)**.
|
|
413
|
-
Rejected: file count complaint is real for multi-atom features.
|
|
414
|
-
Path A solves it without inventing redundancy.
|
|
415
|
-
|
|
416
|
-
**(c) New top-level kind `Feature` that bundles atoms**.
|
|
417
|
-
Rejected: turns a YAML file-organization concern into a spec
|
|
418
|
-
question. The 4-atom contract holds; an envelope-around-atoms
|
|
419
|
-
is structural noise.
|
|
420
|
-
|
|
421
|
-
**(d) Make Trigger optional with a default of "auto-mount the
|
|
422
|
-
Procedure at /api/p/<name>"**.
|
|
423
|
-
Rejected: hides the binding decision from the author, breaks
|
|
424
|
-
the PG-1:1 mapping (Procedures are not externally exposed by
|
|
425
|
-
themselves), and creates a third way to bind (this default +
|
|
426
|
-
explicit `Trigger` + explicit `expose:`).
|
|
427
|
-
|
|
428
|
-
### How to apply
|
|
429
|
-
|
|
430
|
-
- Authoring: put every atom in `manifests/site.yaml`, separated by `---`.
|
|
431
|
-
- Reviewing: when an author writes a Procedure with an inline
|
|
432
|
-
HTTP binding, push back with this section.
|
|
433
|
-
- Refactoring: a feature that grew from one HTTP binding to
|
|
434
|
-
HTTP + MCP doesn't change the Procedure; it adds one Trigger
|
|
435
|
-
in the same file.
|
|
436
|
-
- Tooling: SDK loader reads `<manifest-root>/site.yaml` and parses each `---`
|
|
437
|
-
block; static validator emits diagnostics
|
|
438
|
-
with file path + manifest pointer
|
|
439
|
-
(`site.yaml#/2/spec/from`) so multi-doc location stays
|
|
440
|
-
precise.
|