@aotter/mantle 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +9 -5
- package/dist/generate.js +19 -2
- package/dist/generate.js.map +1 -1
- package/dist/harness-cli.js +1 -1
- package/dist/harness-cli.js.map +1 -1
- package/docs/adapter-guide.md +7 -3
- package/docs/adr/0001-four-atom-manifest-model.md +37 -304
- package/docs/adr/0002-closed-enums-for-bindings.md +6 -15
- package/docs/adr/0007-ai-as-primary-author.md +3 -1
- package/docs/adr/0008-structured-diagnostic-shape.md +2 -2
- package/docs/adr/0009-consumer-supplied-manifests.md +6 -5
- package/docs/adr/0010-locale-and-translates.md +13 -8
- package/docs/adr/0011-adapter-port-spec.md +13 -19
- package/docs/adr/0012-views-as-public-rest.md +5 -9
- package/docs/adr/0014-auth-better-auth-and-multi-tenant-mcp.md +13 -37
- package/docs/adr/README.md +4 -4
- package/docs/api-mcp-authorization.md +7 -0
- package/docs/design-atoms.md +66 -255
- package/docs/labels.md +4 -2
- package/docs/performance-harness.md +3 -2
- package/docs/release-process.md +14 -3
- package/docs/schema-indexes.md +1 -1
- package/package.json +8 -8
- package/skills/develop/SKILL.md +15 -6
- package/skills/plugin/SKILL.md +1 -1
- package/skills/provision/SKILL.md +4 -0
- package/skills/theme/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -43,17 +43,22 @@ pnpm exec mantle-harness indexes --require-public
|
|
|
43
43
|
pnpm exec mantle-harness http --base-url http://127.0.0.1:8787 --route page=/en/example
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`mantle generate` validates
|
|
46
|
+
`mantle generate` validates `./manifests/site.yaml`, then writes the
|
|
47
47
|
parsed manifest module and handler declarations to `.mantle/generated/`.
|
|
48
48
|
It does not sync skills, update packages, style, provision, or deploy.
|
|
49
|
-
When manifests declare Views, the generated `site.ts` also exports
|
|
50
|
-
`bindMantleSite(runtime)`: its `views` keys,
|
|
51
|
-
those manifests, while diagnostics still come
|
|
49
|
+
When manifests declare Views or Procedures, the generated `site.ts` also exports
|
|
50
|
+
`bindMantleSite(runtime)`: its `views` and `procedures` keys, inputs, and outputs
|
|
51
|
+
come from those manifests, while diagnostics still come from the runtime use
|
|
52
|
+
cases.
|
|
52
53
|
Dynamic `runtime.viewsByName` access remains available for low-level code.
|
|
53
54
|
|
|
54
55
|
```ts
|
|
55
56
|
const site = bindMantleSite(runtime);
|
|
56
57
|
const notes = await site.views["published-notes"]();
|
|
58
|
+
const result = await site.procedures["expire-order"](
|
|
59
|
+
{ orderId },
|
|
60
|
+
{ user: null, staff: null, env },
|
|
61
|
+
);
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
`mantle skills` explicitly copies the installed package's `develop`, `plugin`,
|
|
@@ -164,7 +169,6 @@ Core-owned `mantle:plugin` skill and records it in `.mantle/plugins.json` plus
|
|
|
164
169
|
| Adapter | Status |
|
|
165
170
|
|---|---|
|
|
166
171
|
| Cloudflare Workers | ✅ shipping |
|
|
167
|
-
| Netlify | 📋 README stub — engineering forcing function for v0.2 (`@aotter/mantle-netlify`) |
|
|
168
172
|
|
|
169
173
|
The `mantle-runtime` package never imports Cloudflare-specific types — adapters bind concrete drivers (D1 / R2) to the runtime's `domain/port/*` interfaces, so adding a new adapter is a port-implementation exercise, not a refactor.
|
|
170
174
|
|
package/dist/generate.js
CHANGED
|
@@ -76,7 +76,7 @@ function printHelp() {
|
|
|
76
76
|
Usage: mantle generate [options]
|
|
77
77
|
|
|
78
78
|
Options:
|
|
79
|
-
--manifests <dir>
|
|
79
|
+
--manifests <dir> Directory containing site.yaml (default: ./manifests)
|
|
80
80
|
-o, --output <dir> Generated root (default: .mantle/generated)
|
|
81
81
|
--namespace <name> Generated type namespace (default: MantleSite)
|
|
82
82
|
--check Fail without writing when output is stale
|
|
@@ -85,15 +85,19 @@ Options:
|
|
|
85
85
|
}
|
|
86
86
|
function emitManifestModule(manifests, namespace) {
|
|
87
87
|
const views = [];
|
|
88
|
+
const procedures = [];
|
|
88
89
|
manifests.forEach((manifest, index) => {
|
|
89
90
|
if (manifest.kind === "View")
|
|
90
91
|
views.push({ manifest, index });
|
|
92
|
+
if (manifest.kind === "Procedure")
|
|
93
|
+
procedures.push({ manifest, index });
|
|
91
94
|
});
|
|
92
95
|
const notice = "// Generated by `mantle generate`. Do not edit by hand.";
|
|
93
96
|
const specImport = 'import type { Manifest } from "@aotter/mantle/spec";';
|
|
94
97
|
const declaration = `export const manifest = ${JSON.stringify(manifests, null, 2)} as const satisfies readonly Manifest[];`;
|
|
95
|
-
if (views.length === 0)
|
|
98
|
+
if (views.length === 0 && procedures.length === 0) {
|
|
96
99
|
return [notice, specImport, "", declaration, ""].join("\n");
|
|
100
|
+
}
|
|
97
101
|
return [
|
|
98
102
|
notice,
|
|
99
103
|
'import type { CmsRuntime, HandlerContext } from "@aotter/mantle/runtime";',
|
|
@@ -131,6 +135,19 @@ function emitManifestModule(manifests, namespace) {
|
|
|
131
135
|
];
|
|
132
136
|
}),
|
|
133
137
|
" },",
|
|
138
|
+
" procedures: {",
|
|
139
|
+
...procedures.flatMap(({ manifest: procedure, index }) => {
|
|
140
|
+
const id = tsId(procedure.metadata.name);
|
|
141
|
+
return [
|
|
142
|
+
` ${JSON.stringify(procedure.metadata.name)}: (input: MantleGenerated.${namespace}.ProcInput_${id}, ctx: HandlerContext) =>`,
|
|
143
|
+
` runtime.invokeProcedure.execute<MantleGenerated.${namespace}.ProcOutput_${id}>({`,
|
|
144
|
+
` procedure: manifest[${index}],`,
|
|
145
|
+
" input,",
|
|
146
|
+
" ctx,",
|
|
147
|
+
" }),",
|
|
148
|
+
];
|
|
149
|
+
}),
|
|
150
|
+
" },",
|
|
134
151
|
" } as const;",
|
|
135
152
|
"}",
|
|
136
153
|
"",
|
package/dist/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":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AC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAChH;QACD,IAAI;QACJ,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,IAAI,CAAC,IAAY;IACxB,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,QAAgB,EAAE,KAAc;IACpE,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/D,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
package/dist/harness-cli.js
CHANGED
|
@@ -188,7 +188,7 @@ function printHelp() {
|
|
|
188
188
|
}
|
|
189
189
|
function printIndexesHelp() {
|
|
190
190
|
stdout.write(`Usage: mantle-harness indexes [options]\n\n` +
|
|
191
|
-
` --manifests <dir>
|
|
191
|
+
` --manifests <dir> Directory containing site.yaml (default: ./manifests)\n` +
|
|
192
192
|
` --rows <n> Deterministic rows per Schema (default: 2000)\n` +
|
|
193
193
|
` --require <view> Fail when this View lacks its access path; repeatable\n` +
|
|
194
194
|
` --require-public Apply the gate to public Views\n` +
|
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C;QACrD,+CAA+C;QAC/C,6DAA6D;QAC7D,kEAAkE;QAClE,+DAA+D;QAC/D,qCAAqC,CAAC,CAAC;AAC3C,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,CACT,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EACtC,CAAC,KAAK,EAAE,EAAE;IACR,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
|
package/docs/adapter-guide.md
CHANGED
|
@@ -15,7 +15,7 @@ A first-run adapter must implement exactly these two runtime ports:
|
|
|
15
15
|
| `DatabaseDriver` plus `PreparedStatement` and `MigrationRunner` | `packages/mantle-runtime/src/domain/port/DatabaseDriver.ts` | `packages/adapters/cloudflare/src/bindings/D1DatabaseDriver.ts` |
|
|
16
16
|
| `AssetServer` | `packages/mantle-runtime/src/domain/port/AssetServer.ts` | `packages/adapters/cloudflare/src/bindings/AssetsAssetServer.ts` |
|
|
17
17
|
|
|
18
|
-
The runtime must not import platform types such as `D1Database`, `KVNamespace`, Cloudflare `Fetcher`,
|
|
18
|
+
The runtime must not import platform types such as `D1Database`, `KVNamespace`, Cloudflare `Fetcher`, Postgres pools, or adapter SDK types. Those live in adapter packages.
|
|
19
19
|
|
|
20
20
|
## Optional capabilities
|
|
21
21
|
|
|
@@ -116,7 +116,8 @@ CDN cache overrides are removed.
|
|
|
116
116
|
|
|
117
117
|
`mountPublicRoutes(...)` renders canonical D1 state and opts only successful HTML, markdown,
|
|
118
118
|
`llms.txt`, and sitemap responses into the shared cache with
|
|
119
|
-
`Cache-Control: public, max-age=0, s-maxage=300
|
|
119
|
+
`Cache-Control: public, max-age=0, s-maxage=300` and the site-level
|
|
120
|
+
`Cache-Tag: mantle-public`. The top-level policy preserves
|
|
120
121
|
that opt-in only for anonymous `GET`/`HEAD` responses with status 200, explicit
|
|
121
122
|
shared freshness, no request `Cookie` or `Authorization`, and no response
|
|
122
123
|
`Set-Cookie`. It also varies public responses by `Cookie` and `Authorization`.
|
|
@@ -124,7 +125,10 @@ shared freshness, no request `Cookie` or `Authorization`, and no response
|
|
|
124
125
|
A starter-level Workers Cache may therefore store only responses that still
|
|
125
126
|
meet that exact public contract. It must bypass credentialed/cookie requests
|
|
126
127
|
and must never infer cacheability from a URL prefix. Cache entries remain
|
|
127
|
-
version-local; cross-version caching is outside this contract.
|
|
128
|
+
version-local; cross-version caching is outside this contract. Successful
|
|
129
|
+
publishing-content and site-setting mutations purge `mantle-public` through
|
|
130
|
+
Cloudflare's native cache API. Operational records and immutable assets do not
|
|
131
|
+
purge the public render cache.
|
|
128
132
|
|
|
129
133
|
Minimum auth/MCP behavior:
|
|
130
134
|
|
|
@@ -78,14 +78,14 @@ the `cms.mantle.aotter.net/v1` API group:
|
|
|
78
78
|
| `Schema` | `CREATE TABLE` | no | no |
|
|
79
79
|
| `View` | `CREATE VIEW` | yes (auto-mounted at `GET /api/views/<name>`; see ADR-0012) | no |
|
|
80
80
|
| `Procedure` | `CREATE FUNCTION ... LANGUAGE plpgsql` | **no** (transport-agnostic; needs a Trigger to bind) | **yes — handler ref to consumer's TS** |
|
|
81
|
-
| `Trigger` | `CREATE TRIGGER` +
|
|
81
|
+
| `Trigger` | `CREATE TRIGGER` + route/tool binding | yes (the binding atom) | no |
|
|
82
82
|
|
|
83
83
|
### Path A: Trigger does all binding
|
|
84
84
|
|
|
85
85
|
A Procedure is **not externally exposed by itself**. To make it
|
|
86
|
-
callable over HTTP / MCP /
|
|
86
|
+
callable over HTTP / MCP / lifecycle, declare a
|
|
87
87
|
`Trigger` whose `target.procedure` points at it. The same
|
|
88
|
-
Procedure can be bound by multiple Triggers (HTTP +
|
|
88
|
+
Procedure can be bound by multiple Triggers (HTTP + MCP,
|
|
89
89
|
all sharing one handler).
|
|
90
90
|
|
|
91
91
|
This is "Path A" relative to an alternative considered (and
|
|
@@ -135,9 +135,6 @@ existing atoms cannot express it.
|
|
|
135
135
|
by multi-doc YAML grouping (see § Authoring shape below).
|
|
136
136
|
- "Procedure is not directly exposed" is a teaching point; new
|
|
137
137
|
authors initially try to call a Procedure URL and get 404.
|
|
138
|
-
Mitigated by the dispatcher emitting a hint in the 404 if a
|
|
139
|
-
Procedure exists with no Trigger binding (DRAFT — not yet
|
|
140
|
-
spec'd as a code).
|
|
141
138
|
- The PG-1:1 pitch breaks down once authors look at the actual
|
|
142
139
|
storage layer (D1 today). The mapping is conceptual; the
|
|
143
140
|
runtime is SQLite + JSON.
|
|
@@ -150,12 +147,9 @@ existing atoms cannot express it.
|
|
|
150
147
|
multi-doc YAML keeping atoms separate while the file count
|
|
151
148
|
stays low; reviewers should push back when a single Procedure's
|
|
152
149
|
handler becomes a workflow engine.
|
|
153
|
-
- **Trigger.source.kind expansion pressure.** v0.1
|
|
154
|
-
`
|
|
155
|
-
|
|
156
|
-
atom has to accommodate radically different invocation shapes.
|
|
157
|
-
The contract holds (one binding atom, many source kinds) but
|
|
158
|
-
each new kind is a design pass.
|
|
150
|
+
- **Trigger.source.kind expansion pressure.** v0.1 ships `http`, `mcp`,
|
|
151
|
+
and `lifecycle`. Each new source kind requires a complete grammar and
|
|
152
|
+
runtime design pass.
|
|
159
153
|
- **The PG-1:1 pitch may become a constraint.** If a future
|
|
160
154
|
capability has no PG analogue, framing pressure will push to
|
|
161
155
|
shoehorn it into the table or to break the pitch. Either is
|
|
@@ -178,8 +172,8 @@ Rejected: under R7's reframing, the right axis is contract /
|
|
|
178
172
|
implementation × state / event, not "PG attachment." Schema
|
|
179
173
|
holds state; Procedure holds operations against state; folding
|
|
180
174
|
them conflates "what data exists" with "what can happen to data."
|
|
181
|
-
Also the LOC win that motivated the fold (92→58 via default
|
|
182
|
-
was recovered without folding
|
|
175
|
+
Also the LOC win that motivated the fold (92→58 via default CRUD)
|
|
176
|
+
was recovered without folding through the shipped
|
|
183
177
|
`handler.kind: builtin` shortcut.
|
|
184
178
|
|
|
185
179
|
**(d) 4 kinds with `Procedure` retaining inline
|
|
@@ -217,251 +211,12 @@ executor, and Procedure dispatcher live in this repository.
|
|
|
217
211
|
|
|
218
212
|
---
|
|
219
213
|
|
|
220
|
-
##
|
|
214
|
+
## Grammar changes
|
|
221
215
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
### Context
|
|
227
|
-
|
|
228
|
-
The 4-atom design experiment (same 6 rounds + R6.5 + R7 cited
|
|
229
|
-
above) produced a rich inner grammar:
|
|
230
|
-
|
|
231
|
-
- 18 grammar keys across the 4 atoms
|
|
232
|
-
- 7 meta-rules (DRY across `requires` siblings; one-site
|
|
233
|
-
placeholder evaluation; SDK helper doctrine; closed
|
|
234
|
-
`x-mantle-bind` enum; list-shape for cross-resource refs;
|
|
235
|
-
singleton-fallback exception; ctx.system origin invariant)
|
|
236
|
-
- 2 closed enums (`x-mantle-bind`, `ctx.*` predicate identity)
|
|
237
|
-
- 2 placeholder namespaces (`:ctx.*` identity bindings, `$.*`
|
|
238
|
-
data-flow bindings)
|
|
239
|
-
- ~36 cognitive surface units (consumer-cc count)
|
|
240
|
-
|
|
241
|
-
The pressure-tested grammar covered features as ambitious as
|
|
242
|
-
`Trigger.target.project` (declarative cross-Schema aggregate
|
|
243
|
-
projection in same-tx), `Schema.spec.policies.{visible,
|
|
244
|
-
readable, writable}` (PG-RLS-style row/field policy),
|
|
245
|
-
`View.recursive` (declarative recursive CTEs),
|
|
246
|
-
`requires.window/quota/owns/contains` (temporal predicates,
|
|
247
|
-
rate caps, row ownership, array containment), and
|
|
248
|
-
`handler.kind: builtin` (default-CRUD shortcut).
|
|
249
|
-
|
|
250
|
-
Shipping all of that in v0.1 would mean roughly 5–10× the
|
|
251
|
-
dispatcher / validator / type-system surface v0.1 actually
|
|
252
|
-
needs, plus an OpenAPI emission story for keys (recursive CTEs,
|
|
253
|
-
RLS) that have no clean OpenAPI mapping.
|
|
254
|
-
|
|
255
|
-
The user principle, articulated 2026-04-30 EOD:
|
|
256
|
-
|
|
257
|
-
> 本次 iteration 只匡出四個 yml 最 minimum essential 的 grammar,
|
|
258
|
-
> 四個都蓋出來且能動,之後當應用場景擴充真的有需要再往上蓋。
|
|
259
|
-
|
|
260
|
-
(Translation: this iteration only ships the absolute minimum
|
|
261
|
-
grammar to make the 4 atoms work end-to-end; each extension
|
|
262
|
-
arrives when a real application use case demands it.)
|
|
263
|
-
|
|
264
|
-
This is YAGNI applied to grammar surface, motivated by:
|
|
265
|
-
|
|
266
|
-
- The runtime cost above.
|
|
267
|
-
- The risk that speculative grammar locks the wrong shape —
|
|
268
|
-
features designed in the abstract often look different once a
|
|
269
|
-
real use case applies pressure (R3-R5 of the design experiment
|
|
270
|
-
showed multiple grammar shapes proposed and revised as
|
|
271
|
-
features unfolded).
|
|
272
|
-
- The maintenance cost of keys nobody uses but everybody must
|
|
273
|
-
understand.
|
|
274
|
-
|
|
275
|
-
### Decision
|
|
276
|
-
|
|
277
|
-
The v0.1 ship targets **minimum essential grammar only**. Rich
|
|
278
|
-
grammar from the design experiment is preserved as DRAFT in the
|
|
279
|
-
manifest grammar reference; it lands when a concrete use case
|
|
280
|
-
forces it.
|
|
281
|
-
|
|
282
|
-
#### v0.1 grammar lock per atom
|
|
283
|
-
|
|
284
|
-
**Schema (v0.1)**:
|
|
285
|
-
- `spec.schema:` (JSON Schema 2020-12 body)
|
|
286
|
-
- `spec.uniqueIndexes:` (composite uniques)
|
|
287
|
-
- `spec.indexes:` (ordered composite, non-unique access paths)
|
|
288
|
-
- Property extensions: `x-mantle-bind`, `x-mantle-ref`, `x-mcp-hint`
|
|
289
|
-
|
|
290
|
-
**View (v0.1)**:
|
|
291
|
-
- `spec.from:` (source Schema)
|
|
292
|
-
- `spec.fields:` (projected fields)
|
|
293
|
-
- `spec.filter:` AST — `eq`, `gt`, `gte`, `lt`, `lte`, `and`, `or`
|
|
294
|
-
- `spec.orderBy:`
|
|
295
|
-
- `spec.limit:`
|
|
296
|
-
- `spec.params:` (required query params referenced by filter values)
|
|
297
|
-
- `spec.requires.{auth, guard}:` (same authorization contract as Procedure)
|
|
298
|
-
|
|
299
|
-
**Procedure (v0.1)**:
|
|
300
|
-
- `spec.requires.auth.all:` (closed predicate vocabulary)
|
|
301
|
-
- `spec.requires.guard.procedure:` (one consumer-owned dynamic guard)
|
|
302
|
-
- `spec.input:` (JSON Schema 2020-12)
|
|
303
|
-
- `spec.output:` (JSON Schema 2020-12)
|
|
304
|
-
- `spec.handler.{kind: ref, ref: <opaque-key>}` — author-supplied
|
|
305
|
-
handler function
|
|
306
|
-
- `spec.handler.{kind: builtin, op: <create | update | upsert |
|
|
307
|
-
delete>, schema: <Schema name>}` — SDK-supplied CRUD shortcut
|
|
308
|
-
(promoted to v0.1.0; runtime implemented by `InvokeBuiltinUseCase`)
|
|
309
|
-
|
|
310
|
-
**Trigger (v0.1)**:
|
|
311
|
-
- `spec.source.kind: http` — public HTTP endpoint
|
|
312
|
-
- `spec.source.{method, path}` (when `kind: http`)
|
|
313
|
-
- `spec.source.kind: lifecycle` — entry-writer hook (promoted to
|
|
314
|
-
v0.1.0; runtime implemented by `LifecycleHookingEntryRepository`)
|
|
315
|
-
- `spec.source.{schema, on, errorPolicy}` (when `kind: lifecycle`)
|
|
316
|
-
- `spec.source.kind: mcp` plus `surface: public | staff` — MCP tool
|
|
317
|
-
exposure for a declared Procedure
|
|
318
|
-
- `spec.target.procedure:`
|
|
319
|
-
|
|
320
|
-
#### v0.1 closed enums
|
|
321
|
-
|
|
322
|
-
- `x-mantle-bind: {ctx.user, ctx.staff, now}`
|
|
323
|
-
- `ctx.*` predicate vocabulary: `{user, staff, auth, auth.scope}` (no
|
|
324
|
-
`system` until a use case forces it)
|
|
325
|
-
- `Trigger.source.kind: {http, lifecycle, mcp}`
|
|
326
|
-
- `Procedure.handler.kind: {ref, builtin}`
|
|
327
|
-
- `BuiltinOp: {create, update, upsert, delete}`
|
|
328
|
-
- `LifecycleHook: {before_create, after_create, before_update,
|
|
329
|
-
after_update, before_delete, after_delete, before_publish,
|
|
330
|
-
after_publish}`
|
|
331
|
-
|
|
332
|
-
#### What's DRAFT (do not implement, do not type)
|
|
333
|
-
|
|
334
|
-
- Schema: `policies.{visible, readable, writable, owner}`,
|
|
335
|
-
`x-mantle-ref` auto-lift to virtual column,
|
|
336
|
-
computed columns via projection Trigger
|
|
337
|
-
- View: `recursive`, `gatedBy`, `join`, `policies.skip`,
|
|
338
|
-
filter AST extensions (`contains`, `not`, `in`, `like`)
|
|
339
|
-
- Procedure: `requires.auth.{any | all}` with disjunction;
|
|
340
|
-
`owns:`, `contains:`, `withinMinutes:`, `requires.window`,
|
|
341
|
-
`requires.quota`, `errors`, `retry`
|
|
342
|
-
- Trigger: `source.kind: {cron, queue}`,
|
|
343
|
-
`target.project`, `atomicity`
|
|
344
|
-
(`source.kind: mcp` was promoted in alpha.16 — #281)
|
|
345
|
-
- Cross-cutting: `ctx.system`, `$.*` placeholder namespace,
|
|
346
|
-
`staffBypass:`
|
|
347
|
-
|
|
348
|
-
#### Discipline
|
|
349
|
-
|
|
350
|
-
- The v0.1 validator **rejects DRAFT keys at parse time** with a
|
|
351
|
-
`DRAFT_KEY_USED` warning (not error — see the
|
|
352
|
-
AI-as-primary-author contract on permissive bias). The
|
|
353
|
-
diagnostic explicitly references the future-grammar reference
|
|
354
|
-
so authors know the key is reserved, not
|
|
355
|
-
unsupported-and-forgotten.
|
|
356
|
-
- Each DRAFT key has a documented **landing condition** (the
|
|
357
|
-
use case that surfaces it). Promoting a key to v0.1+ requires
|
|
358
|
-
showing that condition has been met — not just "it would be
|
|
359
|
-
nice to have."
|
|
360
|
-
- Each promotion goes through a 3-agent design review
|
|
361
|
-
(yml-editor proposes / code-impler tests buildability /
|
|
362
|
-
fresh-dev verifies clarity) before locking.
|
|
363
|
-
- The v0.1 floor is the floor, not the ceiling. The atom set
|
|
364
|
-
(4) is locked; the grammar inside each atom is permitted to
|
|
365
|
-
grow.
|
|
366
|
-
|
|
367
|
-
### Consequences
|
|
368
|
-
|
|
369
|
-
#### Pros
|
|
370
|
-
|
|
371
|
-
- v0.1 dispatcher / validator / types are tractable in a small
|
|
372
|
-
number of weeks, not many months.
|
|
373
|
-
- Author cognitive surface is small: 4 atoms × ~5 keys each ≈
|
|
374
|
-
20 things to learn, instead of 18 keys with ~36 cognitive
|
|
375
|
-
surface units.
|
|
376
|
-
- DRAFT keys document where the spec is **going**, so authors
|
|
377
|
-
with future requirements can tell whether the project is on
|
|
378
|
-
trajectory or not — without those features being prematurely
|
|
379
|
-
committed.
|
|
380
|
-
- Each DRAFT promotion gets a real use case attached, so the
|
|
381
|
-
grammar evolves under empirical pressure rather than
|
|
382
|
-
speculation. This was the design experiment's strongest
|
|
383
|
-
signal: features like `View.recursive` and
|
|
384
|
-
`Trigger.target.project` looked very different once a real
|
|
385
|
-
feature (threaded comments, cross-Schema invariants) applied
|
|
386
|
-
pressure.
|
|
387
|
-
|
|
388
|
-
#### Costs
|
|
389
|
-
|
|
390
|
-
- Authors with ambitions beyond v0.1 (private posts, role-gated
|
|
391
|
-
reads, rate limits, recursive views) must wait or write
|
|
392
|
-
handler-side TS. For some projects this is enough to shop
|
|
393
|
-
elsewhere; that's acceptable for an OSS v0.1.
|
|
394
|
-
- DRAFT documentation is itself a maintenance burden — the
|
|
395
|
-
reference has to stay coherent as the spec evolves; stale
|
|
396
|
-
DRAFT entries (features no longer planned) need pruning.
|
|
397
|
-
- The "warning, not error, on DRAFT keys" rule means an author
|
|
398
|
-
who copies a DRAFT example into a manifest doesn't fail —
|
|
399
|
-
they get a warning. This requires the validator to know the
|
|
400
|
-
full DRAFT vocabulary, not just the v0.1 vocabulary.
|
|
401
|
-
|
|
402
|
-
#### Risks
|
|
403
|
-
|
|
404
|
-
- **Grammar surface grows ad-hoc.** Each DRAFT promotion looks
|
|
405
|
-
reasonable; together they reproduce the over-grammar v0.1
|
|
406
|
-
was avoiding. Mitigation: 3-agent review per promotion;
|
|
407
|
-
promotions land in batches with documented use cases, not
|
|
408
|
-
one-by-one.
|
|
409
|
-
- **DRAFT becomes vaporware.** Some DRAFT features are listed
|
|
410
|
-
but never land because their use case never surfaces.
|
|
411
|
-
Mitigation: this is fine — the appendix is documenting
|
|
412
|
-
shapes, not commitments. If a DRAFT entry stays cold for >12
|
|
413
|
-
months, prune it from the appendix and let the future
|
|
414
|
-
proposer re-derive it.
|
|
415
|
-
- **Authors hit walls and route around the SDK.** "I need
|
|
416
|
-
`View.recursive` so I'll just write raw SQL in a Procedure
|
|
417
|
-
handler" — over time this drifts the actual extension shape
|
|
418
|
-
away from what the SDK eventually builds. Mitigation: when
|
|
419
|
-
ad-hoc handler patterns repeat, that's the use case that
|
|
420
|
-
promotes the DRAFT key. Watch handler implementations for
|
|
421
|
-
recurring patterns.
|
|
422
|
-
|
|
423
|
-
### Alternatives considered
|
|
424
|
-
|
|
425
|
-
**(a) Ship the full experiment grammar in v0.1**.
|
|
426
|
-
Rejected: 5–10× the dispatcher work; locks shapes in the
|
|
427
|
-
abstract before real use cases apply pressure; author surface
|
|
428
|
-
explodes.
|
|
429
|
-
|
|
430
|
-
**(b) Don't document DRAFT at all; ship v0.1 spec only**.
|
|
431
|
-
Rejected: authors with future requirements have no way to
|
|
432
|
-
evaluate trajectory; the design experiment's results would be
|
|
433
|
-
lost institutionally; future proposals would re-litigate solved
|
|
434
|
-
questions. The DRAFT reference is a forward-looking invariant.
|
|
435
|
-
|
|
436
|
-
**(c) Ship a subset of DRAFT in v0.1 (e.g. `policies.visible`
|
|
437
|
-
and `requires.auth.any`)**.
|
|
438
|
-
Rejected: any line we draw between v0.1 and DRAFT has the same
|
|
439
|
-
litigation problem. The principled cut is "minimum essential to
|
|
440
|
-
make 4 atoms work end-to-end"; anything richer needs a specific
|
|
441
|
-
motivation. None of the DRAFT features had that motivation in
|
|
442
|
-
the v0.1 ship list.
|
|
443
|
-
|
|
444
|
-
**(d) Promote DRAFT keys lazily — implement at runtime when
|
|
445
|
-
authors ask, no spec lock**.
|
|
446
|
-
Rejected: spec coherence demands keys are spec'd before they
|
|
447
|
-
ship. Authors writing against runtime-only features get
|
|
448
|
-
silently broken on SDK upgrades.
|
|
449
|
-
|
|
450
|
-
### How to apply
|
|
451
|
-
|
|
452
|
-
- Authoring v0.1 manifests: stick to the v0.1 vocabulary above.
|
|
453
|
-
If something seems missing, check the DRAFT reference; if it's
|
|
454
|
-
there and you have a concrete use case, file an issue
|
|
455
|
-
describing the use case.
|
|
456
|
-
- SDK code: implement only v0.1 keys in the dispatcher /
|
|
457
|
-
validator / types. DRAFT keys are documented but not handled.
|
|
458
|
-
- DRAFT promotion: needs a documented use case + 3-agent design
|
|
459
|
-
review + ADR landing the promotion (with cross-link to the
|
|
460
|
-
use case).
|
|
461
|
-
- Pruning DRAFT: if an entry has stayed cold for 12+ months,
|
|
462
|
-
propose removal in a small ADR. Removal is reversible (the
|
|
463
|
-
shape is in the experiment transcripts and prior ADR
|
|
464
|
-
history).
|
|
216
|
+
The parser accepts only grammar implemented by the current SDK. Unknown keys and
|
|
217
|
+
closed-enum values fail validation; Mantle does not reserve speculative syntax.
|
|
218
|
+
Add new grammar only alongside a concrete use case, runtime behavior, validation,
|
|
219
|
+
and an ADR update. Earlier experiments remain available in git history.
|
|
465
220
|
|
|
466
221
|
---
|
|
467
222
|
|
|
@@ -482,7 +237,7 @@ bundles multiple atoms. A contact form is at minimum:
|
|
|
482
237
|
inserts)
|
|
483
238
|
- A `Trigger` binding the Procedure to `POST /api/contact`
|
|
484
239
|
|
|
485
|
-
Three atoms, three
|
|
240
|
+
Three atoms, three documents. With one file per atom, a
|
|
486
241
|
small site with 10 features has 30+ manifest files. An early
|
|
487
242
|
design-experiment vibe-user called this out:
|
|
488
243
|
|
|
@@ -496,10 +251,10 @@ Two paths surfaced to address the file count:
|
|
|
496
251
|
#### Path A — Multi-doc YAML
|
|
497
252
|
|
|
498
253
|
YAML's standard `---` separator allows multiple documents in
|
|
499
|
-
one file.
|
|
254
|
+
one file. The fixed site manifest carries all atoms:
|
|
500
255
|
|
|
501
256
|
```yaml
|
|
502
|
-
# manifests/
|
|
257
|
+
# manifests/site.yaml
|
|
503
258
|
apiVersion: cms.mantle.aotter.net/v1
|
|
504
259
|
kind: Schema
|
|
505
260
|
metadata: { name: contact-messages }
|
|
@@ -525,7 +280,7 @@ spec:
|
|
|
525
280
|
```
|
|
526
281
|
|
|
527
282
|
One file, three atoms, conceptual separation preserved. The
|
|
528
|
-
loader
|
|
283
|
+
loader reads `site.yaml` and parses each `---` block as a separate
|
|
529
284
|
manifest.
|
|
530
285
|
|
|
531
286
|
#### Path B — Inline shortcut on Procedure (`expose:`)
|
|
@@ -560,7 +315,7 @@ Path B created **two ways to bind a Procedure to HTTP**:
|
|
|
560
315
|
|
|
561
316
|
- For a Procedure with one HTTP transport: inline `expose:` on
|
|
562
317
|
Procedure
|
|
563
|
-
- For a Procedure with multiple transports (HTTP +
|
|
318
|
+
- For a Procedure with multiple transports (HTTP + MCP):
|
|
564
319
|
separate `Trigger` per transport
|
|
565
320
|
|
|
566
321
|
This is the exact "two ways to do the same thing" failure mode.
|
|
@@ -582,31 +337,20 @@ multi") but creates permanent tax:
|
|
|
582
337
|
|
|
583
338
|
#### What multi-doc YAML accomplishes
|
|
584
339
|
|
|
585
|
-
- File count drops without inventing redundancy. A
|
|
586
|
-
|
|
340
|
+
- File count drops without inventing redundancy. A site has one
|
|
341
|
+
authored manifest file regardless of how many atoms it requires.
|
|
587
342
|
- Atom separation stays honest. Every atom has its own
|
|
588
343
|
envelope (`apiVersion`, `kind`, `metadata`, `spec`); there
|
|
589
344
|
is no "shortcut form."
|
|
590
|
-
- Related atoms sit next to each other for readers reviewing
|
|
591
|
-
feature.
|
|
345
|
+
- Related atoms sit next to each other for readers reviewing the site.
|
|
592
346
|
- The PG-1:1 framing stays clean: Procedure is
|
|
593
347
|
internal-callable, Trigger is the binding atom.
|
|
594
348
|
|
|
595
|
-
####
|
|
596
|
-
|
|
597
|
-
- One feature → one file. Name the file by feature
|
|
598
|
-
(`contact.yaml`, `posts.yaml`, `comments.yaml`), not by atom
|
|
599
|
-
type.
|
|
600
|
-
- The shared file holds the Procedure + its Trigger + (when
|
|
601
|
-
feature-specific) the Schema and View.
|
|
602
|
-
- Schemas that are referenced by many features can live in
|
|
603
|
-
their own `<schema-name>.schema.yaml` file.
|
|
604
|
-
- Views with no Procedure / Trigger neighbors live in
|
|
605
|
-
`<view-name>.view.yaml`.
|
|
349
|
+
#### Fixed file contract
|
|
606
350
|
|
|
607
|
-
The
|
|
608
|
-
|
|
609
|
-
|
|
351
|
+
The authored file is always `manifests/site.yaml`. The common loader rejects
|
|
352
|
+
a missing or differently named file, and every `---` document becomes one
|
|
353
|
+
atom. This is enforced so humans and agents never need a file-discovery rule.
|
|
610
354
|
|
|
611
355
|
### Consequences
|
|
612
356
|
|
|
@@ -616,8 +360,7 @@ block as a manifest.
|
|
|
616
360
|
OpenAPI emitter, runtime dispatcher all walk one shape.
|
|
617
361
|
- Conceptual atom separation preserved. The 4-atom story holds
|
|
618
362
|
for every feature.
|
|
619
|
-
- File count
|
|
620
|
-
files, not 30+.
|
|
363
|
+
- File count is fixed at one authored manifest.
|
|
621
364
|
- Cardinality changes (1 HTTP → HTTP + cron) are additive (add
|
|
622
365
|
a Trigger); no refactor needed.
|
|
623
366
|
- AI authors learn one mental model, not two.
|
|
@@ -630,9 +373,8 @@ block as a manifest.
|
|
|
630
373
|
- Some loaders (older / non-compliant) don't handle multi-doc.
|
|
631
374
|
Standard `js-yaml` / `yaml` libraries do; the SDK uses
|
|
632
375
|
`yaml` (already a dependency).
|
|
633
|
-
-
|
|
634
|
-
|
|
635
|
-
must `grep` instead.
|
|
376
|
+
- Authors use `grep` by atom name inside `manifests/site.yaml` instead of
|
|
377
|
+
discovering feature-specific filenames.
|
|
636
378
|
- Editor support: YAML language servers handle multi-doc, but
|
|
637
379
|
some IDE features (e.g. JSON Schema validation per document
|
|
638
380
|
in a multi-doc file) work less smoothly than in single-doc
|
|
@@ -647,18 +389,9 @@ block as a manifest.
|
|
|
647
389
|
ways is permanent tax that grows with the codebase.
|
|
648
390
|
Mitigation: this section is the answer to that argument; flag
|
|
649
391
|
attempts and link here.
|
|
650
|
-
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
Mitigation: file-organization convention is suggestion, not
|
|
654
|
-
rule; authors are free to split when it stops helping.
|
|
655
|
-
- **Co-location breaks discoverability for shared atoms.**
|
|
656
|
-
A Schema referenced by 4 features can live in any of those
|
|
657
|
-
4 files (or its own). Without grep / IDE go-to-def, finding
|
|
658
|
-
the Schema definition requires knowing where the author
|
|
659
|
-
put it. Mitigation: Loop 1 (`mantle validate`) emits the
|
|
660
|
-
filesystem path in `VIEW_FROM_UNKNOWN_SCHEMA` diagnostics;
|
|
661
|
-
IDE-shaped tooling (LSP — DRAFT) closes the rest.
|
|
392
|
+
- **`site.yaml` can grow.** Search by `kind` plus `metadata.name`; reconsider
|
|
393
|
+
splitting only when real projects show that one deterministic location is
|
|
394
|
+
worse than file discovery.
|
|
662
395
|
|
|
663
396
|
### Alternatives considered
|
|
664
397
|
|
|
@@ -685,14 +418,14 @@ explicit `Trigger` + explicit `expose:`).
|
|
|
685
418
|
|
|
686
419
|
### How to apply
|
|
687
420
|
|
|
688
|
-
- Authoring:
|
|
421
|
+
- Authoring: put every atom in `manifests/site.yaml`, separated by `---`.
|
|
689
422
|
- Reviewing: when an author writes a Procedure with an inline
|
|
690
423
|
HTTP binding, push back with this section.
|
|
691
424
|
- Refactoring: a feature that grew from one HTTP binding to
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
- Tooling: SDK loader
|
|
695
|
-
|
|
425
|
+
HTTP + MCP doesn't change the Procedure; it adds one Trigger
|
|
426
|
+
in the same file.
|
|
427
|
+
- Tooling: SDK loader reads `<manifest-root>/site.yaml` and parses each `---`
|
|
428
|
+
block; static validator emits diagnostics
|
|
696
429
|
with file path + manifest pointer
|
|
697
|
-
(`
|
|
430
|
+
(`site.yaml#/2/spec/from`) so multi-doc location stays
|
|
698
431
|
precise.
|