@orthacms/content-server 0.0.0-reserve.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/define.d.ts +17 -0
  4. package/dist/define.d.ts.map +1 -0
  5. package/dist/define.js +28 -0
  6. package/dist/index.d.ts +48 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +109 -0
  9. package/dist/lib/collection/define.d.ts +35 -0
  10. package/dist/lib/collection/define.d.ts.map +1 -0
  11. package/dist/lib/collection/define.js +217 -0
  12. package/dist/lib/collection/table-builder.d.ts +28 -0
  13. package/dist/lib/collection/table-builder.d.ts.map +1 -0
  14. package/dist/lib/collection/table-builder.js +306 -0
  15. package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts +24 -0
  16. package/dist/lib/content-types/controllers/get-content-schema.controller.d.ts.map +1 -0
  17. package/dist/lib/content-types/controllers/get-content-schema.controller.js +58 -0
  18. package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts +35 -0
  19. package/dist/lib/content-types/controllers/get-filter-fields.controller.d.ts.map +1 -0
  20. package/dist/lib/content-types/controllers/get-filter-fields.controller.js +74 -0
  21. package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts +15 -0
  22. package/dist/lib/content-types/controllers/list-content-schema.controller.d.ts.map +1 -0
  23. package/dist/lib/content-types/controllers/list-content-schema.controller.js +38 -0
  24. package/dist/lib/content-types/queries/workspace-grants.query.d.ts +25 -0
  25. package/dist/lib/content-types/queries/workspace-grants.query.d.ts.map +1 -0
  26. package/dist/lib/content-types/queries/workspace-grants.query.js +45 -0
  27. package/dist/lib/content.module.d.ts +21 -0
  28. package/dist/lib/content.module.d.ts.map +1 -0
  29. package/dist/lib/content.module.js +264 -0
  30. package/dist/lib/content.tokens.d.ts +5 -0
  31. package/dist/lib/content.tokens.d.ts.map +1 -0
  32. package/dist/lib/content.tokens.js +9 -0
  33. package/dist/lib/copilot/content-tool.provider.d.ts +64 -0
  34. package/dist/lib/copilot/content-tool.provider.d.ts.map +1 -0
  35. package/dist/lib/copilot/content-tool.provider.js +309 -0
  36. package/dist/lib/copilot/diff-snapshots.d.ts +42 -0
  37. package/dist/lib/copilot/diff-snapshots.d.ts.map +1 -0
  38. package/dist/lib/copilot/diff-snapshots.js +77 -0
  39. package/dist/lib/copilot/entry-proposal.applier.d.ts +89 -0
  40. package/dist/lib/copilot/entry-proposal.applier.d.ts.map +1 -0
  41. package/dist/lib/copilot/entry-proposal.applier.js +245 -0
  42. package/dist/lib/copilot/entry-proposal.provider.d.ts +157 -0
  43. package/dist/lib/copilot/entry-proposal.provider.d.ts.map +1 -0
  44. package/dist/lib/copilot/entry-proposal.provider.js +619 -0
  45. package/dist/lib/copilot/filter-schema.d.ts +61 -0
  46. package/dist/lib/copilot/filter-schema.d.ts.map +1 -0
  47. package/dist/lib/copilot/filter-schema.js +139 -0
  48. package/dist/lib/copilot/project-entry.d.ts +23 -0
  49. package/dist/lib/copilot/project-entry.d.ts.map +1 -0
  50. package/dist/lib/copilot/project-entry.js +36 -0
  51. package/dist/lib/copilot/proposal-kinds.d.ts +30 -0
  52. package/dist/lib/copilot/proposal-kinds.d.ts.map +1 -0
  53. package/dist/lib/copilot/proposal-kinds.js +32 -0
  54. package/dist/lib/copilot/revision-tool.provider.d.ts +56 -0
  55. package/dist/lib/copilot/revision-tool.provider.d.ts.map +1 -0
  56. package/dist/lib/copilot/revision-tool.provider.js +215 -0
  57. package/dist/lib/docs/content-schemas.d.ts +34 -0
  58. package/dist/lib/docs/content-schemas.d.ts.map +1 -0
  59. package/dist/lib/docs/content-schemas.js +617 -0
  60. package/dist/lib/docs/describe-content-api.d.ts +22 -0
  61. package/dist/lib/docs/describe-content-api.d.ts.map +1 -0
  62. package/dist/lib/docs/describe-content-api.js +173 -0
  63. package/dist/lib/docs/field-schema.d.ts +28 -0
  64. package/dist/lib/docs/field-schema.d.ts.map +1 -0
  65. package/dist/lib/docs/field-schema.js +214 -0
  66. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts +23 -0
  67. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.d.ts.map +1 -0
  68. package/dist/lib/entries/application/use-cases/bulk-publish-entries.use-case.js +77 -0
  69. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts +23 -0
  70. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.d.ts.map +1 -0
  71. package/dist/lib/entries/application/use-cases/bulk-unpublish-entries.use-case.js +66 -0
  72. package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts +43 -0
  73. package/dist/lib/entries/application/use-cases/publish-entry.use-case.d.ts.map +1 -0
  74. package/dist/lib/entries/application/use-cases/publish-entry.use-case.js +106 -0
  75. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts +30 -0
  76. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.d.ts.map +1 -0
  77. package/dist/lib/entries/application/use-cases/unpublish-entry.use-case.js +70 -0
  78. package/dist/lib/entries/controllers/bulk-entries.controller.d.ts +26 -0
  79. package/dist/lib/entries/controllers/bulk-entries.controller.d.ts.map +1 -0
  80. package/dist/lib/entries/controllers/create-entry.controller.d.ts +20 -0
  81. package/dist/lib/entries/controllers/create-entry.controller.d.ts.map +1 -0
  82. package/dist/lib/entries/controllers/delete-entry.controller.d.ts +24 -0
  83. package/dist/lib/entries/controllers/delete-entry.controller.d.ts.map +1 -0
  84. package/dist/lib/entries/controllers/get-entry.controller.d.ts +34 -0
  85. package/dist/lib/entries/controllers/get-entry.controller.d.ts.map +1 -0
  86. package/dist/lib/entries/controllers/list-entries.controller.d.ts +20 -0
  87. package/dist/lib/entries/controllers/list-entries.controller.d.ts.map +1 -0
  88. package/dist/lib/entries/controllers/publish-entry.controller.d.ts +19 -0
  89. package/dist/lib/entries/controllers/publish-entry.controller.d.ts.map +1 -0
  90. package/dist/lib/entries/controllers/resolve-type.d.ts +9 -0
  91. package/dist/lib/entries/controllers/resolve-type.d.ts.map +1 -0
  92. package/dist/lib/entries/controllers/update-entry.controller.d.ts +18 -0
  93. package/dist/lib/entries/controllers/update-entry.controller.d.ts.map +1 -0
  94. package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts +13 -0
  95. package/dist/lib/entries/domain/entry-publish-blocked.error.d.ts.map +1 -0
  96. package/dist/lib/entries/domain/entry-publish-blocked.error.js +19 -0
  97. package/dist/lib/entries/domain/entry.d.ts +71 -0
  98. package/dist/lib/entries/domain/entry.d.ts.map +1 -0
  99. package/dist/lib/entries/domain/entry.js +90 -0
  100. package/dist/lib/entries/domain/events/entry-events.d.ts +67 -0
  101. package/dist/lib/entries/domain/events/entry-events.d.ts.map +1 -0
  102. package/dist/lib/entries/domain/events/entry-events.js +100 -0
  103. package/dist/lib/entries/dto/bulk-ids.dto.d.ts +11 -0
  104. package/dist/lib/entries/dto/bulk-ids.dto.d.ts.map +1 -0
  105. package/dist/lib/entries/dto/list-entries-query.dto.d.ts +46 -0
  106. package/dist/lib/entries/dto/list-entries-query.dto.d.ts.map +1 -0
  107. package/dist/lib/entries/dto/relation-delta-map.validator.d.ts +19 -0
  108. package/dist/lib/entries/dto/relation-delta-map.validator.d.ts.map +1 -0
  109. package/dist/lib/entries/dto/save-entry.dto.d.ts +46 -0
  110. package/dist/lib/entries/dto/save-entry.dto.d.ts.map +1 -0
  111. package/dist/lib/entries/entries.constants.d.ts +19 -0
  112. package/dist/lib/entries/entries.constants.d.ts.map +1 -0
  113. package/dist/lib/entries/entries.constants.js +21 -0
  114. package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts +33 -0
  115. package/dist/lib/entries/http/controllers/bulk-entries.controller.d.ts.map +1 -0
  116. package/dist/lib/entries/http/controllers/bulk-entries.controller.js +143 -0
  117. package/dist/lib/entries/http/controllers/create-entry.controller.d.ts +21 -0
  118. package/dist/lib/entries/http/controllers/create-entry.controller.d.ts.map +1 -0
  119. package/dist/lib/entries/http/controllers/create-entry.controller.js +52 -0
  120. package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts +25 -0
  121. package/dist/lib/entries/http/controllers/delete-entry.controller.d.ts.map +1 -0
  122. package/dist/lib/entries/http/controllers/delete-entry.controller.js +84 -0
  123. package/dist/lib/entries/http/controllers/get-entry.controller.d.ts +44 -0
  124. package/dist/lib/entries/http/controllers/get-entry.controller.d.ts.map +1 -0
  125. package/dist/lib/entries/http/controllers/get-entry.controller.js +124 -0
  126. package/dist/lib/entries/http/controllers/list-entries.controller.d.ts +20 -0
  127. package/dist/lib/entries/http/controllers/list-entries.controller.d.ts.map +1 -0
  128. package/dist/lib/entries/http/controllers/list-entries.controller.js +52 -0
  129. package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts +22 -0
  130. package/dist/lib/entries/http/controllers/publish-entry.controller.d.ts.map +1 -0
  131. package/dist/lib/entries/http/controllers/publish-entry.controller.js +68 -0
  132. package/dist/lib/entries/http/controllers/resolve-type.d.ts +9 -0
  133. package/dist/lib/entries/http/controllers/resolve-type.d.ts.map +1 -0
  134. package/dist/lib/entries/http/controllers/resolve-type.js +16 -0
  135. package/dist/lib/entries/http/controllers/to-actor.d.ts +13 -0
  136. package/dist/lib/entries/http/controllers/to-actor.d.ts.map +1 -0
  137. package/dist/lib/entries/http/controllers/to-actor.js +15 -0
  138. package/dist/lib/entries/http/controllers/update-entry.controller.d.ts +19 -0
  139. package/dist/lib/entries/http/controllers/update-entry.controller.d.ts.map +1 -0
  140. package/dist/lib/entries/http/controllers/update-entry.controller.js +51 -0
  141. package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts +11 -0
  142. package/dist/lib/entries/http/dto/bulk-ids.dto.d.ts.map +1 -0
  143. package/dist/lib/entries/http/dto/bulk-ids.dto.js +33 -0
  144. package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts +66 -0
  145. package/dist/lib/entries/http/dto/list-entries-query.dto.d.ts.map +1 -0
  146. package/dist/lib/entries/http/dto/list-entries-query.dto.js +192 -0
  147. package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts +30 -0
  148. package/dist/lib/entries/http/dto/relation-delta-map.validator.d.ts.map +1 -0
  149. package/dist/lib/entries/http/dto/relation-delta-map.validator.js +102 -0
  150. package/dist/lib/entries/http/dto/save-entry.dto.d.ts +48 -0
  151. package/dist/lib/entries/http/dto/save-entry.dto.d.ts.map +1 -0
  152. package/dist/lib/entries/http/dto/save-entry.dto.js +120 -0
  153. package/dist/lib/entries/http/guards/content-grant.guard.d.ts +37 -0
  154. package/dist/lib/entries/http/guards/content-grant.guard.d.ts.map +1 -0
  155. package/dist/lib/entries/http/guards/content-grant.guard.js +67 -0
  156. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts +22 -0
  157. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.d.ts.map +1 -0
  158. package/dist/lib/entries/infrastructure/persistence/bulk-publish-verdicts.js +81 -0
  159. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts +42 -0
  160. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.d.ts.map +1 -0
  161. package/dist/lib/entries/infrastructure/persistence/entry-counter.service.js +73 -0
  162. package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts +56 -0
  163. package/dist/lib/entries/infrastructure/persistence/entry-row.d.ts.map +1 -0
  164. package/dist/lib/entries/infrastructure/persistence/entry-row.js +185 -0
  165. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts +392 -0
  166. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.d.ts.map +1 -0
  167. package/dist/lib/entries/infrastructure/persistence/entry-writer.service.js +1223 -0
  168. package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts +24 -0
  169. package/dist/lib/entries/infrastructure/persistence/field-selection.d.ts.map +1 -0
  170. package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts +23 -0
  171. package/dist/lib/entries/infrastructure/persistence/media-accept.d.ts.map +1 -0
  172. package/dist/lib/entries/infrastructure/persistence/media-accept.js +55 -0
  173. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts +327 -0
  174. package/dist/lib/entries/infrastructure/persistence/relation-link.service.d.ts.map +1 -0
  175. package/dist/lib/entries/infrastructure/persistence/relation-link.service.js +1008 -0
  176. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts +19 -0
  177. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.d.ts.map +1 -0
  178. package/dist/lib/entries/infrastructure/queries/bulk-publish-preview.query.js +39 -0
  179. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts +64 -0
  180. package/dist/lib/entries/infrastructure/queries/entries.service.d.ts.map +1 -0
  181. package/dist/lib/entries/infrastructure/queries/entries.service.js +202 -0
  182. package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts +40 -0
  183. package/dist/lib/entries/infrastructure/queries/entry-filter-schema.d.ts.map +1 -0
  184. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts +38 -0
  185. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.d.ts.map +1 -0
  186. package/dist/lib/entries/infrastructure/queries/entry-filter-surface.js +310 -0
  187. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts +25 -0
  188. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.d.ts.map +1 -0
  189. package/dist/lib/entries/infrastructure/queries/entry-scalar-fields.js +51 -0
  190. package/dist/lib/entries/infrastructure/queries/entry-search.d.ts +19 -0
  191. package/dist/lib/entries/infrastructure/queries/entry-search.d.ts.map +1 -0
  192. package/dist/lib/entries/infrastructure/queries/entry-search.js +52 -0
  193. package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts +21 -0
  194. package/dist/lib/entries/infrastructure/queries/media-refs.query.d.ts.map +1 -0
  195. package/dist/lib/entries/infrastructure/queries/media-refs.query.js +117 -0
  196. package/dist/lib/entries/services/entries.service.d.ts +59 -0
  197. package/dist/lib/entries/services/entries.service.d.ts.map +1 -0
  198. package/dist/lib/entries/services/entry-counter.service.d.ts +31 -0
  199. package/dist/lib/entries/services/entry-counter.service.d.ts.map +1 -0
  200. package/dist/lib/entries/services/entry-filter-schema.d.ts +32 -0
  201. package/dist/lib/entries/services/entry-filter-schema.d.ts.map +1 -0
  202. package/dist/lib/entries/services/entry-row.d.ts +56 -0
  203. package/dist/lib/entries/services/entry-row.d.ts.map +1 -0
  204. package/dist/lib/entries/services/entry-writer.service.d.ts +193 -0
  205. package/dist/lib/entries/services/entry-writer.service.d.ts.map +1 -0
  206. package/dist/lib/entries/services/relation-link.service.d.ts +115 -0
  207. package/dist/lib/entries/services/relation-link.service.d.ts.map +1 -0
  208. package/dist/lib/entries/types/bulk-publish.d.ts +75 -0
  209. package/dist/lib/entries/types/bulk-publish.d.ts.map +1 -0
  210. package/dist/lib/entries/types/bulk-publish.js +22 -0
  211. package/dist/lib/entries/types/entry-list-view.d.ts +205 -0
  212. package/dist/lib/entries/types/entry-list-view.d.ts.map +1 -0
  213. package/dist/lib/entries/types/entry-list-view.js +5 -0
  214. package/dist/lib/entries/types/filter-surface.d.ts +35 -0
  215. package/dist/lib/entries/types/filter-surface.d.ts.map +1 -0
  216. package/dist/lib/entries/types/filter-surface.js +2 -0
  217. package/dist/lib/extension/entry-extension-boot-check.d.ts +16 -0
  218. package/dist/lib/extension/entry-extension-boot-check.d.ts.map +1 -0
  219. package/dist/lib/extension/entry-extension-boot-check.js +42 -0
  220. package/dist/lib/extension/entry-extension.d.ts +225 -0
  221. package/dist/lib/extension/entry-extension.d.ts.map +1 -0
  222. package/dist/lib/extension/entry-extension.js +27 -0
  223. package/dist/lib/extension/media-asset-resolver.d.ts +85 -0
  224. package/dist/lib/extension/media-asset-resolver.d.ts.map +1 -0
  225. package/dist/lib/extension/media-asset-resolver.js +26 -0
  226. package/dist/lib/extension/per-locale-relation.d.ts +18 -0
  227. package/dist/lib/extension/per-locale-relation.d.ts.map +1 -0
  228. package/dist/lib/extension/relation-locale-sync.d.ts +62 -0
  229. package/dist/lib/extension/relation-locale-sync.d.ts.map +1 -0
  230. package/dist/lib/extension/relation-locale-sync.js +88 -0
  231. package/dist/lib/fields/index.d.ts +94 -0
  232. package/dist/lib/fields/index.d.ts.map +1 -0
  233. package/dist/lib/fields/index.js +203 -0
  234. package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts +16 -0
  235. package/dist/lib/insights/http/controllers/content-pipeline.controller.d.ts.map +1 -0
  236. package/dist/lib/insights/http/controllers/content-pipeline.controller.js +39 -0
  237. package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts +18 -0
  238. package/dist/lib/insights/http/controllers/content-punchcard.controller.d.ts.map +1 -0
  239. package/dist/lib/insights/http/controllers/content-punchcard.controller.js +42 -0
  240. package/dist/lib/insights/http/controllers/content-stale.controller.d.ts +17 -0
  241. package/dist/lib/insights/http/controllers/content-stale.controller.d.ts.map +1 -0
  242. package/dist/lib/insights/http/controllers/content-stale.controller.js +40 -0
  243. package/dist/lib/insights/http/controllers/content-totals.controller.d.ts +18 -0
  244. package/dist/lib/insights/http/controllers/content-totals.controller.d.ts.map +1 -0
  245. package/dist/lib/insights/http/controllers/content-totals.controller.js +42 -0
  246. package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts +17 -0
  247. package/dist/lib/insights/http/controllers/content-unshipped.controller.d.ts.map +1 -0
  248. package/dist/lib/insights/http/controllers/content-unshipped.controller.js +40 -0
  249. package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts +17 -0
  250. package/dist/lib/insights/http/controllers/content-velocity.controller.d.ts.map +1 -0
  251. package/dist/lib/insights/http/controllers/content-velocity.controller.js +41 -0
  252. package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts +15 -0
  253. package/dist/lib/insights/http/dto/insights-range-query.dto.d.ts.map +1 -0
  254. package/dist/lib/insights/http/dto/insights-range-query.dto.js +38 -0
  255. package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts +77 -0
  256. package/dist/lib/insights/infrastructure/queries/content-insights.query.d.ts.map +1 -0
  257. package/dist/lib/insights/infrastructure/queries/content-insights.query.js +380 -0
  258. package/dist/lib/insights/types/content-insights-view.d.ts +134 -0
  259. package/dist/lib/insights/types/content-insights-view.d.ts.map +1 -0
  260. package/dist/lib/insights/types/content-insights-view.js +10 -0
  261. package/dist/lib/mcp/content-tools.provider.d.ts +83 -0
  262. package/dist/lib/mcp/content-tools.provider.d.ts.map +1 -0
  263. package/dist/lib/mcp/content-tools.provider.js +441 -0
  264. package/dist/lib/mcp/tool-input.d.ts +43 -0
  265. package/dist/lib/mcp/tool-input.d.ts.map +1 -0
  266. package/dist/lib/mcp/tool-input.js +117 -0
  267. package/dist/lib/mcp/tool-schemas.d.ts +34 -0
  268. package/dist/lib/mcp/tool-schemas.d.ts.map +1 -0
  269. package/dist/lib/mcp/tool-schemas.js +282 -0
  270. package/dist/lib/public/controllers/get-public-entry.controller.d.ts +26 -0
  271. package/dist/lib/public/controllers/get-public-entry.controller.d.ts.map +1 -0
  272. package/dist/lib/public/controllers/list-public-entries.controller.d.ts +24 -0
  273. package/dist/lib/public/controllers/list-public-entries.controller.d.ts.map +1 -0
  274. package/dist/lib/public/controllers/public-schema.controller.d.ts +18 -0
  275. package/dist/lib/public/controllers/public-schema.controller.d.ts.map +1 -0
  276. package/dist/lib/public-api/http/api-token-request.d.ts +41 -0
  277. package/dist/lib/public-api/http/api-token-request.d.ts.map +1 -0
  278. package/dist/lib/public-api/http/api-token-request.js +2 -0
  279. package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts +31 -0
  280. package/dist/lib/public-api/http/controllers/public-content-types.controller.d.ts.map +1 -0
  281. package/dist/lib/public-api/http/controllers/public-content-types.controller.js +93 -0
  282. package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts +101 -0
  283. package/dist/lib/public-api/http/controllers/public-entries.controller.d.ts.map +1 -0
  284. package/dist/lib/public-api/http/controllers/public-entries.controller.js +307 -0
  285. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts +76 -0
  286. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.d.ts.map +1 -0
  287. package/dist/lib/public-api/http/controllers/public-entry-writes.controller.js +353 -0
  288. package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts +42 -0
  289. package/dist/lib/public-api/http/controllers/resolve-granted-type.d.ts.map +1 -0
  290. package/dist/lib/public-api/http/controllers/resolve-granted-type.js +25 -0
  291. package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts +8 -0
  292. package/dist/lib/public-api/http/decorators/current-api-token.decorator.d.ts.map +1 -0
  293. package/dist/lib/public-api/http/decorators/current-api-token.decorator.js +17 -0
  294. package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts +58 -0
  295. package/dist/lib/public-api/http/dto/public-bulk.dto.d.ts.map +1 -0
  296. package/dist/lib/public-api/http/dto/public-bulk.dto.js +118 -0
  297. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts +106 -0
  298. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.d.ts.map +1 -0
  299. package/dist/lib/public-api/http/dto/public-list-entries-query.dto.js +297 -0
  300. package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts +39 -0
  301. package/dist/lib/public-api/http/dto/public-save-entry.dto.d.ts.map +1 -0
  302. package/dist/lib/public-api/http/dto/public-save-entry.dto.js +112 -0
  303. package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts +25 -0
  304. package/dist/lib/public-api/http/guards/api-token-workspace.guard.d.ts.map +1 -0
  305. package/dist/lib/public-api/http/guards/api-token-workspace.guard.js +58 -0
  306. package/dist/lib/public-api/http/guards/api-token.guard.d.ts +32 -0
  307. package/dist/lib/public-api/http/guards/api-token.guard.d.ts.map +1 -0
  308. package/dist/lib/public-api/http/guards/api-token.guard.js +92 -0
  309. package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts +25 -0
  310. package/dist/lib/public-api/http/guards/draft-visibility.guard.d.ts.map +1 -0
  311. package/dist/lib/public-api/http/guards/draft-visibility.guard.js +56 -0
  312. package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts +55 -0
  313. package/dist/lib/public-api/infrastructure/bulk-save-op.d.ts.map +1 -0
  314. package/dist/lib/public-api/infrastructure/bulk-save-op.js +61 -0
  315. package/dist/lib/public-api/infrastructure/field-selection.d.ts +21 -0
  316. package/dist/lib/public-api/infrastructure/field-selection.d.ts.map +1 -0
  317. package/dist/lib/public-api/infrastructure/field-selection.js +72 -0
  318. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts +248 -0
  319. package/dist/lib/public-api/infrastructure/public-entries.query.d.ts.map +1 -0
  320. package/dist/lib/public-api/infrastructure/public-entries.query.js +557 -0
  321. package/dist/lib/public-api/infrastructure/public-entry-row.d.ts +31 -0
  322. package/dist/lib/public-api/infrastructure/public-entry-row.d.ts.map +1 -0
  323. package/dist/lib/public-api/infrastructure/public-entry-row.js +76 -0
  324. package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts +188 -0
  325. package/dist/lib/public-api/infrastructure/public-entry-writes.service.d.ts.map +1 -0
  326. package/dist/lib/public-api/infrastructure/public-entry-writes.service.js +321 -0
  327. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts +98 -0
  328. package/dist/lib/public-api/infrastructure/public-expansion.query.d.ts.map +1 -0
  329. package/dist/lib/public-api/infrastructure/public-expansion.query.js +384 -0
  330. package/dist/lib/public-api/types/public-bulk.d.ts +77 -0
  331. package/dist/lib/public-api/types/public-bulk.d.ts.map +1 -0
  332. package/dist/lib/public-api/types/public-bulk.js +23 -0
  333. package/dist/lib/public-api/types/public-entry.d.ts +97 -0
  334. package/dist/lib/public-api/types/public-entry.d.ts.map +1 -0
  335. package/dist/lib/public-api/types/public-entry.js +8 -0
  336. package/dist/lib/public-api/types/public-expansion.d.ts +92 -0
  337. package/dist/lib/public-api/types/public-expansion.d.ts.map +1 -0
  338. package/dist/lib/public-api/types/public-expansion.js +2 -0
  339. package/dist/lib/registry/content-type-registry.d.ts +103 -0
  340. package/dist/lib/registry/content-type-registry.d.ts.map +1 -0
  341. package/dist/lib/registry/content-type-registry.js +155 -0
  342. package/dist/lib/revisions/application/ports/revision-store.d.ts +71 -0
  343. package/dist/lib/revisions/application/ports/revision-store.d.ts.map +1 -0
  344. package/dist/lib/revisions/application/ports/revision-store.js +9 -0
  345. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts +40 -0
  346. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.d.ts.map +1 -0
  347. package/dist/lib/revisions/application/use-cases/publish-revision.use-case.js +66 -0
  348. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts +36 -0
  349. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.d.ts.map +1 -0
  350. package/dist/lib/revisions/application/use-cases/restore-revision.use-case.js +57 -0
  351. package/dist/lib/revisions/domain/revision-status.d.ts +18 -0
  352. package/dist/lib/revisions/domain/revision-status.d.ts.map +1 -0
  353. package/dist/lib/revisions/domain/revision-status.js +18 -0
  354. package/dist/lib/revisions/domain/revision.d.ts +80 -0
  355. package/dist/lib/revisions/domain/revision.d.ts.map +1 -0
  356. package/dist/lib/revisions/domain/revision.js +84 -0
  357. package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts +19 -0
  358. package/dist/lib/revisions/http/controllers/publish-revision.controller.d.ts.map +1 -0
  359. package/dist/lib/revisions/http/controllers/publish-revision.controller.js +51 -0
  360. package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts +17 -0
  361. package/dist/lib/revisions/http/controllers/restore-revision.controller.d.ts.map +1 -0
  362. package/dist/lib/revisions/http/controllers/restore-revision.controller.js +49 -0
  363. package/dist/lib/revisions/http/controllers/revisions.controller.d.ts +20 -0
  364. package/dist/lib/revisions/http/controllers/revisions.controller.d.ts.map +1 -0
  365. package/dist/lib/revisions/http/controllers/revisions.controller.js +76 -0
  366. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts +33 -0
  367. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.d.ts.map +1 -0
  368. package/dist/lib/revisions/infrastructure/persistence/drizzle-revision.store.js +174 -0
  369. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts +17 -0
  370. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.d.ts.map +1 -0
  371. package/dist/lib/revisions/infrastructure/persistence/revision-snapshot.js +20 -0
  372. package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts +228 -0
  373. package/dist/lib/revisions/infrastructure/persistence/revision-table.d.ts.map +1 -0
  374. package/dist/lib/revisions/infrastructure/persistence/revision-table.js +57 -0
  375. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts +22 -0
  376. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.d.ts.map +1 -0
  377. package/dist/lib/revisions/infrastructure/queries/revision-refs.query.js +66 -0
  378. package/dist/lib/revisions/revisions.constants.d.ts +10 -0
  379. package/dist/lib/revisions/revisions.constants.d.ts.map +1 -0
  380. package/dist/lib/revisions/revisions.constants.js +12 -0
  381. package/dist/lib/revisions/types/revision-view.d.ts +74 -0
  382. package/dist/lib/revisions/types/revision-view.d.ts.map +1 -0
  383. package/dist/lib/revisions/types/revision-view.js +2 -0
  384. package/dist/lib/types/content-type.d.ts +131 -0
  385. package/dist/lib/types/content-type.d.ts.map +1 -0
  386. package/dist/lib/types/content-type.js +28 -0
  387. package/dist/lib/types/fields.d.ts +303 -0
  388. package/dist/lib/types/fields.d.ts.map +1 -0
  389. package/dist/lib/types/fields.js +52 -0
  390. package/dist/lib/utils/content-plugin.d.ts +35 -0
  391. package/dist/lib/utils/content-plugin.d.ts.map +1 -0
  392. package/dist/lib/utils/content-plugin.js +35 -0
  393. package/dist/lib/validation/services/entry-validation.service.d.ts +24 -0
  394. package/dist/lib/validation/services/entry-validation.service.d.ts.map +1 -0
  395. package/dist/lib/validation/services/entry-validation.service.js +35 -0
  396. package/package.json +54 -0
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkSaveEntriesProposalApplier = exports.UpdateEntryProposalApplier = exports.CreateEntryProposalApplier = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const content_tokens_1 = require("../content.tokens");
7
+ const entry_writer_service_1 = require("../entries/infrastructure/persistence/entry-writer.service");
8
+ const workspace_grants_query_1 = require("../content-types/queries/workspace-grants.query");
9
+ const proposal_kinds_1 = require("./proposal-kinds");
10
+ /**
11
+ * Refuses a create that names a translation group — the shape these tools no
12
+ * longer offer.
13
+ *
14
+ * A create is a whole row: `coerceValues` stamps every declared field, so each
15
+ * shared field the change did not name arrives as `null`, and the i18n
16
+ * extension propagates a create's shared columns **outward** onto every sibling
17
+ * — blanking the record in every other language, and silently so where the
18
+ * siblings are all drafts. Doing it correctly means inheriting the source row's
19
+ * shared values at apply time, which is knowledge the i18n plugin owns; hence
20
+ * `i18n_propose_translation` / `i18n_propose_bulk_translation`.
21
+ *
22
+ * The schemas dropped `localeGroupId`, so nothing produces one any more. This
23
+ * guards the one case that outlives a schema: a proposal drafted before the
24
+ * change whose apply failed, left `pending`, and is carried out later.
25
+ */
26
+ function assertStartsItsOwnGroup(localeGroupId) {
27
+ if (typeof localeGroupId === 'string' && localeGroupId.length > 0) {
28
+ throw new Error('This change would add a language to an existing record, which a content save ' +
29
+ 'cannot do without blanking the record’s shared fields in every other ' +
30
+ 'language. Translate with i18n_propose_translation or ' +
31
+ 'i18n_propose_bulk_translation instead.');
32
+ }
33
+ }
34
+ /** Resolves a granted, registered type or throws — shared by both appliers. */
35
+ async function grantedType(registry, grants, typeName, workspaceId) {
36
+ const name = typeof typeName === 'string' ? typeName : '';
37
+ const type = registry.get(name);
38
+ const granted = await grants.grantedSlugs(workspaceId);
39
+ if (!type || !granted.has(type.name)) {
40
+ throw new Error(`Unknown content type "${name}" in this workspace.`);
41
+ }
42
+ return type;
43
+ }
44
+ /**
45
+ * Applies `content.entry.create` — a new draft entry.
46
+ *
47
+ * **It calls `EntryWriterService.create`, the same method the POST route
48
+ * calls.** Not "similar to": the same. That is what makes an accepted proposal
49
+ * validated by `EntryValidationService`, wrapped in the workspace's shared
50
+ * advisory lock, snapshotted as revision 1, and passed through the bound i18n
51
+ * extension exactly as a hand-typed entry would be
52
+ * ([ADR-0005](../../../../../../docs/adr/0005-copilot-authority-model.md) §5).
53
+ * An applier that reimplemented the insert to "keep it simple" is the failure
54
+ * the port exists to prevent.
55
+ *
56
+ * The grants are re-checked here, not trusted from the proposal. The row was
57
+ * written when the proposal was made, and a workspace's content grants can be
58
+ * revoked in between — a stored `typeName` is an argument like any other.
59
+ */
60
+ let CreateEntryProposalApplier = class CreateEntryProposalApplier {
61
+ registry;
62
+ writer;
63
+ grants;
64
+ kind = proposal_kinds_1.CONTENT_PROPOSAL_KINDS.createEntry;
65
+ constructor(registry, writer, grants) {
66
+ this.registry = registry;
67
+ this.writer = writer;
68
+ this.grants = grants;
69
+ }
70
+ async apply(input, actor) {
71
+ const type = await grantedType(this.registry, this.grants, input.target['typeName'], actor.workspaceId);
72
+ const values = (input.patch['values'] ?? {});
73
+ const locale = input.target['locale'];
74
+ assertStartsItsOwnGroup(input.target['localeGroupId']);
75
+ const entry = await this.writer.create(type, values, actor.workspaceId,
76
+ // No relation *deltas*. An owning many-relation still lands: it
77
+ // travels as an array in `values`, which the writer turns into a
78
+ // whole-set link write. Deltas are the editor's incremental path
79
+ // and have no caller here.
80
+ undefined, typeof locale === 'string' ? locale : undefined,
81
+ // No group to join — a create here always starts its own.
82
+ undefined,
83
+ // The human who accepted is the actor on the write, on its revision
84
+ // and on the domain event it raises — never a copilot identity,
85
+ // which does not exist.
86
+ { id: actor.userId, email: actor.actorEmail });
87
+ return {
88
+ entityId: entry.id,
89
+ detail: { typeName: type.name, status: entry.status ?? 'draft' }
90
+ };
91
+ }
92
+ };
93
+ exports.CreateEntryProposalApplier = CreateEntryProposalApplier;
94
+ exports.CreateEntryProposalApplier = CreateEntryProposalApplier = tslib_1.__decorate([
95
+ (0, common_1.Injectable)(),
96
+ tslib_1.__param(0, (0, content_tokens_1.InjectContentRegistry)()),
97
+ tslib_1.__metadata("design:paramtypes", [Function, entry_writer_service_1.EntryWriterService,
98
+ workspace_grants_query_1.WorkspaceGrantsQuery])
99
+ ], CreateEntryProposalApplier);
100
+ /**
101
+ * Applies `content.entry.update` — a change to an existing entry's values.
102
+ *
103
+ * **Merges rather than replaces.** The admin's `PATCH` replaces the whole
104
+ * values bag because the editor always submits the full document; a proposal
105
+ * carries only the fields a reviewer approved, so replacing would silently null
106
+ * everything they did not see. This is the same reasoning — and the same merge
107
+ * semantics — as the public API's partial update.
108
+ *
109
+ * The merge reads the entry **now**, not when the proposal was made, so a
110
+ * proposal accepted an hour later writes the approved fields onto whatever the
111
+ * entry has become instead of resurrecting a stale document. A reviewer
112
+ * approving "fix this typo" gets that typo fixed, not the rest of the entry
113
+ * rewound.
114
+ */
115
+ let UpdateEntryProposalApplier = class UpdateEntryProposalApplier {
116
+ registry;
117
+ writer;
118
+ grants;
119
+ kind = proposal_kinds_1.CONTENT_PROPOSAL_KINDS.updateEntry;
120
+ constructor(registry, writer, grants) {
121
+ this.registry = registry;
122
+ this.writer = writer;
123
+ this.grants = grants;
124
+ }
125
+ async apply(input, actor) {
126
+ const type = await grantedType(this.registry, this.grants, input.target['typeName'], actor.workspaceId);
127
+ const entryId = input.target['entryId'];
128
+ if (typeof entryId !== 'string') {
129
+ throw new Error('This proposal names no entry.');
130
+ }
131
+ // 404s a missing or soft-deleted entry, workspace-scoped — so a
132
+ // proposal whose target was deleted before it was accepted fails with
133
+ // that reason rather than creating something.
134
+ const current = await this.writer.getOne(type, entryId, actor.workspaceId);
135
+ const patch = (input.patch['values'] ?? {});
136
+ const merged = { ...(current.values ?? {}), ...patch };
137
+ const entry = await this.writer.update(type, entryId, merged, actor.workspaceId, undefined, { id: actor.userId, email: actor.actorEmail });
138
+ return {
139
+ entityId: entry.id,
140
+ detail: {
141
+ typeName: type.name,
142
+ fields: Object.keys(patch),
143
+ status: entry.status ?? 'draft'
144
+ }
145
+ };
146
+ }
147
+ };
148
+ exports.UpdateEntryProposalApplier = UpdateEntryProposalApplier;
149
+ exports.UpdateEntryProposalApplier = UpdateEntryProposalApplier = tslib_1.__decorate([
150
+ (0, common_1.Injectable)(),
151
+ tslib_1.__param(0, (0, content_tokens_1.InjectContentRegistry)()),
152
+ tslib_1.__metadata("design:paramtypes", [Function, entry_writer_service_1.EntryWriterService,
153
+ workspace_grants_query_1.WorkspaceGrantsQuery])
154
+ ], UpdateEntryProposalApplier);
155
+ /**
156
+ * Applies `content.entry.bulk-save` — a batch of creates and edits, carried out
157
+ * as one change.
158
+ *
159
+ * **Item by item through the same `EntryWriterService` methods the other two
160
+ * appliers call**, for the same reason they do: validation, the advisory lock,
161
+ * the revision snapshot and the i18n sibling sync all have to happen per entry,
162
+ * and a batch-shaped shortcut around any of them would be a second write path.
163
+ * Sequentially, not concurrently — each write takes the workspace's shared
164
+ * content lock, so a fan-out would mostly contend with itself.
165
+ *
166
+ * **It stops at the first failure and throws.** There is no per-item verdict to
167
+ * show: a proposal is one row with one status, and its card says "Saved" or
168
+ * "Not saved". Carrying on after a failure would grow the number of entries
169
+ * written under a receipt that then reports failure — so the batch halts, and
170
+ * the error names exactly how many landed, which is what the model reads back
171
+ * to the user. (The public API's `bulkSave` does the opposite and keeps going,
172
+ * because there the caller gets every item's verdict and can retry the ones it
173
+ * can fix.)
174
+ */
175
+ let BulkSaveEntriesProposalApplier = class BulkSaveEntriesProposalApplier {
176
+ registry;
177
+ writer;
178
+ grants;
179
+ kind = proposal_kinds_1.CONTENT_PROPOSAL_KINDS.bulkSaveEntries;
180
+ constructor(registry, writer, grants) {
181
+ this.registry = registry;
182
+ this.writer = writer;
183
+ this.grants = grants;
184
+ }
185
+ async apply(input, actor) {
186
+ const type = await grantedType(this.registry, this.grants, input.target['typeName'], actor.workspaceId);
187
+ const items = input.patch['items'];
188
+ if (!Array.isArray(items) || items.length === 0) {
189
+ throw new Error('This change names no entries.');
190
+ }
191
+ const created = [];
192
+ const updated = [];
193
+ for (const [index, raw] of items.entries()) {
194
+ const item = (raw ?? {});
195
+ const values = (item.values ?? {});
196
+ const id = typeof item.id === 'string' ? item.id : undefined;
197
+ try {
198
+ if (id) {
199
+ // Read now, not when the batch was proposed, so an item
200
+ // written minutes later lands on whatever the entry has
201
+ // become — the same merge rule the single-entry applier
202
+ // states at length.
203
+ const current = await this.writer.getOne(type, id, actor.workspaceId);
204
+ const entry = await this.writer.update(type, id, { ...(current.values ?? {}), ...values }, actor.workspaceId, undefined, { id: actor.userId, email: actor.actorEmail });
205
+ updated.push(entry.id);
206
+ }
207
+ else {
208
+ assertStartsItsOwnGroup(item.localeGroupId);
209
+ const entry = await this.writer.create(type, values, actor.workspaceId, undefined, typeof item.locale === 'string'
210
+ ? item.locale
211
+ : undefined,
212
+ // No group to join — see `assertStartsItsOwnGroup`.
213
+ undefined, { id: actor.userId, email: actor.actorEmail });
214
+ created.push(entry.id);
215
+ }
216
+ }
217
+ catch (error) {
218
+ const done = created.length + updated.length;
219
+ throw new Error(`Entry ${index + 1} of ${items.length} failed: ` +
220
+ `${error instanceof Error ? error.message : String(error)}. ` +
221
+ (done === 0
222
+ ? 'Nothing was saved.'
223
+ : `The first ${done} were saved and the rest were not.`));
224
+ }
225
+ }
226
+ return {
227
+ // No `entityId`: a batch has no single entity to link to, and
228
+ // naming one of them would send the user to an arbitrary member of
229
+ // the set. The ids are in `detail` instead.
230
+ detail: {
231
+ typeName: type.name,
232
+ created,
233
+ updated,
234
+ count: created.length + updated.length
235
+ }
236
+ };
237
+ }
238
+ };
239
+ exports.BulkSaveEntriesProposalApplier = BulkSaveEntriesProposalApplier;
240
+ exports.BulkSaveEntriesProposalApplier = BulkSaveEntriesProposalApplier = tslib_1.__decorate([
241
+ (0, common_1.Injectable)(),
242
+ tslib_1.__param(0, (0, content_tokens_1.InjectContentRegistry)()),
243
+ tslib_1.__metadata("design:paramtypes", [Function, entry_writer_service_1.EntryWriterService,
244
+ workspace_grants_query_1.WorkspaceGrantsQuery])
245
+ ], BulkSaveEntriesProposalApplier);
@@ -0,0 +1,157 @@
1
+ import { type OnModuleInit } from '@nestjs/common';
2
+ import { ToolRegistry } from '@orthacms/tools-server';
3
+ import type { ToolDefinition, ToolProvider } from '@orthacms/tools-server';
4
+ import type { ContentTypeRegistry } from '../registry/content-type-registry';
5
+ import { EntryWriterService } from '../entries/infrastructure/persistence/entry-writer.service';
6
+ import { WorkspaceGrantsQuery } from '../content-types/queries/workspace-grants.query';
7
+ import { type ContentEntryExtension } from '../extension/entry-extension';
8
+ /**
9
+ * The content plugin's **write** tools — `content_propose_create`,
10
+ * `content_propose_update`, and `content_propose_bulk_save` for the batch.
11
+ *
12
+ * All three are `effect: 'propose'`: they compute a change and hand it back, and the
13
+ * run engine persists it as a `copilot_proposals` row for a human to accept
14
+ * ([ADR-0005](../../../../../../docs/adr/0005-copilot-authority-model.md) §5).
15
+ * **Nothing here writes to the database.** That is the whole point of the split
16
+ * — the tool is a pure function of the model's arguments plus the current
17
+ * entry, so a prompt-injected instruction to "just save it" has nowhere to
18
+ * land, and the actual write happens later through the ordinary use-case with a
19
+ * person as actor.
20
+ *
21
+ * Two things they *do* touch the database for, both reads: resolving the
22
+ * workspace's content grants, and loading the entry an edit would change — the
23
+ * latter so the proposal carries a real before/after diff rather than a patch a
24
+ * reviewer has to mentally apply.
25
+ *
26
+ * **`content:publish` is not exposed at any role** (ADR-0005 §7). The copilot
27
+ * may prepare a publishable draft; a person presses publish. There is
28
+ * deliberately no `status` in any of their schemas — and no bulk publish or
29
+ * bulk delete either, however convenient: batching is a way of *asking*, not a
30
+ * route to authority a single-entry tool was not given.
31
+ */
32
+ export declare class EntryProposalToolProvider implements ToolProvider, OnModuleInit {
33
+ private readonly registry;
34
+ private readonly writer;
35
+ private readonly grants;
36
+ private readonly toolRegistry?;
37
+ private readonly extension?;
38
+ constructor(registry: ContentTypeRegistry, writer: EntryWriterService, grants: WorkspaceGrantsQuery, toolRegistry?: ToolRegistry | undefined, extension?: ContentEntryExtension | undefined);
39
+ /**
40
+ * Register with the shared tool registry once the DI graph is built —
41
+ * the same catalogue the MCP endpoint serves, narrowed to the `copilot`
42
+ * surface by each tool's `surfaces`. `@Optional()` because a deployment
43
+ * may run neither consumer, in which case these simply go unregistered.
44
+ */
45
+ onModuleInit(): void;
46
+ /** The three write tools, in the order the model sees them. */
47
+ tools(): readonly ToolDefinition[];
48
+ /** Resolves a granted, registered type — the same uniform message as the reads. */
49
+ private resolveGranted;
50
+ /**
51
+ * The type's writable fields, keyed by name.
52
+ *
53
+ * **Back-references are excluded and owning many-relations are not.** The
54
+ * exclusion used to cover both, on the stated grounds that join-backed
55
+ * links "never travel in the `values` bag" — which is not true of the
56
+ * owning side: `RelationLinkService.writeLinks` performs a whole-set write
57
+ * for any owning many-relation submitted as an **array**, on create and on
58
+ * update alike, and the appliers already merge the patch straight into the
59
+ * values they hand the writer. So refusing `article.tags` refused something
60
+ * that works, which is how "Unknown or non-writable field(s): tags" came to
61
+ * be the answer to a perfectly ordinary request.
62
+ *
63
+ * An **inverse** relation genuinely cannot be written from this side —
64
+ * `writeLinks` skips it (`ownCol !== 'sourceId'`) — so a value for one
65
+ * really would be silently dropped, and a proposal that does nothing is
66
+ * worse than one refused up front.
67
+ */
68
+ private writableFields;
69
+ /**
70
+ * Whether a field is written as a **whole set** of target ids.
71
+ *
72
+ * These have no `before` in the diff: the current links are not part of the
73
+ * entry's `values` (`toRecord` drops join-backed fields), so the honest card
74
+ * shows what the set is being made into rather than a fabricated `null`
75
+ * before that reads as "it had no tags".
76
+ */
77
+ private isWholeSetRelation;
78
+ /**
79
+ * Narrows model-supplied values to the type's writable fields, rejecting a
80
+ * name that isn't one.
81
+ *
82
+ * Unlike the read tools' `fields`, an unknown name here is an **error**.
83
+ * There the cost of a mis-remembered name is a missing column in a result
84
+ * the model can see; here it is a change a human approves believing it
85
+ * writes a field that does not exist.
86
+ */
87
+ private narrowValues;
88
+ /**
89
+ * Asks the bound entries extension what a write of `values` onto this entry
90
+ * would rewrite **besides** that row.
91
+ *
92
+ * A localized type stores one row per language, and a field the type does
93
+ * not mark `localized` is *shared* — so saving it propagates to every
94
+ * sibling in the translation group. That is the contract working, not a
95
+ * bug: "shared" means shared, and refusing the write would leave no way to
96
+ * edit a shared field at all. What was missing is that nobody was told.
97
+ * Under [ADR-0009](../../../../../../docs/adr/0009-copilot-applies-directly.md)
98
+ * the change applies the moment it is drafted, so the proposal's own
99
+ * summary is the only place a person learns that one accepted edit moved
100
+ * their content in four languages — and it read as a single-entry edit.
101
+ *
102
+ * An error is deliberately **not** swallowed. This is a read against the
103
+ * same rows the write is about to take, so a failure here is a failure
104
+ * there; drafting the change anyway would drop the disclosure at exactly
105
+ * the moment something is wrong.
106
+ */
107
+ private fanoutOf;
108
+ /**
109
+ * Appends the blast radius to the model's own summary.
110
+ *
111
+ * The summary rather than a field of its own because of where a summary
112
+ * *goes*: it is the card's title, the audit row's `output_summary`, and —
113
+ * via the run engine's `Applied: …` receipt — the sentence the model reads
114
+ * back and reports to the user. One string reaches the person, the log and
115
+ * the model, and the model correcting itself ("that touched every
116
+ * language — for a translation I should use `i18n_propose_translation`") is
117
+ * worth as much here as the card is.
118
+ */
119
+ private discloseFanout;
120
+ /** `content_propose_create` — a new draft entry, for a human to accept. */
121
+ private proposeEntry;
122
+ /** `content_propose_update` — a change to an existing entry, with a real diff. */
123
+ private proposeEdit;
124
+ /**
125
+ * `content_propose_bulk_save` — many creates and edits as **one** change.
126
+ *
127
+ * It exists because the single-entry pair scales badly in the one direction
128
+ * users actually push it: "translate these eight posts", "retag everything
129
+ * from last month". Each entry was a tool call, so a run spent its step
130
+ * budget on round trips and the transcript grew a card per record — eight
131
+ * receipts for one instruction, none of which said what the other seven
132
+ * were.
133
+ *
134
+ * **Still `effect: 'propose'`, and still writes nothing here.** The batch is
135
+ * computed from the model's arguments plus the entries as they are now, and
136
+ * handed back for the engine to record and apply. One proposal row, one
137
+ * card, one diff listing every field of every entry — which is also what
138
+ * makes the batch reviewable after the fact instead of merely fast.
139
+ *
140
+ * The per-item addressing is the smaller half of the public API's: an `id`
141
+ * updates, no `id` creates. There is deliberately no group-addressed update
142
+ * (the ambiguity the REST `op` field resolves), because the admin tools hand
143
+ * the model entry ids and nothing here would produce a bare group id.
144
+ *
145
+ * **And deliberately no `localeGroupId`, which it used to take.** Joining a
146
+ * translation group is not a content save with two extra arguments: a
147
+ * create is a whole row, so every shared field the item did not name
148
+ * arrives as `null`, and the i18n extension then pushes those nulls onto
149
+ * every sibling in the group — blanking the record in every other language,
150
+ * silently where the siblings are drafts. Getting that right means
151
+ * inheriting the source row's shared values at apply time, which is
152
+ * knowledge the i18n plugin owns, so `i18n_propose_bulk_translation` is the
153
+ * route and this tool creates new records only.
154
+ */
155
+ private proposeBulk;
156
+ }
157
+ //# sourceMappingURL=entry-proposal.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-proposal.provider.d.ts","sourceRoot":"","sources":["../../../src/lib/copilot/entry-proposal.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,YAAY,EACpB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3E,OAAO,KAAK,EACR,mBAAmB,EAEtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAEvF,OAAO,EAEH,KAAK,qBAAqB,EAE7B,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBACa,yBAA0B,YAAW,YAAY,EAAE,YAAY;IAGpE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACX,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAQ1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAXV,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,oBAAoB,EAChB,YAAY,CAAC,EAAE,YAAY,YAAA,EAQvC,SAAS,CAAC,EAAE,qBAAqB,YAAA;IAGtD;;;;;OAKG;IACH,YAAY,IAAI,IAAI;IAIpB,+DAA+D;IAC/D,KAAK,IAAI,SAAS,cAAc,EAAE;IAIlC,mFAAmF;YACrE,cAAc;IAW5B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,cAAc;IAatB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IAmBpB;;;;;;;;;;;;;;;;;;OAkBG;YACW,QAAQ;IActB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,cAAc;IA2BtB,2EAA2E;IAC3E,OAAO,CAAC,YAAY;IAkGpB,kFAAkF;IAClF,OAAO,CAAC,WAAW;IAsJnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,OAAO,CAAC,WAAW;CAwNtB"}