@se-studio/contentful-cms 0.0.0-next16-20260822103555

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 (1031) hide show
  1. package/CHANGELOG.md +1117 -0
  2. package/HOSTED.md +152 -0
  3. package/INSTALL.md +29 -0
  4. package/README.md +674 -0
  5. package/dist/audit/asset-usage.d.ts +29 -0
  6. package/dist/audit/asset-usage.d.ts.map +1 -0
  7. package/dist/audit/asset-usage.js +99 -0
  8. package/dist/audit/asset-usage.js.map +1 -0
  9. package/dist/audit/media-review-rules.d.ts +33 -0
  10. package/dist/audit/media-review-rules.d.ts.map +1 -0
  11. package/dist/audit/media-review-rules.js +120 -0
  12. package/dist/audit/media-review-rules.js.map +1 -0
  13. package/dist/audit/media-review.d.ts +45 -0
  14. package/dist/audit/media-review.d.ts.map +1 -0
  15. package/dist/audit/media-review.js +69 -0
  16. package/dist/audit/media-review.js.map +1 -0
  17. package/dist/bin/cms-edit.d.ts +4 -0
  18. package/dist/bin/cms-edit.d.ts.map +1 -0
  19. package/dist/bin/cms-edit.js +46 -0
  20. package/dist/bin/cms-edit.js.map +1 -0
  21. package/dist/cli/program.d.ts +9 -0
  22. package/dist/cli/program.d.ts.map +1 -0
  23. package/dist/cli/program.js +152 -0
  24. package/dist/cli/program.js.map +1 -0
  25. package/dist/cli/read-json-input.d.ts +27 -0
  26. package/dist/cli/read-json-input.d.ts.map +1 -0
  27. package/dist/cli/read-json-input.js +65 -0
  28. package/dist/cli/read-json-input.js.map +1 -0
  29. package/dist/cli/runner.d.ts +15 -0
  30. package/dist/cli/runner.d.ts.map +1 -0
  31. package/dist/cli/runner.js +113 -0
  32. package/dist/cli/runner.js.map +1 -0
  33. package/dist/commands/add-initial-fields.d.ts +27 -0
  34. package/dist/commands/add-initial-fields.d.ts.map +1 -0
  35. package/dist/commands/add-initial-fields.js +42 -0
  36. package/dist/commands/add-initial-fields.js.map +1 -0
  37. package/dist/commands/add-target-field.d.ts +15 -0
  38. package/dist/commands/add-target-field.d.ts.map +1 -0
  39. package/dist/commands/add-target-field.js +48 -0
  40. package/dist/commands/add-target-field.js.map +1 -0
  41. package/dist/commands/add.d.ts +4 -0
  42. package/dist/commands/add.d.ts.map +1 -0
  43. package/dist/commands/add.js +291 -0
  44. package/dist/commands/add.js.map +1 -0
  45. package/dist/commands/article-tags-from-json.d.ts +4 -0
  46. package/dist/commands/article-tags-from-json.d.ts.map +1 -0
  47. package/dist/commands/article-tags-from-json.js +55 -0
  48. package/dist/commands/article-tags-from-json.js.map +1 -0
  49. package/dist/commands/asset.d.ts +4 -0
  50. package/dist/commands/asset.d.ts.map +1 -0
  51. package/dist/commands/asset.js +685 -0
  52. package/dist/commands/asset.js.map +1 -0
  53. package/dist/commands/batch-assignments.d.ts +16 -0
  54. package/dist/commands/batch-assignments.d.ts.map +1 -0
  55. package/dist/commands/batch-assignments.js +61 -0
  56. package/dist/commands/batch-assignments.js.map +1 -0
  57. package/dist/commands/batch.d.ts +5 -0
  58. package/dist/commands/batch.d.ts.map +1 -0
  59. package/dist/commands/batch.js +272 -0
  60. package/dist/commands/batch.js.map +1 -0
  61. package/dist/commands/bulk-rtf-replace.d.ts +4 -0
  62. package/dist/commands/bulk-rtf-replace.d.ts.map +1 -0
  63. package/dist/commands/bulk-rtf-replace.js +103 -0
  64. package/dist/commands/bulk-rtf-replace.js.map +1 -0
  65. package/dist/commands/create-from-json.d.ts +8 -0
  66. package/dist/commands/create-from-json.d.ts.map +1 -0
  67. package/dist/commands/create-from-json.js +531 -0
  68. package/dist/commands/create-from-json.js.map +1 -0
  69. package/dist/commands/create-person-from-json.d.ts +4 -0
  70. package/dist/commands/create-person-from-json.d.ts.map +1 -0
  71. package/dist/commands/create-person-from-json.js +86 -0
  72. package/dist/commands/create-person-from-json.js.map +1 -0
  73. package/dist/commands/create-person.d.ts +4 -0
  74. package/dist/commands/create-person.d.ts.map +1 -0
  75. package/dist/commands/create-person.js +76 -0
  76. package/dist/commands/create-person.js.map +1 -0
  77. package/dist/commands/create-taxonomy-from-json.d.ts +4 -0
  78. package/dist/commands/create-taxonomy-from-json.d.ts.map +1 -0
  79. package/dist/commands/create-taxonomy-from-json.js +96 -0
  80. package/dist/commands/create-taxonomy-from-json.js.map +1 -0
  81. package/dist/commands/create-taxonomy.d.ts +36 -0
  82. package/dist/commands/create-taxonomy.d.ts.map +1 -0
  83. package/dist/commands/create-taxonomy.js +214 -0
  84. package/dist/commands/create-taxonomy.js.map +1 -0
  85. package/dist/commands/create.d.ts +4 -0
  86. package/dist/commands/create.d.ts.map +1 -0
  87. package/dist/commands/create.js +454 -0
  88. package/dist/commands/create.js.map +1 -0
  89. package/dist/commands/customer.d.ts +4 -0
  90. package/dist/commands/customer.d.ts.map +1 -0
  91. package/dist/commands/customer.js +56 -0
  92. package/dist/commands/customer.js.map +1 -0
  93. package/dist/commands/diagnose.d.ts +29 -0
  94. package/dist/commands/diagnose.d.ts.map +1 -0
  95. package/dist/commands/diagnose.js +119 -0
  96. package/dist/commands/diagnose.js.map +1 -0
  97. package/dist/commands/diff.d.ts +4 -0
  98. package/dist/commands/diff.d.ts.map +1 -0
  99. package/dist/commands/diff.js +33 -0
  100. package/dist/commands/diff.js.map +1 -0
  101. package/dist/commands/discard.d.ts +4 -0
  102. package/dist/commands/discard.d.ts.map +1 -0
  103. package/dist/commands/discard.js +63 -0
  104. package/dist/commands/discard.js.map +1 -0
  105. package/dist/commands/editor-pack.d.ts +4 -0
  106. package/dist/commands/editor-pack.d.ts.map +1 -0
  107. package/dist/commands/editor-pack.js +31 -0
  108. package/dist/commands/editor-pack.js.map +1 -0
  109. package/dist/commands/entry-lookup-target.d.ts +113 -0
  110. package/dist/commands/entry-lookup-target.d.ts.map +1 -0
  111. package/dist/commands/entry-lookup-target.js +235 -0
  112. package/dist/commands/entry-lookup-target.js.map +1 -0
  113. package/dist/commands/entry-search.d.ts +4 -0
  114. package/dist/commands/entry-search.d.ts.map +1 -0
  115. package/dist/commands/entry-search.js +91 -0
  116. package/dist/commands/entry-search.js.map +1 -0
  117. package/dist/commands/guide.d.ts +4 -0
  118. package/dist/commands/guide.d.ts.map +1 -0
  119. package/dist/commands/guide.js +18 -0
  120. package/dist/commands/guide.js.map +1 -0
  121. package/dist/commands/health.d.ts +4 -0
  122. package/dist/commands/health.d.ts.map +1 -0
  123. package/dist/commands/health.js +179 -0
  124. package/dist/commands/health.js.map +1 -0
  125. package/dist/commands/help.d.ts +4 -0
  126. package/dist/commands/help.d.ts.map +1 -0
  127. package/dist/commands/help.js +49 -0
  128. package/dist/commands/help.js.map +1 -0
  129. package/dist/commands/host-scaffold.d.ts +4 -0
  130. package/dist/commands/host-scaffold.d.ts.map +1 -0
  131. package/dist/commands/host-scaffold.js +104 -0
  132. package/dist/commands/host-scaffold.js.map +1 -0
  133. package/dist/commands/host-stage.d.ts +4 -0
  134. package/dist/commands/host-stage.d.ts.map +1 -0
  135. package/dist/commands/host-stage.js +60 -0
  136. package/dist/commands/host-stage.js.map +1 -0
  137. package/dist/commands/host.d.ts +3 -0
  138. package/dist/commands/host.d.ts.map +1 -0
  139. package/dist/commands/host.js +9 -0
  140. package/dist/commands/host.js.map +1 -0
  141. package/dist/commands/index-dump.d.ts +15 -0
  142. package/dist/commands/index-dump.d.ts.map +1 -0
  143. package/dist/commands/index-dump.js +207 -0
  144. package/dist/commands/index-dump.js.map +1 -0
  145. package/dist/commands/index.d.ts +4 -0
  146. package/dist/commands/index.d.ts.map +1 -0
  147. package/dist/commands/index.js +107 -0
  148. package/dist/commands/index.js.map +1 -0
  149. package/dist/commands/links.d.ts +4 -0
  150. package/dist/commands/links.d.ts.map +1 -0
  151. package/dist/commands/links.js +343 -0
  152. package/dist/commands/links.js.map +1 -0
  153. package/dist/commands/list.d.ts +4 -0
  154. package/dist/commands/list.d.ts.map +1 -0
  155. package/dist/commands/list.js +282 -0
  156. package/dist/commands/list.js.map +1 -0
  157. package/dist/commands/media.d.ts +4 -0
  158. package/dist/commands/media.d.ts.map +1 -0
  159. package/dist/commands/media.js +143 -0
  160. package/dist/commands/media.js.map +1 -0
  161. package/dist/commands/move.d.ts +3 -0
  162. package/dist/commands/move.d.ts.map +1 -0
  163. package/dist/commands/move.js +85 -0
  164. package/dist/commands/move.js.map +1 -0
  165. package/dist/commands/multiset-assignments.d.ts +16 -0
  166. package/dist/commands/multiset-assignments.d.ts.map +1 -0
  167. package/dist/commands/multiset-assignments.js +24 -0
  168. package/dist/commands/multiset-assignments.js.map +1 -0
  169. package/dist/commands/nav.d.ts +4 -0
  170. package/dist/commands/nav.d.ts.map +1 -0
  171. package/dist/commands/nav.js +327 -0
  172. package/dist/commands/nav.js.map +1 -0
  173. package/dist/commands/open.d.ts +4 -0
  174. package/dist/commands/open.d.ts.map +1 -0
  175. package/dist/commands/open.js +124 -0
  176. package/dist/commands/open.js.map +1 -0
  177. package/dist/commands/peek.d.ts +4 -0
  178. package/dist/commands/peek.d.ts.map +1 -0
  179. package/dist/commands/peek.js +105 -0
  180. package/dist/commands/peek.js.map +1 -0
  181. package/dist/commands/preview.d.ts +4 -0
  182. package/dist/commands/preview.d.ts.map +1 -0
  183. package/dist/commands/preview.js +242 -0
  184. package/dist/commands/preview.js.map +1 -0
  185. package/dist/commands/project.d.ts +4 -0
  186. package/dist/commands/project.d.ts.map +1 -0
  187. package/dist/commands/project.js +63 -0
  188. package/dist/commands/project.js.map +1 -0
  189. package/dist/commands/read.d.ts +4 -0
  190. package/dist/commands/read.d.ts.map +1 -0
  191. package/dist/commands/read.js +59 -0
  192. package/dist/commands/read.js.map +1 -0
  193. package/dist/commands/remove.d.ts +4 -0
  194. package/dist/commands/remove.d.ts.map +1 -0
  195. package/dist/commands/remove.js +104 -0
  196. package/dist/commands/remove.js.map +1 -0
  197. package/dist/commands/resolve.d.ts +4 -0
  198. package/dist/commands/resolve.d.ts.map +1 -0
  199. package/dist/commands/resolve.js +157 -0
  200. package/dist/commands/resolve.js.map +1 -0
  201. package/dist/commands/rtf.d.ts +4 -0
  202. package/dist/commands/rtf.d.ts.map +1 -0
  203. package/dist/commands/rtf.js +589 -0
  204. package/dist/commands/rtf.js.map +1 -0
  205. package/dist/commands/run.d.ts +4 -0
  206. package/dist/commands/run.d.ts.map +1 -0
  207. package/dist/commands/run.js +515 -0
  208. package/dist/commands/run.js.map +1 -0
  209. package/dist/commands/save-pending.d.ts +3 -0
  210. package/dist/commands/save-pending.d.ts.map +1 -0
  211. package/dist/commands/save-pending.js +5 -0
  212. package/dist/commands/save-pending.js.map +1 -0
  213. package/dist/commands/save.d.ts +4 -0
  214. package/dist/commands/save.d.ts.map +1 -0
  215. package/dist/commands/save.js +79 -0
  216. package/dist/commands/save.js.map +1 -0
  217. package/dist/commands/schema.d.ts +4 -0
  218. package/dist/commands/schema.d.ts.map +1 -0
  219. package/dist/commands/schema.js +283 -0
  220. package/dist/commands/schema.js.map +1 -0
  221. package/dist/commands/session-diff.d.ts +14 -0
  222. package/dist/commands/session-diff.d.ts.map +1 -0
  223. package/dist/commands/session-diff.js +238 -0
  224. package/dist/commands/session-diff.js.map +1 -0
  225. package/dist/commands/set.d.ts +4 -0
  226. package/dist/commands/set.d.ts.map +1 -0
  227. package/dist/commands/set.js +577 -0
  228. package/dist/commands/set.js.map +1 -0
  229. package/dist/commands/snapshot.d.ts +3 -0
  230. package/dist/commands/snapshot.d.ts.map +1 -0
  231. package/dist/commands/snapshot.js +31 -0
  232. package/dist/commands/snapshot.js.map +1 -0
  233. package/dist/commands/staged-upload.d.ts +4 -0
  234. package/dist/commands/staged-upload.d.ts.map +1 -0
  235. package/dist/commands/staged-upload.js +54 -0
  236. package/dist/commands/staged-upload.js.map +1 -0
  237. package/dist/commands/version.d.ts +4 -0
  238. package/dist/commands/version.d.ts.map +1 -0
  239. package/dist/commands/version.js +17 -0
  240. package/dist/commands/version.js.map +1 -0
  241. package/dist/config/data-root.d.ts +6 -0
  242. package/dist/config/data-root.d.ts.map +1 -0
  243. package/dist/config/data-root.js +21 -0
  244. package/dist/config/data-root.js.map +1 -0
  245. package/dist/config/hosted.d.ts +36 -0
  246. package/dist/config/hosted.d.ts.map +1 -0
  247. package/dist/config/hosted.js +113 -0
  248. package/dist/config/hosted.js.map +1 -0
  249. package/dist/config/load.d.ts +27 -0
  250. package/dist/config/load.d.ts.map +1 -0
  251. package/dist/config/load.js +139 -0
  252. package/dist/config/load.js.map +1 -0
  253. package/dist/config/types.d.ts +42 -0
  254. package/dist/config/types.d.ts.map +1 -0
  255. package/dist/config/types.js +2 -0
  256. package/dist/config/types.js.map +1 -0
  257. package/dist/contentful/article-tags-from-json.d.ts +25 -0
  258. package/dist/contentful/article-tags-from-json.d.ts.map +1 -0
  259. package/dist/contentful/article-tags-from-json.js +121 -0
  260. package/dist/contentful/article-tags-from-json.js.map +1 -0
  261. package/dist/contentful/article-type-resolve.d.ts +11 -0
  262. package/dist/contentful/article-type-resolve.d.ts.map +1 -0
  263. package/dist/contentful/article-type-resolve.js +35 -0
  264. package/dist/contentful/article-type-resolve.js.map +1 -0
  265. package/dist/contentful/asset-link-from-json.d.ts +17 -0
  266. package/dist/contentful/asset-link-from-json.d.ts.map +1 -0
  267. package/dist/contentful/asset-link-from-json.js +41 -0
  268. package/dist/contentful/asset-link-from-json.js.map +1 -0
  269. package/dist/contentful/assets.d.ts +54 -0
  270. package/dist/contentful/assets.d.ts.map +1 -0
  271. package/dist/contentful/assets.js +168 -0
  272. package/dist/contentful/assets.js.map +1 -0
  273. package/dist/contentful/bulk-rtf-replace.d.ts +29 -0
  274. package/dist/contentful/bulk-rtf-replace.d.ts.map +1 -0
  275. package/dist/contentful/bulk-rtf-replace.js +119 -0
  276. package/dist/contentful/bulk-rtf-replace.js.map +1 -0
  277. package/dist/contentful/cda-sync.d.ts +45 -0
  278. package/dist/contentful/cda-sync.d.ts.map +1 -0
  279. package/dist/contentful/cda-sync.js +382 -0
  280. package/dist/contentful/cda-sync.js.map +1 -0
  281. package/dist/contentful/client.d.ts +56 -0
  282. package/dist/contentful/client.d.ts.map +1 -0
  283. package/dist/contentful/client.js +78 -0
  284. package/dist/contentful/client.js.map +1 -0
  285. package/dist/contentful/cma-user-agent.d.ts +10 -0
  286. package/dist/contentful/cma-user-agent.d.ts.map +1 -0
  287. package/dist/contentful/cma-user-agent.js +20 -0
  288. package/dist/contentful/cma-user-agent.js.map +1 -0
  289. package/dist/contentful/content-type-disk-cache.d.ts +7 -0
  290. package/dist/contentful/content-type-disk-cache.d.ts.map +1 -0
  291. package/dist/contentful/content-type-disk-cache.js +42 -0
  292. package/dist/contentful/content-type-disk-cache.js.map +1 -0
  293. package/dist/contentful/delivery-token.d.ts +17 -0
  294. package/dist/contentful/delivery-token.d.ts.map +1 -0
  295. package/dist/contentful/delivery-token.js +104 -0
  296. package/dist/contentful/delivery-token.js.map +1 -0
  297. package/dist/contentful/entry-fields.d.ts +74 -0
  298. package/dist/contentful/entry-fields.d.ts.map +1 -0
  299. package/dist/contentful/entry-fields.js +403 -0
  300. package/dist/contentful/entry-fields.js.map +1 -0
  301. package/dist/contentful/entry-lookup.d.ts +16 -0
  302. package/dist/contentful/entry-lookup.d.ts.map +1 -0
  303. package/dist/contentful/entry-lookup.js +273 -0
  304. package/dist/contentful/entry-lookup.js.map +1 -0
  305. package/dist/contentful/featured-image-defaults.d.ts +16 -0
  306. package/dist/contentful/featured-image-defaults.d.ts.map +1 -0
  307. package/dist/contentful/featured-image-defaults.js +117 -0
  308. package/dist/contentful/featured-image-defaults.js.map +1 -0
  309. package/dist/contentful/fetch.d.ts +31 -0
  310. package/dist/contentful/fetch.d.ts.map +1 -0
  311. package/dist/contentful/fetch.js +115 -0
  312. package/dist/contentful/fetch.js.map +1 -0
  313. package/dist/contentful/field-metadata.d.ts +8 -0
  314. package/dist/contentful/field-metadata.d.ts.map +1 -0
  315. package/dist/contentful/field-metadata.js +12 -0
  316. package/dist/contentful/field-metadata.js.map +1 -0
  317. package/dist/contentful/field-value-from-json.d.ts +24 -0
  318. package/dist/contentful/field-value-from-json.d.ts.map +1 -0
  319. package/dist/contentful/field-value-from-json.js +206 -0
  320. package/dist/contentful/field-value-from-json.js.map +1 -0
  321. package/dist/contentful/hosted-asset-upload.d.ts +4 -0
  322. package/dist/contentful/hosted-asset-upload.d.ts.map +1 -0
  323. package/dist/contentful/hosted-asset-upload.js +9 -0
  324. package/dist/contentful/hosted-asset-upload.js.map +1 -0
  325. package/dist/contentful/link-fields.d.ts +22 -0
  326. package/dist/contentful/link-fields.d.ts.map +1 -0
  327. package/dist/contentful/link-fields.js +58 -0
  328. package/dist/contentful/link-fields.js.map +1 -0
  329. package/dist/contentful/linkedEntryFields.d.ts +29 -0
  330. package/dist/contentful/linkedEntryFields.d.ts.map +1 -0
  331. package/dist/contentful/linkedEntryFields.js +97 -0
  332. package/dist/contentful/linkedEntryFields.js.map +1 -0
  333. package/dist/contentful/list-entry-format.d.ts +18 -0
  334. package/dist/contentful/list-entry-format.d.ts.map +1 -0
  335. package/dist/contentful/list-entry-format.js +45 -0
  336. package/dist/contentful/list-entry-format.js.map +1 -0
  337. package/dist/contentful/media.d.ts +26 -0
  338. package/dist/contentful/media.d.ts.map +1 -0
  339. package/dist/contentful/media.js +82 -0
  340. package/dist/contentful/media.js.map +1 -0
  341. package/dist/contentful/person-create.d.ts +32 -0
  342. package/dist/contentful/person-create.d.ts.map +1 -0
  343. package/dist/contentful/person-create.js +102 -0
  344. package/dist/contentful/person-create.js.map +1 -0
  345. package/dist/contentful/reference-record.d.ts +45 -0
  346. package/dist/contentful/reference-record.d.ts.map +1 -0
  347. package/dist/contentful/reference-record.js +106 -0
  348. package/dist/contentful/reference-record.js.map +1 -0
  349. package/dist/contentful/references.d.ts +7 -0
  350. package/dist/contentful/references.d.ts.map +1 -0
  351. package/dist/contentful/references.js +12 -0
  352. package/dist/contentful/references.js.map +1 -0
  353. package/dist/contentful/regex.d.ts +14 -0
  354. package/dist/contentful/regex.d.ts.map +1 -0
  355. package/dist/contentful/regex.js +38 -0
  356. package/dist/contentful/regex.js.map +1 -0
  357. package/dist/contentful/resolve-content-type.d.ts +9 -0
  358. package/dist/contentful/resolve-content-type.d.ts.map +1 -0
  359. package/dist/contentful/resolve-content-type.js +38 -0
  360. package/dist/contentful/resolve-content-type.js.map +1 -0
  361. package/dist/contentful/scalar-value.d.ts +19 -0
  362. package/dist/contentful/scalar-value.d.ts.map +1 -0
  363. package/dist/contentful/scalar-value.js +95 -0
  364. package/dist/contentful/scalar-value.js.map +1 -0
  365. package/dist/contentful/set-field-schema.d.ts +32 -0
  366. package/dist/contentful/set-field-schema.d.ts.map +1 -0
  367. package/dist/contentful/set-field-schema.js +123 -0
  368. package/dist/contentful/set-field-schema.js.map +1 -0
  369. package/dist/contentful/slug-validation.d.ts +7 -0
  370. package/dist/contentful/slug-validation.d.ts.map +1 -0
  371. package/dist/contentful/slug-validation.js +15 -0
  372. package/dist/contentful/slug-validation.js.map +1 -0
  373. package/dist/contentful/upload-fetch.d.ts +11 -0
  374. package/dist/contentful/upload-fetch.d.ts.map +1 -0
  375. package/dist/contentful/upload-fetch.js +26 -0
  376. package/dist/contentful/upload-fetch.js.map +1 -0
  377. package/dist/contentful/upload-limits.d.ts +7 -0
  378. package/dist/contentful/upload-limits.d.ts.map +1 -0
  379. package/dist/contentful/upload-limits.js +13 -0
  380. package/dist/contentful/upload-limits.js.map +1 -0
  381. package/dist/contentful/write.d.ts +16 -0
  382. package/dist/contentful/write.d.ts.map +1 -0
  383. package/dist/contentful/write.js +97 -0
  384. package/dist/contentful/write.js.map +1 -0
  385. package/dist/editor-pack/capabilities.d.ts +105 -0
  386. package/dist/editor-pack/capabilities.d.ts.map +1 -0
  387. package/dist/editor-pack/capabilities.js +497 -0
  388. package/dist/editor-pack/capabilities.js.map +1 -0
  389. package/dist/editor-pack/generate.d.ts +19 -0
  390. package/dist/editor-pack/generate.d.ts.map +1 -0
  391. package/dist/editor-pack/generate.js +337 -0
  392. package/dist/editor-pack/generate.js.map +1 -0
  393. package/dist/editor-pack/load.d.ts +13 -0
  394. package/dist/editor-pack/load.d.ts.map +1 -0
  395. package/dist/editor-pack/load.js +99 -0
  396. package/dist/editor-pack/load.js.map +1 -0
  397. package/dist/editor-pack/parse-constants.d.ts +23 -0
  398. package/dist/editor-pack/parse-constants.d.ts.map +1 -0
  399. package/dist/editor-pack/parse-constants.js +99 -0
  400. package/dist/editor-pack/parse-constants.js.map +1 -0
  401. package/dist/editor-pack/parse-guidelines.d.ts +17 -0
  402. package/dist/editor-pack/parse-guidelines.d.ts.map +1 -0
  403. package/dist/editor-pack/parse-guidelines.js +93 -0
  404. package/dist/editor-pack/parse-guidelines.js.map +1 -0
  405. package/dist/editor-pack/parse-registrations.d.ts +7 -0
  406. package/dist/editor-pack/parse-registrations.d.ts.map +1 -0
  407. package/dist/editor-pack/parse-registrations.js +57 -0
  408. package/dist/editor-pack/parse-registrations.js.map +1 -0
  409. package/dist/editor-pack/production-site.d.ts +3 -0
  410. package/dist/editor-pack/production-site.d.ts.map +1 -0
  411. package/dist/editor-pack/production-site.js +68 -0
  412. package/dist/editor-pack/production-site.js.map +1 -0
  413. package/dist/generated/hosted-guide.d.ts +2 -0
  414. package/dist/generated/hosted-guide.d.ts.map +1 -0
  415. package/dist/generated/hosted-guide.js +3 -0
  416. package/dist/generated/hosted-guide.js.map +1 -0
  417. package/dist/generated/version.d.ts +3 -0
  418. package/dist/generated/version.d.ts.map +1 -0
  419. package/dist/generated/version.js +4 -0
  420. package/dist/generated/version.js.map +1 -0
  421. package/dist/hosted/customer-playbooks.d.ts +23 -0
  422. package/dist/hosted/customer-playbooks.d.ts.map +1 -0
  423. package/dist/hosted/customer-playbooks.js +69 -0
  424. package/dist/hosted/customer-playbooks.js.map +1 -0
  425. package/dist/hosted/index.d.ts +30 -0
  426. package/dist/hosted/index.d.ts.map +1 -0
  427. package/dist/hosted/index.js +29 -0
  428. package/dist/hosted/index.js.map +1 -0
  429. package/dist/hosted/next/HostedPageShell.d.ts +18 -0
  430. package/dist/hosted/next/HostedPageShell.d.ts.map +1 -0
  431. package/dist/hosted/next/HostedPageShell.js +12 -0
  432. package/dist/hosted/next/HostedPageShell.js.map +1 -0
  433. package/dist/hosted/next/claude-connect.d.ts +8 -0
  434. package/dist/hosted/next/claude-connect.d.ts.map +1 -0
  435. package/dist/hosted/next/claude-connect.js +23 -0
  436. package/dist/hosted/next/claude-connect.js.map +1 -0
  437. package/dist/hosted/next/context.d.ts +3 -0
  438. package/dist/hosted/next/context.d.ts.map +1 -0
  439. package/dist/hosted/next/context.js +11 -0
  440. package/dist/hosted/next/context.js.map +1 -0
  441. package/dist/hosted/next/editor-pack-path.d.ts +2 -0
  442. package/dist/hosted/next/editor-pack-path.d.ts.map +1 -0
  443. package/dist/hosted/next/editor-pack-path.js +6 -0
  444. package/dist/hosted/next/editor-pack-path.js.map +1 -0
  445. package/dist/hosted/next/page-styles.d.ts +31 -0
  446. package/dist/hosted/next/page-styles.d.ts.map +1 -0
  447. package/dist/hosted/next/page-styles.js +166 -0
  448. package/dist/hosted/next/page-styles.js.map +1 -0
  449. package/dist/hosted/next/pages/CmsEditPage.d.ts +2 -0
  450. package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -0
  451. package/dist/hosted/next/pages/CmsEditPage.js +24 -0
  452. package/dist/hosted/next/pages/CmsEditPage.js.map +1 -0
  453. package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts +2 -0
  454. package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts.map +1 -0
  455. package/dist/hosted/next/pages/ContentfulCallbackPage.js +47 -0
  456. package/dist/hosted/next/pages/ContentfulCallbackPage.js.map +1 -0
  457. package/dist/hosted/next/pages/CustomerPlaybookPage.d.ts +8 -0
  458. package/dist/hosted/next/pages/CustomerPlaybookPage.d.ts.map +1 -0
  459. package/dist/hosted/next/pages/CustomerPlaybookPage.js +24 -0
  460. package/dist/hosted/next/pages/CustomerPlaybookPage.js.map +1 -0
  461. package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts +2 -0
  462. package/dist/hosted/next/pages/CustomerPlaybooksPage.d.ts.map +1 -0
  463. package/dist/hosted/next/pages/CustomerPlaybooksPage.js +29 -0
  464. package/dist/hosted/next/pages/CustomerPlaybooksPage.js.map +1 -0
  465. package/dist/hosted/next/pages/HomePage.d.ts +2 -0
  466. package/dist/hosted/next/pages/HomePage.d.ts.map +1 -0
  467. package/dist/hosted/next/pages/HomePage.js +37 -0
  468. package/dist/hosted/next/pages/HomePage.js.map +1 -0
  469. package/dist/hosted/next/redis.d.ts +5 -0
  470. package/dist/hosted/next/redis.d.ts.map +1 -0
  471. package/dist/hosted/next/redis.js +49 -0
  472. package/dist/hosted/next/redis.js.map +1 -0
  473. package/dist/hosted/next/routes/connect.d.ts +2 -0
  474. package/dist/hosted/next/routes/connect.d.ts.map +1 -0
  475. package/dist/hosted/next/routes/connect.js +19 -0
  476. package/dist/hosted/next/routes/connect.js.map +1 -0
  477. package/dist/hosted/next/routes/customer-index.d.ts +2 -0
  478. package/dist/hosted/next/routes/customer-index.d.ts.map +1 -0
  479. package/dist/hosted/next/routes/customer-index.js +12 -0
  480. package/dist/hosted/next/routes/customer-index.js.map +1 -0
  481. package/dist/hosted/next/routes/customer-resource.d.ts +8 -0
  482. package/dist/hosted/next/routes/customer-resource.d.ts.map +1 -0
  483. package/dist/hosted/next/routes/customer-resource.js +19 -0
  484. package/dist/hosted/next/routes/customer-resource.js.map +1 -0
  485. package/dist/hosted/next/routes/health.d.ts +2 -0
  486. package/dist/hosted/next/routes/health.d.ts.map +1 -0
  487. package/dist/hosted/next/routes/health.js +82 -0
  488. package/dist/hosted/next/routes/health.js.map +1 -0
  489. package/dist/hosted/next/routes/link-contentful.d.ts +2 -0
  490. package/dist/hosted/next/routes/link-contentful.d.ts.map +1 -0
  491. package/dist/hosted/next/routes/link-contentful.js +6 -0
  492. package/dist/hosted/next/routes/link-contentful.js.map +1 -0
  493. package/dist/hosted/next/routes/mcp.d.ts +4 -0
  494. package/dist/hosted/next/routes/mcp.d.ts.map +1 -0
  495. package/dist/hosted/next/routes/mcp.js +116 -0
  496. package/dist/hosted/next/routes/mcp.js.map +1 -0
  497. package/dist/hosted/next/routes/oauth-authorization-server.d.ts +2 -0
  498. package/dist/hosted/next/routes/oauth-authorization-server.d.ts.map +1 -0
  499. package/dist/hosted/next/routes/oauth-authorization-server.js +5 -0
  500. package/dist/hosted/next/routes/oauth-authorization-server.js.map +1 -0
  501. package/dist/hosted/next/routes/oauth-authorize.d.ts +2 -0
  502. package/dist/hosted/next/routes/oauth-authorize.d.ts.map +1 -0
  503. package/dist/hosted/next/routes/oauth-authorize.js +6 -0
  504. package/dist/hosted/next/routes/oauth-authorize.js.map +1 -0
  505. package/dist/hosted/next/routes/oauth-protected-resource.d.ts +2 -0
  506. package/dist/hosted/next/routes/oauth-protected-resource.d.ts.map +1 -0
  507. package/dist/hosted/next/routes/oauth-protected-resource.js +5 -0
  508. package/dist/hosted/next/routes/oauth-protected-resource.js.map +1 -0
  509. package/dist/hosted/next/routes/oauth-register.d.ts +2 -0
  510. package/dist/hosted/next/routes/oauth-register.d.ts.map +1 -0
  511. package/dist/hosted/next/routes/oauth-register.js +6 -0
  512. package/dist/hosted/next/routes/oauth-register.js.map +1 -0
  513. package/dist/hosted/next/routes/oauth-token.d.ts +2 -0
  514. package/dist/hosted/next/routes/oauth-token.d.ts.map +1 -0
  515. package/dist/hosted/next/routes/oauth-token.js +6 -0
  516. package/dist/hosted/next/routes/oauth-token.js.map +1 -0
  517. package/dist/hosted/next/routes/staged-upload.d.ts +2 -0
  518. package/dist/hosted/next/routes/staged-upload.d.ts.map +1 -0
  519. package/dist/hosted/next/routes/staged-upload.js +83 -0
  520. package/dist/hosted/next/routes/staged-upload.js.map +1 -0
  521. package/dist/hosted/next/stage-site.d.ts +11 -0
  522. package/dist/hosted/next/stage-site.d.ts.map +1 -0
  523. package/dist/hosted/next/stage-site.js +50 -0
  524. package/dist/hosted/next/stage-site.js.map +1 -0
  525. package/dist/hosted/oauth/auth.d.ts +15 -0
  526. package/dist/hosted/oauth/auth.d.ts.map +1 -0
  527. package/dist/hosted/oauth/auth.js +54 -0
  528. package/dist/hosted/oauth/auth.js.map +1 -0
  529. package/dist/hosted/oauth/cached-cma.d.ts +14 -0
  530. package/dist/hosted/oauth/cached-cma.d.ts.map +1 -0
  531. package/dist/hosted/oauth/cached-cma.js +41 -0
  532. package/dist/hosted/oauth/cached-cma.js.map +1 -0
  533. package/dist/hosted/oauth/complete.d.ts +16 -0
  534. package/dist/hosted/oauth/complete.d.ts.map +1 -0
  535. package/dist/hosted/oauth/complete.js +55 -0
  536. package/dist/hosted/oauth/complete.js.map +1 -0
  537. package/dist/hosted/oauth/config.d.ts +7 -0
  538. package/dist/hosted/oauth/config.d.ts.map +1 -0
  539. package/dist/hosted/oauth/config.js +33 -0
  540. package/dist/hosted/oauth/config.js.map +1 -0
  541. package/dist/hosted/oauth/handlers.d.ts +18 -0
  542. package/dist/hosted/oauth/handlers.d.ts.map +1 -0
  543. package/dist/hosted/oauth/handlers.js +262 -0
  544. package/dist/hosted/oauth/handlers.js.map +1 -0
  545. package/dist/hosted/oauth/jwt.d.ts +9 -0
  546. package/dist/hosted/oauth/jwt.d.ts.map +1 -0
  547. package/dist/hosted/oauth/jwt.js +31 -0
  548. package/dist/hosted/oauth/jwt.js.map +1 -0
  549. package/dist/hosted/oauth/log.d.ts +12 -0
  550. package/dist/hosted/oauth/log.d.ts.map +1 -0
  551. package/dist/hosted/oauth/log.js +71 -0
  552. package/dist/hosted/oauth/log.js.map +1 -0
  553. package/dist/hosted/oauth/pat-cache.d.ts +11 -0
  554. package/dist/hosted/oauth/pat-cache.d.ts.map +1 -0
  555. package/dist/hosted/oauth/pat-cache.js +42 -0
  556. package/dist/hosted/oauth/pat-cache.js.map +1 -0
  557. package/dist/hosted/oauth/pkce.d.ts +3 -0
  558. package/dist/hosted/oauth/pkce.d.ts.map +1 -0
  559. package/dist/hosted/oauth/pkce.js +9 -0
  560. package/dist/hosted/oauth/pkce.js.map +1 -0
  561. package/dist/hosted/oauth/redirect-uri.d.ts +10 -0
  562. package/dist/hosted/oauth/redirect-uri.d.ts.map +1 -0
  563. package/dist/hosted/oauth/redirect-uri.js +61 -0
  564. package/dist/hosted/oauth/redirect-uri.js.map +1 -0
  565. package/dist/hosted/oauth/refresh.d.ts +22 -0
  566. package/dist/hosted/oauth/refresh.d.ts.map +1 -0
  567. package/dist/hosted/oauth/refresh.js +46 -0
  568. package/dist/hosted/oauth/refresh.js.map +1 -0
  569. package/dist/hosted/oauth/store.d.ts +75 -0
  570. package/dist/hosted/oauth/store.d.ts.map +1 -0
  571. package/dist/hosted/oauth/store.js +217 -0
  572. package/dist/hosted/oauth/store.js.map +1 -0
  573. package/dist/hosted/oauth/token-grant-response.d.ts +7 -0
  574. package/dist/hosted/oauth/token-grant-response.d.ts.map +1 -0
  575. package/dist/hosted/oauth/token-grant-response.js +34 -0
  576. package/dist/hosted/oauth/token-grant-response.js.map +1 -0
  577. package/dist/hosted/parse-customer-resource.d.ts +3 -0
  578. package/dist/hosted/parse-customer-resource.d.ts.map +1 -0
  579. package/dist/hosted/parse-customer-resource.js +16 -0
  580. package/dist/hosted/parse-customer-resource.js.map +1 -0
  581. package/dist/index/blob.d.ts +5 -0
  582. package/dist/index/blob.d.ts.map +1 -0
  583. package/dist/index/blob.js +15 -0
  584. package/dist/index/blob.js.map +1 -0
  585. package/dist/index/cache-keys.d.ts +9 -0
  586. package/dist/index/cache-keys.d.ts.map +1 -0
  587. package/dist/index/cache-keys.js +13 -0
  588. package/dist/index/cache-keys.js.map +1 -0
  589. package/dist/index/cache-store.d.ts +31 -0
  590. package/dist/index/cache-store.d.ts.map +1 -0
  591. package/dist/index/cache-store.js +17 -0
  592. package/dist/index/cache-store.js.map +1 -0
  593. package/dist/index/db.d.ts +12 -0
  594. package/dist/index/db.d.ts.map +1 -0
  595. package/dist/index/db.js +49 -0
  596. package/dist/index/db.js.map +1 -0
  597. package/dist/index/distributed-sync-lock.d.ts +3 -0
  598. package/dist/index/distributed-sync-lock.d.ts.map +1 -0
  599. package/dist/index/distributed-sync-lock.js +22 -0
  600. package/dist/index/distributed-sync-lock.js.map +1 -0
  601. package/dist/index/errors.d.ts +18 -0
  602. package/dist/index/errors.d.ts.map +1 -0
  603. package/dist/index/errors.js +18 -0
  604. package/dist/index/errors.js.map +1 -0
  605. package/dist/index/file-index-cache.d.ts +16 -0
  606. package/dist/index/file-index-cache.d.ts.map +1 -0
  607. package/dist/index/file-index-cache.js +103 -0
  608. package/dist/index/file-index-cache.js.map +1 -0
  609. package/dist/index/hydrate.d.ts +8 -0
  610. package/dist/index/hydrate.d.ts.map +1 -0
  611. package/dist/index/hydrate.js +26 -0
  612. package/dist/index/hydrate.js.map +1 -0
  613. package/dist/index/invalidate.d.ts +28 -0
  614. package/dist/index/invalidate.d.ts.map +1 -0
  615. package/dist/index/invalidate.js +114 -0
  616. package/dist/index/invalidate.js.map +1 -0
  617. package/dist/index/mode.d.ts +7 -0
  618. package/dist/index/mode.d.ts.map +1 -0
  619. package/dist/index/mode.js +9 -0
  620. package/dist/index/mode.js.map +1 -0
  621. package/dist/index/patch-index.d.ts +12 -0
  622. package/dist/index/patch-index.d.ts.map +1 -0
  623. package/dist/index/patch-index.js +80 -0
  624. package/dist/index/patch-index.js.map +1 -0
  625. package/dist/index/paths.d.ts +6 -0
  626. package/dist/index/paths.d.ts.map +1 -0
  627. package/dist/index/paths.js +23 -0
  628. package/dist/index/paths.js.map +1 -0
  629. package/dist/index/publish-cache.d.ts +5 -0
  630. package/dist/index/publish-cache.d.ts.map +1 -0
  631. package/dist/index/publish-cache.js +26 -0
  632. package/dist/index/publish-cache.js.map +1 -0
  633. package/dist/index/query.d.ts +139 -0
  634. package/dist/index/query.d.ts.map +1 -0
  635. package/dist/index/query.js +451 -0
  636. package/dist/index/query.js.map +1 -0
  637. package/dist/index/redis-index-cache.d.ts +24 -0
  638. package/dist/index/redis-index-cache.d.ts.map +1 -0
  639. package/dist/index/redis-index-cache.js +83 -0
  640. package/dist/index/redis-index-cache.js.map +1 -0
  641. package/dist/index/reference-lookup.d.ts +18 -0
  642. package/dist/index/reference-lookup.d.ts.map +1 -0
  643. package/dist/index/reference-lookup.js +123 -0
  644. package/dist/index/reference-lookup.js.map +1 -0
  645. package/dist/index/require.d.ts +22 -0
  646. package/dist/index/require.d.ts.map +1 -0
  647. package/dist/index/require.js +74 -0
  648. package/dist/index/require.js.map +1 -0
  649. package/dist/index/run-sync.d.ts +22 -0
  650. package/dist/index/run-sync.d.ts.map +1 -0
  651. package/dist/index/run-sync.js +76 -0
  652. package/dist/index/run-sync.js.map +1 -0
  653. package/dist/index/schema.d.ts +19 -0
  654. package/dist/index/schema.d.ts.map +1 -0
  655. package/dist/index/schema.js +81 -0
  656. package/dist/index/schema.js.map +1 -0
  657. package/dist/index/sync-lock.d.ts +9 -0
  658. package/dist/index/sync-lock.d.ts.map +1 -0
  659. package/dist/index/sync-lock.js +98 -0
  660. package/dist/index/sync-lock.js.map +1 -0
  661. package/dist/index/sync-log.d.ts +7 -0
  662. package/dist/index/sync-log.d.ts.map +1 -0
  663. package/dist/index/sync-log.js +23 -0
  664. package/dist/index/sync-log.js.map +1 -0
  665. package/dist/index/sync.d.ts +50 -0
  666. package/dist/index/sync.d.ts.map +1 -0
  667. package/dist/index/sync.js +292 -0
  668. package/dist/index/sync.js.map +1 -0
  669. package/dist/index.d.ts +7 -0
  670. package/dist/index.d.ts.map +1 -0
  671. package/dist/index.js +5 -0
  672. package/dist/index.js.map +1 -0
  673. package/dist/mcp/guide.d.ts +21 -0
  674. package/dist/mcp/guide.d.ts.map +1 -0
  675. package/dist/mcp/guide.js +97 -0
  676. package/dist/mcp/guide.js.map +1 -0
  677. package/dist/mcp/hosted-metadata.d.ts +12 -0
  678. package/dist/mcp/hosted-metadata.d.ts.map +1 -0
  679. package/dist/mcp/hosted-metadata.js +30 -0
  680. package/dist/mcp/hosted-metadata.js.map +1 -0
  681. package/dist/mcp/http-handler.d.ts +15 -0
  682. package/dist/mcp/http-handler.d.ts.map +1 -0
  683. package/dist/mcp/http-handler.js +38 -0
  684. package/dist/mcp/http-handler.js.map +1 -0
  685. package/dist/mcp/prompts/onboarding.d.ts +4 -0
  686. package/dist/mcp/prompts/onboarding.d.ts.map +1 -0
  687. package/dist/mcp/prompts/onboarding.js +398 -0
  688. package/dist/mcp/prompts/onboarding.js.map +1 -0
  689. package/dist/mcp/resources/customer.d.ts +7 -0
  690. package/dist/mcp/resources/customer.d.ts.map +1 -0
  691. package/dist/mcp/resources/customer.js +72 -0
  692. package/dist/mcp/resources/customer.js.map +1 -0
  693. package/dist/mcp/resources/guide.d.ts +4 -0
  694. package/dist/mcp/resources/guide.d.ts.map +1 -0
  695. package/dist/mcp/resources/guide.js +16 -0
  696. package/dist/mcp/resources/guide.js.map +1 -0
  697. package/dist/mcp/server.d.ts +17 -0
  698. package/dist/mcp/server.d.ts.map +1 -0
  699. package/dist/mcp/server.js +63 -0
  700. package/dist/mcp/server.js.map +1 -0
  701. package/dist/mcp/session-args.d.ts +10 -0
  702. package/dist/mcp/session-args.d.ts.map +1 -0
  703. package/dist/mcp/session-args.js +28 -0
  704. package/dist/mcp/session-args.js.map +1 -0
  705. package/dist/mcp/tools/cms-edit.d.ts +10 -0
  706. package/dist/mcp/tools/cms-edit.d.ts.map +1 -0
  707. package/dist/mcp/tools/cms-edit.js +148 -0
  708. package/dist/mcp/tools/cms-edit.js.map +1 -0
  709. package/dist/mcp/tools/customer.d.ts +8 -0
  710. package/dist/mcp/tools/customer.d.ts.map +1 -0
  711. package/dist/mcp/tools/customer.js +41 -0
  712. package/dist/mcp/tools/customer.js.map +1 -0
  713. package/dist/mcp/tools/help.d.ts +4 -0
  714. package/dist/mcp/tools/help.d.ts.map +1 -0
  715. package/dist/mcp/tools/help.js +23 -0
  716. package/dist/mcp/tools/help.js.map +1 -0
  717. package/dist/mcp/tools/media.d.ts +4 -0
  718. package/dist/mcp/tools/media.d.ts.map +1 -0
  719. package/dist/mcp/tools/media.js +176 -0
  720. package/dist/mcp/tools/media.js.map +1 -0
  721. package/dist/mcp/tools/staged-upload.d.ts +4 -0
  722. package/dist/mcp/tools/staged-upload.d.ts.map +1 -0
  723. package/dist/mcp/tools/staged-upload.js +77 -0
  724. package/dist/mcp/tools/staged-upload.js.map +1 -0
  725. package/dist/mcp/types.d.ts +2 -0
  726. package/dist/mcp/types.d.ts.map +1 -0
  727. package/dist/mcp/types.js +2 -0
  728. package/dist/mcp/types.js.map +1 -0
  729. package/dist/media-pipeline/actions.d.ts +32 -0
  730. package/dist/media-pipeline/actions.d.ts.map +1 -0
  731. package/dist/media-pipeline/actions.js +436 -0
  732. package/dist/media-pipeline/actions.js.map +1 -0
  733. package/dist/media-pipeline/client.d.ts +71 -0
  734. package/dist/media-pipeline/client.d.ts.map +1 -0
  735. package/dist/media-pipeline/client.js +79 -0
  736. package/dist/media-pipeline/client.js.map +1 -0
  737. package/dist/media-pipeline/config.d.ts +17 -0
  738. package/dist/media-pipeline/config.d.ts.map +1 -0
  739. package/dist/media-pipeline/config.js +52 -0
  740. package/dist/media-pipeline/config.js.map +1 -0
  741. package/dist/media-pipeline/import-filter.d.ts +36 -0
  742. package/dist/media-pipeline/import-filter.d.ts.map +1 -0
  743. package/dist/media-pipeline/import-filter.js +53 -0
  744. package/dist/media-pipeline/import-filter.js.map +1 -0
  745. package/dist/media-pipeline/import.d.ts +25 -0
  746. package/dist/media-pipeline/import.d.ts.map +1 -0
  747. package/dist/media-pipeline/import.js +225 -0
  748. package/dist/media-pipeline/import.js.map +1 -0
  749. package/dist/media-pipeline/index.d.ts +6 -0
  750. package/dist/media-pipeline/index.d.ts.map +1 -0
  751. package/dist/media-pipeline/index.js +6 -0
  752. package/dist/media-pipeline/index.js.map +1 -0
  753. package/dist/media-pipeline/job-store.d.ts +49 -0
  754. package/dist/media-pipeline/job-store.d.ts.map +1 -0
  755. package/dist/media-pipeline/job-store.js +215 -0
  756. package/dist/media-pipeline/job-store.js.map +1 -0
  757. package/dist/media-pipeline/limits.d.ts +19 -0
  758. package/dist/media-pipeline/limits.d.ts.map +1 -0
  759. package/dist/media-pipeline/limits.js +19 -0
  760. package/dist/media-pipeline/limits.js.map +1 -0
  761. package/dist/media-pipeline/log.d.ts +3 -0
  762. package/dist/media-pipeline/log.d.ts.map +1 -0
  763. package/dist/media-pipeline/log.js +12 -0
  764. package/dist/media-pipeline/log.js.map +1 -0
  765. package/dist/media-pipeline/validate.d.ts +18 -0
  766. package/dist/media-pipeline/validate.d.ts.map +1 -0
  767. package/dist/media-pipeline/validate.js +38 -0
  768. package/dist/media-pipeline/validate.js.map +1 -0
  769. package/dist/output/json.d.ts +53 -0
  770. package/dist/output/json.d.ts.map +1 -0
  771. package/dist/output/json.js +110 -0
  772. package/dist/output/json.js.map +1 -0
  773. package/dist/output/mode.d.ts +3 -0
  774. package/dist/output/mode.d.ts.map +1 -0
  775. package/dist/output/mode.js +16 -0
  776. package/dist/output/mode.js.map +1 -0
  777. package/dist/output/print.d.ts +14 -0
  778. package/dist/output/print.d.ts.map +1 -0
  779. package/dist/output/print.js +61 -0
  780. package/dist/output/print.js.map +1 -0
  781. package/dist/output/terminal-table.d.ts +15 -0
  782. package/dist/output/terminal-table.d.ts.map +1 -0
  783. package/dist/output/terminal-table.js +60 -0
  784. package/dist/output/terminal-table.js.map +1 -0
  785. package/dist/preview/capture-urls.d.ts +12 -0
  786. package/dist/preview/capture-urls.d.ts.map +1 -0
  787. package/dist/preview/capture-urls.js +41 -0
  788. package/dist/preview/capture-urls.js.map +1 -0
  789. package/dist/preview/entry-urls.d.ts +44 -0
  790. package/dist/preview/entry-urls.d.ts.map +1 -0
  791. package/dist/preview/entry-urls.js +153 -0
  792. package/dist/preview/entry-urls.js.map +1 -0
  793. package/dist/project/doctor.d.ts +9 -0
  794. package/dist/project/doctor.d.ts.map +1 -0
  795. package/dist/project/doctor.js +172 -0
  796. package/dist/project/doctor.js.map +1 -0
  797. package/dist/project/load.d.ts +5 -0
  798. package/dist/project/load.d.ts.map +1 -0
  799. package/dist/project/load.js +66 -0
  800. package/dist/project/load.js.map +1 -0
  801. package/dist/project/types.d.ts +54 -0
  802. package/dist/project/types.d.ts.map +1 -0
  803. package/dist/project/types.js +53 -0
  804. package/dist/project/types.js.map +1 -0
  805. package/dist/project/validate-hosted.d.ts +7 -0
  806. package/dist/project/validate-hosted.d.ts.map +1 -0
  807. package/dist/project/validate-hosted.js +12 -0
  808. package/dist/project/validate-hosted.js.map +1 -0
  809. package/dist/project/validate-secrets.d.ts +7 -0
  810. package/dist/project/validate-secrets.d.ts.map +1 -0
  811. package/dist/project/validate-secrets.js +61 -0
  812. package/dist/project/validate-secrets.js.map +1 -0
  813. package/dist/rtf/convertToRtf.d.ts +7 -0
  814. package/dist/rtf/convertToRtf.d.ts.map +1 -0
  815. package/dist/rtf/convertToRtf.js +24 -0
  816. package/dist/rtf/convertToRtf.js.map +1 -0
  817. package/dist/rtf/fromHtml.d.ts +8 -0
  818. package/dist/rtf/fromHtml.d.ts.map +1 -0
  819. package/dist/rtf/fromHtml.js +290 -0
  820. package/dist/rtf/fromHtml.js.map +1 -0
  821. package/dist/rtf/fromMarkdown.d.ts +25 -0
  822. package/dist/rtf/fromMarkdown.d.ts.map +1 -0
  823. package/dist/rtf/fromMarkdown.js +375 -0
  824. package/dist/rtf/fromMarkdown.js.map +1 -0
  825. package/dist/rtf/fromPlainText.d.ts +7 -0
  826. package/dist/rtf/fromPlainText.d.ts.map +1 -0
  827. package/dist/rtf/fromPlainText.js +39 -0
  828. package/dist/rtf/fromPlainText.js.map +1 -0
  829. package/dist/rtf/fromRtfJson.d.ts +10 -0
  830. package/dist/rtf/fromRtfJson.d.ts.map +1 -0
  831. package/dist/rtf/fromRtfJson.js +52 -0
  832. package/dist/rtf/fromRtfJson.js.map +1 -0
  833. package/dist/rtf/inlineHtml.d.ts +6 -0
  834. package/dist/rtf/inlineHtml.d.ts.map +1 -0
  835. package/dist/rtf/inlineHtml.js +152 -0
  836. package/dist/rtf/inlineHtml.js.map +1 -0
  837. package/dist/rtf/references.d.ts +9 -0
  838. package/dist/rtf/references.d.ts.map +1 -0
  839. package/dist/rtf/references.js +49 -0
  840. package/dist/rtf/references.js.map +1 -0
  841. package/dist/rtf/replacePlainText.d.ts +117 -0
  842. package/dist/rtf/replacePlainText.d.ts.map +1 -0
  843. package/dist/rtf/replacePlainText.js +598 -0
  844. package/dist/rtf/replacePlainText.js.map +1 -0
  845. package/dist/rtf/resolveRtfInput.d.ts +11 -0
  846. package/dist/rtf/resolveRtfInput.d.ts.map +1 -0
  847. package/dist/rtf/resolveRtfInput.js +23 -0
  848. package/dist/rtf/resolveRtfInput.js.map +1 -0
  849. package/dist/rtf/toMarkdown.d.ts +6 -0
  850. package/dist/rtf/toMarkdown.d.ts.map +1 -0
  851. package/dist/rtf/toMarkdown.js +179 -0
  852. package/dist/rtf/toMarkdown.js.map +1 -0
  853. package/dist/rtf/types.d.ts +5 -0
  854. package/dist/rtf/types.d.ts.map +1 -0
  855. package/dist/rtf/types.js +2 -0
  856. package/dist/rtf/types.js.map +1 -0
  857. package/dist/rtf/utils.d.ts +7 -0
  858. package/dist/rtf/utils.d.ts.map +1 -0
  859. package/dist/rtf/utils.js +11 -0
  860. package/dist/rtf/utils.js.map +1 -0
  861. package/dist/runtime/context.d.ts +32 -0
  862. package/dist/runtime/context.d.ts.map +1 -0
  863. package/dist/runtime/context.js +9 -0
  864. package/dist/runtime/context.js.map +1 -0
  865. package/dist/session/dirty.d.ts +20 -0
  866. package/dist/session/dirty.d.ts.map +1 -0
  867. package/dist/session/dirty.js +44 -0
  868. package/dist/session/dirty.js.map +1 -0
  869. package/dist/session/file-session-store.d.ts +10 -0
  870. package/dist/session/file-session-store.d.ts.map +1 -0
  871. package/dist/session/file-session-store.js +169 -0
  872. package/dist/session/file-session-store.js.map +1 -0
  873. package/dist/session/log.d.ts +6 -0
  874. package/dist/session/log.d.ts.map +1 -0
  875. package/dist/session/log.js +21 -0
  876. package/dist/session/log.js.map +1 -0
  877. package/dist/session/redis-session-store.d.ts +40 -0
  878. package/dist/session/redis-session-store.d.ts.map +1 -0
  879. package/dist/session/redis-session-store.js +199 -0
  880. package/dist/session/redis-session-store.js.map +1 -0
  881. package/dist/session/refs.d.ts +45 -0
  882. package/dist/session/refs.d.ts.map +1 -0
  883. package/dist/session/refs.js +152 -0
  884. package/dist/session/refs.js.map +1 -0
  885. package/dist/session/session-store.d.ts +27 -0
  886. package/dist/session/session-store.d.ts.map +1 -0
  887. package/dist/session/session-store.js +9 -0
  888. package/dist/session/session-store.js.map +1 -0
  889. package/dist/session/state.d.ts +106 -0
  890. package/dist/session/state.d.ts.map +1 -0
  891. package/dist/session/state.js +93 -0
  892. package/dist/session/state.js.map +1 -0
  893. package/dist/session/store.d.ts +16 -0
  894. package/dist/session/store.d.ts.map +1 -0
  895. package/dist/session/store.js +89 -0
  896. package/dist/session/store.js.map +1 -0
  897. package/dist/snapshot/field-value.d.ts +5 -0
  898. package/dist/snapshot/field-value.d.ts.map +1 -0
  899. package/dist/snapshot/field-value.js +42 -0
  900. package/dist/snapshot/field-value.js.map +1 -0
  901. package/dist/snapshot/fields.d.ts +10 -0
  902. package/dist/snapshot/fields.d.ts.map +1 -0
  903. package/dist/snapshot/fields.js +72 -0
  904. package/dist/snapshot/fields.js.map +1 -0
  905. package/dist/snapshot/render.d.ts +21 -0
  906. package/dist/snapshot/render.d.ts.map +1 -0
  907. package/dist/snapshot/render.js +231 -0
  908. package/dist/snapshot/render.js.map +1 -0
  909. package/dist/staged-upload/hmac.d.ts +6 -0
  910. package/dist/staged-upload/hmac.d.ts.map +1 -0
  911. package/dist/staged-upload/hmac.js +43 -0
  912. package/dist/staged-upload/hmac.js.map +1 -0
  913. package/dist/staged-upload/limits.d.ts +6 -0
  914. package/dist/staged-upload/limits.d.ts.map +1 -0
  915. package/dist/staged-upload/limits.js +9 -0
  916. package/dist/staged-upload/limits.js.map +1 -0
  917. package/dist/staged-upload/mime.d.ts +2 -0
  918. package/dist/staged-upload/mime.d.ts.map +1 -0
  919. package/dist/staged-upload/mime.js +15 -0
  920. package/dist/staged-upload/mime.js.map +1 -0
  921. package/dist/staged-upload/request.d.ts +11 -0
  922. package/dist/staged-upload/request.d.ts.map +1 -0
  923. package/dist/staged-upload/request.js +40 -0
  924. package/dist/staged-upload/request.js.map +1 -0
  925. package/dist/staged-upload/store.d.ts +19 -0
  926. package/dist/staged-upload/store.d.ts.map +1 -0
  927. package/dist/staged-upload/store.js +124 -0
  928. package/dist/staged-upload/store.js.map +1 -0
  929. package/dist/staged-upload/types.d.ts +27 -0
  930. package/dist/staged-upload/types.d.ts.map +1 -0
  931. package/dist/staged-upload/types.js +2 -0
  932. package/dist/staged-upload/types.js.map +1 -0
  933. package/dist/telemetry/axiom.d.ts +22 -0
  934. package/dist/telemetry/axiom.d.ts.map +1 -0
  935. package/dist/telemetry/axiom.js +45 -0
  936. package/dist/telemetry/axiom.js.map +1 -0
  937. package/dist/telemetry/composite.d.ts +9 -0
  938. package/dist/telemetry/composite.d.ts.map +1 -0
  939. package/dist/telemetry/composite.js +16 -0
  940. package/dist/telemetry/composite.js.map +1 -0
  941. package/dist/telemetry/enrich.d.ts +11 -0
  942. package/dist/telemetry/enrich.d.ts.map +1 -0
  943. package/dist/telemetry/enrich.js +32 -0
  944. package/dist/telemetry/enrich.js.map +1 -0
  945. package/dist/telemetry/factory.d.ts +8 -0
  946. package/dist/telemetry/factory.d.ts.map +1 -0
  947. package/dist/telemetry/factory.js +44 -0
  948. package/dist/telemetry/factory.js.map +1 -0
  949. package/dist/telemetry/index.d.ts +10 -0
  950. package/dist/telemetry/index.d.ts.map +1 -0
  951. package/dist/telemetry/index.js +9 -0
  952. package/dist/telemetry/index.js.map +1 -0
  953. package/dist/telemetry/local.d.ts +9 -0
  954. package/dist/telemetry/local.d.ts.map +1 -0
  955. package/dist/telemetry/local.js +21 -0
  956. package/dist/telemetry/local.js.map +1 -0
  957. package/dist/telemetry/noop.d.ts +7 -0
  958. package/dist/telemetry/noop.d.ts.map +1 -0
  959. package/dist/telemetry/noop.js +6 -0
  960. package/dist/telemetry/noop.js.map +1 -0
  961. package/dist/telemetry/record.d.ts +14 -0
  962. package/dist/telemetry/record.d.ts.map +1 -0
  963. package/dist/telemetry/record.js +61 -0
  964. package/dist/telemetry/record.js.map +1 -0
  965. package/dist/telemetry/request-stats.d.ts +15 -0
  966. package/dist/telemetry/request-stats.d.ts.map +1 -0
  967. package/dist/telemetry/request-stats.js +34 -0
  968. package/dist/telemetry/request-stats.js.map +1 -0
  969. package/dist/telemetry/types.d.ts +47 -0
  970. package/dist/telemetry/types.d.ts.map +1 -0
  971. package/dist/telemetry/types.js +2 -0
  972. package/dist/telemetry/types.js.map +1 -0
  973. package/dist/validation/allowed-types.d.ts +7 -0
  974. package/dist/validation/allowed-types.d.ts.map +1 -0
  975. package/dist/validation/allowed-types.js +17 -0
  976. package/dist/validation/allowed-types.js.map +1 -0
  977. package/dist/version.d.ts +9 -0
  978. package/dist/version.d.ts.map +1 -0
  979. package/dist/version.js +10 -0
  980. package/dist/version.js.map +1 -0
  981. package/docs/FEATURE_REQUESTS_ARCHIVE.md +141 -0
  982. package/docs/FUNCTIONAL_SPEC.md +303 -0
  983. package/docs/MEDIA_INDEX_PLAN.md +256 -0
  984. package/docs/SKILLS.md +29 -0
  985. package/docs/TELEMETRY_AXIOM.md +93 -0
  986. package/docs/editor-tasks/article-tags.md +47 -0
  987. package/docs/editor-tasks/authors-import.md +53 -0
  988. package/docs/editor-tasks/bulk-find-replace.md +52 -0
  989. package/docs/editor-tasks/clone-page.md +39 -0
  990. package/docs/editor-tasks/create-article.md +77 -0
  991. package/docs/editor-tasks/create-from-document.md +77 -0
  992. package/docs/editor-tasks/create-page.md +45 -0
  993. package/docs/editor-tasks/edit-rich-text.md +44 -0
  994. package/docs/editor-tasks/edit-scalar-fields.md +47 -0
  995. package/docs/editor-tasks/featured-images.md +46 -0
  996. package/docs/editor-tasks/media-pipeline-prepare.md +175 -0
  997. package/docs/editor-tasks/media-reuse-and-upload.md +122 -0
  998. package/docs/editor-tasks/media-review.md +139 -0
  999. package/docs/editor-tasks/navigation.md +39 -0
  1000. package/docs/editor-tasks/preview-verify.md +93 -0
  1001. package/docs/editor-tasks/publish-handoff.md +41 -0
  1002. package/docs/editor-tasks/seo-descriptions.md +48 -0
  1003. package/docs/editor-tasks/source-readiness-review.md +116 -0
  1004. package/docs/editor-tasks/taxonomy.md +51 -0
  1005. package/docs/help/article-tags-from-json.md +62 -0
  1006. package/docs/help/asset-review.md +56 -0
  1007. package/docs/help/batch-run.md +222 -0
  1008. package/docs/help/batch.md +94 -0
  1009. package/docs/help/bulk-rtf-replace.md +80 -0
  1010. package/docs/help/create-from-json.md +382 -0
  1011. package/docs/help/fields-article.md +161 -0
  1012. package/docs/help/fields-collection.md +133 -0
  1013. package/docs/help/fields-component.md +165 -0
  1014. package/docs/help/fields-page.md +123 -0
  1015. package/docs/help/fields-taxonomy.md +158 -0
  1016. package/docs/help/fields.md +60 -0
  1017. package/docs/help/index-sync.md +136 -0
  1018. package/docs/help/index.md +181 -0
  1019. package/docs/help/lookup.md +132 -0
  1020. package/docs/help/person-from-json.md +82 -0
  1021. package/docs/help/taxonomy-from-json.md +115 -0
  1022. package/docs/help/workflow.md +239 -0
  1023. package/docs/mcp/e2e-test-prompt.md +159 -0
  1024. package/docs/mcp/hosted-guide.md +354 -0
  1025. package/package.json +107 -0
  1026. package/skills/README.md +30 -0
  1027. package/skills/core/SKILL.md +860 -0
  1028. package/skills/editor-tasks/SKILL.md +86 -0
  1029. package/skills/manifest.json +6 -0
  1030. package/skills/setup/SKILL.md +102 -0
  1031. package/skills/templates/SKILL.md +21 -0
@@ -0,0 +1,303 @@
1
+ # Functional Specification: cms-edit
2
+
3
+ ## 1. Purpose
4
+
5
+ `cms-edit` is a CLI tool and MCP server for reading and writing draft content in a Contentful CMS space. It is designed to be operated by an AI agent or a human via the command line. All write operations produce Contentful drafts; no publish, unpublish, archive, or delete operation is exposed.
6
+
7
+ ---
8
+
9
+ ## 2. Interfaces
10
+
11
+ **CLI binary (`cms-edit`)** — invoked with subcommands and arguments from a terminal or shell script.
12
+
13
+ **Hosted MCP server** — deployed per site at `/api/mcp` (OAuth). Exposes `cms_edit`, `cms_edit_help`, `cms_edit_customer`, guide/customer resources, and onboarding prompts. Local stdio MCP is not supported; IDE/terminal agents use the `cms-edit` CLI directly.
14
+
15
+ ---
16
+
17
+ ## 3. Configuration
18
+
19
+ A project-level `.contentful-cms.json` file defines one or more Contentful spaces. Each space entry holds:
20
+
21
+ - `spaceId` — Contentful space identifier
22
+ - `environment` — Contentful environment name (e.g., `master`)
23
+ - `managementToken` — Contentful Management API token, expressed as an env var reference (e.g., `${CMS_EDIT_TOKEN_OM1}`)
24
+ - `defaultLocale` — locale string (e.g., `en-US`)
25
+ - `devBaseUrl` — local app URL for `preview url` and `preview showcase`
26
+
27
+ A `defaultSpace` key selects the active space when none is specified. The `--space` flag overrides per invocation.
28
+
29
+ **Environment variables:**
30
+
31
+ | Variable | Purpose |
32
+ |---|---|
33
+ | `CMS_EDIT_TOKEN_<SPACE>` | Management token per space |
34
+ | `CMS_EDIT_JSON=1` | Force JSON output mode globally |
35
+ | `CONTENTFUL_CMS_SESSION=<name>` | Select a named session for concurrent workflows |
36
+
37
+ ---
38
+
39
+ ## 4. Session Model
40
+
41
+ A session is the unit of work. It is created when content is opened and persists on the local filesystem until saved or discarded. Multiple named sessions can be active concurrently.
42
+
43
+ Each session holds:
44
+ - The loaded entry tree with assigned `@ref` labels (`@c0`, `@c1`, …)
45
+ - A change log (set of modified fields per entry)
46
+ - Entries queued for deletion (drafts unlinked during the session)
47
+
48
+ Commands within a session reference entries by their `@ref` label. The session is explicitly ended by `save` or `discard`.
49
+
50
+ ---
51
+
52
+ ## 5. Supported Contentful Entity Types
53
+
54
+ The tool operates on the following Contentful content types:
55
+
56
+ | Type | Discriminator field | Notes |
57
+ |---|---|---|
58
+ | Page | — | Top-level container; identified by `slug` |
59
+ | Article | — | Blog/editorial entry; identified by `slug` |
60
+ | Component | `componentType` | Inline content block (Hero, RichText, CTA, Card, …) |
61
+ | Collection | `collectionType` | Container with a `contents` array of child entries |
62
+ | ExternalComponent | `externalComponentType` | Embeds (data viz, research charts) |
63
+ | Template | — | Layout with `preContent`/`postContent` arrays |
64
+ | Navigation | — | Menu tree with nested `items`/`navigationItems` |
65
+ | Person | — | Author/team member; `bio` is rich text (`rtf` in cms-edit) |
66
+ | ArticleType | — | Article taxonomy tag |
67
+ | Tag | — | General taxonomy |
68
+ | Media | — | Wrapper entry around an asset |
69
+ | Asset | — | Image, PDF, or file (read-only; no upload capability) |
70
+
71
+ ---
72
+
73
+ ## 6. Entry Tree Resolution
74
+
75
+ When content is opened, the tool recursively fetches linked entries to build a tree:
76
+
77
+ - Content arrays: `topContent`, `content`, `bottomContent` (on pages/articles/templates), `contents` (on collections)
78
+ - Single-link fields: `template`, `articleType`, `author`, `menu`, `footer`
79
+ - Navigation trees: `items`, `navigationItems`
80
+ - Template layout: `preContent`, `postContent`
81
+
82
+ Each resolved entry is assigned a stable `@ref` label (`@c0` = the root, `@c1`, `@c2`, … for children in tree order). The tree is rebuilt on each `snapshot` call.
83
+
84
+ ---
85
+
86
+ ## 7. Command Reference
87
+
88
+ ### 7.1 Discovery and Navigation
89
+
90
+ | Command | Function |
91
+ |---|---|
92
+ | `open --page-slug <slug>` | Load entry by flat lookup flag (see `docs/help/lookup.md`) |
93
+ | `open --id <id>` | Load by Contentful entry ID |
94
+ | `peek --page-slug <slug>` | Fetch and display content tree and root field values without creating a session |
95
+ | `peek --id <id>` | Same as peek, but look up by Contentful entry ID |
96
+ | `snapshot` | Print the current session's entry tree with @refs, entry types, field labels, and publish status |
97
+ | `read <ref>` | Print all fields of an entry in the active session |
98
+ | `read <ref> <field>` | Print a specific field (rich text rendered as Markdown) |
99
+ | `read <id> --id [field]` | Print entry fields by ID without an open session |
100
+ | `search <query>` | Full-text search across entries; returns matching entries |
101
+ | `list --type <type>` | List all entries of a given content type |
102
+ | `index sync` | Rebuild local SQLite media index from Content Preview API (draft; default). Use `--published` for Delivery API only |
103
+ | `index status` | Show index path, sync time, and row counts |
104
+ | `index dump` | Pretty-print index contents (assets, media, type breakdown) for terminal inspection |
105
+ | `list --type media --asset-id <id>` | List Media entries linked to an asset (index) |
106
+ | `list --type media --asset-filename <name>` | List Media entries by exact asset fileName (index) |
107
+ | `list --type page` | List pages from the content catalog (index-backed) |
108
+ | `resolve --id <id>` | Resolve an entry or asset ID to its details |
109
+ | `resolve --page-slug <slug>` | Resolve by flat lookup flag (no session). See `docs/help/lookup.md` |
110
+ | `open --page-slug <slug>` | Open a page session (one lookup flag required) |
111
+
112
+ ### 7.2 Session Management
113
+
114
+ | Command | Function |
115
+ |---|---|
116
+ | `diff` | Show all unsaved field changes across all modified entries in the session |
117
+ | `save` | Write all queued changes to Contentful as drafts; delete queued draft-only entries |
118
+ | `discard` | Clear all unsaved changes; end the session |
119
+ | `discard --all` | Clear all active sessions |
120
+
121
+ ### 7.3 Field Mutations
122
+
123
+ | Command | Function |
124
+ |---|---|
125
+ | `set <ref> <field> <value>` | Set a scalar field (string, boolean, number, date) |
126
+ | `set <ref> <field> <id> --link` | Set a single entry-link field |
127
+ | `set <ref> <field> @c1,@c2 --links` | Replace a content-array field with the given refs |
128
+ | `set <ref> <field> @c1,@c2 --links --append` | Append refs to an existing content array |
129
+ | `set <ref> <field> --file <path>` | Set a JSON/Object field from a local file |
130
+ | `set <ref> <field> --json '<json>'` | Set a JSON/Object field from an inline string |
131
+ | `set @c1:field="val" @c2:field="val" …` | Bulk set scalar fields across multiple entries in one command |
132
+ | `rtf <ref> <field> "<markdown>"` | Set a rich text field from Markdown |
133
+ | `rtf <ref> <field> --file <path>` | Set a rich text field from a Markdown file |
134
+ | `rtf <ref> <field> -` | Set a rich text field from stdin |
135
+ | `rtf replace <ref> <field> --find "X" --replace-plain "Y"` | Surgical per-text-node replacement within existing rich text (does not rewrite the entire field) |
136
+ | `rtf embed <ref> <field> <entry-id>` | Embed an entry block into an existing rich text field |
137
+ | `rtf embed <ref> <field> <asset-id> --asset` | Embed an asset block into an existing rich text field |
138
+ | `asset set <ref> <field> <asset-id>` | Set a visual/asset link field |
139
+
140
+ ### 7.4 Entry Creation
141
+
142
+ | Command | Function |
143
+ |---|---|
144
+ | `create page --slug /x --title "X"` | Create a new page entry and open it in a session |
145
+ | `create article --slug /x --title "X" --article-type-id <id>` | Create a new article entry and open it in a session |
146
+ | `create template --label "X"` | Create a new template entry |
147
+ | `create media --asset-id <id> --name "X"` | Create a Media wrapper entry around an existing asset |
148
+ | `create from-json --file <path>` | Bulk-create a page or article with all its components from a declarative JSON file |
149
+ | `create taxonomy-from-json --file <path>` | Batch-create tagType, articleType, and tag entries from JSON |
150
+ | `create tag-type --slug <slug> --name "X"` | Create a tagType entry (draft) |
151
+ | `create article-type --slug <slug> --name "X"` | Create an articleType entry (draft) |
152
+ | `create tag --slug <slug> --name "X" --tag-type <slug>` | Create a tag entry (draft); `--tag-type-slug`, `--tag-type-name`; `--description`, `--featured-image`; cmsLabel auto `"<tagType> — <name>"` |
153
+ | `create tag-type\|tag\|article-type … --if-not-exists` | Idempotent taxonomy create (returns existing entry when slug matches) |
154
+ | `add <entry-type> --content-type <ct>` | Create a new child entry of a given content type, link it into the current open entry's content array, and assign it a @ref |
155
+
156
+ ### 7.5 Entry Removal and Reordering
157
+
158
+ | Command | Function |
159
+ |---|---|
160
+ | `remove <ref>` | Unlink an entry from its parent. If the entry is a draft that has never been published, it is queued for deletion on `save`. Published entries are only unlinked. |
161
+ | `move <ref> --after <ref2>` | Move an entry to a new position within its parent content array |
162
+
163
+ ### 7.6 CTA Links
164
+
165
+ CTA link lists are nested within component entries.
166
+
167
+ | Command | Function |
168
+ |---|---|
169
+ | `links list <ref>` | List all CTA links on an entry |
170
+ | `links add <ref> --type external --label "X" --href <url>` | Add an external URL link |
171
+ | `links add <ref> --type internal --label "X" --slug /page` | Add an internal link by page slug |
172
+ | `links add <ref> --type internal --label "X" --id <id>` | Add an internal link by entry ID |
173
+ | `links add <ref> --type download --label "X" --asset-id <id>` | Add a download link to an asset |
174
+ | `links add <ref> … --variant <value>` | Set link variant on create |
175
+ | `links set <ref> <index> <field> <value>` | Set a scalar field on an existing link entry |
176
+ | `links move <ref> <from-index> <to-index>` | Reorder links by index |
177
+ | `links remove <ref> <index>` | Remove a link by index |
178
+
179
+ ### 7.7 Batch edit (by entry ID)
180
+
181
+ | Command | Function |
182
+ |---|---|
183
+ | `batch set <entryId>:field=value …` | Queue scalar field updates for unrelated entries |
184
+ | `batch diff` | Show pending batch session changes |
185
+ | `batch save` | Write all batch changes as drafts |
186
+ | `batch discard` | Clear batch session without saving |
187
+
188
+ Default session name: `batch`. Scalar fields only in v1.
189
+
190
+ ### 7.8 Navigation
191
+
192
+ | Command | Function |
193
+ |---|---|
194
+ | `nav open --nav-name <name>` | Open a navigation entry in a session (`--nav-id` also supported) |
195
+ | `nav add --label "X" --slug /page` | Add a navigation item |
196
+
197
+ ---
198
+
199
+ ## 8. Rich Text Conversion
200
+
201
+ The `rtf` command sets Rich Text fields from one of four input modes (exactly one flag; **`--markdown` is the default** when omitted):
202
+
203
+ | Mode | Flag | Behaviour |
204
+ |---|---|---|
205
+ | Plain text | `--text` | Paragraphs from `\n\n` or `\n`; inline markers (`**bold**`, links, …) use the same inline rules as Markdown. |
206
+ | Markdown | `--markdown` | Full document Markdown (see table below). |
207
+ | HTML | `--html` | Subset of HTML (`h1`–`h6`, `p`, lists, `blockquote`, `table`, inline tags). |
208
+ | Rich Text JSON | `--json` | Full Contentful Rich Text document JSON (`nodeType: document`). |
209
+
210
+ Input may be passed as positional argument, `--content`, `--base64`, `--file`, or stdin (`-`). The same modes apply to `cms-edit set` on Rich Text fields via `--rtf-text`, `--rtf-markdown`, `--rtf-html`, `--rtf-json`; `create from-json` auto-detects Markdown / HTML / JSON document strings or accepts `{ "value", "format" }`; `rtf patch` ops support `replaceIsMarkdown`, `replaceIsHtml`, `replaceIsJson`, or `replaceFormat`.
211
+
212
+ Markdown syntax (when using `--markdown`):
213
+
214
+ | Markdown | Rich text output |
215
+ |---|---|
216
+ | `#` through `######` | heading-1 through heading-6 |
217
+ | `**text**` | bold |
218
+ | `_text_` | italic |
219
+ | `***text***` | bold-italic |
220
+ | `` `code` `` | inline code |
221
+ | `[text](url)` | hyperlink |
222
+ | `- item` | unordered list item |
223
+ | `1. item` | ordered list item |
224
+ | Indented list items | nested lists |
225
+ | `> text` | blockquote |
226
+ | `---` | horizontal rule |
227
+ | `\| col \| col \|` (GFM) | table |
228
+
229
+ The `rtf replace` command performs surgical replacement at the text-node level. Replacements may be supplied as plain text, inline Markdown, inline HTML, or a JSON array of inline nodes (`--replace-plain`, `--replace`, `--replace-html`, `--replace-json`).
230
+
231
+ ---
232
+
233
+ ## 9. Write Behaviour and Optimistic Locking
234
+
235
+ On `save`:
236
+
237
+ 1. For each modified entry, the tool fetches the current live version from Contentful.
238
+ 2. Local changes are merged on top of the fetched version (handles concurrent edits from other sources).
239
+ 3. The merged entry is written using the Contentful Management API `update` method (not `publish`).
240
+ 4. Draft-only entries queued for deletion are deleted.
241
+ 5. Success and failure counts are reported.
242
+
243
+ If a version conflict cannot be resolved cleanly, an error is returned and the entry is not written.
244
+
245
+ ---
246
+
247
+ ## 10. Permission Constraints
248
+
249
+ The tool enforces a hard boundary between editing and publishing:
250
+
251
+ **Permitted:**
252
+ - Read entries and assets
253
+ - Create draft entries
254
+ - Update draft and published entries (saving as new draft versions)
255
+ - Delete draft-only entries (never-published)
256
+
257
+ **Not permitted (not exposed by the tool):**
258
+ - Publish entries
259
+ - Unpublish entries
260
+ - Archive entries
261
+ - Delete published entries
262
+
263
+ This boundary is enforced at two levels: the tool exposes no publish/unpublish/archive/delete commands, and the expected Contentful management token role should not have those permissions either.
264
+
265
+ ---
266
+
267
+ ## 11. Output Modes
268
+
269
+ **Human-readable mode (default):** Coloured console output with info, success, warning, and error messages.
270
+
271
+ **JSON mode** (`--json-output` flag or `CMS_EDIT_JSON=1`): Structured JSON on stdout. Schema varies by command:
272
+
273
+ | Command | JSON output |
274
+ |---|---|
275
+ | `snapshot` | Entry tree with refs, types, labels, publish status |
276
+ | `read` | Entry object with all fields, or single field value |
277
+ | `diff` | Array of changed entries, each with before/after field values |
278
+ | `search` / `list` | Array of matching entry objects |
279
+ | `save` | Success/failure counts and per-entry messages |
280
+ | `resolve` | Asset or entry metadata |
281
+
282
+ ---
283
+
284
+ ## 12. Preview URLs
285
+
286
+ When `devBaseUrl` is configured, `preview url` and `preview showcase` build URLs for pages and showcase renders. Visual verification is done via a browser MCP (e.g. Chrome DevTools), not built into cms-edit. CMS guidelines batch capture uses `cms-capture-screenshots` from `@se-studio/project-build` (separate tool, requires agent-browser).
287
+
288
+ ---
289
+
290
+ ## 13. Telemetry
291
+
292
+ Opt in with `CMS_EDIT_TELEMETRY=1` (opt out with `0`). The tool emits telemetry events recording the command name, outcome (`success`, `error`, or `exit`), duration, package version, and deployment `project_key`. No user ids, emails, slugs, field values, entry IDs, query text, or error messages are included.
293
+
294
+ - **Local CLI:** newline-delimited JSON at `~/.contentful-cms/telemetry.log`
295
+ - **Hosted (Vercel):** batched ingest to Axiom when `AXIOM_TOKEN` and `AXIOM_DATASET` are set
296
+
297
+ See [TELEMETRY_AXIOM.md](./TELEMETRY_AXIOM.md) for env vars, schema, and example queries.
298
+
299
+ ---
300
+
301
+ ## 14. Concurrency
302
+
303
+ Multiple sessions can be active simultaneously using the `--session <name>` flag or `CONTENTFUL_CMS_SESSION` env var. Sessions are isolated; changes in one session do not affect another. The optimistic locking on `save` handles the case where two sessions modify the same entry.
@@ -0,0 +1,256 @@
1
+ # Media & asset search — local index plan
2
+
3
+ ## Implementation status (2026-06)
4
+
5
+ **Implemented** in `@se-studio/contentful-cms`:
6
+
7
+ - `cms-edit index sync` / `index status` (Preview API draft default + `--published`)
8
+ - SQLite index at `~/.contentful-cms/index/<spaceId>/<environment>/media.db` via `node:sqlite`
9
+ - Delivery token resolution: `deliveryAccessToken` → `deliveryApiKeyName` → environment match → optional `autoCreateDeliveryApiKey`
10
+ - **Index required** (no CMA fallback) for: `asset search`, `asset audit`, `list --type media` with `--asset-id` / `--asset-filename*`, upload `--if-exists-by-filename`
11
+ - **Reference catalog** (index-preferred, CMA fallback): `template`, `articleType`, `tagType`, `tag` in `reference_entries` table (schema v2)
12
+ - `list --type template|articleType|tagType|tag`, `resolve --type … --slug`, taxonomy `--if-not-exists`, and `tagTypeSlug` shorthands use the catalog when the index exists
13
+ - Bulk CMA asset pagination and N+1 `links_to_asset` scans removed from those paths
14
+
15
+ Help: [help/index-sync.md](./help/index-sync.md).
16
+
17
+ ---
18
+
19
+ ## Problem
20
+
21
+ Today, cms-edit discovers assets and Media entries via the **Contentful Management API (CMA)**:
22
+
23
+ | Operation | CMA approach | Pain |
24
+ |-----------|--------------|------|
25
+ | Exact `fileName` | `fields.file.fileName` filter | Fast |
26
+ | Regex `fileName` | Paginate assets (+ optional `[match]` prefix), filter client-side | Slow on large spaces |
27
+ | `list --type media --asset-filename*` | Find assets, then **N×** `links_to_asset` queries for Media | Very slow at scale |
28
+ | Title search | `fields.title[match]` | OK for small result sets |
29
+
30
+ CMA is rate-limited, optimized for writes, and regex scans can mean thousands of round trips. Publication-import and deduplication workflows need **fast repeated lookups** by `fileName`, title, MIME type, and “which Media wraps this asset?”.
31
+
32
+ ## Goal
33
+
34
+ A **local, per-space index** built from the **Content Delivery API (CDA)** (read-only, cache-friendly) that powers:
35
+
36
+ - Sub-second filename / regex / title search over all assets
37
+ - Reverse lookup: asset ID → Media entry IDs
38
+ - Optional freshness via incremental sync or scheduled rebuild
39
+
40
+ CMA remains the source of truth for **creates/updates** (`asset upload`, `create media`, taxonomy).
41
+
42
+ ## Non-goals (v1)
43
+
44
+ - Full-text search across entry bodies
45
+ - Replacing CMA for asset upload or processing
46
+ - Cross-space search
47
+ - Publishing or preview-mode mixing in one index (pick one: published CDA or preview CPA — see below)
48
+
49
+ ## Proposed architecture
50
+
51
+ ```mermaid
52
+ flowchart LR
53
+ subgraph sync [Index sync]
54
+ CMA_keys[CMA API keys]
55
+ CDA[Contentful CDA]
56
+ SyncCmd["cms-edit index sync"]
57
+ Store[(Local index)]
58
+ CMA_keys -->|"resolve accessToken"| SyncCmd
59
+ SyncCmd --> CDA
60
+ CDA --> Store
61
+ end
62
+ subgraph query [Search]
63
+ CLI[cms-edit asset search]
64
+ List[cms-edit list --type media]
65
+ CLI --> Store
66
+ List --> Store
67
+ end
68
+ subgraph write [Writes unchanged]
69
+ CMA[Contentful CMA]
70
+ Upload[asset upload]
71
+ Upload --> CMA
72
+ end
73
+ ```
74
+
75
+ ### Index store
76
+
77
+ **Location:** `~/.contentful-cms/index/<spaceId>/<environment>/` (or project-local `.contentful-cms/index/` when `--config` is set).
78
+
79
+ **Format (v1):** SQLite via `better-sqlite3` or embedded JSONL + in-memory Map for zero native deps. Prefer **SQLite** for regex scans and stable pagination on 10k+ assets.
80
+
81
+ **Tables (conceptual):**
82
+
83
+ | Table | Key fields | Purpose |
84
+ |-------|------------|---------|
85
+ | `assets` | `id`, `fileName`, `title`, `description`, `contentType`, `url`, `width`, `height`, `size`, `updatedAt` | Asset search |
86
+ | `media` | `id`, `name`, `assetId`, `updatedAt` | Media wrapper lookup |
87
+ | `meta` | `syncedAt`, `assetCount`, `mediaCount`, `cdaTokenHash` | Freshness |
88
+
89
+ Indexes: `assets.fileName`, `assets.title`; `media.assetId`.
90
+
91
+ ### Sync command
92
+
93
+ ```bash
94
+ # Full rebuild (paginate CDA assets + media entries)
95
+ cms-edit index sync
96
+
97
+ # Incremental (if sync token / updatedSince supported)
98
+ cms-edit index sync --since <iso>
99
+
100
+ # Status
101
+ cms-edit index status
102
+ ```
103
+
104
+ **CDA pagination:** Use `contentful` JS SDK or fetch `https://cdn.contentful.com/.../assets` and `.../entries?content_type=media` with `limit=1000`, following `skip` until complete.
105
+
106
+ **Preview vs published:** Default index = **Preview API** (draft content, matches CMA uploads). Optional `--published` uses Delivery API for published assets only (separate DB file suffix `-published`).
107
+
108
+ ### Delivery token resolution (CMA → CDA)
109
+
110
+ The **management token is not a delivery token** — it cannot call `cdn.contentful.com`. For index sync we only need a **read-only** CDA (or CPA) access token. That token can be obtained without asking operators to copy a second secret, by using the **same CMA client** cms-edit already uses.
111
+
112
+ Contentful exposes delivery keys on the space via the [Management API — API keys](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/api-keys): list/create delivery keys; each key includes an `accessToken` for CDA. Creating a delivery key also creates a linked preview key (resolve separately for `--preview` sync).
113
+
114
+ **Resolution order** (first match wins):
115
+
116
+ | Priority | Source | Notes |
117
+ |----------|--------|--------|
118
+ | 1 | Explicit override | Space config `deliveryAccessToken` or `${CONTENTFUL_ACCESS_TOKEN}` / `${CONTENTFUL_DELIVERY_TOKEN}` — same vars as marketing apps |
119
+ | 2 | Named key via CMA | `deliveryApiKeyName` in `.contentful-cms.json` → `space.getApiKeys()` → match `name` |
120
+ | 3 | Environment match via CMA | Pick first delivery key whose `environments` includes the configured `environment` (default `master`) |
121
+ | 4 | Auto-create (optional) | If PAT has API-key manage rights and no key matches: create `cms-edit-index` delivery key scoped to that environment |
122
+
123
+ Implement as `resolveDeliveryAccessToken(space, { preview?: boolean })` in `src/contentful/delivery-token.ts` (or similar), called at the start of `index sync` only — not on every search (cache resolved token in `meta` as a hash + key id, not the raw token).
124
+
125
+ **SDK sketch (contentful-management, already a dependency):**
126
+
127
+ ```typescript
128
+ const client = createClient({ accessToken: space.managementToken }, { type: 'plain' });
129
+ const spaceApi = await client.getSpace(space.spaceId);
130
+ const { items: keys } = await spaceApi.getApiKeys();
131
+ const key = pickDeliveryKey(keys, { name: space.deliveryApiKeyName, environment: space.environment });
132
+ const deliveryToken = key.accessToken; // CDA
133
+ // preview: await spaceApi.getPreviewApiKey(key.preview_api_key.sys.id) → accessToken
134
+ ```
135
+
136
+ **What does not work:**
137
+
138
+ - Passing `managementToken` directly to the CDA client.
139
+ - Assuming any single PAT can read API keys (editor-only tokens may lack `ContentDelivery` / key read rights — fail with a clear error and point to explicit `deliveryAccessToken`).
140
+
141
+ **Caveats:**
142
+
143
+ | Topic | Guidance |
144
+ |-------|----------|
145
+ | Permissions | PAT needs rights to read (and optionally create) space API keys; document in hosted/CLI setup guides |
146
+ | Multiple keys | Never “first key in list” without environment/name filter |
147
+ | Propagation | New keys may 401 for a few seconds after create — retry with backoff |
148
+ | Secrets | Do not log `accessToken`; store only `cdaTokenHash` + `apiKeyId` in index `meta` |
149
+ | Preview index | Resolve linked preview key when `index sync --preview` |
150
+
151
+ **Config additions** (`.contentful-cms.json` per space, all optional):
152
+
153
+ ```json
154
+ {
155
+ "deliveryAccessToken": "${CONTENTFUL_ACCESS_TOKEN}",
156
+ "deliveryApiKeyName": "Production",
157
+ "autoCreateDeliveryApiKey": false
158
+ }
159
+ ```
160
+
161
+ If only `managementToken` is configured, `index sync` should still work when CMA can list a suitable delivery key — aligning with agent setups that already have cms-edit credentials.
162
+
163
+ ### Query integration (implemented)
164
+
165
+ 1. **`asset search`** — Requires index; queries SQLite (title `LIKE`, filename exact/regex, MIME filter).
166
+ 2. **`list --type media --asset-filename*`** — Single index query (assets + joined media rows); no CMA.
167
+ 3. **`--if-exists-by-filename`** — Index exact `fileName` lookup; optional post-upload row upsert.
168
+
169
+ Stale index: warn when `syncedAt` > 24h; no `--no-index` CMA fallback.
170
+
171
+ ### Freshness
172
+
173
+ | Strategy | When |
174
+ |----------|------|
175
+ | Manual `index sync` | Before large import jobs |
176
+ | `index sync` in CI nightly | Keeps agents fast |
177
+ | Post-upload hook (optional) | After `asset upload`, upsert one row into index |
178
+
179
+ Webhook-driven incremental sync is out of scope for v1 but fits the same schema.
180
+
181
+ ## Implementation phases
182
+
183
+ ### Phase 1 — Foundation (MVP)
184
+
185
+ - [x] Add `contentful` delivery client dependency
186
+ - [x] `resolveDeliveryAccessToken()` — explicit config, then CMA `getApiKeys()` (+ optional `createApiKey`)
187
+ - [x] Config fields: `deliveryAccessToken`, `deliveryApiKeyName`, `autoCreateDeliveryApiKey`
188
+ - [x] `cms-edit index sync` full rebuild → SQLite (CDA pagination after token resolve)
189
+ - [x] `cms-edit index status`
190
+ - [x] Unit tests: delivery token, index queries
191
+
192
+ ### Phase 2 — Wire search
193
+
194
+ - [x] `asset search --filename` / `--filename-match` uses index (required)
195
+ - [x] `findAssetByExactFilename` replaced by index lookup
196
+ - [x] README / help document index requirement
197
+
198
+ ### Phase 3 — Media discovery
199
+
200
+ - [x] Index `media` entries with `assetId` and denormalized `assetFileName`
201
+ - [x] `list --type media --asset-id` / `--asset-filename*` without N+1 CMA
202
+ - [x] JSON output for indexed media list
203
+
204
+ ### Phase 3b — Reference catalog
205
+
206
+ - [x] Index `template`, `articleType`, `tagType`, `tag` in `reference_entries` (schema v2)
207
+ - [x] `list --type` for reference types from index (`--force-cma` escape hatch)
208
+ - [x] `resolve --type … --slug` and taxonomy `--if-not-exists` prefer index
209
+ - [x] Post-create upsert for taxonomy and template creates
210
+ - [x] `index dump --reference-only` / `--reference-type`
211
+
212
+ ### Phase 3c — Auto-sync and incremental refresh
213
+
214
+ - [x] `ensureContentIndex` — auto full rebuild when missing or schema mismatch
215
+ - [x] Incremental upsert when only stale (>24h), same schema (`sys.updatedAt[gte]` last `syncedAt`)
216
+ - [x] Manual `index sync` always full rebuild
217
+ - [x] File lock — single writer per index database
218
+ - [x] Duplicate slug/label detection in reference catalog (index + CMA)
219
+
220
+ ### Phase 4 — Operator UX
221
+
222
+ - [x] Auto-sync on index-backed commands (see [help/index-sync.md](./help/index-sync.md))
223
+ - [ ] Optional `index sync` before bulk upload scripts (skill note — partial)
224
+ - [ ] MCP tool exposure if hosted MCP should search assets
225
+
226
+ ## Dependencies & package boundaries
227
+
228
+ - Keep index code inside `packages/contentful-cms` (CLI owns agent workflows).
229
+ - **Do not** pull `@se-studio/contentful-rest-api` into cms-edit unless we need shared cache tags; a thin CDA client keeps the CLI package self-contained.
230
+ - SQLite: evaluate `node:sqlite` (Node 22+) vs `better-sqlite3` for install size in npx usage.
231
+
232
+ ## Risks
233
+
234
+ | Risk | Mitigation |
235
+ |------|------------|
236
+ | Index stale vs CMA | Show `syncedAt` in search output; exact match confirm via CMA before skip-upload |
237
+ | Draft assets missing from CDA | Default index uses Preview API; use `--published` only when you need published-only discovery |
238
+ | Disk size | 10k assets ≈ few MB in SQLite |
239
+ | Token sprawl | Prefer CMA-resolve when only `managementToken` is set; optional explicit `deliveryAccessToken` for CI |
240
+ | CMA cannot read API keys | Clear error; require `deliveryAccessToken` in config |
241
+ | Leaked delivery token in logs | Never log; `meta.cdaTokenHash` only |
242
+ | New API key 401 | Retry CDA requests after create (Contentful propagation delay) |
243
+
244
+ ## Success criteria
245
+
246
+ - Regex search over 5k assets completes in **< 2s** locally after sync
247
+ - `list --type media --asset-filename-match` does **not** scale with asset count via N+1 CMA calls
248
+ - No change to write paths; tests cover index-off fallback
249
+
250
+ ## References
251
+
252
+ - Current CMA helpers: `src/contentful/assets.ts`, `src/contentful/media.ts`
253
+ - CMA client: `src/contentful/client.ts` (`managementToken` per space)
254
+ - Contentful: [API keys (CMA)](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/api-keys), [Authentication](https://www.contentful.com/developers/docs/references/authentication/)
255
+ - App delivery env vars (override): `CONTENTFUL_ACCESS_TOKEN`, `CONTENTFUL_PREVIEW_ACCESS_TOKEN` in `contentful-rest-api`
256
+ - Issue context: #42 publication import (GITHUB_ISSUES_IMPLEMENTATION_STATUS.md)
package/docs/SKILLS.md ADDED
@@ -0,0 +1,29 @@
1
+ # cms-edit and agent skills
2
+
3
+ ## Two skill channels
4
+
5
+ | Channel | Package | Install | Use case |
6
+ |---------|---------|---------|----------|
7
+ | **Full SE Studio skills** | `@se-studio/skills` | `npx skills add @se-studio/skills`, `pnpm skills:sync` in monorepo, or auto-sync via `prepare` in consumer sites (see `packages/project-build/README.md`) | Marketing sites, CMS guidelines, app tasks |
8
+ | **Bundled cms-edit skills** | `@se-studio/contentful-cms` | `npx skills add @se-studio/skills` | Minimal set shipped with the CLI (`core`, `editor-tasks`, `templates`, `setup`) |
9
+
10
+ ## Where to edit
11
+
12
+ 1. **Always edit** `packages/skills/skills/<skill-dir>/SKILL.md` in this monorepo.
13
+ 2. Run `pnpm skills:validate` then `pnpm skills:sync` to update `.agents/skills/`.
14
+ 3. Bundled cms-edit copies are regenerated by `pnpm --filter @se-studio/contentful-cms sync:skills` (also runs on `build` and `test`).
15
+
16
+ Never edit:
17
+
18
+ - `.agents/skills/` or `.cursor/skills/` by hand (generated)
19
+ - `packages/contentful-cms/skills/` by hand (generated — see `skills/README.md`)
20
+ - `.claude/skills/` in the repo (untracked local installs; not a source of truth)
21
+
22
+ ## `.claude/skills` vs `.agents/skills`
23
+
24
+ - **`.agents/skills/`** — Monorepo target for `pnpm skills:sync`; gitignored; symlinked to `.cursor/skills/`.
25
+ - **`.claude/skills/`** — Optional per-machine path used by some Claude setups; **intentionally untracked**. Skills should come from this repo (`@se-studio/skills`) or third-party skill packs — not from committed copies under `.claude/`.
26
+
27
+ ## Installing bundled skills
28
+
29
+ `npx skills add @se-studio/skills` installs cms-edit skills into `.agents/skills/` in the current project. In the monorepo, prefer `pnpm skills:sync` from `@se-studio/skills`.
@@ -0,0 +1,93 @@
1
+ # cms-edit telemetry (Axiom)
2
+
3
+ Hosted cms-edit deployments can emit aggregate usage telemetry to [Axiom](https://axiom.co). Events contain command names, outcomes, and durations only — no user ids, emails, slugs, entry ids, or error messages.
4
+
5
+ ## Enable on Vercel
6
+
7
+ Set on each cms-edit host project (`se-website-2026-cms-edit-host`, `pedestal-cms-edit`, `headwater-cms-edit`, dev `cms-edit-host`):
8
+
9
+ | Variable | Value |
10
+ |----------|-------|
11
+ | `CMS_EDIT_TELEMETRY` | `1` |
12
+ | `AXIOM_TOKEN` | Axiom ingest token (sensitive) |
13
+ | `AXIOM_DATASET` | `cms-edit` |
14
+ | `AXIOM_DOMAIN` | Optional; default `api.axiom.co` |
15
+ | `CMS_EDIT_PROJECT_KEY` | Already required — used as `project_key` for aggregation |
16
+
17
+ Opt out: `CMS_EDIT_TELEMETRY=0`.
18
+
19
+ ## Event schema
20
+
21
+ Each event is one JSON object:
22
+
23
+ | Field | Description |
24
+ |-------|-------------|
25
+ | `event_id` | UUID for deduplication |
26
+ | `timestamp` | ISO 8601 completion time |
27
+ | `command` | e.g. `open`, `save`, `oauth` |
28
+ | `subcommand` | Optional, e.g. `replace`, `link-contentful` |
29
+ | `outcome` | `success`, `error`, or `exit` |
30
+ | `exit_code` | When `outcome` is `exit` |
31
+ | `error_name` | Error class or stable reason code (never message text) |
32
+ | `duration_ms` | Wall-clock duration |
33
+ | `cms_edit_version` | Package version |
34
+ | `mode` | `hosted-mcp` on Vercel, `cli` locally |
35
+ | `project_key` | From `CMS_EDIT_PROJECT_KEY` |
36
+ | `node_version` | Node runtime |
37
+ | `platform` | `process.platform` |
38
+
39
+ OAuth events emit `command: oauth` with route-specific `subcommand` values:
40
+
41
+ | `subcommand` | When |
42
+ |--------------|------|
43
+ | `link-contentful` | Contentful sign-in link step (failures only today) |
44
+ | `authorization-code` | Initial MCP connect via `/oauth/token` (`authorization_code` grant) |
45
+ | `refresh-token` | Silent token refresh via `/oauth/token` (`refresh_token` grant) |
46
+
47
+ `error_name` uses stable reason codes only — never token values, user ids, or emails. Examples: `invalid_contentful_token`, `space_access_denied`, `invalid_refresh_token`, `refresh_client_mismatch`, `invalid_authorization_code`.
48
+
49
+ ## Local development
50
+
51
+ With `CMS_EDIT_TELEMETRY=1` and no Axiom env vars, events append to `~/.contentful-cms/telemetry.log` as NDJSON.
52
+
53
+ ## Example Axiom queries
54
+
55
+ **Commands per project (last 24h):**
56
+
57
+ ```apl
58
+ ['cms-edit']
59
+ | where _time > ago(24h)
60
+ | summarize count() by project_key, command, outcome
61
+ | order by count_ desc
62
+ ```
63
+
64
+ **OAuth failures by reason:**
65
+
66
+ ```apl
67
+ ['cms-edit']
68
+ | where command == "oauth" and outcome == "error"
69
+ | summarize count() by project_key, error_name
70
+ ```
71
+
72
+ **Token refresh health (success vs failure):**
73
+
74
+ ```apl
75
+ ['cms-edit']
76
+ | where command == "oauth" and subcommand == "refresh-token"
77
+ | summarize count() by project_key, outcome
78
+ | order by count_ desc
79
+ ```
80
+
81
+ **p95 duration by command:**
82
+
83
+ ```apl
84
+ ['cms-edit']
85
+ | where outcome == "success"
86
+ | summarize percentile(duration_ms, 95) by project_key, command
87
+ ```
88
+
89
+ ## Flow
90
+
91
+ MCP request → `runCmsEditArgs` → Commander hooks record outcome → `flush()` POSTs buffered events to `https://{AXIOM_DOMAIN}/v1/datasets/{AXIOM_DATASET}/ingest` before the HTTP response returns. OAuth `link-contentful` failures record and flush in the route handler.
92
+
93
+ After adding or changing `AXIOM_*` env vars on Vercel, **redeploy** — serverless only reads env at deploy time.