canopycms 0.7.1 → 0.8.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +187 -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-workspace.js +22 -15
  39. package/dist/cli/cli.js +1060 -172
  40. package/dist/cli/generate-ai-content.js +732 -101
  41. package/dist/cli/init.js +126 -0
  42. package/dist/comment-store.d.ts +3 -0
  43. package/dist/comment-store.js +4 -1
  44. package/dist/config/schemas/config.d.ts +3 -0
  45. package/dist/config/schemas/config.js +2 -0
  46. package/dist/config/types.d.ts +11 -0
  47. package/dist/content-id-index.d.ts +5 -0
  48. package/dist/content-id-index.js +1 -1
  49. package/dist/content-listing.d.ts +53 -0
  50. package/dist/content-listing.js +123 -27
  51. package/dist/content-reader.js +23 -16
  52. package/dist/context.js +8 -7
  53. package/dist/editor/BranchManager.d.ts +7 -3
  54. package/dist/editor/BranchManager.js +51 -6
  55. package/dist/editor/Editor.js +166 -34
  56. package/dist/editor/EntryNavigator.d.ts +34 -10
  57. package/dist/editor/EntryNavigator.js +185 -29
  58. package/dist/editor/admin/SystemHealthPanel.js +36 -1
  59. package/dist/editor/admin/useSystemHealth.js +1 -0
  60. package/dist/editor/branch-names.d.ts +43 -0
  61. package/dist/editor/branch-names.js +75 -0
  62. package/dist/editor/components/BranchPill.d.ts +2 -2
  63. package/dist/editor/components/BranchPill.js +2 -2
  64. package/dist/editor/components/EditorHeader.d.ts +3 -1
  65. package/dist/editor/components/EditorHeader.js +2 -2
  66. package/dist/editor/components/EntryChangesDrawer.d.ts +51 -0
  67. package/dist/editor/components/EntryChangesDrawer.js +363 -0
  68. package/dist/editor/components/EntryChangesSkeleton.d.ts +9 -0
  69. package/dist/editor/components/EntryChangesSkeleton.js +7 -0
  70. package/dist/editor/components/EntryHeader.d.ts +9 -1
  71. package/dist/editor/components/EntryHeader.js +25 -3
  72. package/dist/editor/components/LazyEntryChangesDrawer.d.ts +16 -0
  73. package/dist/editor/components/LazyEntryChangesDrawer.js +45 -0
  74. package/dist/editor/components/ReviewDialogs.js +3 -3
  75. package/dist/editor/context/ApiClientContext.d.ts +9 -0
  76. package/dist/editor/context/ApiClientContext.js +26 -2
  77. package/dist/editor/context/index.d.ts +1 -1
  78. package/dist/editor/context/index.js +1 -1
  79. package/dist/editor/copy.d.ts +1 -0
  80. package/dist/editor/copy.js +1 -0
  81. package/dist/editor/editor-utils.d.ts +2 -0
  82. package/dist/editor/editor-utils.js +15 -0
  83. package/dist/editor/entry-diff.d.ts +143 -0
  84. package/dist/editor/entry-diff.js +593 -0
  85. package/dist/editor/hooks/create-branch-request.d.ts +11 -1
  86. package/dist/editor/hooks/create-branch-request.js +16 -6
  87. package/dist/editor/hooks/useBranchActions.d.ts +19 -2
  88. package/dist/editor/hooks/useBranchActions.js +29 -20
  89. package/dist/editor/hooks/useBranchChangesData.d.ts +57 -0
  90. package/dist/editor/hooks/useBranchChangesData.js +134 -0
  91. package/dist/editor/hooks/useBranchManager.d.ts +16 -0
  92. package/dist/editor/hooks/useBranchManager.js +142 -54
  93. package/dist/editor/hooks/useDraftManager.js +6 -2
  94. package/dist/editor/hooks/useEntryManager.d.ts +18 -2
  95. package/dist/editor/hooks/useEntryManager.js +36 -10
  96. package/dist/editor/utils/editor-errors.d.ts +5 -2
  97. package/dist/git-manager.d.ts +71 -0
  98. package/dist/git-manager.js +270 -1
  99. package/dist/http/handler.js +11 -9
  100. package/dist/operating-mode/branch-namespace-fixtures.d.ts +17 -0
  101. package/dist/operating-mode/branch-namespace-fixtures.js +65 -0
  102. package/dist/operating-mode/branch-namespace.d.ts +34 -0
  103. package/dist/operating-mode/branch-namespace.js +121 -0
  104. package/dist/operating-mode/client-unsafe-strategy.js +7 -0
  105. package/dist/operating-mode/types.d.ts +8 -0
  106. package/dist/paths/branch-name.d.ts +11 -19
  107. package/dist/paths/branch-name.js +17 -27
  108. package/dist/paths/index.d.ts +2 -2
  109. package/dist/paths/index.js +2 -2
  110. package/dist/paths/resolve.d.ts +0 -1
  111. package/dist/paths/resolve.js +0 -1
  112. package/dist/paths/validation.d.ts +40 -1
  113. package/dist/paths/validation.js +83 -4
  114. package/dist/pr-comments.d.ts +17 -9
  115. package/dist/pr-comments.js +53 -15
  116. package/dist/services.js +2 -1
  117. package/dist/submission-attribution.d.ts +22 -0
  118. package/dist/submission-attribution.js +62 -6
  119. package/dist/task-queue/worker-status.d.ts +6 -1
  120. package/dist/task-queue/worker-status.js +23 -2
  121. package/dist/types.d.ts +59 -0
  122. package/dist/version.d.ts +1 -1
  123. package/dist/version.js +1 -1
  124. package/dist/worker/branch-policy.d.ts +111 -16
  125. package/dist/worker/branch-policy.js +222 -17
  126. package/dist/worker/cms-worker.d.ts +24 -2
  127. package/dist/worker/cms-worker.js +35 -24
  128. package/dist/worker/git-sync.d.ts +3 -3
  129. package/dist/worker/git-sync.js +42 -1
  130. package/dist/worker/github-gateway-http.js +2 -2
  131. package/dist/worker/github-gateway-wire.d.ts +40 -25
  132. package/dist/worker/github-gateway-wire.js +14 -3
  133. package/dist/worker/github-gateway.d.ts +17 -6
  134. package/dist/worker/github-gateway.js +62 -6
  135. package/dist/worker/github-mirror.d.ts +7 -4
  136. package/dist/worker/github-mirror.js +27 -16
  137. package/dist/worker/history-rewrite.d.ts +23 -10
  138. package/dist/worker/history-rewrite.js +43 -20
  139. package/dist/worker/legacy-branch-fixtures.d.ts +21 -0
  140. package/dist/worker/legacy-branch-fixtures.js +71 -0
  141. package/dist/worker/rebase.d.ts +2 -1
  142. package/dist/worker/rebase.js +93 -36
  143. package/dist/worker/task-runner.d.ts +4 -1
  144. package/dist/worker/task-runner.js +77 -48
  145. package/dist/worker/unpublishable-branches.d.ts +34 -0
  146. package/dist/worker/unpublishable-branches.js +182 -0
  147. 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.0`, built from [`f47713d`](https://github.com/safeinsights/canopycms/tree/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a).
9
9
 
10
- Its entries are [0.7.1](#071), under **Released**.
10
+ Its entries are [0.8.0](#080), 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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/.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,146 @@ entries under **Released**.
62
62
 
63
63
  ## Released
64
64
 
65
+ ### 0.8.0
66
+
67
+ <!-- changeset: merge-main-0-7-1-into-int-e -->
68
+
69
+ #### New branches are created in the branch namespace, and pull request links carry their short names — **behaviour change**
70
+
71
+ <!-- changeset: branches-created-in-namespace -->
72
+
73
+ _First in 0.8.0._
74
+
75
+ **What changed.** A branch an editor creates is named with the deployment's
76
+ [branch namespace](#the-github-gateway-writes-only-its-deployments-branch-namespace--security-fix-template-first) in front of the typed name, sanitized: typing
77
+ `spring/update` creates `canopycms/prod/spring-update` by default. Its short name
78
+ (`spring-update`) is what the branch listing returns as `shortName`, what `?branch=` links in pull
79
+ request bodies carry, and what a pull request without a title is named after (`Submit
80
+ spring-update`); `?branch=` and the API's `/:branch` segment accept it or the full name. A branch
81
+ outside the namespace is reached by its full name, or only by its exact form, `~<name>`, when a
82
+ namespace branch's short name is that name. Creation refuses a short name that another branch already has (the
83
+ base, the active branch, a branch outside the namespace, an exact name the gateway protects), one equal to
84
+ an API route (`admin`, `assets`, …), one kept for settings (`canopycms-settings-…` or the settings
85
+ branch), a name typed with the namespace in front, a name the remote holds a branch inside
86
+ (`spring/draft` for `spring`), and any name while the CMS and the gateway resolve different
87
+ namespaces or the remote has a branch named after part of the namespace. The gateway refuses a push
88
+ into the namespace while GitHub has a branch named after part of it or inside the one pushed.
89
+
90
+ **To adopt.** Update any CI workflow, ruleset or script that matches the names of branches the
91
+ editor creates, for example to skip them with `branches-ignore: ['canopycms/**']`. Branches that
92
+ already exist keep their names.
93
+
94
+ #### The editor shows a branch by its short name
95
+
96
+ <!-- changeset: editor-short-branch-names -->
97
+
98
+ _First in 0.8.0._
99
+
100
+ **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
101
+ editor shows `spring` where it showed `canopycms/prod/spring`: on the branch pill, the Branches
102
+ drawer, the Submit for review, Withdraw, Approve, Request changes and Delete dialogs, the comments
103
+ panel and the toasts. The editor's `?branch=` carries the short name too, as do the preview and its
104
+ page link; an old link with the full name still opens the branch, and the editor shortens it. A
105
+ branch outside the namespace, or nested deeper in it, is shown and linked by its full name, except
106
+ that one named like a namespace branch's short name is linked as `~<name>` (`%7E<name>` in the
107
+ address bar), its exact form, which only those links show; System health keeps the full ref and
108
+ workspace directory. The editor's API requests name a listed branch by its exact form, an internal
109
+ detail: `~` and the full name, each `/` as `~` (`/~canopycms~prod~spring/entries`). Git allows no
110
+ `~` in a branch name, so the form reaches the branch shown even when another answers to its short
111
+ name. Drafts saved in a browser stay with the branch, whichever name opened it.
112
+
113
+ The New branch field says "Will be named …" only when sanitizing changed what was typed, and shows
114
+ why a name is refused under the field, where it used to toast. A name with no letter
115
+ (a–z) or digit, such as `_`, is now refused. The "still being set up" answer a create or
116
+ open can get names the branch by its short name, not its workspace directory.
117
+
118
+ **To adopt.** Nothing. A script that reads the editor's `?branch=` gets the short name; the API
119
+ accepts it and the full name alike.
120
+
121
+ #### Pull request bodies show the CanopyCMS review state
122
+
123
+ <!-- changeset: pr-body-review-state -->
124
+
125
+ _First in 0.8.0._
126
+
127
+ **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.
128
+
129
+ #### `legacyBranches` keeps branches from outside the namespace publishing, and System health names any that cannot — **template first**
130
+
131
+ <!-- changeset: legacy-branches-and-unpublishable-warning -->
132
+
133
+ _First in 0.8.0._
134
+
135
+ **What changed.** `CanopyCmsService` takes `legacyBranches`: exact names of branches outside
136
+ [the gateway's namespace](#the-github-gateway-writes-only-its-deployments-branch-namespace--security-fix-template-first) that editors are still working on, which
137
+ the GitHub gateway may still write. It writes them, comma-separated, to the gateway's
138
+ `CANOPYCMS_LEGACY_BRANCHES`, and refuses at synth any list the gateway would refuse at boot,
139
+ such as an entry holding `*` or a comma, inside the resolved namespace, a branch the namespace
140
+ sits under, or repeated. Each git sync, the worker checks every editor branch against the
141
+ gateway's policy, and System health lists by full name the ones it would refuse to publish, with
142
+ what to do. The gateway now returns a pull request's body only when it would update that pull
143
+ request: its head is in the namespace or on `legacyBranches`, not protected, and in this
144
+ repository. For any other pull request it returns the merge state alone. So a legacy branch's
145
+ pull request keeps its comment and review blocks current, as a namespace branch's does.
146
+
147
+ **To adopt.** Before deploying, open the editor's branch list and pass every open branch whose
148
+ name is outside the namespace as `legacyBranches`; a hand install sets `CANOPYCMS_LEGACY_BRANCHES`
149
+ in `gateway.env` instead. After the deploy, System health names any you missed. Remove an entry
150
+ once its branch is merged or deleted.
151
+
152
+ #### The Content panel lists what a branch changes — **behaviour change**
153
+
154
+ <!-- changeset: content-panel-changed-filter -->
155
+
156
+ _First in 0.8.0._
157
+
158
+ **What changed.** The Content panel's filter now offers All, Unsaved and Changed. Unsaved is the
159
+ filter that used to be called Changed: entries with edits not yet saved. Changed lists the entries
160
+ that differ from the base branch, marked New, Edited or Moved, with deleted entries beneath the
161
+ tree, so a reviewer can see what a submitted branch changes without leaving the editor. It reads
162
+ the new `GET /:branch/changes` endpoint, which the catch-all API route already serves.
163
+
164
+ #### Show changes on a changed entry
165
+
166
+ <!-- changeset: entry-show-changes -->
167
+
168
+ _First in 0.8.0._
169
+
170
+ **What changed.** Reviewers and editors can open "Show changes" on a changed entry to see each
171
+ changed field's old and new values against the base branch, with text differences highlighted.
172
+ It opens from the entry header, and from each entry the Content panel's Changed filter lists as
173
+ deleted. It reads the new `GET /:branch/changes/...entryPath` endpoint, which the catch-all API
174
+ route already serves.
175
+
176
+ #### The GitHub gateway writes only its deployment's branch namespace — **security fix, template first**
177
+
178
+ <!-- changeset: gateway-branch-namespace -->
179
+
180
+ _First in 0.8.0._
181
+
182
+ **What changed.** The GitHub gateway now pushes, force-pushes, deletes and opens pull requests only
183
+ for branches in its namespace and the exact names in a new legacy list. The namespace is a template
184
+ ending with `/`, where `{deployment}` stands for the deployment name: `canopycms/{deployment}/` by
185
+ default, so `canopycms/prod/`. It is set by `CanopyCmsService`'s new `branchNamespace` prop (or
186
+ `CANOPYCMS_BRANCH_NAMESPACE`, then `branchNamespace` in `canopycms.config.ts`), and the gateway
187
+ reads it from its own environment only. Of the settings branches it pushes only this deployment's
188
+ own, as before: no lease, deletion or pull request. It updates, closes or drafts a pull request only
189
+ after GitHub shows that its head is such a branch of this repository, so a compromised CMS Lambda
190
+ cannot aim it elsewhere. System health says when the CMS and gateway resolve different namespaces.
191
+
192
+ **To adopt.** Deploy the stack template first: it now writes `CANOPYCMS_DEPLOYMENT_NAME`,
193
+ `CANOPYCMS_SETTINGS_BRANCH` and `CANOPYCMS_BRANCH_NAMESPACE`, which the gateway now reads, to
194
+ `gateway.env` too (a hand install adds them, as `gateway.env.example` shows). The bundle needs
195
+ worker contract 3, which an older template's roll gate refuses. Roll the worker bundle
196
+ (`canopycms-cdk`) with or before the CMS image, which creates no branch until the worker reports its
197
+ namespace. Stacks sharing a repository keep `{deployment}` in one template. Then list every open
198
+ branch outside the namespace, as [`legacyBranches`](#legacybranches-keeps-branches-from-outside-the-namespace-publishing-and-system-health-names-any-that-cannot--template-first)
199
+ describes. Until listed, a branch's publishes, pull request updates and deletion fail permanently,
200
+ naming the list. A rolled-back worker can rename namespace branches, breaking their links and open
201
+ editors; this release's worker restores them on its next sync. Submit none while rolled back: that
202
+ pushes the branch under its directory name, without its earlier commits, which this release
203
+ publishes only if `legacyBranches` lists it.
204
+
65
205
  ### 0.7.1
66
206
 
67
207
  <!-- changeset: worker-platform-ci -->
@@ -111,7 +251,7 @@ _First in 0.7.0._
111
251
 
112
252
  **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
253
 
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).
254
+ **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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#rolling-the-worker-from-ci).
115
255
 
116
256
  #### Pull request bodies link back to the editor
117
257
 
@@ -121,7 +261,7 @@ _First in 0.7.0._
121
261
 
122
262
  **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
263
 
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).
264
+ **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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#definecanopyconfig-options).
125
265
 
126
266
  #### CloudFront origin read timeout accepted up to 120 s; the editor waits 135 s
127
267
 
@@ -207,7 +347,7 @@ _First in 0.6.0._
207
347
 
208
348
  **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
349
 
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).
350
+ **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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md).
211
351
 
212
352
  ### 0.5.0
213
353
 
@@ -219,7 +359,7 @@ _First in 0.5.0._
219
359
 
220
360
  **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
361
 
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).
362
+ **To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#field-types).
223
363
 
224
364
  #### 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
365
 
@@ -229,7 +369,7 @@ _First in 0.5.0._
229
369
 
230
370
  **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
371
 
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).
372
+ **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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#how-references-work-in-the-editor).
233
373
 
234
374
  **Now deletable.** A shared `seo` constant passed separately to the Next context and the AI content config.
235
375
 
@@ -257,7 +397,7 @@ resolved without it.
257
397
  **To adopt.** Where a reference renders its target's prose, set `includeBody: true` on that
258
398
  reference field. Code that reads the body from a link-only reference's resolved type now sees
259
399
  `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).
400
+ [Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#resolving-references-in-a-listing).
261
401
 
262
402
  ### 0.3.3
263
403
 
@@ -674,7 +814,7 @@ URL.
674
814
  2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
675
815
  `app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
676
816
  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)).
817
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#live-preview)).
678
818
  3. A test reading view content from the route's server HTML must load the page in a browser.
679
819
  Server output rendered during a preview request carries the signed-in asset prefix; keep it out
680
820
  of cross-request caches (`unstable_cache`, module memos).
@@ -689,7 +829,7 @@ kept site styles ahead of Mantine's in the preview.
689
829
  server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
690
830
  path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
691
831
  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).
832
+ [Live Preview](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#live-preview).
693
833
 
694
834
  **To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
695
835
  as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
@@ -771,7 +911,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
771
911
  fields are nested or renamed, pass the AI config's `seo` the same object you pass
772
912
  `createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
773
913
  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).
914
+ shows [the recipe](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#ai-content-configuration).
775
915
 
776
916
  **Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
777
917
 
@@ -793,7 +933,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
793
933
  field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
794
934
  `MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
795
935
  `{ 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).
936
+ [MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#mdx-content-cannot-run-code).
797
937
 
798
938
  **To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
799
939
  `mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
@@ -930,7 +1070,7 @@ a format check.
930
1070
 
931
1071
  - (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
932
1072
  re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
933
- ([reference](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#definecanopyconfig-options)).
1073
+ ([reference](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#definecanopyconfig-options)).
934
1074
  - (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
935
1075
  the PR-body section every user who edited the branch, not only the submitter; settings commits
936
1076
  (permissions, groups) carry the acting user's trailer.
@@ -954,7 +1094,7 @@ saves only push the branch, and no failing PR task lands in System health.
954
1094
  that entry type goes unavailable: the editor says so, and its entries answer 503 with
955
1095
  `code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
956
1096
  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).
1097
+ [New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
958
1098
  Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
959
1099
  `ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
960
1100
 
@@ -992,7 +1132,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
992
1132
  new stack needs no steps.
993
1133
 
994
1134
  **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
1135
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
996
1136
  bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
997
1137
  refusing clients without TLS or IAM, replacing the worker's
998
1138
  `AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
@@ -1046,10 +1186,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
1046
1186
  with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
1047
1187
  unchanged.
1048
1188
  - `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).
1189
+ [Worker-down alarm](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#worker-down-alarm).
1050
1190
 
1051
1191
  **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
1192
+ [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
1053
1193
  `alarmTopic`.
1054
1194
 
1055
1195
  **Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
@@ -1060,7 +1200,7 @@ worker, and a hand-built alarm on the worker log group.
1060
1200
  **What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
1061
1201
  swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
1062
1202
  `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).
1203
+ [The worker instance](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#the-worker-instance).
1064
1204
 
1065
1205
  **To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
1066
1206
  not Template first and the worker contract stays at 1.
@@ -1126,7 +1266,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
1126
1266
 
1127
1267
  **To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
1128
1268
  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)).
1269
+ ([details](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#the-worker-instance)).
1130
1270
 
1131
1271
  #### The worker follows a rebased or deleted GitHub branch
1132
1272
 
@@ -1148,7 +1288,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
1148
1288
  bundle-only roll is safe.
1149
1289
 
1150
1290
  **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
1291
+ ([recipe](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
1152
1292
  `WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
1153
1293
  copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
1154
1294
 
@@ -1165,8 +1305,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
1165
1305
  template, then roll the bundle; on an older template it stops with `template too old for this
1166
1306
  bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
1167
1307
  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).
1308
+ ([steps](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
1309
+ [checklist](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#first-deploy-checklist).
1170
1310
 
1171
1311
  #### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
1172
1312
 
@@ -1177,7 +1317,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
1177
1317
  `X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
1178
1318
  its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
1179
1319
  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).
1320
+ [Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
1181
1321
 
1182
1322
  **To adopt.** If you wired the Function URL into your own distribution by hand, delete those
1183
1323
  behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
@@ -1353,7 +1493,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
1353
1493
  **To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
1354
1494
  apply the same rule here, for example `referenceLink: (target, { body }) =>
1355
1495
  !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).
1496
+ [AI Content Configuration](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#ai-content-configuration).
1357
1497
 
1358
1498
  **Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
1359
1499
  change its link.
@@ -1428,7 +1568,7 @@ _First in int.115._
1428
1568
  entry the base branch also changed, the "updated on the base branch" notice and the branch's
1429
1569
  conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
1430
1570
  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
1571
+ and Unpublishing](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#drafts-and-unpublishing) section covers long-lived branches and
1432
1572
  unpublishing.
1433
1573
 
1434
1574
  #### The editor calls the content drawer "All content"
@@ -1740,7 +1880,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
1740
1880
  The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
1741
1881
 
1742
1882
  **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).
1883
+ `{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#stamping-a-publication-date).
1744
1884
 
1745
1885
  **Now deletable.** A build step or hook that writes a missing publication date into new entries.
1746
1886
 
@@ -1787,7 +1927,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
1787
1927
  stored at, and `react-split-pane` is no longer a dependency.
1788
1928
  `EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
1789
1929
  no longer exported from `canopycms/client`. See
1790
- [Your root layout](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#editor-customization).
1930
+ [Your root layout](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#editor-customization).
1791
1931
 
1792
1932
  **To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
1793
1933
  instead, which lays out its own panes. Hiding your site chrome on the editor route is now
@@ -1898,7 +2038,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
1898
2038
  **To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
1899
2039
  `ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
1900
2040
  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).
2041
+ [Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
1902
2042
  Your own Server Actions in the CMS build still 403 behind OAC.
1903
2043
 
1904
2044
  **Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
@@ -1939,12 +2079,12 @@ fast naming the ARN, the field and the keys present, never a value.
1939
2079
  **To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
1940
2080
  prop. The scaffolded stack fills them from the repository _variables_
1941
2081
  `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
2082
+ ([why the prefix](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
1943
2083
  adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
1944
2084
  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
2085
  (also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
1946
2086
  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)).
2087
+ key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#security-model)).
1948
2088
 
1949
2089
  **Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
1950
2090
  worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
@@ -1956,7 +2096,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
1956
2096
  `githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
1957
2097
  nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
1958
2098
  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)).
2099
+ ([why](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
1960
2100
 
1961
2101
  **To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
1962
2102
  `githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
@@ -1969,7 +2109,7 @@ anyone holding an App's key can mint a token for any of its installations
1969
2109
  `verify` checks an existing installation's permissions: run it, since an App missing a
1970
2110
  permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
1971
2111
  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)).
2112
+ ([details](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
1973
2113
  2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
1974
2114
  of the three is refused at synth, and so is an App alongside a token.
1975
2115
  3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
@@ -1980,7 +2120,7 @@ anyone holding an App's key can mint a token for any of its installations
1980
2120
 
1981
2121
  The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
1982
2122
  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).
2123
+ [Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#authenticating-as-a-github-app).
1984
2124
 
1985
2125
  ```bash
1986
2126
  canopycms init-github-app create -- \
@@ -2028,7 +2168,7 @@ downloads the `.pem` from the App's settings page.
2028
2168
 
2029
2169
  **What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
2030
2170
  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).
2171
+ [Rotating a secret](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#rotating-a-secret).
2032
2172
 
2033
2173
  **To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
2034
2174
  GitHub App private key is still read only at boot: store the new key, replace the instance, and
@@ -2082,12 +2222,12 @@ also check the bucket policy for its grant.
2082
2222
  5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
2083
2223
  Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
2084
2224
  `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)).
2225
+ ([Dual Build Support](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#dual-build-support)).
2086
2226
 
2087
2227
  **Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
2088
2228
  function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
2089
2229
  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)).
2230
+ on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#where-the-image-is-built)).
2091
2231
 
2092
2232
  **To adopt.**
2093
2233
 
@@ -2116,7 +2256,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
2116
2256
 
2117
2257
  **What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
2118
2258
  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
2259
+ uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#media-configuration) for the
2120
2260
  CloudFront behavior it expects.
2121
2261
 
2122
2262
  **To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
@@ -2141,7 +2281,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
2141
2281
  bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
2142
2282
  `Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
2143
2283
  `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).
2284
+ pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#cross-account-asset-bucket).
2145
2285
 
2146
2286
  **To adopt.** Optional:
2147
2287
 
@@ -2251,7 +2391,7 @@ public JWKS PEM, used only to verify signatures.
2251
2391
  to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
2252
2392
  deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
2253
2393
  `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)).
2394
+ `clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/docs/deploying-to-aws.md#security-model)).
2255
2395
 
2256
2396
  #### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
2257
2397
 
@@ -2350,7 +2490,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
2350
2490
  Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
2351
2491
  no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
2352
2492
  `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:
2493
+ is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#media-configuration)). Two traps:
2354
2494
 
2355
2495
  - Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
2356
2496
  a nested route prefix and emits zero params, building green.
@@ -2509,7 +2649,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
2509
2649
  `withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
2510
2650
  `canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
2511
2651
  `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
2652
+ [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#sitemap-and-seo-metadata). Every routable entry type is in
2513
2653
  the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
2514
2654
  sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
2515
2655
  filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
@@ -2566,7 +2706,7 @@ underscore-prefixed files are skipped.
2566
2706
 
2567
2707
  **What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
2568
2708
  `defaultPathAccess: { read: 'allow' }`
2569
- ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#public-read-on-server-deployments)).
2709
+ ([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#public-read-on-server-deployments)).
2570
2710
 
2571
2711
  **To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
2572
2712
  consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
@@ -2619,7 +2759,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
2619
2759
  **What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
2620
2760
  gives one template's value type) requires exactly
2621
2761
  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
2762
+ [Block Component Registries](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#block-component-registries) and
2623
2763
  `apps/example1/app/components/PostView.tsx`.
2624
2764
 
2625
2765
  ```ts
@@ -2641,7 +2781,7 @@ templates against the schema.
2641
2781
 
2642
2782
  **What changed.** Spreading a `const` field array into several schemas, and nesting
2643
2783
  `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
2784
+ ([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
2645
2785
  identity helper for them.
2646
2786
 
2647
2787
  ```ts
@@ -2660,7 +2800,7 @@ field by composing from the same `const` field object.
2660
2800
  A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
2661
2801
  it, and listings do with
2662
2802
  [`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).
2803
+ (0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#shared--referenced-blocks).
2664
2804
 
2665
2805
  **Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
2666
2806
 
@@ -2682,7 +2822,7 @@ Not retro-documented, apart from these:
2682
2822
 
2683
2823
  #### The registry is keyed by entry-type name (0.0.42)
2684
2824
 
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.
2825
+ **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/f47713db8d2e5c0dbb3b7ef77ea4b03c1939595a/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
2686
2826
 
2687
2827
  **To adopt.**
2688
2828