@shoalrun/cli 0.1.0-alpha.12 → 0.1.0-alpha.13

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 (193) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +45 -5
  3. package/agent-docs/.well-known/shoalrun/navigation/project-updates-50f26fe22670.txt +3 -1
  4. package/agent-docs/SNAPSHOT.json +5 -5
  5. package/agent-docs/api-docs/support.md +11 -10
  6. package/agent-docs/author/components.md +13 -1
  7. package/agent-docs/author/frontmatter-reference.md +28 -25
  8. package/agent-docs/author/frontmatter-reference.sections/choose-a-publication-and-visibility.md +3 -1
  9. package/agent-docs/author/frontmatter-reference.sections/control-output-details.md +3 -1
  10. package/agent-docs/author/frontmatter-reference.sections/global-defaults-and-enforced-values.md +3 -1
  11. package/agent-docs/author/frontmatter-reference.sections/html-markdown-and-agents.md +3 -1
  12. package/agent-docs/author/frontmatter-reference.sections/identify-and-route-a-page.md +3 -1
  13. package/agent-docs/author/frontmatter-reference.sections/point-agents-to-it.md +3 -1
  14. package/agent-docs/author/frontmatter-reference.sections/project-defined-fields.md +3 -1
  15. package/agent-docs/author/frontmatter-reference.sections/related-reading.md +3 -1
  16. package/agent-docs/author/frontmatter-reference.sections/use-the-local-files-while-authoring.md +3 -1
  17. package/agent-docs/author/frontmatter-reference.sections/when-the-files-update.md +3 -1
  18. package/agent-docs/author/frontmatter.md +5 -2
  19. package/agent-docs/author/frontmatter.sections/audience-badges.md +1 -1
  20. package/agent-docs/author/frontmatter.sections/give-deprecation-guidance.md +1 -1
  21. package/agent-docs/author/frontmatter.sections/global-defaults-and-enforced-values.md +1 -1
  22. package/agent-docs/author/frontmatter.sections/optional-native-fields.md +5 -2
  23. package/agent-docs/author/frontmatter.sections/publication-fields.md +1 -1
  24. package/agent-docs/author/frontmatter.sections/publishing-policy.md +1 -1
  25. package/agent-docs/author/frontmatter.sections/related-metadata-tasks.md +1 -1
  26. package/agent-docs/author/frontmatter.sections/related-reading.md +1 -1
  27. package/agent-docs/author/frontmatter.sections/required-after-inheritance.md +1 -1
  28. package/agent-docs/author/frontmatter.sections/seo-fields.md +1 -1
  29. package/agent-docs/author/frontmatter.sections/validation-rules.md +1 -1
  30. package/agent-docs/author/markdown-metadata.md +13 -5
  31. package/agent-docs/author/navigation.md +12 -1
  32. package/agent-docs/author/navigation.sections/arrange-authored-pages.md +1 -1
  33. package/agent-docs/author/navigation.sections/fill-an-api-tag-group.md +1 -1
  34. package/agent-docs/author/navigation.sections/hide-group-page-counts.md +12 -1
  35. package/agent-docs/author/navigation.sections/html-markdown-and-agents.md +1 -1
  36. package/agent-docs/author/navigation.sections/local-api-preview.md +1 -1
  37. package/agent-docs/author/navigation.sections/mix-guides-and-api-references.md +1 -1
  38. package/agent-docs/author/navigation.sections/optionally-split-a-large-menu-into-files.md +1 -1
  39. package/agent-docs/author/navigation.sections/reach-navigation-while-reading.md +1 -1
  40. package/agent-docs/author/navigation.sections/related-reading.md +1 -1
  41. package/agent-docs/author/navigation.sections/split-navigation-into-tabs.md +1 -1
  42. package/agent-docs/author/navigation.sections/subject-lifecycle-labels.md +1 -1
  43. package/agent-docs/author/templates.md +10 -2
  44. package/agent-docs/author/templates.sections/built-in-feature-templates.md +1 -1
  45. package/agent-docs/author/templates.sections/built-in-templates.md +1 -1
  46. package/agent-docs/author/templates.sections/choose-formatting-enforcement-for-your-project.md +1 -1
  47. package/agent-docs/author/templates.sections/create-or-edit-a-project-template.md +10 -2
  48. package/agent-docs/author/templates.sections/keep-the-four-shapes-distinct.md +1 -1
  49. package/agent-docs/author/templates.sections/project-added-templates.md +1 -1
  50. package/agent-docs/author/templates.sections/related-reading.md +1 -1
  51. package/agent-docs/author/templates.sections/scaffold-a-page.md +1 -1
  52. package/agent-docs/author/templates.sections/short-cli-and-derived-values.md +1 -1
  53. package/agent-docs/author/templates.sections/what-every-template-gives-you.md +1 -1
  54. package/agent-docs/author/workspace.md +7 -1
  55. package/agent-docs/author/writing-style.md +13 -1
  56. package/agent-docs/author/writing-style.sections/adapt-this-example.md +1 -1
  57. package/agent-docs/author/writing-style.sections/choose-components-by-reader-need.md +1 -1
  58. package/agent-docs/author/writing-style.sections/evidence-and-uncertainty.md +1 -1
  59. package/agent-docs/author/writing-style.sections/example-audience-and-scope.md +1 -1
  60. package/agent-docs/author/writing-style.sections/feature-availability.md +36 -0
  61. package/agent-docs/author/writing-style.sections/ingredients-recipes-and-cookbooks.md +1 -1
  62. package/agent-docs/author/writing-style.sections/page-purpose-and-structure.md +1 -1
  63. package/agent-docs/author/writing-style.sections/procedures-and-examples.md +1 -1
  64. package/agent-docs/author/writing-style.sections/related-reading.md +1 -1
  65. package/agent-docs/author/writing-style.sections/review-a-draft.md +1 -1
  66. package/agent-docs/author/writing-style.sections/reviewed-writing-examples.md +1 -1
  67. package/agent-docs/author/writing-style.sections/voice-and-explanations.md +1 -1
  68. package/agent-docs/changelog/2026-10-28.md +89 -0
  69. package/agent-docs/changelog.md +9 -1
  70. package/agent-docs/config/outputs.md +15 -11
  71. package/agent-docs/config/outputs.sections/exports.md +14 -11
  72. package/agent-docs/config/outputs.sections/metadata.md +1 -1
  73. package/agent-docs/config/outputs.sections/related-reading.md +1 -1
  74. package/agent-docs/content-delivery/agents.md +86 -0
  75. package/agent-docs/content-delivery/api.md +130 -0
  76. package/agent-docs/content-delivery/client.md +79 -0
  77. package/agent-docs/content-delivery/http-api/operations/get-content-representation-fa1d2e3f.md +394 -0
  78. package/agent-docs/content-delivery/http-api/operations/get-content-representation-head-4052375c.md +256 -0
  79. package/agent-docs/content-delivery/http-api/operations/get-content-resource-849f1c49.md +911 -0
  80. package/agent-docs/content-delivery/http-api/operations/get-content-resource-head-0a352acd.md +246 -0
  81. package/agent-docs/content-delivery/http-api/operations/list-content-resources-8e977ec7.md +913 -0
  82. package/agent-docs/content-delivery/http-api/operations/list-content-resources-head-b67cbad9.md +236 -0
  83. package/agent-docs/content-delivery/http-api.md +78 -0
  84. package/agent-docs/content-delivery/manifest.md +79 -0
  85. package/agent-docs/content-delivery/publish.md +72 -0
  86. package/agent-docs/content-delivery/render.md +73 -0
  87. package/agent-docs/content-delivery/rest.md +108 -0
  88. package/agent-docs/content-delivery/sections.md +110 -0
  89. package/agent-docs/content-delivery/select.md +100 -0
  90. package/agent-docs/content-delivery.md +79 -0
  91. package/agent-docs/documents.json +6748 -5073
  92. package/agent-docs/provenance.json +4 -4
  93. package/agent-docs/publish/content-export.md +32 -16
  94. package/agent-docs/publish/content-export.sections/assets-downloads-and-notices.md +3 -3
  95. package/agent-docs/publish/content-export.sections/check-the-result.md +2 -2
  96. package/agent-docs/publish/content-export.sections/export-selected-pages.md +12 -9
  97. package/agent-docs/publish/content-export.sections/inspect-the-manifest.md +5 -3
  98. package/agent-docs/publish/content-export.sections/prerequisites.md +3 -3
  99. package/agent-docs/publish/content-export.sections/related-reading.md +2 -2
  100. package/agent-docs/publish/content-export.sections/review-exported-api-material.md +3 -3
  101. package/agent-docs/publish/content-export.sections/try-the-help-drawer-example.md +3 -3
  102. package/agent-docs/publish/content-export.sections/upgrade-an-existing-integration.md +34 -0
  103. package/agent-docs/publish/content-export.sections/what-the-representations-retain.md +4 -4
  104. package/agent-docs/publish/mcp.md +3 -1
  105. package/agent-docs/publish/mcp.sections/check-budgets-and-errors.md +1 -1
  106. package/agent-docs/publish/mcp.sections/choose-the-documentation-source.md +1 -1
  107. package/agent-docs/publish/mcp.sections/configure-the-client.md +1 -1
  108. package/agent-docs/publish/mcp.sections/generate-a-vercel-endpoint.md +1 -1
  109. package/agent-docs/publish/mcp.sections/related-reading.md +3 -1
  110. package/agent-docs/publish/mcp.sections/search-then-read.md +1 -1
  111. package/agent-docs/publish/mcp.sections/serve-a-public-endpoint-on-node.md +1 -1
  112. package/agent-docs/publish/mcp.sections/verify-the-connection.md +1 -1
  113. package/agent-docs/publish/mcp.sections/why-offer-mcp-for-public-docs.md +1 -1
  114. package/agent-docs/publish/seo.md +16 -2
  115. package/agent-docs/publish/seo.sections/related-reading.md +28 -0
  116. package/agent-docs/publish/seo.sections/set-the-public-address.md +36 -0
  117. package/agent-docs/publish/seo.sections/what-agents-receive.md +28 -0
  118. package/agent-docs/publish/seo.sections/what-the-build-adds.md +42 -0
  119. package/agent-docs/publish/seo.sections/write-the-page-title-and-summary.md +43 -0
  120. package/agent-docs/search-index.json +1 -1
  121. package/agent-docs/styling/layouts.md +21 -3
  122. package/agent-docs/styling/layouts.sections/build-a-landing-page.md +6 -3
  123. package/agent-docs/styling/layouts.sections/build-a-splash-page.md +6 -3
  124. package/agent-docs/styling/layouts.sections/control-navigation-tabs.md +6 -3
  125. package/agent-docs/styling/layouts.sections/customize-the-hero.md +6 -3
  126. package/agent-docs/styling/layouts.sections/hero.md +6 -3
  127. package/agent-docs/styling/layouts.sections/hide-the-table-of-contents-or-give-content-more-room.md +54 -0
  128. package/agent-docs/styling/layouts.sections/html-markdown-and-agents.md +6 -3
  129. package/agent-docs/styling/layouts.sections/related-reading.md +6 -3
  130. package/dist/api.js +70 -3
  131. package/dist/authoring-hints.d.ts +3 -0
  132. package/dist/authoring-hints.js +35 -0
  133. package/dist/authoring-project.d.ts +1 -1
  134. package/dist/authoring-project.js +2 -0
  135. package/dist/authoring-validation.js +2 -0
  136. package/dist/code-samples.js +22 -11
  137. package/dist/compiler-config.d.ts +1 -0
  138. package/dist/compiler-config.js +13 -0
  139. package/dist/compiler.js +2 -1
  140. package/dist/component-names.js +1 -1
  141. package/dist/component-transform.js +7 -1
  142. package/dist/content-delivery-contract.d.ts +108 -0
  143. package/dist/content-delivery-contract.js +15 -0
  144. package/dist/content-delivery-transport.d.ts +3 -0
  145. package/dist/content-delivery-transport.js +47 -0
  146. package/dist/content-delivery-validation.d.ts +7 -0
  147. package/dist/content-delivery-validation.js +122 -0
  148. package/dist/content-delivery.d.ts +21 -0
  149. package/dist/content-delivery.js +119 -0
  150. package/dist/content-export-anchors.d.ts +11 -0
  151. package/dist/content-export-anchors.js +79 -0
  152. package/dist/content-export-command.d.ts +4 -2
  153. package/dist/content-export-command.js +15 -2
  154. package/dist/content-export-comparison.d.ts +16 -0
  155. package/dist/content-export-comparison.js +48 -0
  156. package/dist/content-export-config.d.ts +17 -0
  157. package/dist/content-export-config.js +47 -3
  158. package/dist/content-export-render.js +20 -1
  159. package/dist/content-export.d.ts +5 -1
  160. package/dist/content-export.js +193 -40
  161. package/dist/content-mount.d.ts +11 -0
  162. package/dist/content-mount.js +73 -0
  163. package/dist/content-rest-client.d.ts +12 -0
  164. package/dist/content-rest-client.js +162 -0
  165. package/dist/content-rest-contract.d.ts +27 -0
  166. package/dist/content-rest-contract.js +9 -0
  167. package/dist/content-rest-server.d.ts +7 -0
  168. package/dist/content-rest-server.js +99 -0
  169. package/dist/content-source.d.ts +3 -1
  170. package/dist/frontmatter.js +8 -7
  171. package/dist/html-renderer.js +25 -0
  172. package/dist/markdown-sections.d.ts +2 -1
  173. package/dist/markdown-sections.js +8 -18
  174. package/dist/page-renderer.js +5 -3
  175. package/dist/publication-plan.js +2 -1
  176. package/dist/scaffold-placeholders.d.ts +2 -0
  177. package/dist/scaffold-placeholders.js +19 -0
  178. package/dist/section-identity.d.ts +24 -0
  179. package/dist/section-identity.js +137 -0
  180. package/examples/content-delivery/README.md +87 -0
  181. package/examples/content-delivery/app.js +91 -0
  182. package/examples/content-delivery/content/billing.mdx +22 -0
  183. package/examples/content-delivery/docs.config.yaml +36 -0
  184. package/examples/content-delivery/index.html +25 -0
  185. package/examples/content-delivery/preview.mjs +86 -0
  186. package/examples/content-delivery/snippets/refund-window.mdx +3 -0
  187. package/examples/help-drawer/README.md +2 -2
  188. package/examples/help-drawer/app.js +3 -3
  189. package/package.json +6 -3
  190. package/schemas/content-export.schema.json +469 -33
  191. package/schemas/content-rest.openapi.json +1627 -0
  192. package/skills/shoalrun-author/SKILL.md +2 -0
  193. package/styles/site.css +4 -1
@@ -0,0 +1,236 @@
1
+ ---
2
+ id: reference.content-rest.listContentResourcesHead
3
+ title: List resource metadata headers
4
+ summary: HEAD /resources
5
+ type: api-reference
6
+ area: api
7
+ subarea: api-reference
8
+ canonical: /content-delivery/http-api/operations/list-content-resources-head-b67cbad9
9
+ ---
10
+
11
+ # List resource metadata headers
12
+
13
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
14
+
15
+ Navigation section: [Reference](https://www.shoalrun.com/.well-known/shoalrun/navigation/reference-tab-50f26fe22670.txt) (ID: reference-tab). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
16
+
17
+ Breadcrumbs: [Reference](https://www.shoalrun.com/cli.md) > Content delivery > Content REST API > Other > List resource metadata headers
18
+
19
+ **Updated: 2026-10-28.**
20
+
21
+ This reference is generated from the OpenAPI description. It shows the operation contract; follow any related guides below for task steps and context.
22
+
23
+ OpenAPI for this operation: [Download JSON](https://www.shoalrun.com/api/operations/production/current/en/content-rest-listcontentresourceshead-220a5fd6f9ff22577a0823f7f772b7f76e01c38aa0b24dd895d7a91ebbad4021.json).
24
+
25
+ ## HEAD /resources
26
+
27
+ List resource metadata headers
28
+
29
+ Query parameters are single-valued; unknown or duplicate parameters are rejected. Publication and revision checks run before conditional ETag checks. No pagination, search, writes, authentication, or cross-origin policy is supplied by this reference adapter. HEAD returns the GET status and headers without a response body.
30
+
31
+ ### Servers
32
+
33
+ `/content/v1`
34
+
35
+ ### Parameters
36
+
37
+ #### channel (query)
38
+
39
+ Required
40
+
41
+ Exact publication channel. No default or fallback.
42
+
43
+ string; minLength: 1; maxLength: 2048
44
+
45
+ **Default example**: `"production"`
46
+
47
+ #### version (query)
48
+
49
+ Required
50
+
51
+ Exact publication version. No default or fallback.
52
+
53
+ string; minLength: 1; maxLength: 2048
54
+
55
+ **Default example**: `"current"`
56
+
57
+ #### language (query)
58
+
59
+ Required
60
+
61
+ Exact publication language. No default or fallback.
62
+
63
+ string; minLength: 1; maxLength: 2048
64
+
65
+ **Default example**: `"en"`
66
+
67
+ #### revision (query)
68
+
69
+ Optional
70
+
71
+ Omit to discover the currently supplied snapshot. Supply to require that exact revision.
72
+
73
+ string; pattern: ^\[a-f0-9]{64}$
74
+
75
+ **Default example**: `"0770e6d70db51967fac8dcc7bb4ff5a5bff87378eb2e2bbb63dea93d090c82e8"`
76
+
77
+ #### If-None-Match (header)
78
+
79
+ Optional
80
+
81
+ An ETag, comma-separated ETags, or \*. Weak comparison is supported for GET and HEAD.
82
+
83
+ string
84
+
85
+ ### Example request
86
+
87
+ ```bash
88
+ curl --head \
89
+ --url 'https://YOUR_API_HOST/content/v1/resources?channel=YOUR_CHANNEL&version=YOUR_VERSION&language=YOUR_LANGUAGE'
90
+ ```
91
+
92
+ ### Responses
93
+
94
+ #### 200: OK
95
+
96
+ The selected resource or inventory.
97
+
98
+ ##### Response headers
99
+
100
+ ###### ETag
101
+
102
+ Optional
103
+
104
+ Strong SHA-256 validator of the exact UTF-8 response bytes.
105
+
106
+ Serialization: simple; explode: false.
107
+
108
+ string
109
+
110
+ ###### Cache-Control
111
+
112
+ Optional
113
+
114
+ Unpinned discovery uses no-cache. Revision-pinned success uses public, max-age=31536000, immutable. Errors use no-store.
115
+
116
+ Serialization: simple; explode: false.
117
+
118
+ string
119
+
120
+ #### 304: Not Modified
121
+
122
+ The validated selected response matches If-None-Match. No response body.
123
+
124
+ ##### Response headers
125
+
126
+ ###### ETag
127
+
128
+ Optional
129
+
130
+ Strong SHA-256 validator of the exact UTF-8 response bytes.
131
+
132
+ Serialization: simple; explode: false.
133
+
134
+ string
135
+
136
+ ###### Cache-Control
137
+
138
+ Optional
139
+
140
+ Unpinned discovery uses no-cache. Revision-pinned success uses public, max-age=31536000, immutable. Errors use no-store.
141
+
142
+ Serialization: simple; explode: false.
143
+
144
+ string
145
+
146
+ #### 400: Bad Request
147
+
148
+ invalid_request: missing, duplicate, unknown, or malformed query parameter.
149
+
150
+ ##### Response headers
151
+
152
+ ###### Cache-Control
153
+
154
+ Optional
155
+
156
+ Serialization: simple; explode: false.
157
+
158
+ const: "no-store"
159
+
160
+ #### 404: Not Found
161
+
162
+ not_found: unknown publication, resource, or route.
163
+
164
+ ##### Response headers
165
+
166
+ ###### Cache-Control
167
+
168
+ Optional
169
+
170
+ Serialization: simple; explode: false.
171
+
172
+ const: "no-store"
173
+
174
+ #### 405: Method Not Allowed
175
+
176
+ method_not_allowed: only GET and HEAD are supported; Allow lists both.
177
+
178
+ ##### Response headers
179
+
180
+ ###### Cache-Control
181
+
182
+ Optional
183
+
184
+ Serialization: simple; explode: false.
185
+
186
+ const: "no-store"
187
+
188
+ ###### Allow
189
+
190
+ Optional
191
+
192
+ Serialization: simple; explode: false.
193
+
194
+ const: "GET, HEAD"
195
+
196
+ #### 406: Not Acceptable
197
+
198
+ unsupported_format: unsupported or unavailable representation format.
199
+
200
+ ##### Response headers
201
+
202
+ ###### Cache-Control
203
+
204
+ Optional
205
+
206
+ Serialization: simple; explode: false.
207
+
208
+ const: "no-store"
209
+
210
+ #### 409: Conflict
211
+
212
+ stale_revision: revision unavailable, or source bytes no longer match the pinned snapshot.
213
+
214
+ ##### Response headers
215
+
216
+ ###### Cache-Control
217
+
218
+ Optional
219
+
220
+ Serialization: simple; explode: false.
221
+
222
+ const: "no-store"
223
+
224
+ #### 500: Internal Server Error
225
+
226
+ internal_error: the source could not complete the request.
227
+
228
+ ##### Response headers
229
+
230
+ ###### Cache-Control
231
+
232
+ Optional
233
+
234
+ Serialization: simple; explode: false.
235
+
236
+ const: "no-store"
@@ -0,0 +1,78 @@
1
+ ---
2
+ id: reference.content-rest
3
+ title: Content REST API
4
+ summary: Look up resource routes, publication parameters, revision checks,
5
+ caching, and HTTP errors.
6
+ type: reference
7
+ area: publishing
8
+ subarea: publishing-content-delivery
9
+ canonical: /content-delivery/http-api
10
+ ---
11
+
12
+ # Content REST API
13
+
14
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
15
+
16
+ Navigation section: [Reference](https://www.shoalrun.com/.well-known/shoalrun/navigation/reference-tab-50f26fe22670.txt) (ID: reference-tab). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
17
+
18
+ Breadcrumbs: [Reference](https://www.shoalrun.com/cli.md) > Content delivery > Content REST API > Overview
19
+
20
+ **Updated: 2026-10-29.**
21
+
22
+ Content REST contract v1 exposes one reviewed resource inventory per configured publication. The default base path is `/content/v1`. Protocol v1 is independent of the package release and publication version.
23
+
24
+ The host application supplies the API origin. The relative server URL `/content/v1` describes a mount, not a live endpoint on this documentation site. Use the [local example](https://www.shoalrun.com/content-delivery/rest.md) to try requests.
25
+
26
+ Available since `0.1.0-alpha.13`.
27
+
28
+ ## Operations
29
+
30
+ The following references are generated from the reviewed OpenAPI source. They contain each operation's parameters, response schemas, examples, and source download.
31
+
32
+ | Operation | Purpose |
33
+ | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
34
+ | [List resource metadata](https://www.shoalrun.com/content-delivery/http-api/operations/list-content-resources-8e977ec7.md) | Discover resources and the loaded revision |
35
+ | [List metadata headers](https://www.shoalrun.com/content-delivery/http-api/operations/list-content-resources-head-b67cbad9.md) | Check the inventory without a response body |
36
+ | [Read resource metadata](https://www.shoalrun.com/content-delivery/http-api/operations/get-content-resource-849f1c49.md) | Inspect one resource in a pinned revision |
37
+ | [Read metadata headers](https://www.shoalrun.com/content-delivery/http-api/operations/get-content-resource-head-0a352acd.md) | Check one resource without a response body |
38
+ | [Read HTML or Markdown](https://www.shoalrun.com/content-delivery/http-api/operations/get-content-representation-fa1d2e3f.md) | Fetch original representation bytes |
39
+ | [Read representation headers](https://www.shoalrun.com/content-delivery/http-api/operations/get-content-representation-head-4052375c.md) | Check representation headers without a response body |
40
+
41
+ ## Keep publication and revision together
42
+
43
+ All routes require a channel, version, and language. Omit `revision` only to discover the current inventory; copy its returned revision into subsequent requests. There is no pagination, search query, or fallback to another publication.
44
+
45
+ Treat the returned resource `key` as opaque. It identifies a page, section, or snippet instance independently of publication and revision. JavaScript integrations can use `contentResourceKey(ref)` from `@shoalrun/cli/content`. Do not substitute filenames, headings, or document IDs for the returned key.
46
+
47
+ ## Caching and revisions
48
+
49
+ Successful responses include a strong `ETag` containing the SHA-256 of their response bytes. `If-None-Match` can return `304` without a body. An inventory request without `revision` uses `Cache-Control: no-cache`. Successful revision-pinned requests use `public, max-age=31536000, immutable`.
50
+
51
+ An unavailable revision returns `409`; the handler does not silently serve newer content. Errors use JSON with an `error.code` and `error.message`, and `Cache-Control: no-store`. `HEAD` returns the same status and headers without a body. The supplied browser client requests fresh responses and verifies representation bytes against the inventory; it does not maintain an HTTP response cache.
52
+
53
+ ## Host the reference handler
54
+
55
+ Import `createContentRestHandler` from `@shoalrun/cli/content/server`:
56
+
57
+ ```ts
58
+ createContentRestHandler({ sources, basePath? }):
59
+ (request: Request) => Promise<Response>
60
+ ```
61
+
62
+ `sources` is an array of already-open `ContentSnapshot` instances with distinct publications. `basePath` defaults to `/content/v1`; use an absolute path without a trailing slash. Segments accept ASCII letters, numbers, underscores, and hyphens. The caller owns the listener, routing, source disposal, and access policy. See [serve content through REST](https://www.shoalrun.com/content-delivery/rest.md) for setup.
63
+
64
+ The adapter sends representation bytes unchanged. Continue hosting the original export's static asset and link mount. It does not supply authentication, search, editing, or revision history.
65
+
66
+ ## HTML, Markdown, and agents
67
+
68
+ Each native operation reference presents its source-backed request and response contract in HTML and Markdown. Agents can use those schemas and examples to list resources and request Markdown with the same publication and revision. HTML responses are passive content; the API does not supply application styling or browser behavior.
69
+
70
+ ## Related reading
71
+
72
+ ### Read first
73
+
74
+ - [Serve content through REST](https://www.shoalrun.com/content-delivery/rest.md) — Set up the reference HTTP adapter.
75
+
76
+ ### Related topics
77
+
78
+ - [Serve content through REST](https://www.shoalrun.com/content-delivery/rest.md) — Look up HTTP routes and revision handling.
@@ -0,0 +1,79 @@
1
+ ---
2
+ id: reference.content-manifest
3
+ title: Content manifest
4
+ summary: Look up resource references, representations, assets, revision digests,
5
+ and export diagnostics.
6
+ type: reference
7
+ area: publishing
8
+ subarea: publishing-content-delivery
9
+ canonical: /content-delivery/manifest
10
+ ---
11
+
12
+ # Content manifest
13
+
14
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
15
+
16
+ Navigation section: [Reference](https://www.shoalrun.com/.well-known/shoalrun/navigation/reference-tab-50f26fe22670.txt) (ID: reference-tab). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
17
+
18
+ Breadcrumbs: [Reference](https://www.shoalrun.com/cli.md) > Content delivery > Content manifest
19
+
20
+ **Updated: 2026-10-29.**
21
+
22
+ `manifest.json` is the entry point for a content export. The resource-aware implementation uses `kind: shoalrun-content-export`, `schemaVersion: 1`, and a `resources` array. Earlier whole-page exports use a `documents` array; rebuild those exports before opening them with the resource client.
23
+
24
+ Available since `0.1.0-alpha.13`.
25
+
26
+ ## Bundle fields
27
+
28
+ These fields describe the complete export and its publication.
29
+
30
+ | Field | Meaning |
31
+ | ------------- | -------------------------------------------------------------------- |
32
+ | `digest` | Revision digest for the bundle manifest |
33
+ | `publicBase` | Root-relative serving mount with a trailing slash |
34
+ | `publication` | One channel, version, and language |
35
+ | `review` | API source-review status and digests |
36
+ | `resources` | Selected pages, sections, and snippet instances |
37
+ | `assets` | Local asset records |
38
+ | `files` | Exported file paths, sizes, and digests |
39
+ | `diagnostics` | Export findings such as external images or static interaction output |
40
+
41
+ A review status of `required` identifies a review candidate. Do not serve it as an approved content release.
42
+
43
+ ## Resource fields
44
+
45
+ Each resource has `ref`, `publication`, `title`, `summary`, `type`, `representations`, `assets`, and `externalDependencies`. A `canonicalUrl` or source metadata may also be present.
46
+
47
+ ```json
48
+ {
49
+ "kind": "section",
50
+ "documentId": "guide.billing",
51
+ "sectionId": "refunds"
52
+ }
53
+ ```
54
+
55
+ This is a section's `ref`, not a complete manifest. Page references use `kind` and `documentId`; snippet-instance references use `kind` and `id`. Identity is scoped to the publication. A title or generated filename is not a resource reference.
56
+
57
+ ## Representations and links
58
+
59
+ Each available `html` or `markdown` representation declares `path`, `mediaType`, `bytes`, `digest`, `anchors`, and `links`. Paths point to files under the export mount. Anchors map source IDs to exported DOM IDs. Link records distinguish `resource`, `canonical`, `external`, and `asset` targets; resource links include a typed reference.
60
+
61
+ A resource's asset list names local dependencies. `externalDependencies` identifies remote images that were not copied. Distribute `NOTICES.txt` and any required attribution with the content.
62
+
63
+ ## Validate a consumer
64
+
65
+ Use the content client or validate the manifest before fetching its declared paths. Unknown references and unavailable formats are errors. Check representation bytes and digest against the opened revision. Do not assume that a valid digest makes an untrusted host or its HTML safe.
66
+
67
+ ## HTML, Markdown, and agents
68
+
69
+ The manifest records each representation separately because anchors, links, and rendered bytes can differ. It supplies IDs and revision context without inserting machine labels into ordinary Markdown headings. An agent can select Markdown by a resource reference while an application selects HTML from the same revision.
70
+
71
+ ## Related reading
72
+
73
+ ### Read first
74
+
75
+ - [Content delivery](https://www.shoalrun.com/content-delivery.md) — Understand resource delivery and its application boundary.
76
+
77
+ ### Related topics
78
+
79
+ - [Publish and update content](https://www.shoalrun.com/content-delivery/publish.md) — Inspect revision and representation metadata.
@@ -0,0 +1,72 @@
1
+ ---
2
+ id: guide.content-delivery-publishing
3
+ title: Publish and update content
4
+ summary: Publish complete revisions, compare removed references, and replace
5
+ content snapshots deliberately.
6
+ type: how-to
7
+ area: publishing
8
+ subarea: publishing-content-delivery
9
+ canonical: /content-delivery/publish
10
+ ---
11
+
12
+ # Publish and update content
13
+
14
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
15
+
16
+ Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
17
+
18
+ Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Content delivery > Publish and update content
19
+
20
+ **Updated: 2026-10-29.**
21
+
22
+ Publish a complete export as one revision. The manifest and representation files must agree; replacing only the manifest or only an article can leave a running application with mismatched content.
23
+
24
+ Available since `0.1.0-alpha.13`.
25
+
26
+ ## Build a revision
27
+
28
+ Choose a revision mount, such as `/content/revisions/r2/`, and set the target's `publicBase` to that path. Export into a separate output directory:
29
+
30
+ ```sh
31
+ npx --no-install shoalrun export docs.config.yaml \
32
+ --target application --out ./content-r2
33
+ ```
34
+
35
+ Review every selected resource in HTML and Markdown, including links, images, notices, and snippet values. Imported API material requires the existing source-review approval before the bundle is ready for delivery.
36
+
37
+ ## Compare public references
38
+
39
+ Keep the manifest of the last published revision. For an established collection, compare against it:
40
+
41
+ ```sh
42
+ npx --no-install shoalrun export docs.config.yaml \
43
+ --target application --out ./content-r2 \
44
+ --previous-manifest ./content-r1/manifest.json \
45
+ --fail-on-removed
46
+ ```
47
+
48
+ The comparison reports added and removed typed references within their publication. A title or body edit changes content without changing an explicit identity. A renamed derived section ID can remove a reference. Strict removal checking fails before replacing the previous output; without a baseline, removal checking is reported as unavailable.
49
+
50
+ Review intentional removals with the applications that consume them. Keep old revisions available while deployed applications still need them. Comparison does not create redirects or aliases.
51
+
52
+ ## Serve and switch
53
+
54
+ Upload the complete directory to its configured mount. Serve the manifest as `application/json`, HTML as `text/html`, and Markdown as `text/markdown`. Keep relative file paths and local assets intact.
55
+
56
+ The application chooses which manifest URL to open. An already-open snapshot stays on its revision. Open and validate the replacement before switching the UI, then dispose the old snapshot when its views are finished. The [REST adapter](https://www.shoalrun.com/content-delivery/rest.md) can supply the same interface. Replacing its handler updates the loaded snapshots; authorization, historical revision routing, and asset hosting remain the host application's responsibility.
57
+
58
+ ## HTML, Markdown, and agents
59
+
60
+ Publish both representations together when both are selected. Agents and applications can record the manifest revision with a resource reference to explain which content they read. A digest verifies that bytes match the declared revision; it is not a signature or proof of factual accuracy. Remote images remain external dependencies and need separate availability planning.
61
+
62
+ ## Related reading
63
+
64
+ ### Read first
65
+
66
+ - [Content delivery](https://www.shoalrun.com/content-delivery.md) — Understand resource delivery and its application boundary.
67
+
68
+ ### Related topics
69
+
70
+ - [Render content in an application](https://www.shoalrun.com/content-delivery/render.md) — Publish complete revisions and update the client.
71
+
72
+ - [Content manifest](https://www.shoalrun.com/content-delivery/manifest.md) — Inspect revision and representation metadata.
@@ -0,0 +1,73 @@
1
+ ---
2
+ id: guide.content-rendering
3
+ title: Render content in an application
4
+ summary: Mount passive HTML and keep application styling, navigation, and
5
+ lifecycle under your control.
6
+ type: how-to
7
+ area: publishing
8
+ subarea: publishing-content-delivery
9
+ canonical: /content-delivery/render
10
+ ---
11
+
12
+ # Render content in an application
13
+
14
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
15
+
16
+ Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
17
+
18
+ Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Content delivery > Render content in an application
19
+
20
+ **Updated: 2026-10-29.**
21
+
22
+ Your application can display a resource in a panel, onboarding surface, article view, or help drawer. Fetch the resource through a [content snapshot](https://www.shoalrun.com/content-delivery/client.md), then mount its HTML in a container you own.
23
+
24
+ Available since `0.1.0-alpha.13`.
25
+
26
+ ## Mount the result
27
+
28
+ ```ts
29
+ import { mountContent, openManifestContentSource } from '@shoalrun/cli/content';
30
+
31
+ const snapshot = await openManifestContentSource({
32
+ manifestUrl: '/content/revisions/r1/manifest.json',
33
+ });
34
+ const result = await snapshot.get(
35
+ { kind: 'section', documentId: 'guide.billing', sectionId: 'refunds' },
36
+ { format: 'html' },
37
+ );
38
+ const container = document.querySelector('#content-panel');
39
+ if (!container) throw new Error('Missing content panel');
40
+ const mounted = mountContent(container, result);
41
+ ```
42
+
43
+ Mounting assigns a unique prefix to IDs and rewrites local fragments, footnote references, and supported ID-reference attributes. This allows separate instances of the same resource without duplicating those DOM IDs. An explicit `instanceId` must be unique where the content is mounted.
44
+
45
+ ## Own the interface
46
+
47
+ Apply your application's CSS to passive elements. The mount helper does not install the documentation theme or recreate interactive components. Preserve headings, link labels, image alternatives, and other semantic content when styling.
48
+
49
+ Your app owns loading and failure states, navigation history, focus management, close controls, keyboard behavior, and announcements when content changes. Preserve heading levels from the content; arrange the surrounding page so those levels make sense.
50
+
51
+ The helper inserts trusted compiler output. It is not a sanitizer for arbitrary HTML from users or unknown publishers.
52
+
53
+ ## Route links and clean up
54
+
55
+ `mounted.links` records each exported link's kind and target. Resource links include a typed `ref`; canonical and external links have ordinary URLs. Intercept a resource link only when the app can open that target and preserve its fragment or query. Other links should retain their normal destination.
56
+
57
+ Use the returned `mounted.anchors` for instance-specific fragment targets. Do not guess DOM IDs from headings. When the view closes, call `mounted.unmount()` and dispose the snapshot when it is no longer shared by another view.
58
+
59
+ ## HTML, Markdown, and agents
60
+
61
+ HTML fragments retain static content but omit component browser enhancements. The application supplies the interface around them. Markdown consumers receive the readable representation without mount IDs or application controls. Agents should use resource references and manifest links rather than inspect a rendered drawer to find the original content.
62
+
63
+ ## Related reading
64
+
65
+ ### Read first
66
+
67
+ - [Content delivery](https://www.shoalrun.com/content-delivery.md) — Understand resource delivery and its application boundary.
68
+
69
+ ### Related topics
70
+
71
+ - [Read content with a client](https://www.shoalrun.com/content-delivery/client.md) — Mount trusted HTML and route its links.
72
+
73
+ - [Publish and update content](https://www.shoalrun.com/content-delivery/publish.md) — Publish complete revisions and update the client.
@@ -0,0 +1,108 @@
1
+ ---
2
+ id: guide.content-rest
3
+ title: Serve content through REST
4
+ summary: Expose reviewed content snapshots over HTTP and read them through the
5
+ content client.
6
+ type: how-to
7
+ area: publishing
8
+ subarea: publishing-content-delivery
9
+ canonical: /content-delivery/rest
10
+ ---
11
+
12
+ # Serve content through REST
13
+
14
+ > Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
15
+
16
+ Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
17
+
18
+ Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Content delivery > Serve content through REST
19
+
20
+ **Updated: 2026-10-29.**
21
+
22
+ Serve the same reviewed pages, sections, and snippet instances through the Content REST API. The reference adapter accepts already-open snapshots and exposes a Fetch-style request handler. Your host provides the HTTP listener, request routing, and any access controls.
23
+
24
+ Available since `0.1.0-alpha.13`.
25
+
26
+ ## Prepare a snapshot
27
+
28
+ First [export selected resources](https://www.shoalrun.com/content-delivery/select.md) and serve the complete bundle at its configured `publicBase`. Open its manifest on the server:
29
+
30
+ ```ts
31
+ import { openManifestContentSource } from '@shoalrun/cli/content';
32
+ import { createContentRestHandler } from '@shoalrun/cli/content/server';
33
+
34
+ const source = await openManifestContentSource({
35
+ manifestUrl: 'http://localhost:8787/content/revisions/r1/manifest.json',
36
+ });
37
+ const handleContent = createContentRestHandler({ sources: [source] });
38
+
39
+ // In your host's /content/v1 request route:
40
+ const response = await handleContent(request);
41
+ ```
42
+
43
+ The host passes a standard `Request` and sends the returned `Response`. `createContentRestHandler` does not start a listener. Import its server entry point only in server code. Browser clients use the separate entry point shown below.
44
+
45
+ Supply at most one snapshot for each channel, version, and language combination. The handler retains those revisions for its lifetime. It does not reload manifests or keep an archive. Keep sources alive while requests use them, then dispose them during host shutdown.
46
+
47
+ ## Read through the client
48
+
49
+ A browser client opens the API from the application's origin. Use HTTPS or localhost for Web Crypto:
50
+
51
+ ```ts
52
+ import { openRestContentSource } from '@shoalrun/cli/content';
53
+
54
+ const snapshot = await openRestContentSource({
55
+ baseUrl: '/content/v1',
56
+ publication: { channel: 'production', version: 'current', language: 'en' },
57
+ });
58
+ try {
59
+ const result = await snapshot.get(
60
+ { kind: 'page', documentId: 'guide.billing' },
61
+ { format: 'markdown' },
62
+ );
63
+ console.log(result.content);
64
+ } finally {
65
+ snapshot.dispose();
66
+ }
67
+ ```
68
+
69
+ Select `guide.billing` in the export before running this example. Outside a browser, provide an absolute HTTP(S) `baseUrl`. Opening loads the resource list and pins later reads to its revision. Pass `revision` when the caller already knows which revision it needs. The returned [ContentSnapshot](https://www.shoalrun.com/content-delivery/api.md) has the same `list`, `get`, and `dispose` methods as the manifest client.
70
+
71
+ ## Try the local example
72
+
73
+ Copy the package's `examples/content-delivery` directory into a project with the new implementation installed. From that copied directory, build the export and start its preview:
74
+
75
+ ```sh
76
+ npx --no-install shoalrun export docs.config.yaml --target app-help --out public/help/releases/demo
77
+ node preview.mjs
78
+ ```
79
+
80
+ Open `http://127.0.0.1:8775/settings/billing?delivery=rest`. The example hosts its static bundle and REST routes on the same origin. Open the billing guide and refund section to check both resource shapes. Removing `?delivery=rest` uses static manifest delivery with the same application interface.
81
+
82
+ ## Keep assets and links available
83
+
84
+ The adapter sends representation bytes unchanged. Images and links still point to the export's configured static locations; the REST endpoint does not replace that asset mount. Keep the complete bundle hosted alongside the API. Applications can also route typed resource links through their own interface.
85
+
86
+ For a new release, open the new snapshot and replace the handler in your host. Clients pinned to an unavailable older revision receive `409 stale_revision`. Retaining historical revisions or routing between them requires host code beyond this adapter. See [publish and update content](https://www.shoalrun.com/content-delivery/publish.md).
87
+
88
+ ## Check the HTTP boundary
89
+
90
+ The [HTTP reference](https://www.shoalrun.com/content-delivery/http-api.md) describes REST contract v1. That protocol version is separate from the package release and the content publication's `version` value.
91
+
92
+ The adapter lists and reads approved resources. It does not implement authentication, search, content editing, or an MCP service. Place authorization before the handler when required. Successful pinned responses use public immutable caching; a host protecting private content must override that cache policy before sending responses.
93
+
94
+ ## HTML, Markdown, and agents
95
+
96
+ Agents can list resources, keep the returned revision, and fetch Markdown without operating browser controls. HTML responses remain passive fragments for a trusted application renderer. REST changes the transport, not section approval, content context, or representation bytes.
97
+
98
+ ## Related reading
99
+
100
+ ### Read first
101
+
102
+ - [Content delivery](https://www.shoalrun.com/content-delivery.md) — Understand reviewed resources and snapshots.
103
+
104
+ ### Related topics
105
+
106
+ - [Content REST API](https://www.shoalrun.com/content-delivery/http-api.md) — Look up HTTP routes and revision handling.
107
+
108
+ - [Content client API](https://www.shoalrun.com/content-delivery/api.md) — Use the shared snapshot methods and client limits.