@aotter/mantle 0.2.0-alpha.8 → 0.2.0
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 +26 -3
- package/dist/auth/adapter.js +10 -34
- package/dist/auth/admin.js +2 -5
- package/dist/auth/caller.js +0 -27
- package/dist/auth/consent.js +100 -0
- package/dist/auth/hardening.js +0 -7
- package/dist/auth/identity.js +0 -11
- package/dist/auth/oauth.js +0 -32
- package/dist/auth/resource-seeds.js +0 -2
- package/dist/auth/route-http.js +33 -0
- package/dist/auth/routes.js +8 -153
- package/dist/build/compiler.d.ts +19 -609
- package/dist/build/compiler.js +3 -6896
- package/dist/build/spec/domain/model/SqlIr.d.ts +2 -0
- package/dist/build/spec/domain/model/UserFields.d.ts +1 -0
- package/dist/bun/assets.js +0 -2
- package/dist/domain/adminOrder.js +0 -2
- package/dist/domain/columns.js +7 -20
- package/dist/domain/describe/chunk-SGMRVDGE.js +1 -0
- package/dist/domain/describe/index.js +1 -115
- package/dist/domain/describe/target-hash.js +1 -12
- package/dist/domain/entry.js +0 -14
- package/dist/domain/generated-tools.js +0 -1
- package/dist/domain/input.js +0 -2
- package/dist/domain/paging.js +0 -17
- package/dist/domain/recipes.js +10 -7
- package/dist/domain/userReferences.js +0 -1
- package/dist/domain/wireScalars.js +0 -6
- package/dist/infrastructure/adminEntries.js +10 -7
- package/dist/infrastructure/adminPaging.js +55 -57
- package/dist/infrastructure/artifacts.js +0 -4
- package/dist/infrastructure/authSchema.js +0 -9
- package/dist/infrastructure/bundle.js +17 -32
- package/dist/infrastructure/cli.js +25 -11
- package/dist/infrastructure/generate.js +18 -17
- package/dist/infrastructure/generateAuth.js +48 -5
- package/dist/infrastructure/help.js +55 -0
- package/dist/infrastructure/init.js +50 -0
- package/dist/infrastructure/inputs.js +0 -9
- package/dist/infrastructure/mounts.js +22 -0
- package/dist/infrastructure/wrangler.js +18 -9
- package/dist/kernel/authorization.js +0 -1
- package/dist/kernel/binds.d.ts +16 -7
- package/dist/kernel/binds.js +4 -10
- package/dist/kernel/caller-identity.d.ts +0 -3
- package/dist/kernel/caller-identity.js +0 -15
- package/dist/kernel/caller-mode.d.ts +4 -0
- package/dist/kernel/caller-mode.js +14 -0
- package/dist/kernel/contracts.d.ts +7 -11
- package/dist/kernel/contracts.js +8 -44
- package/dist/kernel/cron.js +0 -4
- package/dist/kernel/dialect/common.d.ts +0 -1
- package/dist/kernel/dialect/common.js +0 -3
- package/dist/kernel/dialect/postgres.js +0 -2
- package/dist/kernel/dialect/sqlite.js +1 -6
- package/dist/kernel/drain.js +2 -8
- package/dist/kernel/driver/bun-sqlite.js +0 -4
- package/dist/kernel/driver/d1.js +0 -1
- package/dist/kernel/driver/postgres.js +3 -17
- package/dist/kernel/driver/transaction-context.js +0 -1
- package/dist/kernel/email.js +0 -4
- package/dist/kernel/host-access.js +2 -3
- package/dist/kernel/host-caller.d.ts +1 -1
- package/dist/kernel/host-caller.js +3 -6
- package/dist/kernel/json-body.js +0 -2
- package/dist/kernel/mcp-apps.js +1 -6
- package/dist/kernel/mcp-call.js +0 -1
- package/dist/kernel/mcp-handler.js +3 -27
- package/dist/kernel/mcp.d.ts +5 -1
- package/dist/kernel/mcp.js +2 -6
- package/dist/kernel/media.js +0 -18
- package/dist/kernel/paging.js +1 -9
- package/dist/kernel/publishing.js +3 -4
- package/dist/kernel/r2-media.js +0 -7
- package/dist/kernel/rest-dispatch.js +0 -1
- package/dist/kernel/rest-router.js +2 -3
- package/dist/kernel/rest.js +0 -3
- package/dist/kernel/scalars.js +4 -11
- package/dist/kernel/search.js +0 -1
- package/dist/kernel/site.js +0 -2
- package/dist/kernel/store.d.ts +11 -1
- package/dist/kernel/store.js +21 -34
- package/dist/kernel/surface-failure.d.ts +10 -0
- package/dist/kernel/surface-failure.js +29 -0
- package/dist/kernel/surface.js +0 -3
- package/dist/kernel/sweep.js +0 -1
- package/dist/kernel/translations.js +0 -1
- package/dist/kernel/user-caller.js +2 -8
- package/dist/kernel/user-fields.d.ts +3 -2
- package/dist/kernel/user-fields.js +9 -9
- package/dist/kernel/validation.js +0 -8
- package/dist/kernel/web-gateway.js +0 -2
- package/dist/kernel/web-head.js +0 -1
- package/dist/kernel/web-index.js +39 -0
- package/dist/kernel/web-response.js +0 -1
- package/dist/kernel/web-serve.js +97 -0
- package/dist/kernel/web.d.ts +1 -1
- package/dist/kernel/web.js +10 -125
- package/dist/kernel/where.js +0 -6
- package/dist/usecase/adminBindings.js +30 -21
- package/dist/usecase/adminClient.js +0 -21
- package/dist/usecase/adminDescriptors.js +2 -9
- package/dist/usecase/generate.js +7 -12
- package/dist/usecase/handlers.js +0 -3
- package/dist/usecase/mcp-media.js +0 -1
- package/dist/usecase/mcp.js +0 -4
- package/dist/usecase/paging.js +1 -3
- package/dist/usecase/publishing.js +1 -5
- package/dist/usecase/rest.js +0 -1
- package/dist/usecase/site.js +0 -2
- package/dist/usecase/stores.js +4 -14
- package/dist/usecase/tool-version.js +0 -3
- package/dist/usecase/translations.js +0 -2
- package/dist/usecase/validation.js +8 -20
- package/docs/examples/README.md +13 -5
- package/docs/examples/app-shell/README.md +43 -8
- package/docs/examples/app-shell/accept.mjs +91 -0
- package/docs/examples/app-shell/gitignore +7 -0
- package/docs/examples/app-shell/package.json +7 -6
- package/docs/examples/app-shell/smoke-kit.mjs +29 -15
- package/docs/examples/app-shell/src/auth.ts +3 -2
- package/docs/examples/app-shell/src/routes.ts +6 -3
- package/docs/examples/app-shell/src/service.ts +4 -3
- package/docs/examples/club-events/README.md +7 -2
- package/docs/examples/club-events/manifests/club-events.yaml +22 -0
- package/docs/examples/club-events/smoke.mjs +7 -1
- package/docs/examples/club-events/src/handlers.ts +1 -1
- package/docs/examples/purchasing/README.md +12 -3
- package/docs/examples/purchasing/manifests/purchasing.yaml +36 -3
- package/docs/examples/purchasing/smoke.mjs +14 -0
- package/docs/examples/purchasing/src/handlers.ts +1 -1
- package/docs/examples/recipes/README.md +5 -3
- package/docs/handbook/cloudflare/authentication.md +21 -4
- package/docs/handbook/cloudflare/chatgpt-sites.md +4 -2
- package/docs/handbook/cloudflare/deploy-and-operate.md +24 -1
- package/docs/handbook/cloudflare/media-r2.md +2 -3
- package/docs/handbook/cloudflare/service-entry.md +17 -4
- package/docs/handbook/concepts/runtime-and-adapters.md +1 -1
- package/docs/handbook/examples/hub.md +1 -1
- package/docs/handbook/guides/agent-setup.md +15 -10
- package/docs/handbook/guides/agent-workflow-acceptance.md +232 -0
- package/docs/handbook/guides/local-testing.md +40 -0
- package/docs/handbook/guides/mcp-apps.md +78 -1
- package/docs/handbook/guides/native-admin.md +29 -6
- package/docs/handbook/guides/native-execution.md +5 -4
- package/docs/handbook/guides/oauth.md +58 -0
- package/docs/handbook/guides/public-pages.md +44 -4
- package/docs/handbook/guides/sql-patterns.md +266 -0
- package/docs/handbook/guides/typed-queries.md +173 -0
- package/docs/handbook/navigation.json +16 -0
- package/docs/handbook/reference/admin-descriptors.md +4 -1
- package/docs/handbook/reference/authorization.md +1 -1
- package/docs/handbook/reference/diagnostics.md +6 -1
- package/docs/handbook/reference/procedure.md +5 -5
- package/docs/handbook/reference/schema.md +10 -4
- package/docs/handbook/reference/sql.md +64 -0
- package/docs/handbook/reference/surface.md +11 -4
- package/docs/handbook/reference/trigger.md +9 -0
- package/docs/handbook/reference/view.md +11 -3
- package/docs/handbook/releases/index.md +27 -6
- package/docs/handbook/start/agents.md +45 -0
- package/docs/handbook/start/project-and-cli.md +15 -1
- package/docs/handbook/start/quickstart-worker.md +1 -1
- package/docs/skills/develop/SKILL.md +44 -16
- package/docs/skills/integrate/SKILL.md +4 -9
- package/docs/skills/provision/SKILL.md +15 -12
- package/docs/skills/update/SKILL.md +21 -18
- package/package.json +24 -4
- package/skills/README.md +1 -1
- package/skills/mantle/SKILL.md +48 -107
- package/dist/domain/describe/chunk-ZVXBGP7Y.js +0 -424
- package/docs/skills/develop/mcp-app.md +0 -39
- package/skills/.keep +0 -0
- package/skills/mantle/references/local-testing.md +0 -15
- package/skills/mantle/references/web.md +0 -41
- package/skills/mantle/references/website.md +0 -49
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aotter/mantle",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"engines": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@modelcontextprotocol/client": "2.
|
|
95
|
+
"@modelcontextprotocol/client": "2.2.0",
|
|
96
96
|
"@modelcontextprotocol/server": "2.2.0",
|
|
97
97
|
"@better-auth/core": "1.7.7",
|
|
98
98
|
"@better-auth/oauth-provider": "1.7.7",
|
|
@@ -106,7 +106,24 @@
|
|
|
106
106
|
"wrangler": "4.145.0",
|
|
107
107
|
"vitest": "^5.0.1"
|
|
108
108
|
},
|
|
109
|
-
"description": "
|
|
109
|
+
"description": "Agent-native app SDK and backend compiler: YAML manifests to native SQL (SQLite, Cloudflare D1, PostgreSQL) and typed TypeScript; optional REST and MCP.",
|
|
110
|
+
"keywords": [
|
|
111
|
+
"mantle",
|
|
112
|
+
"agent-native",
|
|
113
|
+
"sdk",
|
|
114
|
+
"backend",
|
|
115
|
+
"yaml",
|
|
116
|
+
"code-generation",
|
|
117
|
+
"sql",
|
|
118
|
+
"sqlite",
|
|
119
|
+
"postgresql",
|
|
120
|
+
"cloudflare-d1",
|
|
121
|
+
"cloudflare-workers",
|
|
122
|
+
"bun",
|
|
123
|
+
"typescript",
|
|
124
|
+
"mcp",
|
|
125
|
+
"model-context-protocol"
|
|
126
|
+
],
|
|
110
127
|
"license": "Apache-2.0",
|
|
111
128
|
"homepage": "https://mantle.tools/",
|
|
112
129
|
"repository": {
|
|
@@ -114,13 +131,16 @@
|
|
|
114
131
|
"url": "git+https://github.com/aotter/mantle.git",
|
|
115
132
|
"directory": "packages/mantle"
|
|
116
133
|
},
|
|
134
|
+
"bugs": {
|
|
135
|
+
"url": "https://github.com/aotter/mantle/issues"
|
|
136
|
+
},
|
|
117
137
|
"publishConfig": {
|
|
118
138
|
"access": "public",
|
|
119
139
|
"tag": "alpha",
|
|
120
140
|
"registry": "https://registry.npmjs.org"
|
|
121
141
|
},
|
|
122
142
|
"scripts": {
|
|
123
|
-
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.lib.json && node scripts/bundle-compiler.mjs && node scripts/prune-declarations.mjs",
|
|
143
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.lib.json && node ../../scripts/strip-comments.mjs tsconfig.lib.json && node scripts/bundle-compiler.mjs && node scripts/prune-declarations.mjs",
|
|
124
144
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
125
145
|
"test": "bun test tests/*.test.ts && bun run test:compiler",
|
|
126
146
|
"generate": "bun src/infrastructure/cli.ts",
|
package/skills/README.md
CHANGED
|
@@ -27,7 +27,7 @@ release tag as the application's SDK; alpha releases on `develop` can be newer
|
|
|
27
27
|
than the default `main` branch. For a skill-only installation:
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
npx skills add https://github.com/aotter/mantle/tree/v0.2.0
|
|
30
|
+
npx skills add https://github.com/aotter/mantle/tree/v0.2.0 --skill mantle
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
The explicit skill name excludes repository maintainer skills. The manifests
|
package/skills/mantle/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mantle
|
|
3
|
-
description: Create or
|
|
3
|
+
description: Create, continue, test or deploy a Mantle application using installed @aotter/mantle docs, including manifests, SQL Views and Procedures, MCP tools, app-built Admin, mantle generate and Mantle upgrades.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
6
|
sourcePath: skills/mantle/SKILL.md
|
|
@@ -17,119 +17,60 @@ authority: `node_modules/@aotter/mantle/README.md` and
|
|
|
17
17
|
`node_modules/@aotter/mantle/docs/`. Prefer them over this file, the SDK
|
|
18
18
|
checkout, or any online copy.
|
|
19
19
|
|
|
20
|
+
## Start with `mantle help`
|
|
21
|
+
|
|
22
|
+
Run `mantle help` first (in a project: `npx mantle help`; before one exists:
|
|
23
|
+
`npx @aotter/mantle@<exact version> help`). It prints the installed version's
|
|
24
|
+
entry page and every topic; `mantle help <topic>` prints one page with the next
|
|
25
|
+
and linked topics as commands. Follow it rather than browsing the SDK checkout
|
|
26
|
+
or an online copy.
|
|
27
|
+
|
|
20
28
|
## Find the project and its version
|
|
21
29
|
|
|
22
30
|
Work in the user's application, outside the SDK checkout. Read package.json, the lockfile, installed SDK README and node_modules/@aotter/mantle/docs/. Those files define the exact version's contract. Preserve existing identity, handles, routes and resources.
|
|
31
|
+
For existing older applications, use their installed docs until the user requests an upgrade; if an older version
|
|
32
|
+
lacks a guide named here, record the missing guidance and keep that version's contract.
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
For a new Cloudflare app, copy `node_modules/@aotter/mantle/docs/examples/app-shell/` first, then the closest example from `docs/examples/README.md` on top of it, and edit from there: manifests, `src/handlers.ts`, `src/routes.ts`, `src/schedule.ts`, `smoke.mjs`. Search for `AGENT:` to find what the app must fill in; the example pages are unstyled on purpose, so styling them is part of that work. Before reporting done, resolve each `AGENT:` or name the ones you left. Keep the two roles `admin` and `user` unless the user asks for more.
|
|
27
|
-
|
|
28
|
-
For existing older applications, use their installed docs until the user requests an upgrade. For partial adoption read node_modules/@aotter/mantle/docs/skills/integrate/SKILL.md.
|
|
29
|
-
|
|
30
|
-
## Generated native applications
|
|
31
|
-
|
|
32
|
-
Follow the installed (or workspace-linked) package README for generation, Workers
|
|
33
|
-
builds and D1 Sessions; the app owns its entry and routing. Read that
|
|
34
|
-
version's `docs/handbook/reference/features.md` before choosing declarations. Keep auth behind
|
|
35
|
-
`authLoader(() => import(...))` to pass the startup guard. Install only the exact
|
|
36
|
-
released version shown by the installed/target package
|
|
37
|
-
contract. Replacing Core needs explicit app wiring and reviewed deployment
|
|
38
|
-
migrations; never use initial schema.sql as an in-place production upgrade.
|
|
39
|
-
Pass outgoing `responseHeaders` to `resolveCaller` so Better Auth's session cookie
|
|
40
|
-
can slide. Native auth adapters use joins by default; keep the joined primary
|
|
41
|
-
session/user check, including before any refresh from secondary storage.
|
|
42
|
-
Only positively classified View/web reads may pass `readOnly: true`, with official
|
|
43
|
-
cookieCache `{enabled:true,maxAge:60,refreshCache:false,version:"read-60-v1"}` and
|
|
44
|
-
no KV. Bump version when enabling/changing the policy; writes, Admin, consent,
|
|
45
|
-
unknown/ref/media calls stay fresh. Read the installed auth docs before MCP caching.
|
|
46
|
-
|
|
47
|
-
Use the workflow **generate → typecheck → implement listed handlers**. For example:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
pnpm exec mantle generate cloudflare-d1 generated manifests/*.yaml
|
|
51
|
-
pnpm exec tsc --noEmit
|
|
52
|
-
pnpm exec mantle generate cloudflare-d1 generated manifests/*.yaml --check
|
|
53
|
-
```
|
|
54
|
-
Implement every printed `Handlers` key
|
|
55
|
-
and pass the implementations at `store(db, caller, { handlers })` (and selected
|
|
56
|
-
surface options). Run `tsc --noEmit` again before local acceptance.
|
|
57
|
-
Generated Store metadata initializes on its first use, once per module. Bind
|
|
58
|
-
`store(db, caller, options?)` for the current request; never reuse one caller's
|
|
59
|
-
bound Store for another caller.
|
|
60
|
-
|
|
61
|
-
Use `paged/views/<encoded-name>.ts` for bounded cursor walks, including internal
|
|
62
|
-
Views that satisfy the installed package's generation-time paging proofs.
|
|
63
|
-
Call its default export with `(db, caller, input, { limit?, cursor? })`; it returns
|
|
64
|
-
`{ rows, nextCursor? }`. Internal paging creates no public route/tool. Keep bare
|
|
65
|
-
Views for authored-query row arrays, and inspect native EXPLAIN/source indexes
|
|
66
|
-
when grouping: cursor paging does not eliminate aggregation work.
|
|
67
|
-
Bare Views, Store and SQL Procedure results keep driver-native scalar values.
|
|
68
|
-
Selected REST/MCP/Admin boundaries return target-identical `WireRow` types:
|
|
69
|
-
declared integers become safe numbers or exact decimal strings, SQLite/D1
|
|
70
|
-
JSON/booleans become JSON values/booleans, and compiler-declared decimals become
|
|
71
|
-
strings. Selected SQL reads integer text before driver rounding; it cannot repair
|
|
72
|
-
already-rounded writes. Use exported `WireRow` for clients and `Row` for bare
|
|
73
|
-
queries. Computed/ref results remain app-owned.
|
|
74
|
-
|
|
75
|
-
Commit everything `mantle generate` writes, including generated TypeScript, SQL and
|
|
76
|
-
Wrangler edits; keep bundle `dist/` untracked. Never hand-edit generated files.
|
|
77
|
-
Resolve conflicts by merging manifests/options and regenerating. Add the printed
|
|
78
|
-
`.gitattributes` line and run the same generate command with `--check` in CI.
|
|
79
|
-
Compose the app-owned `fetch` using `docs/handbook/cloudflare/service-entry.md`: auth/consent, Admin,
|
|
80
|
-
MCP, REST behind one request-local origin-checked resolver; keep heavy auth dynamic.
|
|
81
|
-
|
|
82
|
-
For selected native Admin, follow the version-matched
|
|
83
|
-
`docs/handbook/guides/native-admin.md`: select `--admin` (or `admin: true`),
|
|
84
|
-
mount `entries(bindings.schemas, bindings.adapter)` and serve the Admin assets
|
|
85
|
-
separately. The three-package preview is one Core SDK, the Admin product and the
|
|
86
|
-
shared UI kit.
|
|
87
|
-
Admin reads share generated whitelisted native View templates, writes use native
|
|
88
|
-
Procedure fragments and generated checks. Ref operations retain typed `ctx.store`
|
|
89
|
-
at request time. Verify member/frontend and admin/Admin OTP, tenant/privacy/TTL,
|
|
90
|
-
publishing, paging, statistics, exact OCC, ref effects and the actual console;
|
|
91
|
-
never retry unknown 503 writes automatically. Read the installed Admin README
|
|
92
|
-
for raw-body limits, CSP/assets, 22 languages and the developer workspace.
|
|
93
|
-
Use only versions actually published, or the explicitly linked workspace packages.
|
|
94
|
-
|
|
95
|
-
For generated native applications, optional site settings/media are selected
|
|
96
|
-
with `--site <module>` exporting `siteDefaults`. Apply the emitted deployment DDL;
|
|
97
|
-
wire application-owned object storage as documented in `docs/handbook/cloudflare/media-r2.md`.
|
|
98
|
-
|
|
99
|
-
For a generated public website, follow [web mounting and acceptance](references/web.md).
|
|
100
|
-
The app renders HTML and inserts `site.head()`; generated `web.ts` serves the
|
|
101
|
-
indexes and Markdown alternates.
|
|
102
|
-
|
|
103
|
-
## Complete websites
|
|
104
|
-
|
|
105
|
-
For a requested complete website, apply [website defaults](references/website.md)
|
|
106
|
-
without asking the user to enumerate OTP, media, Admin or SEO. Defaults are
|
|
107
|
-
acceptance requirements, not evidence that a missing renderer is implemented.
|
|
108
|
-
Do not report a complete website with blocked required checks.
|
|
109
|
-
|
|
110
|
-
Run the [local HTTP acceptance](references/local-testing.md) for handlers and selected interfaces; compilation does not execute their behavior. Account for every declared interface as verified, intentionally not exposed, or deferred/unverified with a reason in the existing application handoff. An early preview may defer remote MCP; preserve that pending work. WebMCP, cookie-session discovery and OAuth Bearer/client integration are separate checks.
|
|
111
|
-
|
|
112
|
-
## Self-hosted deployment
|
|
113
|
-
|
|
114
|
-
Deploy only when the user requests it. Follow the application's selected host
|
|
115
|
-
and the installed `docs/skills/provision/SKILL.md`; use the platform's native
|
|
116
|
-
workflow. Local project creation alone is not deployment authorization.
|
|
34
|
+
## Choose the installed package skill
|
|
117
35
|
|
|
118
|
-
|
|
36
|
+
- Read `node_modules/@aotter/mantle/docs/skills/develop/SKILL.md` to change an existing project's manifests, SQL, handlers, service entry or surfaces.
|
|
37
|
+
- Read `node_modules/@aotter/mantle/docs/skills/integrate/SKILL.md` to add Mantle to an application with existing code, users or data.
|
|
38
|
+
- Read `node_modules/@aotter/mantle/docs/skills/update/SKILL.md` to upgrade Mantle, including from 0.1.x.
|
|
39
|
+
- Read `node_modules/@aotter/mantle/docs/skills/provision/SKILL.md` only for an authorized production deployment.
|
|
40
|
+
- Read `node_modules/@aotter/mantle/docs/skills/media-gc/SKILL.md` only to audit or remove stale uncommitted media uploads.
|
|
41
|
+
|
|
42
|
+
## New application
|
|
43
|
+
|
|
44
|
+
Node must be 22.22 or newer. Stable 0.2.0 is available as `@aotter/mantle@0.2.0`; pin selected Mantle packages to that exact version. Create it with `npx @aotter/mantle@<exact version> init <directory>`, then follow
|
|
45
|
+
`mantle help` ("Build from a product brief") and the app's `README.md`. Without the user listing them, a complete app
|
|
46
|
+
includes:
|
|
119
47
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
48
|
+
- Email OTP sign-in, the two roles `admin` and `user`, Admin for `admin`, MCP for both roles (`/mcp`, `/mcp/admin`)
|
|
49
|
+
and REST: the shell already wires them; keep them.
|
|
50
|
+
- Real business rules in SQL Procedures (`mantle help sql-patterns`), not in handler code around separate writes.
|
|
51
|
+
- For visitor pages, everything in `mantle help public-pages` (SEO, AEO, sitemap, robots, `llms.txt`), styled.
|
|
52
|
+
- Local HTTP checks (`mantle help local-testing`), then independent acceptance with `pnpm accept`
|
|
53
|
+
(`mantle help agent-workflow-acceptance`).
|
|
126
54
|
|
|
127
|
-
|
|
128
|
-
|
|
55
|
+
Take patterns from `mantle help examples` into the app's own manifests and `src/`; do not copy an example directory
|
|
56
|
+
over the app. Resolve each `AGENT:` or name the ones you left. Generation only, inside an app you already have: skip
|
|
57
|
+
`init` and use `mantle generate` (`mantle help project-and-cli`).
|
|
129
58
|
|
|
130
|
-
|
|
131
|
-
|
|
59
|
+
## Accept before reporting done
|
|
60
|
+
|
|
61
|
+
Before reporting any new app or feature as done, follow `mantle help agent-workflow-acceptance`: a private rubric,
|
|
62
|
+
then one fresh agent per role given only its role and the URLs `pnpm accept` prints, at most three rounds. If it was
|
|
63
|
+
not run, report the work as UNVERIFIED rather than done; if it could not run, BLOCKED.
|
|
64
|
+
|
|
65
|
+
## Deployment
|
|
66
|
+
|
|
67
|
+
Deploy only when the user requests it, following the installed `docs/skills/provision/SKILL.md` and the selected
|
|
68
|
+
host's native workflow. Local project creation alone is not deployment authorization.
|
|
69
|
+
|
|
70
|
+
## Existing project and handoff
|
|
132
71
|
|
|
133
|
-
|
|
72
|
+
Preserve the user's manifests, `src/` files, identity, package versions and provider resources. Run the project's
|
|
73
|
+
generate command with `--check` and its own tests before and after a change.
|
|
134
74
|
|
|
135
|
-
|
|
75
|
+
Report the project path, the exact Mantle version, what you changed, the checks you ran with their results, the
|
|
76
|
+
independent acceptance verdict (CONVERGED / BLOCKED / UNVERIFIED), and anything left for the user.
|