@aotter/mantle 0.1.0-alpha.1 → 0.1.0-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aotter/mantle",
3
- "version": "0.1.0-alpha.1",
4
- "description": "Umbrella entry for @aotter/mantle. Adopters install this one package and import from subpaths: /spec, /runtime, /cloudflare, /admin-ui. Sub-packages remain individually installable on npm for tooling / alt-adapter authors. The Netlify adapter ships as a private workspace stub in v0.1 — its subpath will be added when the impl lands in v0.2.",
3
+ "version": "0.1.0-alpha.2",
4
+ "description": "Umbrella entry for @aotter/mantle. Adopters install this one package and import from subpaths: /spec, /runtime, /cloudflare, /admin-ui. Sub-packages remain individually installable on npm for tooling and adapter authors.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://mantle.tools/",
7
7
  "repository": {
@@ -55,15 +55,15 @@
55
55
  "README.md"
56
56
  ],
57
57
  "dependencies": {
58
- "@aotter/mantle-admin-ui": "0.1.0-alpha.1",
59
- "@aotter/mantle-cloudflare": "0.1.0-alpha.1",
60
- "@aotter/mantle-spec": "0.1.0-alpha.1",
61
- "@aotter/mantle-runtime": "0.1.0-alpha.1"
58
+ "@aotter/mantle-cloudflare": "0.1.0-alpha.2",
59
+ "@aotter/mantle-admin-ui": "0.1.0-alpha.2",
60
+ "@aotter/mantle-runtime": "0.1.0-alpha.2",
61
+ "@aotter/mantle-spec": "0.1.0-alpha.2"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@cloudflare/workers-oauth-provider": "^0.8.2",
65
65
  "aws4fetch": "^1.0.20",
66
- "better-auth": "^1.6.24",
66
+ "better-auth": "^1.6.27",
67
67
  "hono": "^4.12.0",
68
68
  "zod": "^4.0.0"
69
69
  },
@@ -71,7 +71,7 @@
71
71
  "@cloudflare/workers-oauth-provider": "^0.8.2",
72
72
  "@types/node": "^26",
73
73
  "aws4fetch": "^1.0.20",
74
- "better-auth": "^1.6.24",
74
+ "better-auth": "^1.6.27",
75
75
  "hono": "^4.12.34",
76
76
  "typescript": "^6.0.3",
77
77
  "vitest": "^4.1.10",
@@ -16,7 +16,7 @@ docs govern runtime/API behavior.
16
16
  ## First Read
17
17
 
18
18
  1. `package.json` for the installed `@aotter/mantle*` versions.
19
- 2. `manifests/`, the active adapter config, and `src/auth.ts` when present. If the project is older, check `src/mantleConfig.ts`.
19
+ 2. `manifests/site.yaml`, the active adapter config, and `src/auth.ts` when present. If the project is older, check `src/mantleConfig.ts`.
20
20
  3. The active `.mantle/overlays/<type>/seed.json`, when present; generated
21
21
  homepages commonly import visible copy and form structure from it.
22
22
  4. Optional local context: `.mantle/launch-state.json`, `.mantle/handoff.md`,
@@ -82,9 +82,12 @@ the atoms cannot express the behavior.
82
82
  `Procedure.spec.input` before the seed/form. Keep public mutation inputs
83
83
  `additionalProperties: false`; otherwise JSON Schema's default may strip an
84
84
  undeclared field while returning success.
85
- - Use `lifecycle: none` for submissions, inquiries, orders, and other
85
+ - Use `lifecycle: operational` for submissions, inquiries, orders, and other
86
86
  Procedure-created operational records that staff inspect or correct. Reserve
87
- `simple` for content a person stages and publishes.
87
+ `publishing` for content a person stages and publishes.
88
+ - Lifecycle `before_update` / `after_update` hooks also fire for unpublish,
89
+ archive, and every other status transition whose target is not `published`;
90
+ do not use them for edit-only work.
88
91
  - When a form's fixed option values change, update the stored Schema and public
89
92
  Procedure input `enum` together. Keep translated labels in the page seed;
90
93
  Admin and Staff MCP derive their typed controls from the manifest values.
@@ -98,10 +101,15 @@ the atoms cannot express the behavior.
98
101
 
99
102
  - `data.locale` is reserved for `localized: true` Schemas. A non-localized
100
103
  Schema must use a domain field such as `replyLocale`.
104
+ - Use a standalone localized Schema only for independent locale rows. For
105
+ versions of one entity, use a non-localized parent plus a localized child
106
+ with `translates: { parent, on }`. The child must own at least one field
107
+ besides `locale` and the join field.
101
108
  - Parallel locale blocks must keep field names, option values, step IDs, and
102
109
  result keys identical; translate display strings only.
103
- - `siteDefaults.locales` is code-owned and boot-synced. Brand, title,
104
- description, and origin are seeded once, then changed through site settings.
110
+ - `siteDefaults.origin` and `siteDefaults.locales` are code-owned and
111
+ boot-synced. Brand, title, and description seed once, then change through
112
+ site settings.
105
113
  - When changing an existing collection from `[slug]` to `[slug, locale]`,
106
114
  boot with a Mantle version that reconciles obsolete unique indexes and test
107
115
  the same slug in two locales. Do not patch D1 manually.
@@ -203,7 +211,8 @@ cache.
203
211
 
204
212
  ## Rules
205
213
 
206
- - Prefer manifest YAML for content model changes.
214
+ - Put all content model changes in `manifests/site.yaml`; other manifest
215
+ filenames are rejected.
207
216
  - Use a generated overlay `seed.json` for the auth-free local first page when
208
217
  it is already imported by `src/web/content/*`.
209
218
  - Add TypeScript only for handlers, rendering, adapter wiring, or real behavior.
@@ -49,7 +49,7 @@ stop and ask for the recipe instead of guessing.
49
49
  ## First Read
50
50
 
51
51
  1. `package.json` for Mantle version and adapter package.
52
- 2. `manifests/` for current atom names and route/tool collisions.
52
+ 2. `manifests/site.yaml` for current atom names and route/tool collisions.
53
53
  3. `src/mantle/config.ts` and `src/mantle/handlers/` for registered handlers, templates, and optional ports. Older projects may use `src/mantleConfig.ts`.
54
54
  4. `.mantle/plugins.json` and `.mantle/plugins.lock.json` if present.
55
55
  5. `.mantle/launch-state.json` only as context, not as plugin authority.
@@ -50,6 +50,10 @@ Capture the live URL in `PUBLIC_ORIGIN` and `Public site:` in `AGENTS.md`, then
50
50
  commit and push non-secret changes. Reuse any repo or Worker already created
51
51
  by landing. Workers Builds is optional after a direct deploy.
52
52
 
53
+ When the owner later adopts a custom domain, update `PUBLIC_ORIGIN` and the
54
+ provider's OAuth callback together, then redeploy. Do not patch `site_config`
55
+ directly; boot syncs its canonical origin from `PUBLIC_ORIGIN`.
56
+
53
57
  ## Choose Auth
54
58
 
55
59
  - **Self-hosted — free:** configure the owner's per-site GitHub OAuth App and
@@ -18,7 +18,7 @@ tokens, or recipes, but the skill contract is Core-owned.
18
18
  2. `styles/`, `components/`, `src/web/`, `src/theme*`, and UI-library config
19
19
  if present.
20
20
  3. A vendored UI palette's manifest and license, if present.
21
- 4. `manifests/` to understand which content shape drives the public UI.
21
+ 4. `manifests/site.yaml` to understand which content shape drives the public UI.
22
22
 
23
23
  ## Ownership
24
24