@aotter/mantle 0.1.2-rc.1 → 0.1.2

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 CHANGED
@@ -4,15 +4,15 @@ Umbrella entry for the embeddable Mantle SDK — a manifest-driven application
4
4
  engine built around a 4-atom YAML model (Schema / View / Procedure / Trigger)
5
5
  where agents write config and the runtime carries the complexity.
6
6
 
7
- > Mantle is prerelease software. Use this package's `package.json` as the exact
8
- > installed version; APIs may change between prereleases until the first stable 0.1.2 release.
7
+ > Mantle's first stable release is `0.1.2`. Use this package's `package.json`
8
+ > as the exact installed version.
9
9
 
10
10
  ## Install
11
11
 
12
12
  ```bash
13
- npm install @aotter/mantle@alpha
13
+ npm install @aotter/mantle
14
14
  # or
15
- pnpm add @aotter/mantle@alpha
15
+ pnpm add @aotter/mantle
16
16
  ```
17
17
 
18
18
  ## What's inside
@@ -90,6 +90,11 @@ ports. Unsupported native View dialects fail before the adapter mutates state.
90
90
 
91
91
  ### Bun embedding
92
92
 
93
+ > **Experimental.** The Bun and Vercel adapters may change in a minor
94
+ > release. They cover public Views and HTTP Triggers; the host owns
95
+ > authentication and CSRF, and Auth, Admin and MCP are Cloudflare-only today.
96
+ > Cloudflare is the supported host.
97
+
93
98
  `@aotter/mantle-bun` is the minimal SQLite reference: pass an application-owned
94
99
  `bun:sqlite` `Database` and a compiled `RuntimePlan` to `createBunMantle()`.
95
100
  Its `handle()` returns `null` for sibling routes and a Web-standard `Response`
@@ -1,9 +1,9 @@
1
1
  # Task-specific agent prompts
2
2
 
3
- Copy one block into a coding agent. Resolve handbook pages and official
4
- examples from `docs/` in this checkout, or from
5
- `node_modules/@aotter/mantle/docs/` after install. If neither tree exists,
6
- pin `@aotter/mantle` first. `npx --no-install mantle --help` is the layered
3
+ Copy one block into a coding agent. Paths below are relative to the Mantle
4
+ docs root: `node_modules/@aotter/mantle/docs/` after `@aotter/mantle` is
5
+ installed, or `docs/` in the installed agent plugin. Pin `@aotter/mantle`
6
+ first if neither exists. `npx --no-install mantle --help` is the layered
7
7
  overview. There is no `mantle create`. Admin is opt-in.
8
8
 
9
9
  ### Embed Runtime with typed APIs
@@ -49,7 +49,7 @@ frontend build.
49
49
  ```text
50
50
  Interview me about the service: host, who uses it, whether humans need a
51
51
  Dev UI, and whether we only embed Spec/Runtime. Read mantle --help, then
52
- handbook/start/project-and-cli.md. Use docs/examples/README.md as the
52
+ handbook/start/project-and-cli.md. Use examples/README.md as the
53
53
  examples index; copy builtin-* Manifests only (not cf-primitives-*).
54
54
  Implement locally first. Take only the surfaces we chose.
55
55
  For Spec-only use, skip Runtime and code generation. For a Worker without
@@ -73,10 +73,9 @@ claim Auth or Admin works from a public 200.
73
73
 
74
74
  ```text
75
75
  Build with ChatGPT Sites; use Mantle for content management and publishing.
76
- Read the matching SDK docs/handbook/sites/index.md and
77
- docs/examples/host-chatgpt-sites/README.md. Use that runnable host as a
78
- reference. Follow its supported installation path, including packed-checkout
79
- installation while release support is pending. Derive Schema, View,
76
+ Read handbook/sites/index.md and examples/host-chatgpt-sites/README.md.
77
+ Use that runnable host as a reference and install its pinned
78
+ dependencies from the registry. Derive Schema, View,
80
79
  Procedure and Trigger from my requirements and check the Admin editor/picker and public
81
80
  projections against them. Request both Sites D1 and R2 when my workflow
82
81
  includes uploads. Bind the R2 media port, declare media.purposes, and keep
@@ -2,21 +2,35 @@
2
2
 
3
3
  The runnable application for [Mantle on ChatGPT Sites](../../handbook/sites/index.md) connects Sites D1 + R2 bindings, Sign in with ChatGPT identity, Mantle Admin and staff roles, same-origin media upload, a published-only article frontend, anonymous read-only `/api/mcp`, and Sites-session staff tools at `/api/mcp/staff`. Remote OAuth MCP remains a separate integration; see [MCP support](../../handbook/sites/host-reference.md#remote-mcp-is-a-separate-gate).
4
4
 
5
- **SDK requirement:** this revision requires the checkout's `mountMantleAdmin.mcpEndpoints` support. Published `0.1.2-alpha.6` does not include it, even though the checkout still carries that version number. Use the exact packed-checkout workflow below; copying this folder and running `npm ci` against the registry is not a supported reproduction of this revision. Build typechecking and the endpoint smoke assertions reject that mismatch. Once a release contains this change, update every Mantle dependency and the lockfile together before switching back to registry installation.
6
-
7
5
  After setup, follow [Publish your first article](../../handbook/sites/index.md#publish-your-first-article) to verify the editorial workflow in Admin.
8
6
 
9
7
  ## Before writing code
10
8
 
11
9
  Read the user's business request and author the manifest for **their** records and lifecycle. The included `articles` example deliberately allows a title-only draft; `body` uses `x-mcp-hint: markdown`, while `coverAssetId` uses both `x-mantle-ref: media_assets` (Admin picker) and `x-mcp-hint: media-image` (agent guidance). The `published-articles` View is a list projection, not the detail page contract. If the user's content must always have a body, add it to `required`; if the public API must return body or cover ID, add those to the View's `fields`. Review staff roles, public filters and indexes before deployment. `mantle validate` checks grammar, **not** whether this model matches the business request. Manifest changes after deployment require a new reviewed D1 migration and matching storage fingerprint; never edit an applied migration.
12
10
 
13
- ## Local reproduction
11
+ ## Install and run
12
+
13
+ Requires Mantle 0.1.2 or newer. Copy this directory outside the SDK checkout, then:
14
+
15
+ ```bash
16
+ npm install # or: bun install
17
+ npx mantle validate --phase deploy # or: bunx mantle ...
18
+ npm run generate && npm run check
19
+ npx wrangler d1 migrations apply DB --local
20
+ npm run dev -- --port 4174 # leave running
21
+ npm test # smoke, in a second terminal
22
+ ```
23
+
24
+ `npm install` resolves `@aotter/mantle*` from the `latest` dist-tag; this
25
+ example does not commit a lockfile, so every fresh install picks up the
26
+ current stable release. `bun install` works too, resolving from
27
+ `package.json` the same way.
28
+
29
+ Keep `.openai/hosting.json`; do not copy an existing Site's `project_id`. To use another port, also set the Worker's `PUBLIC_ORIGIN` and the test's `MANTLE_TEST_ORIGIN` to that same localhost origin. Local test headers simulate Sites' trusted dispatcher; they do **not** prove deployed ChatGPT login.
30
+
31
+ Review the entire [smoke script](./scripts/check.mjs) before adapting it. It covers D1 CRUD/version conflict, owner/member/role revocation, R2 read/write/delete, media create → PUT → commit → public read, both advertised MCP URLs, public MCP `initialize`/`tools/list`/View call, staff MCP authentication/catalog, draft isolation, published article HTML/Markdown/SEO, and negative auth/Origin/size checks. It creates and deletes only its own test records and objects.
14
32
 
15
- 1. Start from a clean, committed Mantle checkout containing this change. Record its `git rev-parse HEAD`, then run `pnpm install --frozen-lockfile` and `pnpm build` from the repository root.
16
- 2. Run `node scripts/check-packed-consumer.mjs --project docs/examples/host-chatgpt-sites --output /absolute/path/to/new-sites-reproduction -- pnpm build`. The output path must not exist and must be outside the SDK checkout. This existing helper copies the committed example, packs the SDK, installs exact tarball overrides for all Mantle packages, and reports the source SHA and package hashes. Keep the resulting `artifacts/` beside `consumer/` so the lockfile's tarball paths remain valid.
17
- 3. Work in `/absolute/path/to/new-sites-reproduction/consumer`. Run `pnpm exec mantle validate --phase deploy`, `pnpm check`, then `pnpm exec wrangler d1 migrations apply DB --local`. Keep `.openai/hosting.json` but do not copy an existing Site's `project_id`.
18
- 4. Start `pnpm dev --port 4174` in another terminal, then run `pnpm test`. To use another port, also override the Worker's `PUBLIC_ORIGIN` and set `MANTLE_TEST_ORIGIN` for the test to that same localhost origin. Local test headers simulate Sites' trusted dispatcher; they do **not** prove deployed ChatGPT login.
19
- 5. Review the entire [smoke script](./scripts/check.mjs) before adapting it. It covers D1 CRUD/version conflict, owner/member/role revocation, R2 read/write/delete, media create → PUT → commit → public read, both advertised MCP URLs, public MCP `initialize`/`tools/list`/View call, staff MCP authentication/catalog, draft isolation, published article HTML/Markdown/SEO, and negative auth/Origin/size checks. It creates and deletes only its own test records and objects.
33
+ To run this example against an unreleased Mantle checkout instead of the registry, use `node scripts/check-packed-consumer.mjs --project docs/examples/host-chatgpt-sites --output <new dir> -- pnpm build` from a clean SDK checkout and work in its `consumer/`. That path is for SDK development only.
20
34
 
21
35
  The checked-in `drizzle/` migrations and `src/storage-fingerprint.json` match the example manifest. `scripts/migration.mjs` shows the one-time generation mechanism; do **not** run it against a deployed database or overwrite an applied migration. For a new business manifest, generate/review an initial migration before the first deployment; for a later change, generate an additive migration from the previous schema state.
22
36
 
@@ -1 +1 @@
1
- {"name":"mantle-sites-reference","version":"0.0.1","private":true,"type":"module","scripts":{"build":"node scripts/build.mjs","dev":"wrangler dev","generate":"mantle generate","check":"tsc --noEmit","test":"node --experimental-strip-types scripts/check.mjs"},"dependencies":{"@aotter/mantle":"0.1.2-alpha.6","@aotter/mantle-admin":"0.1.2-alpha.6","@aotter/mantle-admin-ui":"0.1.2-alpha.6","@aotter/mantle-cloudflare":"0.1.2-alpha.6","@aotter/mantle-web":"0.1.2-alpha.6","hono":"^4.9.0","micromark":"4.0.2","zod":"^4.0.0"},"devDependencies":{"@cloudflare/workers-types":"*","esbuild":"^0.25.0","typescript":"^5.9.0","wrangler":"^4.0.0"}}
1
+ {"name":"mantle-sites-reference","version":"0.0.1","private":true,"type":"module","scripts":{"build":"node scripts/build.mjs","dev":"wrangler dev","generate":"mantle generate","check":"tsc --noEmit","test":"node --experimental-strip-types scripts/check.mjs"},"dependencies":{"@aotter/mantle":"latest","@aotter/mantle-admin":"latest","@aotter/mantle-admin-ui":"latest","@aotter/mantle-cloudflare":"latest","@aotter/mantle-web":"latest","hono":"^4.9.0","micromark":"4.0.2","zod":"^4.0.0"},"devDependencies":{"@cloudflare/workers-types":"*","esbuild":"^0.28.0","typescript":"^5.9.0","wrangler":"^4.0.0"}}
@@ -23,7 +23,7 @@ function assemble(env:Env) {
23
23
  mountWeb(app,get);
24
24
  mountMcp(app,get,auth);
25
25
  mountMedia(app,auth,env);
26
- app.get('/health',async()=>{await get();return Response.json({ok:true,storage:'D1',auth:'ChatGPT Sites',mantle:'0.1.2-alpha.6'});});
26
+ app.get('/health',async()=>{await get();return Response.json({ok:true,storage:'D1',auth:'ChatGPT Sites',mantle:'0.1.2'});});
27
27
  app.get('/admin/sign-in',async c=>{
28
28
  if(c.req.header('cookie')?.split(';').some(v=>v.trim()==='mantle-sites-signout=1')) {
29
29
  c.header('Set-Cookie','mantle-sites-signout=; Path=/admin/sign-in; HttpOnly; SameSite=Strict; Max-Age=0'+(env.PUBLIC_ORIGIN.startsWith('https:')?'; Secure':''));
@@ -9,10 +9,9 @@ Schema is example business data; `mantle generate` never invents it.
9
9
  Spec + adapter without Admin:
10
10
  [`docs/examples/host-minimal-worker`](../host-minimal-worker/README.md).
11
11
 
12
- Pin every `@aotter/mantle*` package to the exact version in this snapshot
13
- (`packages/mantle/package.json`). This reference records that version as
14
- its published baseline; Core's test runner substitutes its exact candidate
15
- in a disposable copy.
12
+ This reference depends on every `@aotter/mantle*` package via the `latest`
13
+ dist-tag, so a fresh install always resolves the current stable release.
14
+ Core's test runner substitutes its exact candidate in a disposable copy.
16
15
 
17
16
  ## One-shot
18
17
 
@@ -11,10 +11,10 @@
11
11
  "check": "node ensure-dev-vars.mjs && mantle generate && mantle generate --check && mantle validate && mantle skills && mantle skills --check && tsc --noEmit && node smoke.mjs"
12
12
  },
13
13
  "dependencies": {
14
- "@aotter/mantle": "0.1.2-alpha.6",
15
- "@aotter/mantle-admin": "0.1.2-alpha.6",
16
- "@aotter/mantle-admin-ui": "0.1.2-alpha.6",
17
- "@aotter/mantle-cloudflare": "0.1.2-alpha.6",
14
+ "@aotter/mantle": "latest",
15
+ "@aotter/mantle-admin": "latest",
16
+ "@aotter/mantle-admin-ui": "latest",
17
+ "@aotter/mantle-cloudflare": "latest",
18
18
  "better-auth": "1.7.2",
19
19
  "hono": "^4.13.3",
20
20
  "zod": "^4.5.4",
@@ -9,9 +9,10 @@ Schema/View is example business data; `mantle generate` never invents it.
9
9
 
10
10
  For your own project, author package.json, manifests, Worker/provider config
11
11
  and TypeScript settings for your requirements. Pin all selected `@aotter/mantle*`
12
- dependencies to the same intended release. This reference records the snapshot
13
- version in this tree as its published baseline; Core's test runner substitutes
14
- its exact candidate in a disposable copy.
12
+ dependencies to the same intended release. This reference depends on them via
13
+ the `latest` dist-tag instead, so a fresh install always resolves the current
14
+ stable release; Core's test runner substitutes its exact candidate in a
15
+ disposable copy.
15
16
 
16
17
  Outside the SDK workspace, with Node 22+ and pnpm 9+:
17
18
 
@@ -10,8 +10,8 @@
10
10
  "check": "mantle generate && mantle generate --check && mantle validate && mantle skills && mantle skills --check && tsc --noEmit && node smoke.mjs"
11
11
  },
12
12
  "dependencies": {
13
- "@aotter/mantle": "0.1.2-alpha.6",
14
- "@aotter/mantle-cloudflare": "0.1.2-alpha.6",
13
+ "@aotter/mantle": "latest",
14
+ "@aotter/mantle-cloudflare": "latest",
15
15
  "better-auth": "1.7.2",
16
16
  "hono": "^4.13.3",
17
17
  "zod": "^4.5.4",
@@ -112,7 +112,7 @@ Bun, with the server and SQLite handle staying yours:
112
112
 
113
113
  ```ts
114
114
  import { Database } from "bun:sqlite";
115
- import { createBunMantle } from "@aotter/mantle-bun";
115
+ import { createBunMantle } from "@aotter/mantle-bun"; // experimental
116
116
 
117
117
  const database = new Database("app.sqlite");
118
118
  const mantle = createBunMantle({ plan, database, handlers });
@@ -128,7 +128,7 @@ Vercel Functions, with storage injected:
128
128
 
129
129
  ```ts
130
130
  import { SqliteMantleStorageAdapter } from "@aotter/mantle-runtime";
131
- import { createVercelMantle } from "@aotter/mantle-vercel";
131
+ import { createVercelMantle } from "@aotter/mantle-vercel"; // experimental
132
132
  import { LibsqlDatabaseDriver } from "@aotter/mantle-vercel/libsql";
133
133
 
134
134
  const mantle = createVercelMantle({
@@ -9,8 +9,6 @@ integration connects Sites hosting and sign-in to Mantle content, staff roles,
9
9
  Admin, media, and public web. Keep the application outside the Mantle SDK
10
10
  checkout and use matching SDK packages.
11
11
 
12
- The current reference requires unreleased host-declared MCP endpoint support. Follow its [packed-checkout installation](../../examples/host-chatgpt-sites/README.md#local-reproduction); published `0.1.2-alpha.6` does not provide that contract. The build and smoke checks verify the installed SDK rather than relying on its version string alone.
13
-
14
12
  Start from the [runnable Sites host reference](../../examples/host-chatgpt-sites/README.md), then replace its **example** manifest with the user's business contract. It contains the matching D1 migrations/fingerprint, R2 upload adapter, local smoke test and build layout. Its browser-backed staff identity is not an OAuth resource-server credential.
15
13
 
16
14
  ## First deployment
@@ -108,8 +106,7 @@ for live payments.
108
106
 
109
107
  ## Source
110
108
 
111
- - [`MediaStorage` port](../../../packages/mantle-runtime/src/domain/port/MediaStorage.ts)
112
- - [Media upload use case](../../../packages/mantle-runtime/src/usecase/media/CreateMediaUploadUseCase.ts)
109
+ - `MediaStorage` port and the media upload use case in `@aotter/mantle-runtime`
113
110
  - [Cloudflare R2 Workers binding API](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/)
114
111
  - [Cloudflare R2 presigned URLs](https://developers.cloudflare.com/r2/api/s3/presigned-urls/)
115
112
  - [OpenAI Sites](https://learn.chatgpt.com/docs/sites)
@@ -34,14 +34,6 @@ boundaries.
34
34
 
35
35
  ## Start with the supported SDK
36
36
 
37
- **Release status:** this revision needs the new host-declared MCP endpoint
38
- support. Published `0.1.2-alpha.6` does not contain it. Use the
39
- [packed-checkout installation](../../examples/host-chatgpt-sites/README.md#local-reproduction)
40
- to build this exact SDK and its reference application together. It records the
41
- source commit and package hashes. A registry-only installation becomes the
42
- starting path after a release includes this support and the example's dependency
43
- versions and lockfile are updated together.
44
-
45
37
  You need Node.js 22+, pnpm 9+, and Sites access with D1 and R2 available for your
46
38
  project. Follow the reference's local build and smoke test before deployment.
47
39
  Keep your application outside the SDK checkout. The included article schema is
@@ -50,7 +42,7 @@ a working example; adapt its fields and lifecycle to your team's content.
50
42
  ## Publish your first article
51
43
 
52
44
  1. **Prepare the application.** Follow the
53
- [runnable reference](../../examples/host-chatgpt-sites/README.md#local-reproduction).
45
+ [runnable reference](../../examples/host-chatgpt-sites/README.md#install-and-run).
54
46
  Its local test verifies content, roles, images, public pages, and MCP together.
55
47
  2. **Connect Sites.** Follow [Publish with Sites](../../examples/host-chatgpt-sites/README.md#publish-with-sites)
56
48
  to provision D1 and R2, set the production origin and first owner's email,
@@ -77,20 +69,22 @@ deployment workflow.
77
69
 
78
70
  ## Ask your agent to set it up
79
71
 
80
- Give your agent the SDK checkout containing this integration and describe your
72
+ Install the Mantle agent plugin, or `@aotter/mantle` itself, then describe your
81
73
  audience and content requirements:
82
74
 
83
75
  ```text
84
76
  Build a content site with ChatGPT Sites and Mantle. Read
85
- docs/handbook/sites/index.md and docs/examples/host-chatgpt-sites/README.md
86
- from the matching Mantle SDK. Follow the documented installation path,
87
- including packed-checkout installation while release support is pending.
77
+ handbook/sites/index.md and examples/host-chatgpt-sites/README.md from the
78
+ installed Mantle docs, and follow that reference's install and run steps.
88
79
  Adapt the article example to my content requirements. Include ChatGPT
89
80
  sign-in, Mantle staff roles, cover uploads, and published article pages.
90
81
  Run the local checks and show me a draft-to-publish walkthrough before
91
82
  deploying through Sites. Keep remote staff OAuth MCP outside this scope.
92
83
  ```
93
84
 
85
+ For business rules beyond content, add: "use custom `ref` handlers and
86
+ application-owned tables as described in handbook/sites/equipment-checkout.md."
87
+
94
88
  ## Beyond content: operational workflows
95
89
 
96
90
  Custom handlers can connect typed Mantle operations to application-owned
@@ -3,7 +3,7 @@ description: "Open local Admin in one shot: generate the prebuilt SPA, bind ASSE
3
3
  ---
4
4
  # Quickstart: local Admin
5
5
 
6
- This page reproduces Core's local Admin OTP reference as a from-scratch walkthrough. Admin is **opt-in**: use it when humans need a Dev UI. A complete Mantle service does not require this surface. Pin every `@aotter/mantle*` package to the exact version in this snapshot (`packages/mantle/package.json`); see [Versions](../reference/surface.md#versions).
6
+ This page reproduces Core's local Admin OTP reference as a from-scratch walkthrough. Admin is **opt-in**: use it when humans need a Dev UI. A complete Mantle service does not require this surface. Install every `@aotter/mantle*` package from the `latest` dist-tag; see [Versions](../reference/surface.md#versions).
7
7
 
8
8
  The default embed path — Spec + Worker without Admin — is [Quickstart: a minimal Worker](./quickstart-worker.md).
9
9
 
@@ -17,7 +17,7 @@ An agent interviews the human for one value before writing files: the bootstrap
17
17
 
18
18
  ## 1. `package.json`
19
19
 
20
- Pin every `@aotter/mantle*` package to the same exact release. Admin needs both `@aotter/mantle-admin` and `@aotter/mantle-admin-ui` plus the Cloudflare adapter peers.
20
+ Install every `@aotter/mantle*` package from the `latest` dist-tag. Admin needs both `@aotter/mantle-admin` and `@aotter/mantle-admin-ui` plus the Cloudflare adapter peers.
21
21
 
22
22
  ```json
23
23
  {
@@ -32,10 +32,10 @@ Pin every `@aotter/mantle*` package to the same exact release. Admin needs both
32
32
  "dev": "wrangler dev --local --ip 127.0.0.1 --port 8787"
33
33
  },
34
34
  "dependencies": {
35
- "@aotter/mantle": "0.1.2-alpha.6",
36
- "@aotter/mantle-admin": "0.1.2-alpha.6",
37
- "@aotter/mantle-admin-ui": "0.1.2-alpha.6",
38
- "@aotter/mantle-cloudflare": "0.1.2-alpha.6",
35
+ "@aotter/mantle": "latest",
36
+ "@aotter/mantle-admin": "latest",
37
+ "@aotter/mantle-admin-ui": "latest",
38
+ "@aotter/mantle-cloudflare": "latest",
39
39
  "better-auth": "1.7.2",
40
40
  "hono": "^4.13.3",
41
41
  "zod": "^4.5.4",
@@ -3,7 +3,7 @@ description: "Author a minimal Cloudflare Worker from scratch: one Schema, one p
3
3
  ---
4
4
  # Quickstart: a minimal Worker
5
5
 
6
- This page reproduces Core's API-only Worker reference as a from-scratch walkthrough. It is the embed / adapter path: View REST without Admin, Auth or a visitor frontend. Admin is opt-in when humans need a console — [Quickstart: local Admin](./quickstart-admin.md). Pin every `@aotter/mantle*` package to the exact version in this snapshot (`packages/mantle/package.json`); see [Versions](../reference/surface.md#versions).
6
+ This page reproduces Core's API-only Worker reference as a from-scratch walkthrough. It is the embed / adapter path: View REST without Admin, Auth or a visitor frontend. Admin is opt-in when humans need a console — [Quickstart: local Admin](./quickstart-admin.md). Install every `@aotter/mantle*` package from the `latest` dist-tag; see [Versions](../reference/surface.md#versions).
7
7
 
8
8
  ## Prerequisites
9
9
 
@@ -13,7 +13,7 @@ This page reproduces Core's API-only Worker reference as a from-scratch walkthro
13
13
 
14
14
  ## 1. `package.json`
15
15
 
16
- Pin every `@aotter/mantle*` package to the same exact release and add the peers the Cloudflare adapter needs.
16
+ Install every `@aotter/mantle*` package from the `latest` dist-tag and add the peers the Cloudflare adapter needs.
17
17
 
18
18
  ```json
19
19
  {
@@ -28,8 +28,8 @@ Pin every `@aotter/mantle*` package to the same exact release and add the peers
28
28
  "check": "mantle generate && mantle generate --check && mantle validate && mantle skills && mantle skills --check && tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@aotter/mantle": "0.1.2-alpha.6",
32
- "@aotter/mantle-cloudflare": "0.1.2-alpha.6",
31
+ "@aotter/mantle": "latest",
32
+ "@aotter/mantle-cloudflare": "latest",
33
33
  "better-auth": "1.7.2",
34
34
  "hono": "^4.13.3",
35
35
  "zod": "^4.5.4",
@@ -61,7 +61,8 @@ is introduced. The runnable release-order check guards these transitions.
61
61
  or force-updated. Both branches share one ruleset: PR, one approval,
62
62
  resolved threads and a current-base `Typecheck + tests` check.
63
63
  - Stable publishes latest. Final 0.1.0 alphas only advance alpha, preserving
64
- existing legacy latest. Historic 0.0 alpha behavior remains recoverable.
64
+ existing legacy latest. No prerelease moves latest; the 0.0 alpha rule that
65
+ also advanced it was removed once 0.0 became unreachable.
65
66
  A prerelease channel keeps its last version when a later stable publishes.
66
67
 
67
68
  ## Prepare and run
@@ -97,5 +97,5 @@ consumers; they do not duplicate the suite under new names.
97
97
 
98
98
  Issue #674 leaves `CONTRIBUTING.md` plus accepted ADRs as the contributor
99
99
  authority. `AGENTS.md`, `CLAUDE.md`, and the Claude release-skill entry are
100
- small routers; `.agent/skills/mantle-release/SKILL.md` is the only maintainer
100
+ small routers; `.agents/skills/mantle-release/SKILL.md` is the only maintainer
101
101
  release procedure. Shipped `skills/*` remain separate consumer artifacts.
@@ -6,9 +6,8 @@ Runtime. This Spec-only path is allowed by
6
6
  [ADR-0019](adr/0019-sealed-manifest-runtime-pipeline.md), not a new adapter,
7
7
  manifest grammar, or fork of Core.
8
8
 
9
- This recipe targets `0.1.0-alpha.16`. Its public APIs and peer requirements are
10
- prerelease contracts: pin the package, record the tested version, and rerun
11
- compatibility checks when upgrading.
9
+ This recipe targets `0.1.2`. Pin the package, record the tested version, and
10
+ rerun compatibility checks when upgrading.
12
11
 
13
12
  ## What stays with the host
14
13
 
@@ -51,7 +50,7 @@ validation semantics. Do not hand-maintain a second field list for the graph.
51
50
  Install the exact Spec package and its supported peer, without Runtime:
52
51
 
53
52
  ```sh
54
- npm install --save-exact @aotter/mantle-spec@0.1.0-alpha.16 zod@4.5.4
53
+ npm install --save-exact @aotter/mantle-spec zod@4.5.4
55
54
  ```
56
55
 
57
56
  The [synthetic fixture](../packages/mantle-spec/test/fixtures/spec-only-host.yaml)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aotter/mantle",
3
- "version": "0.1.2-rc.1",
3
+ "version": "0.1.2",
4
4
  "description": "Embeddable Mantle Core umbrella with Spec and Runtime; Web, Admin, Bun, Vercel, Cloudflare, and Admin UI are optional peer packages.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://mantle.tools/",
@@ -79,8 +79,8 @@
79
79
  "README.md"
80
80
  ],
81
81
  "dependencies": {
82
- "@aotter/mantle-runtime": "0.1.2-rc.1",
83
- "@aotter/mantle-spec": "0.1.2-rc.1"
82
+ "@aotter/mantle-runtime": "0.1.2",
83
+ "@aotter/mantle-spec": "0.1.2"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "aws4fetch": "^1.0.20",
@@ -88,12 +88,12 @@
88
88
  "hono": "^4.12.0",
89
89
  "@libsql/client": "^0.17.4",
90
90
  "zod": "^4.5.0",
91
- "@aotter/mantle-admin": "0.1.2-rc.1",
92
- "@aotter/mantle-bun": "0.1.2-rc.1",
93
- "@aotter/mantle-cloudflare": "0.1.2-rc.1",
94
- "@aotter/mantle-admin-ui": "0.1.2-rc.1",
95
- "@aotter/mantle-vercel": "0.1.2-rc.1",
96
- "@aotter/mantle-web": "0.1.2-rc.1"
91
+ "@aotter/mantle-admin-ui": "0.1.2",
92
+ "@aotter/mantle-admin": "0.1.2",
93
+ "@aotter/mantle-bun": "0.1.2",
94
+ "@aotter/mantle-cloudflare": "0.1.2",
95
+ "@aotter/mantle-vercel": "0.1.2",
96
+ "@aotter/mantle-web": "0.1.2"
97
97
  },
98
98
  "peerDependenciesMeta": {
99
99
  "@aotter/mantle-admin": {
@@ -136,12 +136,12 @@
136
136
  "typescript": "^6.0.3",
137
137
  "vitest": "^4.1.11",
138
138
  "zod": "^4.5.4",
139
- "@aotter/mantle-admin": "0.1.2-rc.1",
140
- "@aotter/mantle-cloudflare": "0.1.2-rc.1",
141
- "@aotter/mantle-admin-ui": "0.1.2-rc.1",
142
- "@aotter/mantle-bun": "0.1.2-rc.1",
143
- "@aotter/mantle-vercel": "0.1.2-rc.1",
144
- "@aotter/mantle-web": "0.1.2-rc.1"
139
+ "@aotter/mantle-admin": "0.1.2",
140
+ "@aotter/mantle-cloudflare": "0.1.2",
141
+ "@aotter/mantle-admin-ui": "0.1.2",
142
+ "@aotter/mantle-bun": "0.1.2",
143
+ "@aotter/mantle-vercel": "0.1.2",
144
+ "@aotter/mantle-web": "0.1.2"
145
145
  },
146
146
  "engines": {
147
147
  "node": ">=22"
package/skills/README.md CHANGED
@@ -58,8 +58,24 @@ contracts.
58
58
 
59
59
  ## Source-repository marketplace install
60
60
 
61
- The source repository is also an agent plugin bundle. These manifests are not
62
- duplicated into the npm package:
61
+ The source repository is also an agent plugin bundle:
62
+
63
+ ```bash
64
+ # Claude Code — two separate prompts
65
+ /plugin marketplace add aotter/mantle
66
+ /plugin install mantle@mantle
67
+
68
+ # Codex
69
+ codex plugin marketplace add aotter/mantle
70
+ codex plugin add mantle@mantle
71
+ ```
72
+
73
+ These are authoring workflows and do not track a release. Version matching is
74
+ the job of `mantle skills`, which projects the installed package's own skills
75
+ into the project, and `mantle skills --check`, which fails on drift.
76
+
77
+ Cursor and GitHub Copilot read their manifests from the repository directly.
78
+ These manifests are not duplicated into the npm package:
63
79
 
64
80
  - Claude Code: `.claude-plugin/plugin.json` plus `.claude-plugin/marketplace.json`.
65
81
  - Codex: `.codex-plugin/plugin.json` plus `.agents/plugins/marketplace.json`.
@@ -24,9 +24,7 @@ turn `generate` into implicit scaffolding.
24
24
  and pnpm 9+ for these SDK examples. A ChatGPT Site is not a conventional
25
25
  Cloudflare Worker deployment; use the installed
26
26
  `docs/handbook/sites/index.md` integration guide and
27
- `docs/examples/host-chatgpt-sites/` runnable reference when selected. Follow
28
- its SDK availability instructions; while support is unreleased, use its
29
- packed-checkout workflow rather than an older registry package.
27
+ `docs/examples/host-chatgpt-sites/` runnable reference when selected.
30
28
  2. Choose the requested exact SDK version, or resolve the intended release
31
29
  channel once. Pin all selected `@aotter/mantle*` dependencies to that same
32
30
  version. Install only the adapter/optional packages the application needs.
@@ -42,12 +40,30 @@ turn `generate` into implicit scaffolding.
42
40
  in wrangler logs). Admin needs `@aotter/mantle-admin`,
43
41
  `@aotter/mantle-admin-ui`, wrangler `ASSETS` on `./public`, and
44
42
  `createAuth` email-otp + `ConsoleEmailSender`. Do not Vite-build Admin.
45
- - ChatGPT Sites with Admin/D1/R2 — follow `host-chatgpt-sites/`, not the
46
- email-OTP Worker example. Preserve its Sites-owned identity ingress and
47
- hosting manifest; author the user's Schema/View/Procedure/Trigger, then
48
- review migrations, media policy and the local/production smoke gates.
43
+ - ChatGPT Sites with Admin/D1/R2 — follow
44
+ `docs/examples/host-chatgpt-sites/`, not the email-OTP Worker example.
45
+ Copy it outside the SDK checkout, then `npm ci`,
46
+ `npx mantle validate --phase deploy`, `npm run generate`, `npm run check`,
47
+ `npx wrangler d1 migrations apply DB --local`,
48
+ `npm run dev -- --port 4174`, and `npm test` in a second terminal.
49
+ Preserve its Sites-owned identity ingress and hosting manifest; author the
50
+ user's Schema/View/Procedure/Trigger, then review migrations, media policy
51
+ and the local/production smoke gates. Sites provisions and deploys; never
52
+ `wrangler deploy` a Site. Request both D1 and R2 when uploads are in scope.
49
53
  Browser Admin WebMCP and Sites-session `/api/mcp/staff` do not enable remote staff OAuth MCP.
50
- - Grammar — `docs/examples/README.md`; copy `builtin-*` Manifests only.
54
+ - ChatGPT Sites with custom business rules or an external callback — the
55
+ runnable reference covers builtin content only. For application-owned
56
+ operational state, `handler: { kind: ref }` Procedures, staff-only SQL
57
+ Views, staff MCP Triggers with `requires.auth`, and outbound webhooks
58
+ called from handler code, follow
59
+ `docs/handbook/sites/equipment-checkout.md`. It is an implementation
60
+ guide, not a shipped app: keep Mantle-owned Schema tables and
61
+ application-owned tables separate, and give every application table a
62
+ reviewed migration.
63
+ - Grammar — `docs/examples/README.md`. Copy `builtin-*` Manifests directly.
64
+ Read `cf-primitives-*` when the request needs Durable Objects, Queues,
65
+ cron, payment-provider callbacks, or API-key and entitlement guards;
66
+ those carry `ref` handlers and are not Builder-ingestible.
51
67
  None of these is a template to install wholesale. Other hosts use the
52
68
  embedded adapter guides. Author package scripts, manifests, entry and
53
69
  configuration for the user's requirements. No default notes model, home
@@ -14,9 +14,11 @@ metadata:
14
14
  Local cold start deliberately stops before this skill. Provision only after the
15
15
  user asks to create remote resources or ship production. This flow is for
16
16
  consumer-owned Cloudflare Workers. For a ChatGPT Site, use the installed
17
- `docs/handbook/sites/index.md` integration guide and the Sites host's
18
- publish workflow; do not run `wrangler deploy` or require R2 S3 credentials
19
- merely because Sites exposes an R2 binding.
17
+ `docs/handbook/sites/index.md` integration guide and the "Publish with Sites"
18
+ steps in `docs/examples/host-chatgpt-sites/README.md`: request D1 and R2 on the
19
+ Site, set `PUBLIC_ORIGIN` and `OWNER_EMAIL` in Sites settings, review the
20
+ migration, then save and deploy a Sites version. Do not run `wrangler deploy`
21
+ or require R2 S3 credentials merely because Sites exposes an R2 binding.
20
22
 
21
23
  ## Source of Truth
22
24