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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +40 -17
  2. package/dist/auth.d.ts +2 -0
  3. package/dist/auth.d.ts.map +1 -0
  4. package/dist/auth.js +2 -0
  5. package/dist/auth.js.map +1 -0
  6. package/dist/cli/generate.d.ts.map +1 -1
  7. package/dist/cli/generate.js +3 -0
  8. package/dist/cli/generate.js.map +1 -1
  9. package/dist/cli/main.d.ts +1 -1
  10. package/dist/cli/main.d.ts.map +1 -1
  11. package/dist/cli/main.js +5 -0
  12. package/dist/cli/main.js.map +1 -1
  13. package/dist/cli/skills.d.ts.map +1 -1
  14. package/dist/cli/skills.js +3 -0
  15. package/dist/cli/skills.js.map +1 -1
  16. package/dist/codegen/emitMantleModule.d.ts.map +1 -1
  17. package/dist/codegen/emitMantleModule.js +38 -2
  18. package/dist/codegen/emitMantleModule.js.map +1 -1
  19. package/docs/adapter-guide.md +5 -0
  20. package/docs/adr/0014-auth-better-auth-and-multi-tenant-mcp.md +109 -2
  21. package/docs/agent-prompts.md +41 -33
  22. package/docs/auth-hosting-model.md +1 -1
  23. package/docs/examples/host-chatgpt-sites/README.md +22 -8
  24. package/docs/examples/host-chatgpt-sites/package.json +1 -1
  25. package/docs/examples/host-chatgpt-sites/src/index.ts +1 -1
  26. package/docs/examples/host-local-admin-otp/README.md +13 -4
  27. package/docs/examples/host-local-admin-otp/package.json +4 -4
  28. package/docs/examples/host-minimal-worker/README.md +4 -3
  29. package/docs/examples/host-minimal-worker/package.json +2 -2
  30. package/docs/handbook/cloudflare/authentication.md +44 -3
  31. package/docs/handbook/concepts/mcp-and-agents.md +10 -5
  32. package/docs/handbook/concepts/runtime-and-adapters.md +2 -2
  33. package/docs/handbook/navigation.json +8 -2
  34. package/docs/handbook/reference/diagnostics.md +5 -1
  35. package/docs/handbook/reference/manifest.md +1 -1
  36. package/docs/handbook/reference/procedure.md +1 -0
  37. package/docs/handbook/reference/surface.md +6 -4
  38. package/docs/handbook/reference/trigger.md +1 -1
  39. package/docs/handbook/releases/index.md +75 -0
  40. package/docs/handbook/sites/host-reference.md +1 -4
  41. package/docs/handbook/sites/index.md +7 -13
  42. package/docs/handbook/start/project-and-cli.md +15 -4
  43. package/docs/handbook/start/quickstart-admin.md +20 -209
  44. package/docs/handbook/start/quickstart-worker.md +4 -4
  45. package/docs/labels.md +3 -3
  46. package/docs/migration-0.1.2.md +10 -126
  47. package/docs/release-process.md +36 -31
  48. package/docs/sealed-pipeline-ownership.md +1 -1
  49. package/docs/spec-only-host-adoption.md +3 -4
  50. package/package.json +25 -16
  51. package/skills/README.md +33 -11
  52. package/skills/install/SKILL.md +29 -13
  53. package/skills/plugin/SKILL.md +6 -6
  54. package/skills/provision/SKILL.md +27 -15
  55. package/skills/update/SKILL.md +4 -3
  56. package/docs/examples/host-chatgpt-sites/package-lock.json +0 -7088
@@ -1,9 +1,9 @@
1
1
  # Release process
2
2
 
3
- First stable targets 0.1.2 (#826). The last legacy Landing/Starter release is
4
- 0.1.0-alpha.17. Its immutable artifacts and repositories remain available;
5
- recover that version with its tagged controller/docs. New releases have no
6
- Starter/Landing checkout, tag, dispatch, credential or deployment dependency.
3
+ How a version reaches npm. What each shipped stable contains is
4
+ [Releases](handbook/releases/index.md); this document is the procedure only.
5
+ A release has no Starter/Landing checkout, tag, dispatch, credential or
6
+ deployment dependency.
7
7
 
8
8
  ## Authority and state transitions
9
9
 
@@ -56,13 +56,13 @@ is introduced. The runnable release-order check guards these transitions.
56
56
  `develop`, anything else means `main`. It refuses a commit that is not that
57
57
  branch's tip or not the merge commit of exactly one PR into that branch.
58
58
  `scripts/release-tag-order.mjs` rejects any other prerelease identifier.
59
- - `develop` stays the default integration branch. `main` changes only through
60
- promotion PRs and hotfix PRs (below); it is never pushed directly, rebased
61
- or force-updated. Both branches share one ruleset: PR, one approval,
62
- resolved threads and a current-base `Typecheck + tests` check.
63
- - Stable publishes latest. Final 0.1.0 alphas only advance alpha, preserving
64
- existing legacy latest. Historic 0.0 alpha behavior remains recoverable.
65
- A prerelease channel keeps its last version when a later stable publishes.
59
+ - `develop` is where every change integrates first, so it is the base for all
60
+ work despite `main` being the repository's default branch on GitHub. `main`
61
+ changes only through promotion PRs and hotfix PRs (below); it is never pushed
62
+ directly, rebased or force-updated. Both branches share one ruleset: PR, one
63
+ approval, resolved threads and a current-base `Typecheck + tests` check.
64
+ - Stable is the only release that moves `latest`. A prerelease channel keeps
65
+ its last version when a later stable publishes.
66
66
 
67
67
  ## Prepare and run
68
68
 
@@ -83,7 +83,8 @@ is introduced. The runnable release-order check guards these transitions.
83
83
  ```
84
84
 
85
85
  3. Review API compatibility and migration instructions for actual consumers.
86
- Frozen legacy consumers stay on alpha.17; do not make them follow new Core.
86
+ Frozen legacy consumers stay on their pinned version; do not make them
87
+ follow new Core.
87
88
  4. Run `pnpm check`, including exact packed Worker, optional products, Bun,
88
89
  Vercel, skills, release invariants, types and tests. Inspect the umbrella
89
90
  docs/skills payload: no workspace dependencies, secrets or local state.
@@ -93,7 +94,7 @@ is introduced. The runnable release-order check guards these transitions.
93
94
  stable, continue with the promotion below. The controller refuses an
94
95
  untagged source that is no longer the expected branch tip.
95
96
 
96
- The ten public packages remain in dependency order:
97
+ The eleven public packages remain in dependency order:
97
98
 
98
99
  1. @aotter/mantle-spec
99
100
  2. @aotter/mantle-admin-ui
@@ -101,10 +102,11 @@ The ten public packages remain in dependency order:
101
102
  4. @aotter/mantle-indexeddb
102
103
  5. @aotter/mantle-web
103
104
  6. @aotter/mantle-admin
104
- 7. @aotter/mantle-bun
105
- 8. @aotter/mantle-vercel
106
- 9. @aotter/mantle-cloudflare
107
- 10. @aotter/mantle
105
+ 7. @aotter/mantle-auth
106
+ 8. @aotter/mantle-bun
107
+ 9. @aotter/mantle-vercel
108
+ 10. @aotter/mantle-cloudflare
109
+ 11. @aotter/mantle
108
110
 
109
111
  ## Promote to main (beta, RC, stable)
110
112
 
@@ -112,9 +114,9 @@ Every non-alpha release is the version PR above, one promotion PR and one
112
114
  dispatch. The version PR still merges into `develop`, so `develop` always
113
115
  contains what `main` publishes and promotions never conflict.
114
116
 
115
- 1. Stable only: the release-gate issue (#826 for 0.1.2) records owner
116
- acceptance. Every gate item passes with linked evidence or is explicitly
117
- deferred there, and no `release-gate` issue stays open against the version.
117
+ 1. Stable only: the version's release-gate issue records owner acceptance.
118
+ Every gate item passes with linked evidence or is explicitly deferred
119
+ there, and no `release-gate` issue stays open against the version.
118
120
  Beta and RC need the gate defined, not passed.
119
121
  2. Merge the version PR into `develop` with a merge commit; note its SHA.
120
122
  3. Pin the promotion head at that SHA so later `develop` merges cannot ride
@@ -147,18 +149,20 @@ the next promotion. Branch from `main`, include the version bump, PR into
147
149
  and resolve version files in favour of `develop`. Until that lands, the next
148
150
  promotion conflicts on the version files.
149
151
 
150
- First stable (0.1.2) specifics: `latest` moves from 0.1.0-alpha.16, the last
151
- `latest` the frozen legacy consumers saw, to 0.1.2. GitHub generates notes
152
- from the previous release (v0.1.2-alpha.6); to cover the whole 0.1.2 line,
153
- regenerate from v0.1.0-alpha.17 and edit the release body after the run. The
154
- body is not an immutable artifact; the tag and packages are.
152
+ GitHub generates notes from the immediately previous tag, which for a stable
153
+ is usually its own last RC. To cover the whole line instead, regenerate from
154
+ the previous stable and edit the release body after the run. The body is not
155
+ an immutable artifact; the tag and packages are.
155
156
 
156
157
  ```sh
157
158
  gh api repos/aotter/mantle/releases/generate-notes \
158
- -f tag_name=v0.1.2 -f previous_tag_name=v0.1.0-alpha.17 --jq .body > notes.md
159
- gh release edit v0.1.2 --notes-file notes.md
159
+ -f tag_name=v<version> -f previous_tag_name=v<previous stable> --jq .body > notes.md
160
+ gh release edit v<version> --notes-file notes.md
160
161
  ```
161
162
 
163
+ Add the version's entry to [Releases](handbook/releases/index.md) in the same
164
+ pass, so the handbook and the GitHub release describe the same thing.
165
+
162
166
  After publication, move docs/examples that were pinned to a packed checkout
163
167
  back to registry installation with an updated lockfile, and close the gate
164
168
  issue with the run link and completion evidence.
@@ -170,12 +174,13 @@ tag/release and mirrors GitHub Packages. No cross-repository fanout token is
170
174
  needed. Before tagging, verify credentials and new-version absence on both
171
175
  registries. Existing artifacts on retry must have matching integrity.
172
176
 
173
- Completion requires the Core tag SHA, all ten npmjs/GPR packages, exact
177
+ Completion requires the Core tag SHA, all eleven npmjs/GPR packages, exact
174
178
  integrity, no workspace dependencies, a passing public-registry Worker gate,
175
179
  correct channel tags and the GitHub release. Retain run links and gate evidence.
176
- This does not prove stable production soak or upgrade safety; #826 owns those
177
- acceptance requirements. A first-stable agent acceptance uses only the
178
- version-matched authoring instructions, not an SDK checkout or generated site.
180
+ This does not prove stable production soak or upgrade safety; the version's
181
+ release-gate issue owns those acceptance requirements. An agent acceptance run
182
+ uses only the version-matched authoring instructions, not an SDK checkout or
183
+ generated site.
179
184
 
180
185
  ## Recovery
181
186
 
@@ -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.3-alpha.1`. 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,7 +1,7 @@
1
1
  {
2
2
  "name": "@aotter/mantle",
3
- "version": "0.1.2-rc.1",
4
- "description": "Embeddable Mantle Core umbrella with Spec and Runtime; Web, Admin, Bun, Vercel, Cloudflare, and Admin UI are optional peer packages.",
3
+ "version": "0.1.3-alpha.1",
4
+ "description": "Embeddable Mantle Core umbrella with Spec and Runtime; Web, Admin, Auth, Bun, Vercel, Cloudflare, and Admin UI are optional peer packages.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://mantle.tools/",
7
7
  "repository": {
@@ -51,6 +51,10 @@
51
51
  "types": "./dist/admin.d.ts",
52
52
  "import": "./dist/admin.js"
53
53
  },
54
+ "./auth": {
55
+ "types": "./dist/auth.d.ts",
56
+ "import": "./dist/auth.js"
57
+ },
54
58
  "./bun": {
55
59
  "types": "./dist/bun.d.ts",
56
60
  "import": "./dist/bun.js"
@@ -79,8 +83,8 @@
79
83
  "README.md"
80
84
  ],
81
85
  "dependencies": {
82
- "@aotter/mantle-runtime": "0.1.2-rc.1",
83
- "@aotter/mantle-spec": "0.1.2-rc.1"
86
+ "@aotter/mantle-runtime": "0.1.3-alpha.1",
87
+ "@aotter/mantle-spec": "0.1.3-alpha.1"
84
88
  },
85
89
  "peerDependencies": {
86
90
  "aws4fetch": "^1.0.20",
@@ -88,12 +92,13 @@
88
92
  "hono": "^4.12.0",
89
93
  "@libsql/client": "^0.17.4",
90
94
  "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"
95
+ "@aotter/mantle-admin": "0.1.3-alpha.1",
96
+ "@aotter/mantle-auth": "0.1.3-alpha.1",
97
+ "@aotter/mantle-vercel": "0.1.3-alpha.1",
98
+ "@aotter/mantle-bun": "0.1.3-alpha.1",
99
+ "@aotter/mantle-web": "0.1.3-alpha.1",
100
+ "@aotter/mantle-cloudflare": "0.1.3-alpha.1",
101
+ "@aotter/mantle-admin-ui": "0.1.3-alpha.1"
97
102
  },
98
103
  "peerDependenciesMeta": {
99
104
  "@aotter/mantle-admin": {
@@ -102,6 +107,9 @@
102
107
  "@aotter/mantle-admin-ui": {
103
108
  "optional": true
104
109
  },
110
+ "@aotter/mantle-auth": {
111
+ "optional": true
112
+ },
105
113
  "@aotter/mantle-bun": {
106
114
  "optional": true
107
115
  },
@@ -136,12 +144,13 @@
136
144
  "typescript": "^6.0.3",
137
145
  "vitest": "^4.1.11",
138
146
  "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"
147
+ "@aotter/mantle-admin": "0.1.3-alpha.1",
148
+ "@aotter/mantle-bun": "0.1.3-alpha.1",
149
+ "@aotter/mantle-auth": "0.1.3-alpha.1",
150
+ "@aotter/mantle-admin-ui": "0.1.3-alpha.1",
151
+ "@aotter/mantle-cloudflare": "0.1.3-alpha.1",
152
+ "@aotter/mantle-vercel": "0.1.3-alpha.1",
153
+ "@aotter/mantle-web": "0.1.3-alpha.1"
145
154
  },
146
155
  "engines": {
147
156
  "node": ">=22"
package/skills/README.md CHANGED
@@ -6,11 +6,11 @@ Agent-readable skill briefs for consumers of `@aotter/mantle-*`. Discoverable by
6
6
  |---|---|
7
7
  | [`develop`](develop/SKILL.md) | `mantle:develop`: Core-owned workflow for manifest, runtime, handler, adapter, validation, and MCP work in any Mantle project. |
8
8
  | [`media-gc`](media-gc/SKILL.md) | `mantle:media-gc`: audit or remove stale uncommitted public media objects with the connected Cloudflare API. |
9
- | [`plugin`](plugin/SKILL.md) | `mantle:plugin`: Core-owned marketplace workflow for plan-first capability installs across starters and adapters. |
10
- | [`theme`](theme/SKILL.md) | `mantle:theme`: Core-owned visual workflow. Reads project context but does not depend on starter-owned skill semantics. |
9
+ | [`plugin`](plugin/SKILL.md) | `mantle:plugin`: Core-owned marketplace workflow for plan-first capability installs across applications and adapters. |
10
+ | [`theme`](theme/SKILL.md) | `mantle:theme`: Core-owned visual workflow. Reads project-owned theme and UI contracts. |
11
11
  | [`update`](update/SKILL.md) | `mantle:update`: Core-owned drift check workflow for SDK dependencies, local skills, and plugin lockfiles. |
12
- | [`install`](install/SKILL.md) | User wants to create a local Mantle site by direct authoring or continue an existing local / landing-generated project. |
13
- | [`provision`](provision/SKILL.md) | User wants a local or landing-generated project shipped to Cloudflare with production auth and operator handoff. |
12
+ | [`install`](install/SKILL.md) | User wants to author a local Mantle application or continue an existing project. |
13
+ | [`provision`](provision/SKILL.md) | User wants a local project shipped to Cloudflare with production auth and operator handoff. |
14
14
 
15
15
  The skills target Mantle's v0.1 grammar. The installed package version, not
16
16
  duplicated skill prose, selects the exact runtime and embedded docs.
@@ -27,9 +27,9 @@ enforces the columns below.
27
27
  |---|---|---|---|---|---|
28
28
  | `develop` | existing project; manifest, runtime, handler, adapter, or MCP work | four-atom model; adapter neutrality; no direct D1/KV/Postgres writes; no committed secrets | performance harness; local MCP client; locale rules | project, plugin | — |
29
29
  | `plugin` | user wants an installable capability | plan before apply; lock entry is the removal manifest; delete only plugin-owned files and atoms | apply; remove | project, plugin | — |
30
- | `theme` | brand or visual direction in a generated project | repo-owned theme and UI contracts | — | project, plugin | — |
30
+ | `theme` | brand or visual direction in a project | repo-owned theme and UI contracts | — | project, plugin | — |
31
31
  | `update` | SDK upgrade or plugin lock review | never blindly overwrite user-owned code | — | project, plugin | — |
32
- | `install` | new site, or opening an existing generated one | do not use the SDK checkout as the application; no push/deploy/provider config during cold start | author local project; continue existing project | plugin | Creates a new project; nothing to project into an existing one. |
32
+ | `install` | new application, or opening an existing project | do not use the SDK checkout as the application; no push/deploy/provider config during cold start | author local project; continue existing project | plugin | Creates a new project; nothing to project into an existing one. |
33
33
  | `provision` | ship to Cloudflare and finish production auth | secrets never enter source or logs; explicit auth mode | hosted auth; self-managed auth | plugin | Platform-specific deploy that handles production secrets; opt-in only. |
34
34
  | `media-gc` | audit or remove stale uncommitted media objects | audit by default; confirm exact account, bucket, cutoff, and candidate digest; re-audit before applying; never prefix-delete; never print keys | apply | plugin | Destructive remote object deletion and Cloudflare-specific; opt-in only. |
35
35
 
@@ -46,20 +46,42 @@ Deliberately monolithic:
46
46
 
47
47
  The `mantle:*` namespace is owned by `@aotter/mantle`. Every skill declares its
48
48
  own distribution scope in front matter: `metadata.projection: project` marks a
49
- skill `mantle skills` should place in a generated project, and a skill that
49
+ skill `mantle skills` should place in a consumer project, and a skill that
50
50
  withholds `project` must say why. `scripts/check-skills.mjs` holds that
51
51
  declaration and the audit table below to each other.
52
52
 
53
53
  Run `mantle skills` to project the installed package's skills into a project;
54
54
  use `mantle skills --check` to fail closed on drift. The installed package and
55
55
  `node_modules/@aotter/mantle/docs/` are the single version-matched authority.
56
- Starter launch files and plugin recipes are project context, not competing
56
+ Application files and plugin recipes are project context, not competing
57
57
  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
+ Cold start is the pinned install skill. Other marketplace hosts are pointers
62
+ to the same pin:
63
+
64
+ ```sh
65
+ npx skills add aotter/mantle@v0.1.3-alpha.1 --skill install
66
+ ```
67
+
68
+ ```bash
69
+ # Claude Code — two separate prompts
70
+ /plugin marketplace add aotter/mantle@v0.1.3-alpha.1
71
+ /plugin install mantle@mantle
72
+
73
+ # Codex
74
+ codex plugin marketplace add aotter/mantle --ref v0.1.3-alpha.1
75
+ codex plugin add mantle@mantle
76
+ ```
77
+
78
+ Then follow the install skill to the CLI and handbook. Do not use an untagged
79
+ `aotter/mantle` marketplace add as the official entry. After packages are
80
+ pinned, `mantle skills` projects the installed package's own skills into the
81
+ project, and `mantle skills --check` fails on drift.
82
+
83
+ Cursor and GitHub Copilot read their manifests from the repository directly.
84
+ These manifests are not duplicated into the npm package:
63
85
 
64
86
  - Claude Code: `.claude-plugin/plugin.json` plus `.claude-plugin/marketplace.json`.
65
87
  - Codex: `.codex-plugin/plugin.json` plus `.agents/plugins/marketplace.json`.
@@ -75,7 +97,7 @@ package. Two audiences, two artifacts.
75
97
 
76
98
  ## Discoverability
77
99
 
78
- The skills target ADR-0007's "AI as primary author" thesis: agents reach these files by URL when the user invokes them by intent ("install mantle", "develop my Mantle site", "deploy"). No `/skill install` slash command is required — point the agent at a version tag or pass the version-matched markdown content directly.
100
+ The skills target ADR-0007's "AI as primary author" thesis: agents reach these files by URL when the user invokes them by intent ("install mantle", "develop my Mantle site", "deploy"). Official cold start is `npx skills add aotter/mantle@v0.1.3-alpha.1 --skill install`. Point the agent at tag `v0.1.3-alpha.1` or pass the version-matched markdown content directly.
79
101
 
80
102
  ## Conventions
81
103
 
@@ -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
@@ -85,15 +101,15 @@ Install the frozen dependency graph, project installed Core skills, then read
85
101
  those skills and embedded docs. Never apply develop docs to an older package.
86
102
  Use the installed `mantle --help` and the project's scripts as authority.
87
103
 
88
- For legacy alpha.17 projects, retain their pinned behavior until an explicit
89
- upgrade is requested; read `docs/migration-0.1.2.md` before upgrading. Do not
90
- rewrite provider identities, delete metadata or fetch a nonexistent new Starter
91
- tag. SDK upgrades follow the update skill, not a bundle comparison command.
104
+ For a legacy pre-stable project, retain its pinned behavior until an explicit
105
+ upgrade is requested. Do not rewrite provider identities, delete metadata or
106
+ fetch a nonexistent new Starter tag. SDK upgrades follow the update skill, not
107
+ a bundle comparison command.
92
108
 
93
109
  ## Ship and report
94
110
 
95
111
  When deployment is requested, follow the installed provision skill and the
96
- observed host configuration. Legacy Landing remains an alpha.17 product; it
112
+ observed host configuration. Legacy Landing remains a pre-stable product; it
97
113
  is not a launch dependency for new Core projects.
98
114
 
99
115
  Report the project path, exact SDK version, local URL/HTTP result and checks,
@@ -10,8 +10,8 @@ metadata:
10
10
 
11
11
  # Mantle Plugin
12
12
 
13
- Mantle plugins are Core SDK capability packages. They are not starter overlays
14
- and they are not provider provisioning scripts.
13
+ Mantle plugins are Core SDK capability packages. They are not application
14
+ scaffolds (retired in ADR-0021) and they are not provider provisioning scripts.
15
15
 
16
16
  A plugin may contribute:
17
17
 
@@ -82,8 +82,8 @@ Suggested ledger paths:
82
82
  .mantle/plugins.lock.json
83
83
  ```
84
84
 
85
- Keep starter launch state separate from plugin state. `.mantle/features.json`
86
- is launch/starter context, not the Core plugin ledger.
85
+ Keep optional legacy launch files such as `.mantle/features.json` separate from
86
+ plugin state. They are not the Core plugin ledger.
87
87
 
88
88
  ## Update
89
89
 
@@ -114,7 +114,7 @@ Then verify the plugin's declared surfaces:
114
114
 
115
115
  ## Don't
116
116
 
117
- - Don't treat a starter archetype as a plugin.
117
+ - Don't treat an application template as a plugin.
118
118
  - Don't assume Cloudflare; inspect the active adapter and capability ports.
119
- - Don't create a second skill namespace for starter-specific plugins.
119
+ - Don't create a second skill namespace for host-specific plugins.
120
120
  - Don't commit secrets. Provider secrets stay in the platform secret store.
@@ -13,16 +13,22 @@ metadata:
13
13
 
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
- 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.
16
+ consumer-owned Cloudflare Workers. New direct-authored apps do not need Landing
17
+ artifacts (`.mantle/launch-state.json`, `.mantle/handoff.md`, or a hosted-auth
18
+ allocation). Treat any Landing handoff as **legacy/optional**. For a ChatGPT
19
+ Site, use the installed `docs/handbook/sites/index.md` integration guide and
20
+ the "Publish with Sites" steps in `docs/examples/host-chatgpt-sites/README.md`:
21
+ request D1 and R2 on the Site, set `PUBLIC_ORIGIN` and `OWNER_EMAIL` in Sites
22
+ settings, review the migration, then save and deploy a Sites version. Do not
23
+ run `wrangler deploy` or require R2 S3 credentials merely because Sites exposes
24
+ an R2 binding.
20
25
 
21
26
  ## Source of Truth
22
27
 
23
28
  1. Read the actual provider config (`wrangler.jsonc` or `wrangler.toml`),
24
29
  application entry and git remotes. Read legacy `.mantle/launch-state.json`
25
- and `.mantle/handoff.md` only when present; do not create them as prerequisites.
30
+ and `.mantle/handoff.md` only when present; they are optional leftovers from
31
+ Landing and must not be created as prerequisites for a new app.
26
32
  2. Read installed `@aotter/mantle*` versions from `package.json`.
27
33
  3. Use matching embedded docs under `node_modules/@aotter/mantle/docs/`.
28
34
  4. Never infer provider authority from launch state. Confirm the active GitHub
@@ -54,8 +60,9 @@ account, prefer an available connector, or use `pnpm exec wrangler login` with
54
60
  the user's agreement, then run `pnpm deploy`.
55
61
 
56
62
  Capture the live URL in `PUBLIC_ORIGIN` and `Public site:` in `AGENTS.md`, then
57
- commit and push non-secret changes. Reuse any repo or Worker already created
58
- by landing. Workers Builds is optional after a direct deploy.
63
+ commit and push non-secret changes. Reuse any repo or Worker already created.
64
+ Do not recreate Landing artifacts for a new direct-authored app. Workers Builds
65
+ is optional after a direct deploy.
59
66
 
60
67
  When the owner later adopts a custom domain, update `PUBLIC_ORIGIN` and the
61
68
  provider's OAuth callback together, then redeploy. Do not patch `site_config`
@@ -65,15 +72,17 @@ directly; boot syncs its canonical origin from `PUBLIC_ORIGIN`.
65
72
 
66
73
  - **Self-hosted email OTP:** use the application's production transactional-email sender. Replace `ConsoleEmailSender`; never deploy it.
67
74
  - **Self-hosted GitHub OAuth — free fallback:** use when the application has no email provider. Configure the owner's per-site GitHub OAuth App and Worker secrets using the steps below.
68
- - **Mantle hosted auth — paid:** use only when the landing handoff records a
69
- hosted allocation and client configuration. Mantle Platform operates the
70
- identity provider; do not ask the user for a per-site GitHub OAuth App.
75
+ - **Mantle hosted auth — paid, legacy/optional:** use only when a **legacy
76
+ Landing handoff** already records a hosted allocation and client
77
+ configuration. New direct-authored apps do not get this from Core. Mantle
78
+ Platform operates the identity provider; do not ask the user for a per-site
79
+ GitHub OAuth App.
71
80
 
72
81
  Configure only the selected mode. Core deliberately rejects partial or mixed
73
82
  hosted/self-managed bindings with `503 setup_incomplete`.
74
83
 
75
- Do not claim that hosted auth can attach to an arbitrary local repo unless the
76
- current Mantle landing flow explicitly supplies that handoff.
84
+ Do not claim that hosted auth can attach to an arbitrary local repo unless a
85
+ legacy Landing handoff already supplies that configuration.
77
86
 
78
87
  For the exact boundary, read
79
88
  `node_modules/@aotter/mantle/docs/auth-hosting-model.md`.
@@ -129,10 +138,13 @@ git push
129
138
  pnpm deploy
130
139
  ```
131
140
 
132
- ## Hosted Auth
141
+ ## Hosted Auth (legacy Landing)
133
142
 
134
- Follow the landing handoff and generated client configuration. Hosted
135
- configuration remains in landing-managed Cloudflare Worker bindings. Verify:
143
+ Skip this section unless a legacy Landing handoff is already present. New
144
+ direct-authored apps use self-hosted email OTP or GitHub OAuth above.
145
+
146
+ Follow that handoff and its client configuration. Hosted configuration remains
147
+ in landing-managed Cloudflare Worker bindings. Verify:
136
148
 
137
149
  - `MANTLE_AUTH_MODE = "hosted"`;
138
150
  - `MANTLE_HOSTED_AUTH_ISSUER` is the HTTPS root issuer;
@@ -17,9 +17,10 @@ skill remains the version-matched upgrade workflow, not a replacement CLI.
17
17
  1. Inspect git status, package.json, lockfile, actual project scripts and
18
18
  installed versions. Preserve unrelated local changes. Read plugin locks
19
19
  and legacy `.mantle` metadata if present; they are context, not required.
20
- 2. Select an explicit target release and read its migration notes, including
21
- `docs/migration-0.1.2.md` when leaving alpha.17. Do not resolve new Starter
22
- refs or compare the project to a baseline template.
20
+ 2. Select an explicit target release and read its entry in
21
+ `docs/handbook/releases/index.md` plus that version's GitHub release notes.
22
+ Do not resolve new Starter refs or compare the project to a baseline
23
+ template.
23
24
  3. Update only selected `@aotter/mantle*` dependencies to the same exact target
24
25
  version, preserving dependency sections. Use the package manager to update
25
26
  the lockfile; inspect the dependency diff and required peer changes.