@abraca/junis 2.80.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 (383) hide show
  1. package/README.md +594 -0
  2. package/dist/module.d.mts +158 -0
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +957 -0
  5. package/dist/runtime/assets/css/jun.css +13 -0
  6. package/dist/runtime/components/JunAnnouncement.d.vue.ts +3 -0
  7. package/dist/runtime/components/JunAnnouncement.vue +88 -0
  8. package/dist/runtime/components/JunAnnouncement.vue.d.ts +3 -0
  9. package/dist/runtime/components/JunAppreciate.d.vue.ts +6 -0
  10. package/dist/runtime/components/JunAppreciate.vue +71 -0
  11. package/dist/runtime/components/JunAppreciate.vue.d.ts +6 -0
  12. package/dist/runtime/components/JunBackgroundPhoto.d.vue.ts +3 -0
  13. package/dist/runtime/components/JunBackgroundPhoto.vue +23 -0
  14. package/dist/runtime/components/JunBackgroundPhoto.vue.d.ts +3 -0
  15. package/dist/runtime/components/JunBlobBackdrop.client.d.vue.ts +3 -0
  16. package/dist/runtime/components/JunBlobBackdrop.client.vue +120 -0
  17. package/dist/runtime/components/JunBlobBackdrop.client.vue.d.ts +3 -0
  18. package/dist/runtime/components/JunBreadcrumbs.d.vue.ts +16 -0
  19. package/dist/runtime/components/JunBreadcrumbs.vue +63 -0
  20. package/dist/runtime/components/JunBreadcrumbs.vue.d.ts +16 -0
  21. package/dist/runtime/components/JunCampfireChat.d.vue.ts +14 -0
  22. package/dist/runtime/components/JunCampfireChat.vue +136 -0
  23. package/dist/runtime/components/JunCampfireChat.vue.d.ts +14 -0
  24. package/dist/runtime/components/JunCampfirePanel.d.vue.ts +33 -0
  25. package/dist/runtime/components/JunCampfirePanel.vue +202 -0
  26. package/dist/runtime/components/JunCampfirePanel.vue.d.ts +33 -0
  27. package/dist/runtime/components/JunCampfirePresence.client.d.vue.ts +3 -0
  28. package/dist/runtime/components/JunCampfirePresence.client.vue +321 -0
  29. package/dist/runtime/components/JunCampfirePresence.client.vue.d.ts +3 -0
  30. package/dist/runtime/components/JunCampfireRoster.d.vue.ts +19 -0
  31. package/dist/runtime/components/JunCampfireRoster.vue +259 -0
  32. package/dist/runtime/components/JunCampfireRoster.vue.d.ts +19 -0
  33. package/dist/runtime/components/JunCampfireYou.d.vue.ts +10 -0
  34. package/dist/runtime/components/JunCampfireYou.vue +157 -0
  35. package/dist/runtime/components/JunCampfireYou.vue.d.ts +10 -0
  36. package/dist/runtime/components/JunDocSurface.d.vue.ts +34 -0
  37. package/dist/runtime/components/JunDocSurface.vue +117 -0
  38. package/dist/runtime/components/JunDocSurface.vue.d.ts +34 -0
  39. package/dist/runtime/components/JunFestivalPlayer.client.d.vue.ts +3 -0
  40. package/dist/runtime/components/JunFestivalPlayer.client.vue +471 -0
  41. package/dist/runtime/components/JunFestivalPlayer.client.vue.d.ts +3 -0
  42. package/dist/runtime/components/JunFooter.d.vue.ts +3 -0
  43. package/dist/runtime/components/JunFooter.vue +102 -0
  44. package/dist/runtime/components/JunFooter.vue.d.ts +3 -0
  45. package/dist/runtime/components/JunGlobeEditor.client.d.vue.ts +43 -0
  46. package/dist/runtime/components/JunGlobeEditor.client.vue +315 -0
  47. package/dist/runtime/components/JunGlobeEditor.client.vue.d.ts +43 -0
  48. package/dist/runtime/components/JunGlobeMap.client.d.vue.ts +58 -0
  49. package/dist/runtime/components/JunGlobeMap.client.vue +495 -0
  50. package/dist/runtime/components/JunGlobeMap.client.vue.d.ts +58 -0
  51. package/dist/runtime/components/JunHead.d.vue.ts +3 -0
  52. package/dist/runtime/components/JunHead.vue +79 -0
  53. package/dist/runtime/components/JunHead.vue.d.ts +3 -0
  54. package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +0 -0
  55. package/dist/runtime/components/JunHorizontalTimeline.vue +363 -0
  56. package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +0 -0
  57. package/dist/runtime/components/JunImagePopup.client.d.vue.ts +3 -0
  58. package/dist/runtime/components/JunImagePopup.client.vue +422 -0
  59. package/dist/runtime/components/JunImagePopup.client.vue.d.ts +3 -0
  60. package/dist/runtime/components/JunIntro.d.vue.ts +3 -0
  61. package/dist/runtime/components/JunIntro.vue +156 -0
  62. package/dist/runtime/components/JunIntro.vue.d.ts +3 -0
  63. package/dist/runtime/components/JunItemMenu.d.vue.ts +50 -0
  64. package/dist/runtime/components/JunItemMenu.vue +97 -0
  65. package/dist/runtime/components/JunItemMenu.vue.d.ts +50 -0
  66. package/dist/runtime/components/JunLinksRow.d.vue.ts +19 -0
  67. package/dist/runtime/components/JunLinksRow.vue +96 -0
  68. package/dist/runtime/components/JunLinksRow.vue.d.ts +19 -0
  69. package/dist/runtime/components/JunLogo.d.vue.ts +15 -0
  70. package/dist/runtime/components/JunLogo.vue +360 -0
  71. package/dist/runtime/components/JunLogo.vue.d.ts +15 -0
  72. package/dist/runtime/components/JunMedia.client.d.vue.ts +40 -0
  73. package/dist/runtime/components/JunMedia.client.vue +117 -0
  74. package/dist/runtime/components/JunMedia.client.vue.d.ts +40 -0
  75. package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +24 -0
  76. package/dist/runtime/components/JunMosaicPane.client.vue +95 -0
  77. package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +24 -0
  78. package/dist/runtime/components/JunNavigation.d.vue.ts +26 -0
  79. package/dist/runtime/components/JunNavigation.vue +1149 -0
  80. package/dist/runtime/components/JunNavigation.vue.d.ts +26 -0
  81. package/dist/runtime/components/JunNodePanel.client.d.vue.ts +3 -0
  82. package/dist/runtime/components/JunNodePanel.client.vue +23 -0
  83. package/dist/runtime/components/JunNodePanel.client.vue.d.ts +3 -0
  84. package/dist/runtime/components/JunNotFound.d.vue.ts +7 -0
  85. package/dist/runtime/components/JunNotFound.vue +137 -0
  86. package/dist/runtime/components/JunNotFound.vue.d.ts +7 -0
  87. package/dist/runtime/components/JunPageHero.d.vue.ts +25 -0
  88. package/dist/runtime/components/JunPageHero.vue +90 -0
  89. package/dist/runtime/components/JunPageHero.vue.d.ts +25 -0
  90. package/dist/runtime/components/JunPatternBackdrop.client.d.vue.ts +7 -0
  91. package/dist/runtime/components/JunPatternBackdrop.client.vue +95 -0
  92. package/dist/runtime/components/JunPatternBackdrop.client.vue.d.ts +7 -0
  93. package/dist/runtime/components/JunPeerCursors.client.d.vue.ts +3 -0
  94. package/dist/runtime/components/JunPeerCursors.client.vue +123 -0
  95. package/dist/runtime/components/JunPeerCursors.client.vue.d.ts +3 -0
  96. package/dist/runtime/components/JunPresenceBlobs.client.d.vue.ts +3 -0
  97. package/dist/runtime/components/JunPresenceBlobs.client.vue +172 -0
  98. package/dist/runtime/components/JunPresenceBlobs.client.vue.d.ts +3 -0
  99. package/dist/runtime/components/JunSearch.client.d.vue.ts +3 -0
  100. package/dist/runtime/components/JunSearch.client.vue +809 -0
  101. package/dist/runtime/components/JunSearch.client.vue.d.ts +3 -0
  102. package/dist/runtime/components/JunServiceCard.d.vue.ts +10 -0
  103. package/dist/runtime/components/JunServiceCard.vue +145 -0
  104. package/dist/runtime/components/JunServiceCard.vue.d.ts +10 -0
  105. package/dist/runtime/components/JunShaderBackdrop.client.d.vue.ts +3 -0
  106. package/dist/runtime/components/JunShaderBackdrop.client.vue +82 -0
  107. package/dist/runtime/components/JunShaderBackdrop.client.vue.d.ts +3 -0
  108. package/dist/runtime/components/JunShell.d.vue.ts +17 -0
  109. package/dist/runtime/components/JunShell.vue +80 -0
  110. package/dist/runtime/components/JunShell.vue.d.ts +17 -0
  111. package/dist/runtime/components/JunStudioBar.client.d.vue.ts +3 -0
  112. package/dist/runtime/components/JunStudioBar.client.vue +462 -0
  113. package/dist/runtime/components/JunStudioBar.client.vue.d.ts +3 -0
  114. package/dist/runtime/components/JunStudioLogin.client.d.vue.ts +3 -0
  115. package/dist/runtime/components/JunStudioLogin.client.vue +58 -0
  116. package/dist/runtime/components/JunStudioLogin.client.vue.d.ts +3 -0
  117. package/dist/runtime/components/JunThemeToggle.d.vue.ts +3 -0
  118. package/dist/runtime/components/JunThemeToggle.vue +32 -0
  119. package/dist/runtime/components/JunThemeToggle.vue.d.ts +3 -0
  120. package/dist/runtime/components/JunTravellersChip.d.vue.ts +9 -0
  121. package/dist/runtime/components/JunTravellersChip.vue +111 -0
  122. package/dist/runtime/components/JunTravellersChip.vue.d.ts +9 -0
  123. package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +23 -0
  124. package/dist/runtime/components/JunVideoEmbed.client.vue +124 -0
  125. package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +23 -0
  126. package/dist/runtime/components/css-modules.d.ts +7 -0
  127. package/dist/runtime/components/renderers/.gitkeep +0 -0
  128. package/dist/runtime/components/renderers/JunAppsRenderer.d.vue.ts +10 -0
  129. package/dist/runtime/components/renderers/JunAppsRenderer.vue +271 -0
  130. package/dist/runtime/components/renderers/JunAppsRenderer.vue.d.ts +10 -0
  131. package/dist/runtime/components/renderers/JunCinemaRenderer.d.vue.ts +10 -0
  132. package/dist/runtime/components/renderers/JunCinemaRenderer.vue +465 -0
  133. package/dist/runtime/components/renderers/JunCinemaRenderer.vue.d.ts +10 -0
  134. package/dist/runtime/components/renderers/JunConfigRenderer.d.vue.ts +10 -0
  135. package/dist/runtime/components/renderers/JunConfigRenderer.vue +2045 -0
  136. package/dist/runtime/components/renderers/JunConfigRenderer.vue.d.ts +10 -0
  137. package/dist/runtime/components/renderers/JunCvRenderer.d.vue.ts +10 -0
  138. package/dist/runtime/components/renderers/JunCvRenderer.vue +256 -0
  139. package/dist/runtime/components/renderers/JunCvRenderer.vue.d.ts +10 -0
  140. package/dist/runtime/components/renderers/JunEntryRenderer.d.vue.ts +10 -0
  141. package/dist/runtime/components/renderers/JunEntryRenderer.vue +429 -0
  142. package/dist/runtime/components/renderers/JunEntryRenderer.vue.d.ts +10 -0
  143. package/dist/runtime/components/renderers/JunFestivalRenderer.d.vue.ts +10 -0
  144. package/dist/runtime/components/renderers/JunFestivalRenderer.vue +557 -0
  145. package/dist/runtime/components/renderers/JunFestivalRenderer.vue.d.ts +10 -0
  146. package/dist/runtime/components/renderers/JunGlobeRenderer.d.vue.ts +10 -0
  147. package/dist/runtime/components/renderers/JunGlobeRenderer.vue +91 -0
  148. package/dist/runtime/components/renderers/JunGlobeRenderer.vue.d.ts +10 -0
  149. package/dist/runtime/components/renderers/JunGuestbookRenderer.d.vue.ts +10 -0
  150. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +326 -0
  151. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue.d.ts +10 -0
  152. package/dist/runtime/components/renderers/JunHomeRenderer.d.vue.ts +10 -0
  153. package/dist/runtime/components/renderers/JunHomeRenderer.vue +585 -0
  154. package/dist/runtime/components/renderers/JunHomeRenderer.vue.d.ts +10 -0
  155. package/dist/runtime/components/renderers/JunJournalRenderer.d.vue.ts +10 -0
  156. package/dist/runtime/components/renderers/JunJournalRenderer.vue +420 -0
  157. package/dist/runtime/components/renderers/JunJournalRenderer.vue.d.ts +10 -0
  158. package/dist/runtime/components/renderers/JunLibraryRenderer.d.vue.ts +10 -0
  159. package/dist/runtime/components/renderers/JunLibraryRenderer.vue +319 -0
  160. package/dist/runtime/components/renderers/JunLibraryRenderer.vue.d.ts +10 -0
  161. package/dist/runtime/components/renderers/JunLinksRenderer.d.vue.ts +10 -0
  162. package/dist/runtime/components/renderers/JunLinksRenderer.vue +206 -0
  163. package/dist/runtime/components/renderers/JunLinksRenderer.vue.d.ts +10 -0
  164. package/dist/runtime/components/renderers/JunLiveRenderer.d.vue.ts +10 -0
  165. package/dist/runtime/components/renderers/JunLiveRenderer.vue +684 -0
  166. package/dist/runtime/components/renderers/JunLiveRenderer.vue.d.ts +10 -0
  167. package/dist/runtime/components/renderers/JunMosaicRenderer.d.vue.ts +10 -0
  168. package/dist/runtime/components/renderers/JunMosaicRenderer.vue +572 -0
  169. package/dist/runtime/components/renderers/JunMosaicRenderer.vue.d.ts +10 -0
  170. package/dist/runtime/components/renderers/JunMovieRenderer.d.vue.ts +10 -0
  171. package/dist/runtime/components/renderers/JunMovieRenderer.vue +539 -0
  172. package/dist/runtime/components/renderers/JunMovieRenderer.vue.d.ts +10 -0
  173. package/dist/runtime/components/renderers/JunNowRenderer.d.vue.ts +10 -0
  174. package/dist/runtime/components/renderers/JunNowRenderer.vue +382 -0
  175. package/dist/runtime/components/renderers/JunNowRenderer.vue.d.ts +10 -0
  176. package/dist/runtime/components/renderers/JunProjectRenderer.d.vue.ts +10 -0
  177. package/dist/runtime/components/renderers/JunProjectRenderer.vue +413 -0
  178. package/dist/runtime/components/renderers/JunProjectRenderer.vue.d.ts +10 -0
  179. package/dist/runtime/components/renderers/JunRedirectRenderer.d.vue.ts +10 -0
  180. package/dist/runtime/components/renderers/JunRedirectRenderer.vue +133 -0
  181. package/dist/runtime/components/renderers/JunRedirectRenderer.vue.d.ts +10 -0
  182. package/dist/runtime/components/renderers/JunServicesRenderer.d.vue.ts +10 -0
  183. package/dist/runtime/components/renderers/JunServicesRenderer.vue +267 -0
  184. package/dist/runtime/components/renderers/JunServicesRenderer.vue.d.ts +10 -0
  185. package/dist/runtime/components/renderers/JunStatsRenderer.d.vue.ts +10 -0
  186. package/dist/runtime/components/renderers/JunStatsRenderer.vue +230 -0
  187. package/dist/runtime/components/renderers/JunStatsRenderer.vue.d.ts +10 -0
  188. package/dist/runtime/components/renderers/JunTrackRenderer.d.vue.ts +10 -0
  189. package/dist/runtime/components/renderers/JunTrackRenderer.vue +380 -0
  190. package/dist/runtime/components/renderers/JunTrackRenderer.vue.d.ts +10 -0
  191. package/dist/runtime/components/renderers/JunUsesRenderer.d.vue.ts +10 -0
  192. package/dist/runtime/components/renderers/JunUsesRenderer.vue +254 -0
  193. package/dist/runtime/components/renderers/JunUsesRenderer.vue.d.ts +10 -0
  194. package/dist/runtime/components/renderers/JunWallRenderer.d.vue.ts +10 -0
  195. package/dist/runtime/components/renderers/JunWallRenderer.vue +276 -0
  196. package/dist/runtime/components/renderers/JunWallRenderer.vue.d.ts +10 -0
  197. package/dist/runtime/components/renderers/JunWindowRenderer.d.vue.ts +10 -0
  198. package/dist/runtime/components/renderers/JunWindowRenderer.vue +516 -0
  199. package/dist/runtime/components/renderers/JunWindowRenderer.vue.d.ts +10 -0
  200. package/dist/runtime/composables/useJunBackdrop.d.ts +9 -0
  201. package/dist/runtime/composables/useJunBackdrop.js +27 -0
  202. package/dist/runtime/composables/useJunBackground.d.ts +78 -0
  203. package/dist/runtime/composables/useJunBackground.js +65 -0
  204. package/dist/runtime/composables/useJunCampfire.d.ts +156 -0
  205. package/dist/runtime/composables/useJunCampfire.js +225 -0
  206. package/dist/runtime/composables/useJunChrome.d.ts +66 -0
  207. package/dist/runtime/composables/useJunChrome.js +233 -0
  208. package/dist/runtime/composables/useJunColorMode.d.ts +8 -0
  209. package/dist/runtime/composables/useJunColorMode.js +11 -0
  210. package/dist/runtime/composables/useJunCommands.d.ts +37 -0
  211. package/dist/runtime/composables/useJunCommands.js +225 -0
  212. package/dist/runtime/composables/useJunCreatePage.d.ts +17 -0
  213. package/dist/runtime/composables/useJunCreatePage.js +30 -0
  214. package/dist/runtime/composables/useJunCurrentDoc.d.ts +5 -0
  215. package/dist/runtime/composables/useJunCurrentDoc.js +14 -0
  216. package/dist/runtime/composables/useJunDocMenu.d.ts +71 -0
  217. package/dist/runtime/composables/useJunDocMenu.js +344 -0
  218. package/dist/runtime/composables/useJunDocPage.d.ts +99 -0
  219. package/dist/runtime/composables/useJunDocPage.js +155 -0
  220. package/dist/runtime/composables/useJunFollow.d.ts +11 -0
  221. package/dist/runtime/composables/useJunFollow.js +38 -0
  222. package/dist/runtime/composables/useJunGroupedDnD.d.ts +74 -0
  223. package/dist/runtime/composables/useJunGroupedDnD.js +186 -0
  224. package/dist/runtime/composables/useJunImagePopup.d.ts +37 -0
  225. package/dist/runtime/composables/useJunImagePopup.js +24 -0
  226. package/dist/runtime/composables/useJunIntro.d.ts +7 -0
  227. package/dist/runtime/composables/useJunIntro.js +8 -0
  228. package/dist/runtime/composables/useJunListDnD.d.ts +65 -0
  229. package/dist/runtime/composables/useJunListDnD.js +159 -0
  230. package/dist/runtime/composables/useJunMediaImport.d.ts +27 -0
  231. package/dist/runtime/composables/useJunMediaImport.js +90 -0
  232. package/dist/runtime/composables/useJunNavSettings.d.ts +57 -0
  233. package/dist/runtime/composables/useJunNavSettings.js +74 -0
  234. package/dist/runtime/composables/useJunNodePanel.d.ts +41 -0
  235. package/dist/runtime/composables/useJunNodePanel.js +36 -0
  236. package/dist/runtime/composables/useJunOpenDoc.d.ts +7 -0
  237. package/dist/runtime/composables/useJunOpenDoc.js +30 -0
  238. package/dist/runtime/composables/useJunOptions.d.ts +68 -0
  239. package/dist/runtime/composables/useJunOptions.js +68 -0
  240. package/dist/runtime/composables/useJunPalette.d.ts +16 -0
  241. package/dist/runtime/composables/useJunPalette.js +72 -0
  242. package/dist/runtime/composables/useJunPeopleAdmin.d.ts +69 -0
  243. package/dist/runtime/composables/useJunPeopleAdmin.js +73 -0
  244. package/dist/runtime/composables/useJunPlayer.d.ts +99 -0
  245. package/dist/runtime/composables/useJunPlayer.js +208 -0
  246. package/dist/runtime/composables/useJunPresence.d.ts +32 -0
  247. package/dist/runtime/composables/useJunPresence.js +53 -0
  248. package/dist/runtime/composables/useJunPressDrag.d.ts +20 -0
  249. package/dist/runtime/composables/useJunPressDrag.js +85 -0
  250. package/dist/runtime/composables/useJunRecent.d.ts +9 -0
  251. package/dist/runtime/composables/useJunRecent.js +44 -0
  252. package/dist/runtime/composables/useJunRename.d.ts +19 -0
  253. package/dist/runtime/composables/useJunRename.js +62 -0
  254. package/dist/runtime/composables/useJunRouteGeoHeal.d.ts +1 -0
  255. package/dist/runtime/composables/useJunRouteGeoHeal.js +45 -0
  256. package/dist/runtime/composables/useJunRouting.d.ts +29 -0
  257. package/dist/runtime/composables/useJunRouting.js +101 -0
  258. package/dist/runtime/composables/useJunSearch.d.ts +6 -0
  259. package/dist/runtime/composables/useJunSearch.js +16 -0
  260. package/dist/runtime/composables/useJunSelfId.d.ts +1 -0
  261. package/dist/runtime/composables/useJunSelfId.js +28 -0
  262. package/dist/runtime/composables/useJunSiteConfig.d.ts +229 -0
  263. package/dist/runtime/composables/useJunSiteConfig.js +95 -0
  264. package/dist/runtime/composables/useJunSiteConfigValues.d.ts +33 -0
  265. package/dist/runtime/composables/useJunSiteConfigValues.js +21 -0
  266. package/dist/runtime/composables/useJunStagger.d.ts +54 -0
  267. package/dist/runtime/composables/useJunStagger.js +23 -0
  268. package/dist/runtime/composables/useJunStudio.d.ts +11 -0
  269. package/dist/runtime/composables/useJunStudio.js +51 -0
  270. package/dist/runtime/composables/useJunSurface.d.ts +19 -0
  271. package/dist/runtime/composables/useJunSurface.js +8 -0
  272. package/dist/runtime/composables/useJunTheme.d.ts +21 -0
  273. package/dist/runtime/composables/useJunTheme.js +138 -0
  274. package/dist/runtime/composables/useJunThemeTransition.d.ts +5 -0
  275. package/dist/runtime/composables/useJunThemeTransition.js +32 -0
  276. package/dist/runtime/composables/useJunUpload.d.ts +12 -0
  277. package/dist/runtime/composables/useJunUpload.js +44 -0
  278. package/dist/runtime/composables/useJunViewingAccent.d.ts +6 -0
  279. package/dist/runtime/composables/useJunViewingAccent.js +28 -0
  280. package/dist/runtime/error.d.vue.ts +7 -0
  281. package/dist/runtime/error.vue +74 -0
  282. package/dist/runtime/error.vue.d.ts +7 -0
  283. package/dist/runtime/layouts/jun.d.vue.ts +13 -0
  284. package/dist/runtime/layouts/jun.vue +162 -0
  285. package/dist/runtime/layouts/jun.vue.d.ts +13 -0
  286. package/dist/runtime/pages/doc.d.vue.ts +3 -0
  287. package/dist/runtime/pages/doc.vue +142 -0
  288. package/dist/runtime/pages/doc.vue.d.ts +3 -0
  289. package/dist/runtime/pages/index.d.vue.ts +3 -0
  290. package/dist/runtime/pages/index.vue +64 -0
  291. package/dist/runtime/pages/index.vue.d.ts +3 -0
  292. package/dist/runtime/plugins/jun-drag-affordance.client.d.ts +2 -0
  293. package/dist/runtime/plugins/jun-drag-affordance.client.js +9 -0
  294. package/dist/runtime/router.options.d.ts +3 -0
  295. package/dist/runtime/router.options.js +72 -0
  296. package/dist/runtime/server/api/nav.get.d.ts +9 -0
  297. package/dist/runtime/server/api/nav.get.js +16 -0
  298. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +18 -0
  299. package/dist/runtime/server/api/resolve/[...slug].get.js +20 -0
  300. package/dist/runtime/server/api/search.get.d.ts +13 -0
  301. package/dist/runtime/server/api/search.get.js +72 -0
  302. package/dist/runtime/server/api/service.get.d.ts +12 -0
  303. package/dist/runtime/server/api/service.get.js +39 -0
  304. package/dist/runtime/server/api/site-config.get.d.ts +2 -0
  305. package/dist/runtime/server/api/site-config.get.js +3 -0
  306. package/dist/runtime/server/api/stats.get.d.ts +12 -0
  307. package/dist/runtime/server/api/stats.get.js +56 -0
  308. package/dist/runtime/server/janitor/junJanitorActor.d.ts +179 -0
  309. package/dist/runtime/server/janitor/junJanitorActor.js +305 -0
  310. package/dist/runtime/server/janitor/junJanitorChores.d.ts +137 -0
  311. package/dist/runtime/server/janitor/junJanitorChores.js +189 -0
  312. package/dist/runtime/server/janitor/junJanitorDiff.d.ts +41 -0
  313. package/dist/runtime/server/janitor/junJanitorDiff.js +109 -0
  314. package/dist/runtime/server/janitor/junJanitorListen.d.ts +33 -0
  315. package/dist/runtime/server/janitor/junJanitorListen.js +43 -0
  316. package/dist/runtime/server/janitor/junJanitorMachine.d.ts +60 -0
  317. package/dist/runtime/server/janitor/junJanitorMachine.js +598 -0
  318. package/dist/runtime/server/janitor/junJanitorMotor.d.ts +211 -0
  319. package/dist/runtime/server/janitor/junJanitorMotor.js +241 -0
  320. package/dist/runtime/server/janitor/junJanitorPatrol.d.ts +68 -0
  321. package/dist/runtime/server/janitor/junJanitorPatrol.js +34 -0
  322. package/dist/runtime/server/janitor/junJanitorPerform.d.ts +70 -0
  323. package/dist/runtime/server/janitor/junJanitorPerform.js +72 -0
  324. package/dist/runtime/server/janitor/junJanitorRandom.d.ts +54 -0
  325. package/dist/runtime/server/janitor/junJanitorRandom.js +48 -0
  326. package/dist/runtime/server/janitor/junJanitorStore.d.ts +159 -0
  327. package/dist/runtime/server/janitor/junJanitorStore.js +269 -0
  328. package/dist/runtime/server/janitor/junJanitorVoice.d.ts +86 -0
  329. package/dist/runtime/server/janitor/junJanitorVoice.js +193 -0
  330. package/dist/runtime/server/janitor/junJanitorYText.d.ts +164 -0
  331. package/dist/runtime/server/janitor/junJanitorYText.js +258 -0
  332. package/dist/runtime/server/plugins/jun-bootstrap.d.ts +25 -0
  333. package/dist/runtime/server/plugins/jun-bootstrap.js +652 -0
  334. package/dist/runtime/server/plugins/jun-doc-cache.d.ts +2 -0
  335. package/dist/runtime/server/plugins/jun-doc-cache.js +142 -0
  336. package/dist/runtime/server/plugins/jun-janitor.d.ts +2 -0
  337. package/dist/runtime/server/plugins/jun-janitor.js +176 -0
  338. package/dist/runtime/server/plugins/jun-rpc.d.ts +2 -0
  339. package/dist/runtime/server/plugins/jun-rpc.js +455 -0
  340. package/dist/runtime/server/routes/feed.json.get.d.ts +21 -0
  341. package/dist/runtime/server/routes/feed.json.get.js +25 -0
  342. package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
  343. package/dist/runtime/server/routes/feed.xml.get.js +34 -0
  344. package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
  345. package/dist/runtime/server/routes/sitemap.xml.get.js +27 -0
  346. package/dist/runtime/server/utils/junCache.d.ts +41 -0
  347. package/dist/runtime/server/utils/junCache.js +32 -0
  348. package/dist/runtime/server/utils/junFeed.d.ts +20 -0
  349. package/dist/runtime/server/utils/junFeed.js +71 -0
  350. package/dist/runtime/server/utils/junServiceFetch.d.ts +46 -0
  351. package/dist/runtime/server/utils/junServiceFetch.js +320 -0
  352. package/dist/runtime/server/utils/junVisibility.d.ts +31 -0
  353. package/dist/runtime/server/utils/junVisibility.js +6 -0
  354. package/dist/runtime/types.d.ts +853 -0
  355. package/dist/runtime/types.js +1 -0
  356. package/dist/runtime/utils/junDate.d.ts +38 -0
  357. package/dist/runtime/utils/junDate.js +30 -0
  358. package/dist/runtime/utils/junDndGeometry.d.ts +62 -0
  359. package/dist/runtime/utils/junDndGeometry.js +56 -0
  360. package/dist/runtime/utils/junDocTypeIcons.d.ts +30 -0
  361. package/dist/runtime/utils/junDocTypeIcons.js +30 -0
  362. package/dist/runtime/utils/junEditorBodyText.d.ts +32 -0
  363. package/dist/runtime/utils/junEditorBodyText.js +10 -0
  364. package/dist/runtime/utils/junMapboxToken.d.ts +1 -0
  365. package/dist/runtime/utils/junMapboxToken.js +5 -0
  366. package/dist/runtime/utils/junMatch.d.ts +45 -0
  367. package/dist/runtime/utils/junMatch.js +37 -0
  368. package/dist/runtime/utils/junMetaSchemas.d.ts +23 -0
  369. package/dist/runtime/utils/junMetaSchemas.js +94 -0
  370. package/dist/runtime/utils/junMotion.d.ts +71 -0
  371. package/dist/runtime/utils/junMotion.js +3 -0
  372. package/dist/runtime/utils/junServiceRef.d.ts +21 -0
  373. package/dist/runtime/utils/junServiceRef.js +94 -0
  374. package/dist/runtime/utils/junSimplifyPath.d.ts +23 -0
  375. package/dist/runtime/utils/junSimplifyPath.js +57 -0
  376. package/dist/runtime/utils/junTransportModes.d.ts +49 -0
  377. package/dist/runtime/utils/junTransportModes.js +37 -0
  378. package/dist/runtime/utils/junVideoSource.d.ts +51 -0
  379. package/dist/runtime/utils/junVideoSource.js +110 -0
  380. package/dist/runtime/utils/junVisibility.d.ts +14 -0
  381. package/dist/runtime/utils/junVisibility.js +6 -0
  382. package/dist/types.d.mts +5 -0
  383. package/package.json +111 -0
@@ -0,0 +1,189 @@
1
+ import { junDiffText, describeSize, editShape } from "./junJanitorDiff.js";
2
+ export const JUN_CHORE_POLICY_DEFAULT = {
3
+ backspaceLimit: 90,
4
+ wholesaleLimit: 4e3,
5
+ // Deliberately short. `date`, `slugAliases`, `appreciatedBy` and the rest are
6
+ // either legitimately live or belong to other features — a janitor that
7
+ // reverted `appreciatedBy` would be un-hearting visitors' reactions, which is
8
+ // not tidying, it is vandalism with a mop.
9
+ metaKeys: ["excerpt", "icon", "tags", "accent", "description", "status", "url"],
10
+ ignoreDocIds: [],
11
+ protectChildCount: 1
12
+ };
13
+ function severityFor(chars) {
14
+ if (chars <= 24) return "minor";
15
+ if (chars <= 400) return "notable";
16
+ return "egregious";
17
+ }
18
+ function styleFor(chars, policy, impatient) {
19
+ if (impatient) return chars <= 12 ? "backspace" : "cut";
20
+ return chars <= policy.backspaceLimit ? "backspace" : "cut";
21
+ }
22
+ function editKey(docId, edit) {
23
+ const sample = (edit.remove || edit.restore).slice(0, 24);
24
+ return `${docId}:${edit.at}:${sample}`;
25
+ }
26
+ export function planBodyChores(docId, baselineText, liveText, options = {}) {
27
+ const policy = options.policy ?? JUN_CHORE_POLICY_DEFAULT;
28
+ if (policy.ignoreDocIds.includes(docId)) return [];
29
+ const edits = junDiffText(baselineText, liveText);
30
+ const chores = [];
31
+ for (const edit of edits) {
32
+ const id = editKey(docId, edit);
33
+ const shape = editShape(edit);
34
+ const weight = Math.max(edit.remove.length, edit.restore.length);
35
+ if (weight > policy.wholesaleLimit) {
36
+ chores.push({
37
+ kind: "body.replace",
38
+ id,
39
+ docId,
40
+ at: edit.at,
41
+ remove: edit.remove,
42
+ restore: edit.restore,
43
+ style: "cut",
44
+ severity: "egregious"
45
+ });
46
+ continue;
47
+ }
48
+ if (shape === "addition") {
49
+ chores.push({
50
+ kind: "body.remove",
51
+ id,
52
+ docId,
53
+ at: edit.at,
54
+ text: edit.remove,
55
+ style: styleFor(edit.remove.length, policy, !!options.impatient),
56
+ severity: severityFor(edit.remove.length)
57
+ });
58
+ } else if (shape === "removal") {
59
+ chores.push({
60
+ kind: "body.restore",
61
+ id,
62
+ docId,
63
+ at: edit.at,
64
+ text: edit.restore,
65
+ severity: severityFor(edit.restore.length)
66
+ });
67
+ } else {
68
+ chores.push({
69
+ kind: "body.replace",
70
+ id,
71
+ docId,
72
+ at: edit.at,
73
+ remove: edit.remove,
74
+ restore: edit.restore,
75
+ style: styleFor(edit.remove.length, policy, !!options.impatient),
76
+ severity: severityFor(Math.max(edit.remove.length, edit.restore.length))
77
+ });
78
+ }
79
+ }
80
+ return chores;
81
+ }
82
+ function childCount(snapshot, docId) {
83
+ let n = 0;
84
+ for (const doc of Object.values(snapshot.docs)) {
85
+ if (doc.parentId === docId && !doc.trashed) n++;
86
+ }
87
+ return n;
88
+ }
89
+ export function planTreeChores(baseline, live, options = {}) {
90
+ const policy = options.policy ?? JUN_CHORE_POLICY_DEFAULT;
91
+ const chores = [];
92
+ const ignored = new Set(policy.ignoreDocIds);
93
+ for (const [id, base] of Object.entries(baseline.docs)) {
94
+ if (ignored.has(id)) continue;
95
+ const now = live.docs[id];
96
+ if (!now || now.trashed) {
97
+ chores.push({
98
+ kind: "doc.restore",
99
+ id: `restore:${id}`,
100
+ docId: id,
101
+ label: base.label,
102
+ parentId: base.parentId,
103
+ text: base.text,
104
+ severity: "egregious"
105
+ });
106
+ continue;
107
+ }
108
+ if (now.label !== base.label) {
109
+ chores.push({
110
+ kind: "entry.rename",
111
+ id: `rename:${id}:${base.label}`,
112
+ docId: id,
113
+ from: now.label,
114
+ to: base.label,
115
+ severity: "notable"
116
+ });
117
+ }
118
+ if (now.order !== base.order) {
119
+ chores.push({
120
+ kind: "entry.reorder",
121
+ id: `order:${id}`,
122
+ docId: id,
123
+ order: base.order,
124
+ // Straightening things is not a complaint. It gets no commentary and
125
+ // no ceremony — it is the equivalent of squaring up a pile of chairs.
126
+ severity: "minor"
127
+ });
128
+ }
129
+ for (const key of policy.metaKeys) {
130
+ const want = base.meta?.[key];
131
+ const have = now.meta?.[key];
132
+ if (stableEqual(want, have)) continue;
133
+ chores.push({
134
+ kind: "entry.meta",
135
+ id: `meta:${id}:${key}`,
136
+ docId: id,
137
+ key,
138
+ value: want,
139
+ severity: "minor"
140
+ });
141
+ }
142
+ }
143
+ for (const [id, now] of Object.entries(live.docs)) {
144
+ if (ignored.has(id) || baseline.docs[id] || now.trashed) continue;
145
+ if (childCount(live, id) >= policy.protectChildCount) continue;
146
+ chores.push({
147
+ kind: "doc.remove",
148
+ id: `remove:${id}`,
149
+ docId: id,
150
+ label: now.label,
151
+ severity: "notable"
152
+ });
153
+ }
154
+ return chores;
155
+ }
156
+ function stableEqual(a, b) {
157
+ if (a === b) return true;
158
+ if (a == null || b == null) return a == null && b == null;
159
+ if (Array.isArray(a) && Array.isArray(b)) {
160
+ return a.length === b.length && [...a].sort().every((v, i) => stableEqual(v, [...b].sort()[i]));
161
+ }
162
+ if (typeof a === "object" && typeof b === "object") {
163
+ return JSON.stringify(a) === JSON.stringify(b);
164
+ }
165
+ return false;
166
+ }
167
+ export function describeChore(chore) {
168
+ switch (chore.kind) {
169
+ case "body.remove":
170
+ return { what: describeSize(chore.text), verb: "left behind" };
171
+ case "body.restore":
172
+ return { what: describeSize(chore.text), verb: "missing" };
173
+ case "body.replace":
174
+ return {
175
+ what: describeSize(chore.remove.length >= chore.restore.length ? chore.remove : chore.restore),
176
+ verb: "changed"
177
+ };
178
+ case "entry.rename":
179
+ return { what: `the name`, verb: "changed" };
180
+ case "entry.reorder":
181
+ return { what: "the order", verb: "shuffled" };
182
+ case "entry.meta":
183
+ return { what: chore.key, verb: "changed" };
184
+ case "doc.remove":
185
+ return { what: "a whole page", verb: "appeared" };
186
+ case "doc.restore":
187
+ return { what: "a page", verb: "gone" };
188
+ }
189
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * What changed — baseline prose versus what is on the page now.
3
+ *
4
+ * Pure text in, edits out. No yjs here on purpose: the janitor decides WHAT to
5
+ * fix from plain strings, and only then does the effect layer work out where
6
+ * those offsets live in a `Y.XmlFragment`. That split is what makes the whole
7
+ * decision half testable without a server.
8
+ *
9
+ * The diff is TOKEN-level (words and whitespace runs), not character-level,
10
+ * for a reason that is about behaviour rather than performance: a character
11
+ * diff of "the cat" → "the bat" reports "one character changed at offset 4",
12
+ * and the janitor would sit there replacing a single letter like a spellchecker.
13
+ * A token diff reports "the word `bat` should be `cat`", which is what a person
14
+ * sees, and it is what makes "select the word, delete it, type the right one"
15
+ * the natural performance.
16
+ */
17
+ /** One contiguous divergence, in LIVE text coordinates. */
18
+ export interface JunTextEdit {
19
+ /** Offset into the live text where the divergence starts. */
20
+ at: number;
21
+ /** Text that is on the page but not in the baseline. The janitor removes it. */
22
+ remove: string;
23
+ /** Text that is in the baseline but not on the page. The janitor types it back. */
24
+ restore: string;
25
+ }
26
+ export type JunEditShape = 'addition' | 'removal' | 'replacement';
27
+ export declare function editShape(edit: JunTextEdit): JunEditShape;
28
+ /**
29
+ * Diverge `live` from `baseline`, as a list of edits the janitor could perform.
30
+ *
31
+ * `live` is the "a" side: `del` ops are text that is on the page and shouldn't
32
+ * be, `ins` ops are baseline text that has gone missing. Adjacent del/ins runs
33
+ * merge into one replacement, because that is one gesture, not two.
34
+ */
35
+ export declare function junDiffText(baseline: string, live: string): JunTextEdit[];
36
+ /**
37
+ * A short, human description of an edit for the campfire — "three words",
38
+ * "a paragraph", "half a page". Never an exact count: nobody says
39
+ * "47 characters".
40
+ */
41
+ export declare function describeSize(text: string): string;
@@ -0,0 +1,109 @@
1
+ export function editShape(edit) {
2
+ if (edit.remove && edit.restore) return "replacement";
3
+ return edit.remove ? "addition" : "removal";
4
+ }
5
+ const MAX_TOKENS = 1500;
6
+ function tokenize(text) {
7
+ return text.match(/\s+|\S+/g) ?? [];
8
+ }
9
+ function diffTokens(a, b) {
10
+ const n = a.length;
11
+ const m = b.length;
12
+ const table = new Int32Array((n + 1) * (m + 1));
13
+ const idx = (i2, j2) => i2 * (m + 1) + j2;
14
+ for (let i2 = n - 1; i2 >= 0; i2--) {
15
+ for (let j2 = m - 1; j2 >= 0; j2--) {
16
+ table[idx(i2, j2)] = a[i2] === b[j2] ? table[idx(i2 + 1, j2 + 1)] + 1 : Math.max(table[idx(i2 + 1, j2)], table[idx(i2, j2 + 1)]);
17
+ }
18
+ }
19
+ const ops = [];
20
+ let i = 0;
21
+ let j = 0;
22
+ while (i < n && j < m) {
23
+ if (a[i] === b[j]) {
24
+ ops.push({ kind: "eq", text: a[i] });
25
+ i++;
26
+ j++;
27
+ } else if (table[idx(i + 1, j)] >= table[idx(i, j + 1)]) {
28
+ ops.push({ kind: "del", text: a[i] });
29
+ i++;
30
+ } else {
31
+ ops.push({ kind: "ins", text: b[j] });
32
+ j++;
33
+ }
34
+ }
35
+ while (i < n) ops.push({ kind: "del", text: a[i++] });
36
+ while (j < m) ops.push({ kind: "ins", text: b[j++] });
37
+ return ops;
38
+ }
39
+ export function junDiffText(baseline, live) {
40
+ if (baseline === live) return [];
41
+ let head = 0;
42
+ const maxHead = Math.min(baseline.length, live.length);
43
+ while (head < maxHead && baseline[head] === live[head]) head++;
44
+ let tail = 0;
45
+ while (tail < maxHead - head && baseline[baseline.length - 1 - tail] === live[live.length - 1 - tail]) tail++;
46
+ while (head > 0 && !/\s/.test(live[head - 1] ?? "")) head--;
47
+ while (tail > 0 && !/\s/.test(live[live.length - tail] ?? "")) tail--;
48
+ const baseMid = baseline.slice(head, baseline.length - tail);
49
+ const liveMid = live.slice(head, live.length - tail);
50
+ if (!baseMid && !liveMid) return [];
51
+ const liveTokens = tokenize(liveMid);
52
+ const baseTokens = tokenize(baseMid);
53
+ if (liveTokens.length > MAX_TOKENS || baseTokens.length > MAX_TOKENS) {
54
+ return [{ at: head, remove: liveMid, restore: baseMid }];
55
+ }
56
+ const ops = diffTokens(liveTokens, baseTokens);
57
+ const edits = [];
58
+ let cursor = head;
59
+ let pending = null;
60
+ const flush = () => {
61
+ if (pending && (pending.remove || pending.restore)) edits.push(pending);
62
+ pending = null;
63
+ };
64
+ for (const op of ops) {
65
+ if (op.kind === "eq") {
66
+ if (pending && /^[^\S\n]{1,2}$/.test(op.text)) {
67
+ pending.remove += op.text;
68
+ pending.restore += op.text;
69
+ } else {
70
+ flush();
71
+ }
72
+ cursor += op.text.length;
73
+ continue;
74
+ }
75
+ pending ??= { at: cursor, remove: "", restore: "" };
76
+ if (op.kind === "del") {
77
+ pending.remove += op.text;
78
+ cursor += op.text.length;
79
+ } else {
80
+ pending.restore += op.text;
81
+ }
82
+ }
83
+ flush();
84
+ return edits.map(trimEdit).filter((e) => e.remove || e.restore);
85
+ }
86
+ function trimEdit(edit) {
87
+ const { at, remove, restore } = edit;
88
+ const max = Math.min(remove.length, restore.length);
89
+ let head = 0;
90
+ while (head < max && remove[head] === restore[head]) head++;
91
+ let tail = 0;
92
+ while (tail < max - head && remove[remove.length - 1 - tail] === restore[restore.length - 1 - tail]) tail++;
93
+ return {
94
+ at: at + head,
95
+ remove: remove.slice(head, remove.length - tail),
96
+ restore: restore.slice(head, restore.length - tail)
97
+ };
98
+ }
99
+ export function describeSize(text) {
100
+ const chars = text.trim().length;
101
+ if (chars === 0) return "nothing";
102
+ if (chars <= 2) return "a couple of characters";
103
+ if (chars <= 12) return "a word";
104
+ if (chars > 900) return "a wall of text";
105
+ if (chars > 180) return "a paragraph";
106
+ const words = text.trim().split(/\s+/).length;
107
+ if (words <= 4) return "a few words";
108
+ return "a line";
109
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Being spoken to.
3
+ *
4
+ * Someone types "janitor?" at the campfire and, forty seconds later, gets an
5
+ * answer. That delay is the entire feature: an instant reply is a bot, and a
6
+ * reply that arrives while you have moved on to talking about something else is
7
+ * a person who was across the room with a mop.
8
+ *
9
+ * Pure — a chat frame in, an intent out. The machine decides whether to answer
10
+ * (shift, kill switch, cadence) and takes its time about it.
11
+ */
12
+ import type { JunVoiceEvent } from './junJanitorVoice.js';
13
+ /** What somebody at the campfire seems to want. */
14
+ export interface JunHeard {
15
+ /** Who said it, server-stamped. */
16
+ senderId: string;
17
+ senderName: string;
18
+ text: string;
19
+ /** The phrase bank to answer from. */
20
+ intent: Extract<JunVoiceEvent, `answer${string}`>;
21
+ }
22
+ /**
23
+ * Read a stateless frame off the wire and decide whether it was aimed at us.
24
+ *
25
+ * `selfId` is the janitor's own public key — without it, its own lines come
26
+ * back through the same channel and it answers itself, forever, at whatever
27
+ * rate the cadence allows.
28
+ */
29
+ export declare function junHear(payload: string, options: {
30
+ channelDocId: string;
31
+ name: string;
32
+ selfId: string | null;
33
+ }): JunHeard | null;
@@ -0,0 +1,43 @@
1
+ function addressesJanitor(text, name) {
2
+ const haystack = text.toLowerCase();
3
+ const needles = [name.toLowerCase(), "janitor", "cleaner"];
4
+ return needles.some((needle) => {
5
+ const at = haystack.indexOf(needle);
6
+ if (at === -1) return false;
7
+ const before = haystack[at - 1];
8
+ const after = haystack[at + needle.length];
9
+ return (!before || /[^a-z]/.test(before)) && (!after || /[^a-z]/.test(after));
10
+ });
11
+ }
12
+ function intentOf(text) {
13
+ const t = text.toLowerCase();
14
+ if (/\b(?:sorry|apolog|my bad|oops)\b/.test(t)) return "answer.sorry";
15
+ if (/\b(?:bin|deleted|gone|where did|restore|undo|get it back)\b/.test(t)) return "answer.bin";
16
+ if (/\b(?:why|how come|what for|who told)\b/.test(t)) return "answer.why";
17
+ if (/\b(?:hi|hey|hello|evening|morning|yo)\b/.test(t)) return "answer.greeting";
18
+ return "answer";
19
+ }
20
+ export function junHear(payload, options) {
21
+ if (!payload.includes("messages:new_message")) return null;
22
+ let frame;
23
+ try {
24
+ frame = JSON.parse(payload);
25
+ } catch {
26
+ return null;
27
+ }
28
+ if (frame.type !== "messages:new_message") return null;
29
+ const record = frame.record;
30
+ if (!record) return null;
31
+ if (record.record_kind && record.record_kind !== "message") return null;
32
+ if (record.channel_doc_id !== options.channelDocId) return null;
33
+ const senderId = typeof record.sender_id === "string" ? record.sender_id : "";
34
+ if (!senderId || options.selfId && senderId === options.selfId) return null;
35
+ const text = typeof record.content === "string" ? record.content : "";
36
+ if (!text.trim() || !addressesJanitor(text, options.name)) return null;
37
+ return {
38
+ senderId,
39
+ senderName: typeof record.sender_name === "string" && record.sender_name ? record.sender_name : "someone",
40
+ text,
41
+ intent: intentOf(text)
42
+ };
43
+ }
@@ -0,0 +1,60 @@
1
+ import { type JunRng } from './junJanitorRandom.js';
2
+ import { type JunMotorProfile } from './junJanitorMotor.js';
3
+ import { type JunChore, type JunChorePolicy } from './junJanitorChores.js';
4
+ import { type JunPatrolPolicy } from './junJanitorPatrol.js';
5
+ import type { JunJanitorActor } from './junJanitorActor.js';
6
+ import { type JunBaselineHandle, type JunTreeWriter } from './junJanitorStore.js';
7
+ export interface JunJanitorMachineOptions {
8
+ mode: 'observe' | 'clean';
9
+ /**
10
+ * Where "clean" comes from. `after-seed` captures one the first time it finds
11
+ * none; `manual` waits to be told; `off` means it never compares anything and
12
+ * is pure presence.
13
+ */
14
+ baselineMode?: 'after-seed' | 'manual' | 'off';
15
+ name: string;
16
+ rootDocId: string;
17
+ /** `[start, end)` on a 24h clock, server-local. `[0, 24]` is always on duty. */
18
+ shiftHours: [number, number];
19
+ budget: {
20
+ choresPerHour: number;
21
+ linesPerHour: number;
22
+ maxDocRemovalRatio: number;
23
+ choresPerShift: number;
24
+ };
25
+ ignoreDocIds: string[];
26
+ motor?: Partial<JunMotorProfile>;
27
+ patrol?: Partial<JunPatrolPolicy>;
28
+ chores?: Partial<JunChorePolicy>;
29
+ voice?: Record<string, number>;
30
+ phrases?: Record<string, string[]>;
31
+ seed?: string;
32
+ }
33
+ export interface JunJanitorMachineDeps {
34
+ actor: JunJanitorActor;
35
+ tree: JunTreeWriter;
36
+ /** Opened lazily — no baseline means presence and chat, and nothing else. */
37
+ baseline: () => Promise<JunBaselineHandle | null>;
38
+ /** Document id → site path, for the `page` awareness field. */
39
+ slugFor: (docId: string) => Promise<string | null>;
40
+ /** Live site config, re-read every turn. `janitorEnabled: false` stands it down. */
41
+ siteConfig: () => Promise<Record<string, unknown>>;
42
+ log: (message: string) => void;
43
+ now?: () => number;
44
+ sleep?: (ms: number) => Promise<void>;
45
+ }
46
+ export interface JunJanitorMachine {
47
+ start: () => void;
48
+ stop: () => Promise<void>;
49
+ /** Snapshot the current site as the clean state. */
50
+ captureBaseline: () => Promise<boolean>;
51
+ /** For logs and tests. */
52
+ state: () => {
53
+ phase: string;
54
+ openDoc: string | null;
55
+ choresThisHour: number;
56
+ };
57
+ }
58
+ export declare function createJunJanitorMachine(options: JunJanitorMachineOptions, deps: JunJanitorMachineDeps): JunJanitorMachine;
59
+ /** Estimated wall-clock cost of a chore, for logs and budget previews. */
60
+ export declare function junChoreDuration(chore: JunChore, rng: JunRng): number;