@odla-ai/chapter 0.24.0 → 0.25.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 +40 -29
- package/dist/{copy-context-Dp5hvj5W.d.ts → copy-context-DI21CYQ3.d.ts} +3 -4
- package/dist/index.cjs +51 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -24
- package/dist/index.d.ts +50 -24
- package/dist/index.js +51 -14
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +2 -2
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/member/index.d.ts +2 -2
- package/dist/worker/index.cjs +211 -22
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +3 -4
- package/dist/worker/index.d.ts +3 -4
- package/dist/worker/index.js +211 -22
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
- package/runbooks/adopt-existing.md +38 -9
- package/runbooks/greenfield.md +31 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/chapter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "A leader/follower foundation for branded membership sites: shared CRM, admin, auth, payments, booking, and explicit record delivery from one defineChapter config.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://odla.ai/docs/packages/chapter",
|
|
@@ -112,15 +112,26 @@ Allowed states: `not-started`, `canary`, `parallel`, `verified`,
|
|
|
112
112
|
Install the version-matched agent guidance and inspect the automation boundary:
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
npm install \
|
|
116
|
+
@odla-ai/chapter @odla-ai/brand @odla-ai/ui \
|
|
117
|
+
@odla-ai/crm @odla-ai/db \
|
|
118
|
+
@odla-ai/calendar @odla-ai/email \
|
|
119
|
+
@odla-ai/auth-clerk @odla-ai/o11y \
|
|
120
|
+
jose preact
|
|
121
|
+
npm install --save-dev \
|
|
122
|
+
@odla-ai/cli @odla-ai/security \
|
|
123
|
+
@cloudflare/workers-types \
|
|
124
|
+
typescript vite vitest wrangler
|
|
125
|
+
npx odla-ai setup
|
|
126
|
+
npm ls @odla-ai/chapter @odla-ai/crm @odla-ai/ui @odla-ai/cli
|
|
127
|
+
npx odla-ai capabilities --json
|
|
117
128
|
```
|
|
118
129
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
Use normal dependency declarations while ODLA is under active development.
|
|
131
|
+
Review and commit `package.json` plus `package-lock.json`, use `npm ci` after
|
|
132
|
+
the intentional dependency update, record resolved versions in PM, and rerun
|
|
133
|
+
the frozen acceptance and Chapter conformance suites. Do not use
|
|
134
|
+
`--legacy-peer-deps` or preserve an incompatible peer.
|
|
124
135
|
|
|
125
136
|
Write `src/chapter.config.mjs` from the inventory. Make every behavior decision
|
|
126
137
|
explicit:
|
|
@@ -163,8 +174,10 @@ At minimum audit:
|
|
|
163
174
|
- stock `JoinIsland` generates a fresh `submissionId` on each invocation, so an
|
|
164
175
|
ambiguous retry after a lost response is not idempotent even though a
|
|
165
176
|
concurrent click is disabled;
|
|
166
|
-
- `profileFields` now defaults to `[]`; enumerate
|
|
167
|
-
|
|
177
|
+
- `profileFields` now defaults to `[]`; enumerate the small account/admin
|
|
178
|
+
signals that may be mirrored into backend-only Clerk private metadata rather
|
|
179
|
+
than relying on implicit projection. Keep the application row and CRM
|
|
180
|
+
canonical;
|
|
168
181
|
- application-to-CRM projection fields;
|
|
169
182
|
- `requireDisclaimerAck` now defaults to `true`; set `false` explicitly only
|
|
170
183
|
when the existing product has no consent control, and preserve
|
|
@@ -437,6 +450,22 @@ Do not substitute `secrets set-clerk-key`; it writes the platform-reserved
|
|
|
437
450
|
command does not validate Clerk instance prefixes: independently confirm dev
|
|
438
451
|
uses `sk_test_`. Never put `sk_live_` in dev.
|
|
439
452
|
|
|
453
|
+
Chapter now reserves `public_metadata` for the small authorization role and
|
|
454
|
+
stores its `applicationId`/allowlisted profile snapshot in backend-only
|
|
455
|
+
`private_metadata`. After deploying the schema update, run the authenticated
|
|
456
|
+
admin repair endpoint in bounded batches:
|
|
457
|
+
|
|
458
|
+
```text
|
|
459
|
+
POST /api/admin/clerk/private-profiles/sync?offset=0&limit=50
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Continue with each returned `nextOffset` until it is `null`. Prove that the
|
|
463
|
+
public `role` and unrelated host metadata survive, the former public
|
|
464
|
+
`applicationId`/`profile` keys are absent, the private snapshot matches the
|
|
465
|
+
latest application, and `clerkPrivateMetadataSyncedAt` plus `clerkUserId` are
|
|
466
|
+
recorded locally. The application row and CRM remain canonical; this is an
|
|
467
|
+
account/admin signal mirror, not a third editable profile database.
|
|
468
|
+
|
|
440
469
|
### Stripe
|
|
441
470
|
|
|
442
471
|
Use test resources and an isolated dev webhook. Store `stripe_secret_key` and
|
package/runbooks/greenfield.md
CHANGED
|
@@ -41,8 +41,9 @@ consumer, not a visual identity to rename.
|
|
|
41
41
|
|
|
42
42
|
## Non-negotiable boundaries
|
|
43
43
|
|
|
44
|
-
1.
|
|
45
|
-
|
|
44
|
+
1. Use normal dependency declarations while ODLA is under active development.
|
|
45
|
+
Commit the lockfile, use `npm ci` for repeatable installs, and rerun
|
|
46
|
+
conformance after updates. Never use `--legacy-peer-deps`.
|
|
46
47
|
2. Build and prove `dev` before adding `prod`. Production provisioning, secret
|
|
47
48
|
transfer, deploy, DNS, billing activation, and real outbound email are human
|
|
48
49
|
checkpoints.
|
|
@@ -113,38 +114,31 @@ renamed reference site.
|
|
|
113
114
|
|
|
114
115
|
`@odla-ai/chapter` has no scaffolding binary. The agent creates the host files.
|
|
115
116
|
|
|
116
|
-
Initialize npm, install
|
|
117
|
-
agent guidance:
|
|
117
|
+
Initialize npm, install Chapter and the Preact host with normal dependency
|
|
118
|
+
declarations, then install the CLI's agent guidance:
|
|
118
119
|
|
|
119
120
|
```sh
|
|
120
121
|
npm init -y
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
@odla-ai/calendar@0.2.0 @odla-ai/email@0.3.1 \
|
|
134
|
-
@odla-ai/auth-clerk@0.4.1 @odla-ai/o11y@2.2.2 \
|
|
135
|
-
jose@6.2.3 preact@10.29.7
|
|
136
|
-
npm install --save-dev --save-exact \
|
|
137
|
-
@odla-ai/cli@0.17.1 @odla-ai/security@0.3.1 \
|
|
138
|
-
@cloudflare/workers-types@4.20260702.1 \
|
|
139
|
-
typescript@6.0.3 \
|
|
140
|
-
vite@8.1.4 vitest@4.1.10 wrangler@4.107.0
|
|
122
|
+
npm install \
|
|
123
|
+
@odla-ai/chapter @odla-ai/brand @odla-ai/ui \
|
|
124
|
+
@odla-ai/crm @odla-ai/db \
|
|
125
|
+
@odla-ai/calendar @odla-ai/email \
|
|
126
|
+
@odla-ai/auth-clerk @odla-ai/o11y \
|
|
127
|
+
jose preact
|
|
128
|
+
npm install --save-dev \
|
|
129
|
+
@odla-ai/cli @odla-ai/security \
|
|
130
|
+
@cloudflare/workers-types \
|
|
131
|
+
typescript vite vitest wrangler
|
|
132
|
+
npx odla-ai setup
|
|
133
|
+
npm ls @odla-ai/chapter @odla-ai/crm @odla-ai/ui @odla-ai/cli
|
|
141
134
|
npx odla-ai capabilities --json
|
|
142
135
|
```
|
|
143
136
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
it
|
|
137
|
+
Commit `package-lock.json`, use `npm ci` after the initial dependency change,
|
|
138
|
+
and rerun conformance whenever the lockfile resolves new ODLA versions. Do not
|
|
139
|
+
bypass peer-dependency validation. Install auth-clerk explicitly when adopting
|
|
140
|
+
the admin entry; it is an optional Chapter peer because worker-only and
|
|
141
|
+
member-only consumers do not need it.
|
|
148
142
|
|
|
149
143
|
Required host scripts:
|
|
150
144
|
|
|
@@ -341,8 +335,11 @@ both require a named app-readable vault secret `clerk_secret_key`. Keep
|
|
|
341
335
|
defaults to `true`, and `application.profileFields` defaults to `[]`. Keep all
|
|
342
336
|
three decisions explicit in the checked-in config and snapshot their resolved
|
|
343
337
|
values. A site with no consent control must deliberately set
|
|
344
|
-
`requireDisclaimerAck: false`; an application field reaches
|
|
345
|
-
|
|
338
|
+
`requireDisclaimerAck: false`; an application field reaches backend-only Clerk
|
|
339
|
+
private metadata only when it is deliberately listed in `profileFields`. Keep
|
|
340
|
+
that mirror small and use the application row/CRM as the canonical profile.
|
|
341
|
+
With `account: "invite"`, prove the first signed-in `/api/me` request completes
|
|
342
|
+
the private profile write and records `clerkPrivateMetadataSyncedAt`.
|
|
346
343
|
|
|
347
344
|
`copy` is a recursive partial of `ChapterCopy`. `defineChapter()` resolves it
|
|
348
345
|
to a complete `chapter.copy`, which is the voice source for packaged join,
|
|
@@ -704,7 +701,10 @@ Run a real deployed journey:
|
|
|
704
701
|
|
|
705
702
|
1. public home and every navigation/deep link;
|
|
706
703
|
2. join-config readiness, application submit, test payment, booking;
|
|
707
|
-
3. Clerk account/invite behavior selected by config;
|
|
704
|
+
3. Clerk account/invite behavior selected by config; prove `role` is the only
|
|
705
|
+
Chapter-owned public metadata and the allowlisted account snapshot appears
|
|
706
|
+
in private metadata. For an invite, the first authenticated `/api/me`
|
|
707
|
+
completes that write exactly once;
|
|
708
708
|
4. provisional and member area;
|
|
709
709
|
5. admin sign-in, people/CRM, application approval, meeting, billing, email;
|
|
710
710
|
6. replay/idempotency and one safe error;
|