@odla-ai/chapter 0.39.1 → 0.40.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odla-ai/chapter",
3
- "version": "0.39.1",
3
+ "version": "0.40.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",
@@ -333,6 +333,13 @@ export const chapter = defineChapter({
333
333
  // Optional inherited layer; omit `parent` for Chapter-only content.
334
334
  // parent: { sourceId: "approved-parent-app-id" },
335
335
  },
336
+ // This existing network reader is also the Builder Library authority.
337
+ network: {
338
+ readers: [{
339
+ id: "built-not-found",
340
+ fields: { person: ["name"] },
341
+ }],
342
+ },
336
343
  // Private build references; this Chapter receives global material from BNF.
337
344
  builderLibrary: {
338
345
  sources: [{ sourceId: "built-not-found" }],
@@ -685,6 +692,11 @@ book/asset ids in the library; never persist signed URLs, bytes, or storage
685
692
  credentials. Prove `/api/admin/builder-library/manifest` omits drafts, archived
686
693
  items, Built Not Found-only items, and sibling Chapter material.
687
694
 
695
+ Every Builder Library source must name an existing `network.reader` on a
696
+ Chapter or `network.target` on Built Not Found. The signed control route reuses
697
+ that edge's existing `network_share_secret` / `network_share_<chapter_id>`
698
+ value. Never create or request a Builder-specific secret.
699
+
688
700
  The router must serve and reload `/`, every public page, `/join`, `/members/`,
689
701
  and `/admin/` without accidentally sending API paths to the SPA. Chapter
690
702
  terminates unknown `/api/*` paths as JSON 404s before the static asset fallback.
@@ -736,10 +748,15 @@ deployed dev origin.
736
748
  ### Stripe test mode
737
749
 
738
750
  1. Create the approved recurring test product/price.
739
- 2. Point a Stripe test webhook to
740
- `https://<dev-origin>/api/webhooks/stripe`.
741
- 3. Store `stripe_secret_key` and `stripe_webhook_secret` as named dev vault
742
- secrets through write-only `odla-ai secrets set ... --stdin`.
751
+ 2. Store `stripe_secret_key` in the shared dev vault through write-only
752
+ `odla-ai secrets set stripe_secret_key --env dev --stdin`.
753
+ 3. For one Worker per developer on shared dev data, declare top-level
754
+ `runtimes.<name>` with `dataEnvironment: "dev"` and its stable origin, then
755
+ run `odla-ai environment reconcile --runtime <name>`. ODLA creates the
756
+ endpoint, stores `stripe_webhook_secret__<name>` under write-only custody,
757
+ and binds `ODLA_RUNTIME`; do not manually reuse one signing secret across
758
+ endpoints. A legacy single-Worker app may still store
759
+ `stripe_webhook_secret` directly.
743
760
  4. In the guarded `groups` row, set `stripePublishableKey` and `stripePriceId`.
744
761
  5. Read that exact Stripe Price from Stripe and compare its first charge,
745
762
  recurring amount, currency, and interval with the approved public contract.