canopycms 0.7.1 → 0.8.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 (152) hide show
  1. package/CHANGELOG.md +197 -47
  2. package/dist/api/admin-branch-health.js +47 -20
  3. package/dist/api/admin.d.ts +13 -1
  4. package/dist/api/admin.js +14 -24
  5. package/dist/api/branch-changes.d.ts +87 -0
  6. package/dist/api/branch-changes.js +269 -0
  7. package/dist/api/branch-entry-changes.d.ts +83 -0
  8. package/dist/api/branch-entry-changes.js +262 -0
  9. package/dist/api/branch-merge.js +2 -2
  10. package/dist/api/branch-review.js +35 -4
  11. package/dist/api/branch-status.js +14 -5
  12. package/dist/api/branch-withdraw.js +7 -0
  13. package/dist/api/branch.d.ts +13 -1
  14. package/dist/api/branch.js +171 -97
  15. package/dist/api/client.d.ts +15 -0
  16. package/dist/api/client.js +13 -1
  17. package/dist/api/content.d.ts +18 -18
  18. package/dist/api/content.js +1 -1
  19. package/dist/api/github-sync.js +7 -3
  20. package/dist/api/groups.d.ts +4 -4
  21. package/dist/api/pr-comment-sync.d.ts +9 -8
  22. package/dist/api/pr-comment-sync.js +23 -13
  23. package/dist/api/routes.js +4 -0
  24. package/dist/api/types.d.ts +3 -1
  25. package/dist/authorization/groups/schema.d.ts +4 -4
  26. package/dist/authorization/protected-branch.d.ts +3 -3
  27. package/dist/authorization/protected-branch.js +3 -3
  28. package/dist/branch-metadata-file.d.ts +84 -0
  29. package/dist/branch-metadata-file.js +9 -0
  30. package/dist/branch-metadata.d.ts +4 -4
  31. package/dist/branch-metadata.js +4 -5
  32. package/dist/branch-param.d.ts +24 -0
  33. package/dist/branch-param.js +87 -0
  34. package/dist/branch-provisioning.d.ts +6 -3
  35. package/dist/branch-provisioning.js +12 -10
  36. package/dist/branch-registry.d.ts +6 -0
  37. package/dist/branch-registry.js +12 -3
  38. package/dist/branch-schema-cache.d.ts +22 -2
  39. package/dist/branch-schema-cache.js +88 -12
  40. package/dist/branch-workspace.js +22 -15
  41. package/dist/cli/cli.js +1122 -181
  42. package/dist/cli/generate-ai-content.js +791 -109
  43. package/dist/cli/init.js +126 -0
  44. package/dist/comment-store.d.ts +3 -0
  45. package/dist/comment-store.js +4 -1
  46. package/dist/config/schemas/config.d.ts +3 -0
  47. package/dist/config/schemas/config.js +2 -0
  48. package/dist/config/types.d.ts +11 -0
  49. package/dist/content-id-index.d.ts +5 -0
  50. package/dist/content-id-index.js +1 -1
  51. package/dist/content-listing.d.ts +53 -0
  52. package/dist/content-listing.js +123 -27
  53. package/dist/content-reader.d.ts +24 -10
  54. package/dist/content-reader.js +66 -22
  55. package/dist/context.js +51 -48
  56. package/dist/editor/BranchManager.d.ts +7 -3
  57. package/dist/editor/BranchManager.js +51 -6
  58. package/dist/editor/Editor.js +166 -34
  59. package/dist/editor/EntryNavigator.d.ts +34 -10
  60. package/dist/editor/EntryNavigator.js +185 -29
  61. package/dist/editor/admin/SystemHealthPanel.js +36 -1
  62. package/dist/editor/admin/useSystemHealth.js +1 -0
  63. package/dist/editor/branch-names.d.ts +43 -0
  64. package/dist/editor/branch-names.js +75 -0
  65. package/dist/editor/components/BranchPill.d.ts +2 -2
  66. package/dist/editor/components/BranchPill.js +2 -2
  67. package/dist/editor/components/EditorHeader.d.ts +3 -1
  68. package/dist/editor/components/EditorHeader.js +2 -2
  69. package/dist/editor/components/EntryChangesDrawer.d.ts +51 -0
  70. package/dist/editor/components/EntryChangesDrawer.js +363 -0
  71. package/dist/editor/components/EntryChangesSkeleton.d.ts +9 -0
  72. package/dist/editor/components/EntryChangesSkeleton.js +7 -0
  73. package/dist/editor/components/EntryHeader.d.ts +9 -1
  74. package/dist/editor/components/EntryHeader.js +25 -3
  75. package/dist/editor/components/LazyEntryChangesDrawer.d.ts +16 -0
  76. package/dist/editor/components/LazyEntryChangesDrawer.js +45 -0
  77. package/dist/editor/components/ReviewDialogs.js +3 -3
  78. package/dist/editor/context/ApiClientContext.d.ts +9 -0
  79. package/dist/editor/context/ApiClientContext.js +26 -2
  80. package/dist/editor/context/index.d.ts +1 -1
  81. package/dist/editor/context/index.js +1 -1
  82. package/dist/editor/copy.d.ts +1 -0
  83. package/dist/editor/copy.js +1 -0
  84. package/dist/editor/editor-utils.d.ts +2 -0
  85. package/dist/editor/editor-utils.js +15 -0
  86. package/dist/editor/entry-diff.d.ts +143 -0
  87. package/dist/editor/entry-diff.js +593 -0
  88. package/dist/editor/hooks/create-branch-request.d.ts +11 -1
  89. package/dist/editor/hooks/create-branch-request.js +16 -6
  90. package/dist/editor/hooks/useBranchActions.d.ts +19 -2
  91. package/dist/editor/hooks/useBranchActions.js +29 -20
  92. package/dist/editor/hooks/useBranchChangesData.d.ts +57 -0
  93. package/dist/editor/hooks/useBranchChangesData.js +134 -0
  94. package/dist/editor/hooks/useBranchManager.d.ts +16 -0
  95. package/dist/editor/hooks/useBranchManager.js +142 -54
  96. package/dist/editor/hooks/useDraftManager.js +6 -2
  97. package/dist/editor/hooks/useEntryManager.d.ts +18 -2
  98. package/dist/editor/hooks/useEntryManager.js +36 -10
  99. package/dist/editor/utils/editor-errors.d.ts +5 -2
  100. package/dist/git-manager.d.ts +71 -0
  101. package/dist/git-manager.js +270 -1
  102. package/dist/http/handler.js +11 -9
  103. package/dist/operating-mode/branch-namespace-fixtures.d.ts +17 -0
  104. package/dist/operating-mode/branch-namespace-fixtures.js +65 -0
  105. package/dist/operating-mode/branch-namespace.d.ts +34 -0
  106. package/dist/operating-mode/branch-namespace.js +121 -0
  107. package/dist/operating-mode/client-unsafe-strategy.js +7 -0
  108. package/dist/operating-mode/types.d.ts +8 -0
  109. package/dist/paths/branch-name.d.ts +11 -19
  110. package/dist/paths/branch-name.js +17 -27
  111. package/dist/paths/index.d.ts +2 -2
  112. package/dist/paths/index.js +2 -2
  113. package/dist/paths/resolve.d.ts +0 -1
  114. package/dist/paths/resolve.js +0 -1
  115. package/dist/paths/validation.d.ts +40 -1
  116. package/dist/paths/validation.js +83 -4
  117. package/dist/pr-comments.d.ts +17 -9
  118. package/dist/pr-comments.js +53 -15
  119. package/dist/server.d.ts +6 -1
  120. package/dist/server.js +6 -1
  121. package/dist/services.js +2 -1
  122. package/dist/submission-attribution.d.ts +22 -0
  123. package/dist/submission-attribution.js +62 -6
  124. package/dist/task-queue/worker-status.d.ts +6 -1
  125. package/dist/task-queue/worker-status.js +23 -2
  126. package/dist/types.d.ts +59 -0
  127. package/dist/version.d.ts +1 -1
  128. package/dist/version.js +1 -1
  129. package/dist/worker/branch-policy.d.ts +111 -16
  130. package/dist/worker/branch-policy.js +222 -17
  131. package/dist/worker/cms-worker.d.ts +24 -2
  132. package/dist/worker/cms-worker.js +35 -24
  133. package/dist/worker/git-sync.d.ts +3 -3
  134. package/dist/worker/git-sync.js +42 -1
  135. package/dist/worker/github-gateway-http.js +2 -2
  136. package/dist/worker/github-gateway-wire.d.ts +42 -27
  137. package/dist/worker/github-gateway-wire.js +14 -3
  138. package/dist/worker/github-gateway.d.ts +17 -6
  139. package/dist/worker/github-gateway.js +62 -6
  140. package/dist/worker/github-mirror.d.ts +7 -4
  141. package/dist/worker/github-mirror.js +27 -16
  142. package/dist/worker/history-rewrite.d.ts +23 -10
  143. package/dist/worker/history-rewrite.js +43 -20
  144. package/dist/worker/legacy-branch-fixtures.d.ts +21 -0
  145. package/dist/worker/legacy-branch-fixtures.js +71 -0
  146. package/dist/worker/rebase.d.ts +2 -1
  147. package/dist/worker/rebase.js +93 -36
  148. package/dist/worker/task-runner.d.ts +4 -1
  149. package/dist/worker/task-runner.js +77 -48
  150. package/dist/worker/unpublishable-branches.d.ts +34 -0
  151. package/dist/worker/unpublishable-branches.js +182 -0
  152. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -5,9 +5,9 @@ packages release together, at one version.
5
5
 
6
6
  ## This build
7
7
 
8
- Version `0.7.1`, built from [`fc7c124`](https://github.com/safeinsights/canopycms/tree/fc7c124fae32a1df226f082b618889ad6c3e8345).
8
+ Version `0.8.1`, built from [`67d7e59`](https://github.com/safeinsights/canopycms/tree/67d7e59ebd472b09175d09c620d8e2d06d333496).
9
9
 
10
- Its entries are [0.7.1](#071), under **Released**.
10
+ Its entries are [0.8.1](#081), under **Released**.
11
11
 
12
12
  If you upgraded from a build on another branch, compare the `<!-- changeset: … -->` slugs in your previous build's `CHANGELOG.md` (`npm pack canopycms@<old>` fetches it) with this one's: entries whose slug your old file lacks are new to you.
13
13
 
@@ -24,7 +24,7 @@ Each entry has up to three parts:
24
24
  `node_modules/canopycms/CHANGELOG.md`, assembled for that build: its **This build** section lists
25
25
  what is new since the previous int on the same branch, or on a stable release links its entries, and its links point at the commit the build
26
26
  came from. The copy in the repository holds released history and the entries from before changesets;
27
- every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/.changeset/README.md) until a stable release
27
+ every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/.changeset/README.md) until a stable release
28
28
  moves it here.
29
29
 
30
30
  **Find your starting point.** From a stable pin, start at the first version under **Released**
@@ -62,6 +62,156 @@ entries under **Released**.
62
62
 
63
63
  ## Released
64
64
 
65
+ ### 0.8.1
66
+
67
+ #### Content reads stop re-reading and re-parsing the schema cache
68
+
69
+ <!-- changeset: schema-cache-read-once -->
70
+
71
+ _First in 0.8.1._
72
+
73
+ **What changed.** An adopter's request measured every `read()` and `readByUrlPath()` reading and parsing the branch's whole schema cache file, up to five times per page. Each process now keeps the schema it parsed and reuses it while the file is unchanged, still checking its freshness on every read. `readByUrlPath()` resolves the branch's schema once for both of the paths it tries. A build resolves the schema once per process instead of on every read. The cache file is written without indentation, under half its former size.
74
+
75
+ ### 0.8.0
76
+
77
+ <!-- changeset: merge-main-0-7-1-into-int-e -->
78
+
79
+ #### New branches are created in the branch namespace, and pull request links carry their short names — **behaviour change**
80
+
81
+ <!-- changeset: branches-created-in-namespace -->
82
+
83
+ _First in 0.8.0._
84
+
85
+ **What changed.** A branch an editor creates is named with the deployment's
86
+ [branch namespace](#the-github-gateway-writes-only-its-deployments-branch-namespace--security-fix-template-first) in front of the typed name, sanitized: typing
87
+ `spring/update` creates `canopycms/prod/spring-update` by default. Its short name
88
+ (`spring-update`) is what the branch listing returns as `shortName`, what `?branch=` links in pull
89
+ request bodies carry, and what a pull request without a title is named after (`Submit
90
+ spring-update`); `?branch=` and the API's `/:branch` segment accept it or the full name. A branch
91
+ outside the namespace is reached by its full name, or only by its exact form, `~<name>`, when a
92
+ namespace branch's short name is that name. Creation refuses a short name that another branch already has (the
93
+ base, the active branch, a branch outside the namespace, an exact name the gateway protects), one equal to
94
+ an API route (`admin`, `assets`, …), one kept for settings (`canopycms-settings-…` or the settings
95
+ branch), a name typed with the namespace in front, a name the remote holds a branch inside
96
+ (`spring/draft` for `spring`), and any name while the CMS and the gateway resolve different
97
+ namespaces or the remote has a branch named after part of the namespace. The gateway refuses a push
98
+ into the namespace while GitHub has a branch named after part of it or inside the one pushed.
99
+
100
+ **To adopt.** Update any CI workflow, ruleset or script that matches the names of branches the
101
+ editor creates, for example to skip them with `branches-ignore: ['canopycms/**']`. Branches that
102
+ already exist keep their names.
103
+
104
+ #### The editor shows a branch by its short name
105
+
106
+ <!-- changeset: editor-short-branch-names -->
107
+
108
+ _First in 0.8.0._
109
+
110
+ **What changed.** For a branch in the [branch namespace](#new-branches-are-created-in-the-branch-namespace-and-pull-request-links-carry-their-short-names--behaviour-change), the
111
+ editor shows `spring` where it showed `canopycms/prod/spring`: on the branch pill, the Branches
112
+ drawer, the Submit for review, Withdraw, Approve, Request changes and Delete dialogs, the comments
113
+ panel and the toasts. The editor's `?branch=` carries the short name too, as do the preview and its
114
+ page link; an old link with the full name still opens the branch, and the editor shortens it. A
115
+ branch outside the namespace, or nested deeper in it, is shown and linked by its full name, except
116
+ that one named like a namespace branch's short name is linked as `~<name>` (`%7E<name>` in the
117
+ address bar), its exact form, which only those links show; System health keeps the full ref and
118
+ workspace directory. The editor's API requests name a listed branch by its exact form, an internal
119
+ detail: `~` and the full name, each `/` as `~` (`/~canopycms~prod~spring/entries`). Git allows no
120
+ `~` in a branch name, so the form reaches the branch shown even when another answers to its short
121
+ name. Drafts saved in a browser stay with the branch, whichever name opened it.
122
+
123
+ The New branch field says "Will be named …" only when sanitizing changed what was typed, and shows
124
+ why a name is refused under the field, where it used to toast. A name with no letter
125
+ (a–z) or digit, such as `_`, is now refused. The "still being set up" answer a create or
126
+ open can get names the branch by its short name, not its workspace directory.
127
+
128
+ **To adopt.** Nothing. A script that reads the editor's `?branch=` gets the short name; the API
129
+ accepts it and the full name alike.
130
+
131
+ #### Pull request bodies show the CanopyCMS review state
132
+
133
+ <!-- changeset: pr-body-review-state -->
134
+
135
+ _First in 0.8.0._
136
+
137
+ **What changed.** The pull request body now shows whether a reviewer approved the branch or requested changes in CanopyCMS, and who, since an approval in CanopyCMS is not a GitHub review. It says "Not yet reviewed" until a reviewer acts, is updated when one does, and starts fresh when the branch is submitted or withdrawn.
138
+
139
+ #### `legacyBranches` keeps branches from outside the namespace publishing, and System health names any that cannot — **template first**
140
+
141
+ <!-- changeset: legacy-branches-and-unpublishable-warning -->
142
+
143
+ _First in 0.8.0._
144
+
145
+ **What changed.** `CanopyCmsService` takes `legacyBranches`: exact names of branches outside
146
+ [the gateway's namespace](#the-github-gateway-writes-only-its-deployments-branch-namespace--security-fix-template-first) that editors are still working on, which
147
+ the GitHub gateway may still write. It writes them, comma-separated, to the gateway's
148
+ `CANOPYCMS_LEGACY_BRANCHES`, and refuses at synth any list the gateway would refuse at boot,
149
+ such as an entry holding `*` or a comma, inside the resolved namespace, a branch the namespace
150
+ sits under, or repeated. Each git sync, the worker checks every editor branch against the
151
+ gateway's policy, and System health lists by full name the ones it would refuse to publish, with
152
+ what to do. The gateway now returns a pull request's body only when it would update that pull
153
+ request: its head is in the namespace or on `legacyBranches`, not protected, and in this
154
+ repository. For any other pull request it returns the merge state alone. So a legacy branch's
155
+ pull request keeps its comment and review blocks current, as a namespace branch's does.
156
+
157
+ **To adopt.** Before deploying, open the editor's branch list and pass every open branch whose
158
+ name is outside the namespace as `legacyBranches`; a hand install sets `CANOPYCMS_LEGACY_BRANCHES`
159
+ in `gateway.env` instead. After the deploy, System health names any you missed. Remove an entry
160
+ once its branch is merged or deleted.
161
+
162
+ #### The Content panel lists what a branch changes — **behaviour change**
163
+
164
+ <!-- changeset: content-panel-changed-filter -->
165
+
166
+ _First in 0.8.0._
167
+
168
+ **What changed.** The Content panel's filter now offers All, Unsaved and Changed. Unsaved is the
169
+ filter that used to be called Changed: entries with edits not yet saved. Changed lists the entries
170
+ that differ from the base branch, marked New, Edited or Moved, with deleted entries beneath the
171
+ tree, so a reviewer can see what a submitted branch changes without leaving the editor. It reads
172
+ the new `GET /:branch/changes` endpoint, which the catch-all API route already serves.
173
+
174
+ #### Show changes on a changed entry
175
+
176
+ <!-- changeset: entry-show-changes -->
177
+
178
+ _First in 0.8.0._
179
+
180
+ **What changed.** Reviewers and editors can open "Show changes" on a changed entry to see each
181
+ changed field's old and new values against the base branch, with text differences highlighted.
182
+ It opens from the entry header, and from each entry the Content panel's Changed filter lists as
183
+ deleted. It reads the new `GET /:branch/changes/...entryPath` endpoint, which the catch-all API
184
+ route already serves.
185
+
186
+ #### The GitHub gateway writes only its deployment's branch namespace — **security fix, template first**
187
+
188
+ <!-- changeset: gateway-branch-namespace -->
189
+
190
+ _First in 0.8.0._
191
+
192
+ **What changed.** The GitHub gateway now pushes, force-pushes, deletes and opens pull requests only
193
+ for branches in its namespace and the exact names in a new legacy list. The namespace is a template
194
+ ending with `/`, where `{deployment}` stands for the deployment name: `canopycms/{deployment}/` by
195
+ default, so `canopycms/prod/`. It is set by `CanopyCmsService`'s new `branchNamespace` prop (or
196
+ `CANOPYCMS_BRANCH_NAMESPACE`, then `branchNamespace` in `canopycms.config.ts`), and the gateway
197
+ reads it from its own environment only. Of the settings branches it pushes only this deployment's
198
+ own, as before: no lease, deletion or pull request. It updates, closes or drafts a pull request only
199
+ after GitHub shows that its head is such a branch of this repository, so a compromised CMS Lambda
200
+ cannot aim it elsewhere. System health says when the CMS and gateway resolve different namespaces.
201
+
202
+ **To adopt.** Deploy the stack template first: it now writes `CANOPYCMS_DEPLOYMENT_NAME`,
203
+ `CANOPYCMS_SETTINGS_BRANCH` and `CANOPYCMS_BRANCH_NAMESPACE`, which the gateway now reads, to
204
+ `gateway.env` too (a hand install adds them, as `gateway.env.example` shows). The bundle needs
205
+ worker contract 3, which an older template's roll gate refuses. Roll the worker bundle
206
+ (`canopycms-cdk`) with or before the CMS image, which creates no branch until the worker reports its
207
+ namespace. Stacks sharing a repository keep `{deployment}` in one template. Then list every open
208
+ branch outside the namespace, as [`legacyBranches`](#legacybranches-keeps-branches-from-outside-the-namespace-publishing-and-system-health-names-any-that-cannot--template-first)
209
+ describes. Until listed, a branch's publishes, pull request updates and deletion fail permanently,
210
+ naming the list. A rolled-back worker can rename namespace branches, breaking their links and open
211
+ editors; this release's worker restores them on its next sync. Submit none while rolled back: that
212
+ pushes the branch under its directory name, without its earlier commits, which this release
213
+ publishes only if `legacyBranches` lists it.
214
+
65
215
  ### 0.7.1
66
216
 
67
217
  <!-- changeset: worker-platform-ci -->
@@ -111,7 +261,7 @@ _First in 0.7.0._
111
261
 
112
262
  **What changed.** The pull request a submit opens now lists the branch's unresolved editor comment threads: where each one is, the first line of its first comment (80 characters at most) and a link to it in the editor. Once every thread is resolved, it says so. The list is updated whenever a comment is added, replied to or resolved, as well as on submit. Comment excerpts are visible to everyone who can read the pull request, which on a public repository means everyone. Open threads do not block the merge or keep the pull request in draft. A pull request opened before this release shows no list until its branch is next submitted.
113
263
 
114
- **To adopt.** Nothing, if your deploy replaces the worker along with the CMS, as `cdk deploy` of the canopycms-cdk stack does with the default `workerCode`. A worker on an earlier release fails each update of the list and marks the branch's sync failed until a later task succeeds, so a pipeline that leaves the worker behind must roll it no later than the CMS: see [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci).
264
+ **To adopt.** Nothing, if your deploy replaces the worker along with the CMS, as `cdk deploy` of the canopycms-cdk stack does with the default `workerCode`. A worker on an earlier release fails each update of the list and marks the branch's sync failed until a later task succeeds, so a pipeline that leaves the worker behind must roll it no later than the CMS: see [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#rolling-the-worker-from-ci).
115
265
 
116
266
  #### Pull request bodies link back to the editor
117
267
 
@@ -121,7 +271,7 @@ _First in 0.7.0._
121
271
 
122
272
  **What changed.** The pull request a submit opens links to the branch in the editor, and each changed entry to that entry. A notice tells reviewers that comments on the pull request do not reach the editor, so the author will not see them. The links use the editor's URL from the submit, accepted only when its host is the one the request was addressed to (`X-Forwarded-Host`, else `Host`), which holds behind `canopycms-cdk`'s CloudFront distribution as it stands.
123
273
 
124
- **To adopt.** Nothing, unless a proxy in front of the CMS sets neither header to the editor's public host: then set `editorUrl` in your Canopy config to the editor page's URL, e.g. `editorUrl: 'https://cms.example.org/edit'`. See [the config reference](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#definecanopyconfig-options).
274
+ **To adopt.** Nothing, unless a proxy in front of the CMS sets neither header to the editor's public host: then set `editorUrl` in your Canopy config to the editor page's URL, e.g. `editorUrl: 'https://cms.example.org/edit'`. See [the config reference](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#definecanopyconfig-options).
125
275
 
126
276
  #### CloudFront origin read timeout accepted up to 120 s; the editor waits 135 s
127
277
 
@@ -207,7 +357,7 @@ _First in 0.6.0._
207
357
 
208
358
  **What changed.** `CanopyCmsService` takes `clerkOrganizationsAsGroups` (default `true`, unchanged), which the worker honours; in a deployment it, not the plugin's `useOrganizationsAsGroups`, decides the groups. When Clerk refuses the organization list with a 403 (Organizations disabled), the refresh now writes users with no groups and logs a warning, instead of failing whole; any other failure still keeps the last snapshot. Memberships are fetched instance-wide rather than per user. The scaffolds write `false` explicitly: `useOrganizationsAsGroups` in `canopycms init`'s `canopy.ts`, and `clerkOrganizationsAsGroups` in `canopycms init-deploy aws`'s CDK stack.
209
359
 
210
- **To adopt.** On a Clerk instance without Organizations, set `clerkOrganizationsAsGroups: false` on `CanopyCmsService` and `useOrganizationsAsGroups: false` in `createClerkAuthPlugin`. See [Deploying to AWS](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md).
360
+ **To adopt.** On a Clerk instance without Organizations, set `clerkOrganizationsAsGroups: false` on `CanopyCmsService` and `useOrganizationsAsGroups: false` in `createClerkAuthPlugin`. See [Deploying to AWS](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md).
211
361
 
212
362
  ### 0.5.0
213
363
 
@@ -219,7 +369,7 @@ _First in 0.5.0._
219
369
 
220
370
  **What changed.** A `type: 'reference', list: true` field now edits as rows in stored order, like an `object` list: drag a row or use its "…" menu to move or remove it, open a row to swap its entry in place, and pick from Add under the rows to append. Neither control offers an entry the list already holds. Any `list: true` field, and any `block` field, takes `maxItems`. The editor stops adding at the cap and says why, a save over it is refused, and a production build fails on an entry over it, naming the entry, field, count and cap. Adding `maxItems` to a list that already holds more therefore fails the build until an editor removes the extra items. `maxItems` on a field that holds no items is refused when the entry schema registry is created.
221
371
 
222
- **To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#field-types).
372
+ **To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#field-types).
223
373
 
224
374
  #### SEO field location moves into config; reference pickers mark hidden entries and take a sort order — **breaking: `createNextCanopyContext({ seo })` and `AIContentConfig.seo` are removed**
225
375
 
@@ -229,7 +379,7 @@ _First in 0.5.0._
229
379
 
230
380
  **What changed.** `defineCanopyConfig` takes `seo: { group?, fields? }`, the one place every surface reads an entry's `noindex` flag: the sitemap and `entryToMetadata` that `createNextCanopyContext` returns, AI content and the editor's reference picker. A per-call `seo`/`group`/`fields` still overrides it. The free `generateContentSitemap` takes `seo` as an argument and refuses to run without it when the config sets one; `createNextCanopyContext` and the AI content config refuse a leftover `seo`. A reference picker now badges an entry hidden from search as "Hidden from search", and picking one adds a note naming the setting on that entry's form, since a page listing only indexed entries won't show it. A reference field takes `optionSort`: `'label'` (the default), `'collection'`, or `{ field, direction }`. Point `field` at an ISO date, since strings compare as text.
231
381
 
232
- **To adopt.** Move `seo` from `createNextCanopyContext({ seo })` and from `defineAIContentConfig({ seo })` into `defineCanopyConfig({ seo })`. See [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#how-references-work-in-the-editor).
382
+ **To adopt.** Move `seo` from `createNextCanopyContext({ seo })` and from `defineAIContentConfig({ seo })` into `defineCanopyConfig({ seo })`. See [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#how-references-work-in-the-editor).
233
383
 
234
384
  **Now deletable.** A shared `seo` constant passed separately to the Next context and the AI content config.
235
385
 
@@ -257,7 +407,7 @@ resolved without it.
257
407
  **To adopt.** Where a reference renders its target's prose, set `includeBody: true` on that
258
408
  reference field. Code that reads the body from a link-only reference's resolved type now sees
259
409
  `string | undefined`; either set `includeBody: true` or handle the missing value. See
260
- [Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#resolving-references-in-a-listing).
410
+ [Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#resolving-references-in-a-listing).
261
411
 
262
412
  ### 0.3.3
263
413
 
@@ -674,7 +824,7 @@ URL.
674
824
  2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
675
825
  `app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
676
826
  route with `frame-ancestors 'self'`, not `X-Frame-Options: DENY` (see
677
- [Live Preview](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#live-preview)).
827
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#live-preview)).
678
828
  3. A test reading view content from the route's server HTML must load the page in a browser.
679
829
  Server output rendered during a preview request carries the signed-in asset prefix; keep it out
680
830
  of cross-request caches (`unstable_cache`, module memos).
@@ -689,7 +839,7 @@ kept site styles ahead of Mantine's in the preview.
689
839
  server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
690
840
  path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
691
841
  refuses a field name that is empty, all digits or contains `.`, `[` or `]`. See
692
- [Live Preview](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#live-preview).
842
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#live-preview).
693
843
 
694
844
  **To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
695
845
  as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
@@ -771,7 +921,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
771
921
  fields are nested or renamed, pass the AI config's `seo` the same object you pass
772
922
  `createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
773
923
  place. A field that links to a hidden section by plain URL needs a field transform; the README
774
- shows [the recipe](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#ai-content-configuration).
924
+ shows [the recipe](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#ai-content-configuration).
775
925
 
776
926
  **Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
777
927
 
@@ -793,7 +943,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
793
943
  field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
794
944
  `MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
795
945
  `{ type: 'string', maxLength }`): a quoted value only, never bare or `{…}`. See
796
- [MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#mdx-content-cannot-run-code).
946
+ [MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#mdx-content-cannot-run-code).
797
947
 
798
948
  **To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
799
949
  `mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
@@ -930,7 +1080,7 @@ a format check.
930
1080
 
931
1081
  - (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
932
1082
  re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
933
- ([reference](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#definecanopyconfig-options)).
1083
+ ([reference](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#definecanopyconfig-options)).
934
1084
  - (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
935
1085
  the PR-body section every user who edited the branch, not only the submitter; settings commits
936
1086
  (permissions, groups) carry the acting user's trailer.
@@ -954,7 +1104,7 @@ saves only push the branch, and no failing PR task lands in System health.
954
1104
  that entry type goes unavailable: the editor says so, and its entries answer 503 with
955
1105
  `code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
956
1106
  worker holds the base branch for up to 30 minutes while that lasts; see
957
- [New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
1107
+ [New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
958
1108
  Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
959
1109
  `ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
960
1110
 
@@ -992,7 +1142,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
992
1142
  new stack needs no steps.
993
1143
 
994
1144
  **What changed.** (int.109) Detailed in
995
- [The worker instance](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
1145
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
996
1146
  bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
997
1147
  refusing clients without TLS or IAM, replacing the worker's
998
1148
  `AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
@@ -1046,10 +1196,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
1046
1196
  with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
1047
1197
  unchanged.
1048
1198
  - `CanopyCmsService` alarms when the worker logs no git sync for 30 minutes. See
1049
- [Worker-down alarm](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#worker-down-alarm).
1199
+ [Worker-down alarm](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#worker-down-alarm).
1050
1200
 
1051
1201
  **To adopt.** Optional. For parameter-only change sets, see
1052
- [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
1202
+ [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
1053
1203
  `alarmTopic`.
1054
1204
 
1055
1205
  **Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
@@ -1060,7 +1210,7 @@ worker, and a hand-built alarm on the worker log group.
1060
1210
  **What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
1061
1211
  swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
1062
1212
  `alarmTopic` if set; a retried step names itself when it gives up. See
1063
- [The worker instance](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance).
1213
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#the-worker-instance).
1064
1214
 
1065
1215
  **To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
1066
1216
  not Template first and the worker contract stays at 1.
@@ -1126,7 +1276,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
1126
1276
 
1127
1277
  **To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
1128
1278
  mirror, so the root volume needs room for two
1129
- ([details](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance)).
1279
+ ([details](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#the-worker-instance)).
1130
1280
 
1131
1281
  #### The worker follows a rebased or deleted GitHub branch
1132
1282
 
@@ -1148,7 +1298,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
1148
1298
  bundle-only roll is safe.
1149
1299
 
1150
1300
  **To adopt.** Parameter mode: gate bundle-only rolls on the contract
1151
- ([recipe](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
1301
+ ([recipe](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
1152
1302
  `WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
1153
1303
  copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
1154
1304
 
@@ -1165,8 +1315,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
1165
1315
  template, then roll the bundle; on an older template it stops with `template too old for this
1166
1316
  bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
1167
1317
  takes `worker/`'s three units and `gateway.env.example`
1168
- ([steps](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
1169
- [checklist](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#first-deploy-checklist).
1318
+ ([steps](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
1319
+ [checklist](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#first-deploy-checklist).
1170
1320
 
1171
1321
  #### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
1172
1322
 
@@ -1177,7 +1327,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
1177
1327
  `X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
1178
1328
  its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
1179
1329
  marked `noindex`. The editor's default preview is same-origin and unaffected. See
1180
- [Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
1330
+ [Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
1181
1331
 
1182
1332
  **To adopt.** If you wired the Function URL into your own distribution by hand, delete those
1183
1333
  behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
@@ -1353,7 +1503,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
1353
1503
  **To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
1354
1504
  apply the same rule here, for example `referenceLink: (target, { body }) =>
1355
1505
  !body?.trim() ? false : undefined` in `defineAIContentConfig` from `canopycms/ai`. See
1356
- [AI Content Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#ai-content-configuration).
1506
+ [AI Content Configuration](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#ai-content-configuration).
1357
1507
 
1358
1508
  **Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
1359
1509
  change its link.
@@ -1428,7 +1578,7 @@ _First in int.115._
1428
1578
  entry the base branch also changed, the "updated on the base branch" notice and the branch's
1429
1579
  conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
1430
1580
  base change. They used to clear on the next sync, about five minutes later. README's new [Drafts
1431
- and Unpublishing](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#drafts-and-unpublishing) section covers long-lived branches and
1581
+ and Unpublishing](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#drafts-and-unpublishing) section covers long-lived branches and
1432
1582
  unpublishing.
1433
1583
 
1434
1584
  #### The editor calls the content drawer "All content"
@@ -1740,7 +1890,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
1740
1890
  The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
1741
1891
 
1742
1892
  **To adopt.** Add `stampOnPublish: true` to the date field your site sorts or labels by, such as
1743
- `{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#stamping-a-publication-date).
1893
+ `{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#stamping-a-publication-date).
1744
1894
 
1745
1895
  **Now deletable.** A build step or hook that writes a missing publication date into new entries.
1746
1896
 
@@ -1787,7 +1937,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
1787
1937
  stored at, and `react-split-pane` is no longer a dependency.
1788
1938
  `EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
1789
1939
  no longer exported from `canopycms/client`. See
1790
- [Your root layout](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#editor-customization).
1940
+ [Your root layout](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#editor-customization).
1791
1941
 
1792
1942
  **To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
1793
1943
  instead, which lays out its own panes. Hiding your site chrome on the editor route is now
@@ -1898,7 +2048,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
1898
2048
  **To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
1899
2049
  `ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
1900
2050
  own pages, mount the hook as in
1901
- [Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
2051
+ [Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
1902
2052
  Your own Server Actions in the CMS build still 403 behind OAC.
1903
2053
 
1904
2054
  **Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
@@ -1939,12 +2089,12 @@ fast naming the ARN, the field and the keys present, never a value.
1939
2089
  **To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
1940
2090
  prop. The scaffolded stack fills them from the repository _variables_
1941
2091
  `CANOPY_GITHUB_TOKEN_SECRET_JSON_FIELD` and `CLERK_SECRET_KEY_SECRET_JSON_FIELD`
1942
- ([why the prefix](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
2092
+ ([why the prefix](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
1943
2093
  adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
1944
2094
  lines to `.github/workflows/deploy-cms.yml`, or re-runs the generator and diffs. `cdk synth` refuses a `…JsonField` prop without its `…SecretArn`, and an ARN carrying the ECS `:KEY::` suffix
1945
2095
  (also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
1946
2096
  resource's configuration, readable by anyone who can describe it. Only `CLERK_SECRET_KEY` goes through Secrets Manager; `CLERK_JWT_KEY` and the publishable
1947
- key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#security-model)).
2097
+ key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#security-model)).
1948
2098
 
1949
2099
  **Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
1950
2100
  worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
@@ -1956,7 +2106,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
1956
2106
  `githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
1957
2107
  nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
1958
2108
  anyone holding an App's key can mint a token for any of its installations
1959
- ([why](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
2109
+ ([why](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
1960
2110
 
1961
2111
  **To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
1962
2112
  `githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
@@ -1969,7 +2119,7 @@ anyone holding an App's key can mint a token for any of its installations
1969
2119
  `verify` checks an existing installation's permissions: run it, since an App missing a
1970
2120
  permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
1971
2121
  never edits an existing JSON secret (create one and point the JSON-field prop at it)
1972
- ([details](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
2122
+ ([details](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
1973
2123
  2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
1974
2124
  of the three is refused at synth, and so is an App alongside a token.
1975
2125
  3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
@@ -1980,7 +2130,7 @@ anyone holding an App's key can mint a token for any of its installations
1980
2130
 
1981
2131
  The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
1982
2132
  IAM policy automatically, so you need not add it to `secretsArns`. See
1983
- [Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#authenticating-as-a-github-app).
2133
+ [Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#authenticating-as-a-github-app).
1984
2134
 
1985
2135
  ```bash
1986
2136
  canopycms init-github-app create -- \
@@ -2028,7 +2178,7 @@ downloads the `.pem` from the App's settings page.
2028
2178
 
2029
2179
  **What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
2030
2180
  key) when the operation using it fails. Timings, costs and the store-before-revoke order are in
2031
- [Rotating a secret](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rotating-a-secret).
2181
+ [Rotating a secret](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#rotating-a-secret).
2032
2182
 
2033
2183
  **To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
2034
2184
  GitHub App private key is still read only at boot: store the new key, replace the instance, and
@@ -2082,12 +2232,12 @@ also check the bucket policy for its grant.
2082
2232
  5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
2083
2233
  Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
2084
2234
  `webpack` and it can read your Next version. A webpack build still fails its image transforms
2085
- ([Dual Build Support](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#dual-build-support)).
2235
+ ([Dual Build Support](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#dual-build-support)).
2086
2236
 
2087
2237
  **Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
2088
2238
  function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
2089
2239
  function cannot run. A stack setting neither moves to arm64 with a matching image, built under QEMU
2090
- on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#where-the-image-is-built)).
2240
+ on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#where-the-image-is-built)).
2091
2241
 
2092
2242
  **To adopt.**
2093
2243
 
@@ -2116,7 +2266,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
2116
2266
 
2117
2267
  **What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
2118
2268
  replaces the `url` that `beginUpload()` returns, leaving the presign's `fields` untouched, so
2119
- uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#media-configuration) for the
2269
+ uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#media-configuration) for the
2120
2270
  CloudFront behavior it expects.
2121
2271
 
2122
2272
  **To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
@@ -2141,7 +2291,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
2141
2291
  bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
2142
2292
  `Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
2143
2293
  `AWSLambdaBasicExecutionRole` (and the VPC policy) that `lambda.Function` drops from a role you
2144
- pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#cross-account-asset-bucket).
2294
+ pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#cross-account-asset-bucket).
2145
2295
 
2146
2296
  **To adopt.** Optional:
2147
2297
 
@@ -2251,7 +2401,7 @@ public JWKS PEM, used only to verify signatures.
2251
2401
  to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
2252
2402
  deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
2253
2403
  `clerkSecretKeySecretArn` (read by the worker), never in the Lambda's `environment`, unless you keep
2254
- `clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#security-model)).
2404
+ `clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/docs/deploying-to-aws.md#security-model)).
2255
2405
 
2256
2406
  #### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
2257
2407
 
@@ -2350,7 +2500,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
2350
2500
  Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
2351
2501
  no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
2352
2502
  `AssetSupport` stay at the distribution root; pass no `baseUrl` (mount table under "Where `/assets`
2353
- is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#media-configuration)). Two traps:
2503
+ is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#media-configuration)). Two traps:
2354
2504
 
2355
2505
  - Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
2356
2506
  a nested route prefix and emits zero params, building green.
@@ -2509,7 +2659,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
2509
2659
  `withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
2510
2660
  `canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
2511
2661
  `createNextCanopyContext`'s result. See
2512
- [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#sitemap-and-seo-metadata). Every routable entry type is in
2662
+ [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#sitemap-and-seo-metadata). Every routable entry type is in
2513
2663
  the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
2514
2664
  sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
2515
2665
  filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
@@ -2566,7 +2716,7 @@ underscore-prefixed files are skipped.
2566
2716
 
2567
2717
  **What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
2568
2718
  `defaultPathAccess: { read: 'allow' }`
2569
- ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#public-read-on-server-deployments)).
2719
+ ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#public-read-on-server-deployments)).
2570
2720
 
2571
2721
  **To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
2572
2722
  consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
@@ -2619,7 +2769,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
2619
2769
  **What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
2620
2770
  gives one template's value type) requires exactly
2621
2771
  one component per block template name when written as an object literal. See
2622
- [Block Component Registries](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#block-component-registries) and
2772
+ [Block Component Registries](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#block-component-registries) and
2623
2773
  `apps/example1/app/components/PostView.tsx`.
2624
2774
 
2625
2775
  ```ts
@@ -2641,7 +2791,7 @@ templates against the schema.
2641
2791
 
2642
2792
  **What changed.** Spreading a `const` field array into several schemas, and nesting
2643
2793
  `defineInlineFieldGroup()` inside a block template, are documented
2644
- ([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
2794
+ ([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
2645
2795
  identity helper for them.
2646
2796
 
2647
2797
  ```ts
@@ -2660,7 +2810,7 @@ field by composing from the same `const` field object.
2660
2810
  A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
2661
2811
  it, and listings do with
2662
2812
  [`resolveReferences`](#listings-resolve-references-and-a-resolved-reference-carries-urlpath-and-optionally-its-body-16--breaking-type-level)
2663
- (0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#shared--referenced-blocks).
2813
+ (0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#shared--referenced-blocks).
2664
2814
 
2665
2815
  **Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
2666
2816
 
@@ -2682,7 +2832,7 @@ Not retro-documented, apart from these:
2682
2832
 
2683
2833
  #### The registry is keyed by entry-type name (0.0.42)
2684
2834
 
2685
- **What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
2835
+ **What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/67d7e59ebd472b09175d09c620d8e2d06d333496/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
2686
2836
 
2687
2837
  **To adopt.**
2688
2838