@bongos/core 1.21.182 → 1.22.2

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 (247) hide show
  1. package/.bongos-core.json +273 -248
  2. package/docs/copy-inventory.md +165 -165
  3. package/docs/copy-registry.json +184 -184
  4. package/docs/module-api-changelog.md +12 -0
  5. package/docs/page-inventory.json +35 -26
  6. package/docs/page-readings.json +389 -388
  7. package/modules/agents/lib/answer-hold.js +1 -1
  8. package/modules/agents/lib/fire-budget.js +1 -1
  9. package/modules/autonomy/cadence.js +3 -3
  10. package/modules/autonomy/config-idle.js +1 -1
  11. package/modules/autonomy/fence.js +1 -1
  12. package/modules/autonomy/gauge.js +2 -2
  13. package/modules/autonomy/governor-docket.js +0 -1
  14. package/modules/autonomy/server-schedule.js +1 -1
  15. package/modules/builder-settings/builder-needs.js +1 -3
  16. package/modules/builder-settings/event-sound-prefs.js +0 -1
  17. package/modules/builder-settings/law-locks.js +0 -1
  18. package/modules/builder-settings/model-alloc-prefs.js +0 -5
  19. package/modules/builder-settings/profile-nudge-prefs.js +0 -1
  20. package/modules/builder-settings/render-prefs.js +0 -1
  21. package/modules/builder-settings/skill-prefs.js +0 -2
  22. package/modules/builder-settings/sound-prefs.js +0 -3
  23. package/modules/builder-settings/wandering-prefs.js +0 -2
  24. package/modules/copy-desk/artist-stats.js +1 -1
  25. package/modules/copy-desk/flags.js +1 -1
  26. package/modules/copy-desk/guarded-lines.js +1 -1
  27. package/modules/copy-desk/page-status.js +0 -5
  28. package/modules/copy-desk/proposals.js +0 -2
  29. package/modules/copy-desk/registry.js +1 -1
  30. package/modules/copy-desk/stuck-tweaks.js +1 -1
  31. package/modules/economy/credits-by-craft.js +0 -2
  32. package/modules/economy/streak.js +0 -3
  33. package/modules/government/asks-db.js +1 -1
  34. package/modules/government/asks.js +0 -1
  35. package/modules/government/decision-board.js +0 -1
  36. package/modules/government/docket.js +0 -6
  37. package/modules/government/leads.js +0 -1
  38. package/modules/government/positions.js +1 -1
  39. package/modules/government/recommendations.js +0 -3
  40. package/modules/government/routing.js +1 -1
  41. package/modules/government/treasury-db.js +1 -1
  42. package/modules/government/treasury.js +2 -2
  43. package/modules/grading/grade-engine.js +0 -1
  44. package/modules/hall-ui/public/approval-queue.js +3 -3
  45. package/modules/hall-ui/public/atlas.html +2 -1
  46. package/modules/hall-ui/public/atlas.js +1 -1
  47. package/modules/hall-ui/public/blockers.html +3 -4
  48. package/modules/hall-ui/public/board-room.html +2 -2
  49. package/modules/hall-ui/public/brand-holes.js +3 -3
  50. package/modules/hall-ui/public/city.html +2 -1
  51. package/modules/hall-ui/public/collab.html +2 -2
  52. package/modules/hall-ui/public/commands.html +2 -2
  53. package/modules/hall-ui/public/commands.js +1 -2
  54. package/modules/hall-ui/public/copy-desk.html +2 -2
  55. package/modules/hall-ui/public/core-move-notice.js +1 -5
  56. package/modules/hall-ui/public/craft-mode.js +1 -5
  57. package/modules/hall-ui/public/criterion-uat-ui.js +3 -3
  58. package/modules/hall-ui/public/deploy.html +2 -2
  59. package/modules/hall-ui/public/diagrams.html +2 -1
  60. package/modules/hall-ui/public/dom-utils.js +15 -6
  61. package/modules/hall-ui/public/drachmae.html +2 -1
  62. package/modules/hall-ui/public/fleet-costs.js +3 -2
  63. package/modules/hall-ui/public/fleet.html +2 -2
  64. package/modules/hall-ui/public/founding-mark.js +1 -6
  65. package/modules/hall-ui/public/gate.html +2 -2
  66. package/modules/hall-ui/public/goal-map.html +2 -1
  67. package/modules/hall-ui/public/goals.html +2 -2
  68. package/modules/hall-ui/public/government.html +2 -2
  69. package/modules/hall-ui/public/hall-ask.js +3 -3
  70. package/modules/hall-ui/public/hall-kit.js +3 -5
  71. package/modules/hall-ui/public/hall-visual.js +3 -5
  72. package/modules/hall-ui/public/idea.html +2 -2
  73. package/modules/hall-ui/public/ideas.html +2 -2
  74. package/modules/hall-ui/public/index.html +2 -2
  75. package/modules/hall-ui/public/lightbulb.js +1 -5
  76. package/modules/hall-ui/public/md-reader.js +1 -8
  77. package/modules/hall-ui/public/modules.html +2 -2
  78. package/modules/hall-ui/public/my-agents.html +2 -2
  79. package/modules/hall-ui/public/my-agents.js +3 -1
  80. package/modules/hall-ui/public/page-notes.js +1 -5
  81. package/modules/hall-ui/public/paintbrush.js +1 -5
  82. package/modules/hall-ui/public/palette.js +1 -5
  83. package/modules/hall-ui/public/primer.html +2 -1
  84. package/modules/hall-ui/public/primer.js +1 -1
  85. package/modules/hall-ui/public/profile-crafts.js +3 -5
  86. package/modules/hall-ui/public/profile.html +2 -3
  87. package/modules/hall-ui/public/project-settings.html +2 -2
  88. package/modules/hall-ui/public/ranks.html +2 -3
  89. package/modules/hall-ui/public/roadmap.html +2 -2
  90. package/modules/hall-ui/public/roster.html +3 -4
  91. package/modules/hall-ui/public/sessions.html +2 -3
  92. package/modules/hall-ui/public/settings.html +2 -3
  93. package/modules/hall-ui/public/shell.js +1 -5
  94. package/modules/hall-ui/public/sky-data.js +1 -1
  95. package/modules/hall-ui/public/street.html +2 -1
  96. package/modules/hall-ui/public/studio.html +2 -2
  97. package/modules/hall-ui/public/task-detail.js +1 -6
  98. package/modules/hall-ui/public/task-lib.js +3 -8
  99. package/modules/hall-ui/public/task.html +2 -3
  100. package/modules/hall-ui/public/thinking.html +2 -1
  101. package/modules/hall-ui/public/tweak-editor.html +2 -2
  102. package/modules/hall-ui/public/vote-control.js +1 -1
  103. package/modules/hall-ui/public/watch.html +2 -3
  104. package/modules/hall-ui/public/welcome-boot.js +3 -5
  105. package/modules/hall-ui/public/work.html +2 -3
  106. package/modules/ideas/completeness.js +1 -1
  107. package/modules/ideas/descent.js +0 -1
  108. package/modules/ideas/governor-docket.js +0 -2
  109. package/modules/ideas/idea-state.js +0 -1
  110. package/modules/ideas/ideator-stats.js +1 -1
  111. package/modules/ideas/votes.js +1 -1
  112. package/modules/lifecycle/autopickup-files.js +0 -3
  113. package/modules/lifecycle/conflict-resolve.js +0 -1
  114. package/modules/lifecycle/criterion-uat-db.js +0 -4
  115. package/modules/lifecycle/dead-deps.js +2 -2
  116. package/modules/lifecycle/est-advisory.js +1 -1
  117. package/modules/lifecycle/goal-category.js +0 -3
  118. package/modules/lifecycle/goal-spec-task.js +1 -1
  119. package/modules/lifecycle/governor-docket.js +0 -1
  120. package/modules/lifecycle/kickoff-seed.js +1 -1
  121. package/modules/lifecycle/mingle.js +3 -3
  122. package/modules/lifecycle/page-tweak-claim.js +1 -1
  123. package/modules/lifecycle/rebase-gate.js +1 -1
  124. package/modules/lifecycle/removal-derivation.js +0 -1
  125. package/modules/lifecycle/routes/abandon-handler.js +1 -1
  126. package/modules/lifecycle/routes/version-route-authz.js +0 -1
  127. package/modules/lifecycle/ship-card.js +2 -5
  128. package/modules/lifecycle/ship-preflight.js +0 -1
  129. package/modules/lifecycle/sky.js +1 -1
  130. package/modules/lifecycle/task-classifier.js +0 -1
  131. package/modules/lifecycle/task-visuals.js +0 -2
  132. package/modules/lifecycle/version-close.js +0 -1
  133. package/modules/memory/memory.js +0 -1
  134. package/modules/memory/search-chunker.js +1 -1
  135. package/modules/memory/search.js +0 -3
  136. package/modules/npm-release/preview/divert.js +1 -1
  137. package/modules/npm-release/preview/proxy.js +2 -3
  138. package/modules/npm-release/preview/runtime.js +1 -1
  139. package/modules/npm-release/public/task-widget.js +1 -1
  140. package/modules/onboarding/founding-builders.js +1 -1
  141. package/modules/onboarding/founding-mode.js +1 -1
  142. package/modules/onboarding/howto-guide.js +1 -1
  143. package/modules/onboarding/howto-state.js +1 -1
  144. package/modules/onboarding/onboarding-state.js +0 -4
  145. package/modules/onboarding/onboarding.js +0 -6
  146. package/modules/page-notes/notes.js +0 -1
  147. package/modules/platform-identity/community-leaderboard.js +0 -1
  148. package/modules/platform-identity/hub-keys.js +0 -2
  149. package/modules/platform-identity/instance-feedback.js +0 -1
  150. package/modules/platform-identity/read-rate-limit.js +1 -1
  151. package/modules/platform-identity/routes/sso.js +1 -3
  152. package/modules/platform-identity/visibility-pull.js +0 -9
  153. package/modules/provisioning/app-status.js +1 -1
  154. package/modules/provisioning/catalog-bridge.js +0 -1
  155. package/modules/provisioning/core-upgrade.js +1 -1
  156. package/modules/provisioning/credential-preflight.js +1 -1
  157. package/modules/provisioning/demo.js +2 -2
  158. package/modules/provisioning/look.js +1 -1
  159. package/modules/provisioning/routes/callback-page.js +3 -7
  160. package/modules/public-landing/public/projects.html +3 -5
  161. package/modules/raise/raise.js +2 -2
  162. package/modules/render-deploy/deploys.js +1 -1
  163. package/modules/security/artifact-scan/aggregate.js +0 -4
  164. package/modules/security/artifact-scan/detectors/capabilities.js +1 -1
  165. package/modules/security/artifact-scan/detectors/config-obfuscation.js +1 -1
  166. package/modules/security/artifact-scan/detectors/credentials.js +1 -1
  167. package/modules/security/artifact-scan/detectors/dependencies.js +1 -1
  168. package/modules/security/artifact-scan/detectors/injection.js +1 -1
  169. package/modules/security/artifact-scan/detectors/network.js +1 -1
  170. package/modules/security/artifact-scan/detectors/npm-lifecycle.js +1 -1
  171. package/modules/security/artifact-scan/detectors/permissions.js +1 -1
  172. package/modules/security/artifact-scan/detectors/shared.js +0 -3
  173. package/modules/security/artifact-scan/floor.js +0 -3
  174. package/modules/security/artifact-scan/mirror.js +1 -1
  175. package/modules/security/artifact-scan/quarantine.js +0 -1
  176. package/modules/security/artifact-scan/rebuild-spec.js +0 -2
  177. package/modules/security/artifact-scan/report.js +1 -1
  178. package/modules/security/artifact-scan/sanitize.js +0 -2
  179. package/modules/security/secret-scrub.js +0 -4
  180. package/modules/security/security.js +0 -2
  181. package/modules/sessions/accessibility.js +0 -2
  182. package/modules/sessions/bfg.js +0 -4
  183. package/modules/sessions/upload-health.js +0 -3
  184. package/modules/specialities/db.js +1 -1
  185. package/modules/specialities/specialities.js +1 -1
  186. package/modules/ui-design/kit/lib.js +2 -2
  187. package/package-lock.json +2 -2
  188. package/package.json +1 -1
  189. package/release-notes.json +26 -12
  190. package/scripts/bongos/escape-helper-guard.js +147 -0
  191. package/scripts/bongos/fitness.js +3 -2
  192. package/scripts/bongos/key-card.js +1 -4
  193. package/scripts/bongos/review-sheet.js +1 -3
  194. package/scripts/bongos/start.js +1 -1
  195. package/scripts/bongos/status.js +1 -1
  196. package/scripts/gds/escape-helper-guard.js +6 -0
  197. package/scripts/status-mirror-sync.js +2 -3
  198. package/src/bongos/module-scope-map.js +1 -0
  199. package/src/bongos/platform-visibility-gate.js +2 -3
  200. package/src/bongos/prelaunch-gate.js +2 -3
  201. package/src/bongos/routes/auth.js +1 -5
  202. package/src/bongos/serve-internal.js +2 -6
  203. package/src/html-escape.js +26 -0
  204. package/src/module-api.js +9 -1
  205. package/tests/blockers_kit_pager.mjs +2 -2
  206. package/tests/blockers_page_ui.mjs +2 -2
  207. package/tests/core_move_notice.mjs +3 -1
  208. package/tests/core_update_banner.mjs +2 -0
  209. package/tests/core_upgrade_owner_door.mjs +2 -0
  210. package/tests/craft_mode.mjs +2 -0
  211. package/tests/craft_mode_nav.mjs +3 -0
  212. package/tests/craft_review_mode.mjs +3 -2
  213. package/tests/criterion_ref_status.mjs +7 -2
  214. package/tests/curve_kind_overlay.mjs +2 -1
  215. package/tests/founding_mode.mjs +10 -2
  216. package/tests/github_install_nudge.mjs +4 -1
  217. package/tests/goal_map_page.mjs +2 -2
  218. package/tests/hall_approval_queue.mjs +2 -2
  219. package/tests/hall_city.mjs +1 -1
  220. package/tests/hall_fullscreen.mjs +2 -0
  221. package/tests/hall_gov_real_site.mjs +2 -0
  222. package/tests/hall_kit_charts.mjs +2 -1
  223. package/tests/hall_my_agents.mjs +3 -2
  224. package/tests/hall_nav.mjs +2 -0
  225. package/tests/hall_palette.mjs +2 -2
  226. package/tests/hall_reading_world.mjs +3 -1
  227. package/tests/hall_reference_world.mjs +2 -1
  228. package/tests/hall_signout.mjs +2 -0
  229. package/tests/hall_street.mjs +1 -1
  230. package/tests/hall_studio_world.mjs +3 -1
  231. package/tests/hall_tweak_editor.mjs +2 -1
  232. package/tests/helpers.mjs +17 -2
  233. package/tests/html_escape.mjs +149 -0
  234. package/tests/lightbulb.mjs +2 -0
  235. package/tests/module_api.mjs +1 -0
  236. package/tests/module_store_howto.mjs +2 -1
  237. package/tests/modules_external_export_contract.mjs +48 -0
  238. package/tests/nav_permission_atoms.mjs +1 -1
  239. package/tests/npm_release_where.mjs +2 -1
  240. package/tests/page_notes_panel.mjs +4 -3
  241. package/tests/paintbrush.mjs +2 -1
  242. package/tests/profile_connections_ui.mjs +2 -1
  243. package/tests/profile_role_headline.mjs +2 -2
  244. package/tests/profile_role_tabs.mjs +2 -2
  245. package/tests/projects_hub_repo_private.mjs +4 -0
  246. package/tests/terms_acceptance.mjs +1 -0
  247. package/tests/welcome_boot_browser.mjs +1 -1
@@ -88,4 +88,4 @@ function createAnswerHold({ maxHeld = MAX_HELD, ttlMs = TTL_MS, now = () => Date
88
88
  };
89
89
  }
90
90
 
91
- module.exports = { createAnswerHold, MAX_HELD, TTL_MS };
91
+ module.exports = { createAnswerHold, TTL_MS };
@@ -106,4 +106,4 @@ function createFireBudget({
106
106
  };
107
107
  }
108
108
 
109
- module.exports = { createFireBudget, DEFAULT_LIMIT, DEFAULT_WINDOW_MS, MAX_TRACKED_BUILDERS };
109
+ module.exports = { createFireBudget, DEFAULT_LIMIT, MAX_TRACKED_BUILDERS };
@@ -342,7 +342,7 @@ function shouldJumpWait(before, after) {
342
342
  }
343
343
 
344
344
  module.exports = {
345
- CLASSES, COUNTS_AS_FAILURE, SYSTEMIC_MARKERS, DEFAULTS, START,
346
- looksSystemic, classifyEvent, nextCadence, signalFingerprint, shouldJumpWait,
347
- workerNeverRan, WORKER_RAN_FLOOR_S,
345
+ CLASSES, COUNTS_AS_FAILURE, DEFAULTS, START,
346
+ classifyEvent, nextCadence, signalFingerprint, shouldJumpWait,
347
+ workerNeverRan,
348
348
  };
@@ -188,5 +188,5 @@ function createNotifier({ post = null, channel = 'ship_news' } = {}) {
188
188
 
189
189
  module.exports = {
190
190
  GRACE_S, LONG_GRACE_S, CONFIG_IDLE,
191
- configIdleCode, trackIdle, idleEvent, markBeat, parseIdleEvent, pendingCode, noticeDecision, noticeText, createNotifier,
191
+ configIdleCode, trackIdle, idleEvent, markBeat, parseIdleEvent, pendingCode, noticeText, createNotifier,
192
192
  };
@@ -361,4 +361,4 @@ function decideTask({ task, goals = [], protectedHits = [] } = {}) {
361
361
  return { go: true, code: null, reason: null };
362
362
  }
363
363
 
364
- module.exports = { REFUSALS, HOST_ACCESS_PATTERNS, HOST_ACCESS_MIN_SIGNALS, normaliseFence, prioritise, allowedGoals, effectiveFence, decideRun, decideTask, needsHostAccess };
364
+ module.exports = { REFUSALS, normaliseFence, prioritise, allowedGoals, effectiveFence, decideRun, decideTask, needsHostAccess };
@@ -301,6 +301,6 @@ function decideCapacity({ gauge, now, config = {} } = {}) {
301
301
  }
302
302
 
303
303
  module.exports = {
304
- decideCapacity, readGauge, reserveFor, weeklyPace, whenPaceAllows, localHour,
305
- cfg, DEFAULT_CONFIG, WEEK_SECONDS, DEFAULT_STALE_AFTER_S,
304
+ decideCapacity, readGauge, reserveFor, weeklyPace, whenPaceAllows,
305
+ cfg, DEFAULT_CONFIG, DEFAULT_STALE_AFTER_S,
306
306
  };
@@ -288,5 +288,4 @@ module.exports = {
288
288
  runningFloor,
289
289
  spendingLimitFloor,
290
290
  reportsFloor,
291
- fenceHistory,
292
291
  };
@@ -34,4 +34,4 @@ function periodMs(routine) {
34
34
  return CADENCE_MS[row.cadence];
35
35
  }
36
36
 
37
- module.exports = { SERVER_ROUTINES, CADENCE_MS, periodMs, DAY_MS, WEEK_MS };
37
+ module.exports = { SERVER_ROUTINES, periodMs, DAY_MS, WEEK_MS };
@@ -385,9 +385,7 @@ module.exports = {
385
385
  computeNeeds,
386
386
  // exported for tests / direct reuse
387
387
  artKeyNeed,
388
- helpRequestsNeed, taskRecommendationsNeed, boardVotesNeed, mingleIntroductionsNeed, stuckPageTweakNeeds,
389
- foundingGraceActive,
388
+ helpRequestsNeed, taskRecommendationsNeed, boardVotesNeed, mingleIntroductionsNeed,
390
389
  FOUNDING_GRACE_DAYS,
391
- SETTINGS_PATH,
392
390
  NEED_PRIORITY,
393
391
  };
@@ -169,7 +169,6 @@ module.exports = {
169
169
  EVENT_DEFAULT,
170
170
  KNOWN_EVENT_IDS,
171
171
  KNOWN_VARIANT_IDS,
172
- EVENT_VARIANTS,
173
172
  resolveVariant,
174
173
  resolveWav,
175
174
  listEffective,
@@ -194,7 +194,6 @@ function locksFor(route, locks) {
194
194
 
195
195
  module.exports = {
196
196
  settingSpec,
197
- locksOf,
198
197
  lockedPrefs,
199
198
  checkPatch,
200
199
  describe,
@@ -133,14 +133,9 @@ module.exports = {
133
133
  RESERVED_KEY,
134
134
  ALLOWED_TIERS,
135
135
  SLOTS,
136
- SLOT_KEYS,
137
- isValidTier,
138
- codeDefaults,
139
136
  storedOverride,
140
- instanceDefault,
141
137
  effectiveAllocation,
142
138
  contractFor,
143
- slotCatalog,
144
139
  describeForApi,
145
140
  validatePatch,
146
141
  applyPatch,
@@ -115,7 +115,6 @@ function applyPatch(existing, patch) {
115
115
  module.exports = {
116
116
  RESERVED_KEY,
117
117
  DEFAULT_DISMISSED,
118
- overrideDismissed,
119
118
  nudgeDismissed,
120
119
  missingProfileFields,
121
120
  shouldNudge,
@@ -328,7 +328,6 @@ module.exports = {
328
328
  DEFAULT_ENABLED,
329
329
  LEVELS,
330
330
  // the ladder
331
- isLevel,
332
331
  levelRank,
333
332
  showsCard,
334
333
  showsWidget,
@@ -187,8 +187,6 @@ module.exports = {
187
187
  ALLOWED_MODELS,
188
188
  KNOWN_SKILLS,
189
189
  SKILL_DEFAULTS,
190
- isAllowedModel,
191
- isKnownSkill,
192
190
  getForBuilder,
193
191
  listEffective,
194
192
  validatePatch,
@@ -165,14 +165,11 @@ module.exports = {
165
165
  KNOWN_SOUNDS,
166
166
  SOUND_META,
167
167
  SOUND_DEFAULTS,
168
- VOLUME_KEY,
169
- VOLUME_DEFAULT,
170
168
  isKnownSound,
171
169
  getForBuilder,
172
170
  listEffective,
173
171
  effectiveMap,
174
172
  getVolume,
175
- clampVolume,
176
173
  validatePatch,
177
174
  applyPatch,
178
175
  };
@@ -302,12 +302,10 @@ function applyPatch(existing, patch) {
302
302
  module.exports = {
303
303
  LEVELS,
304
304
  LEVEL_META,
305
- LEVEL_CONTRACT,
306
305
  RANK_WANDERING,
307
306
  rankWandering,
308
307
  RANK_DEFAULT,
309
308
  RANK_MAX,
310
- TOP_LEVEL,
311
309
  RESERVED_KEY,
312
310
  isLevelInt,
313
311
  levelKey,
@@ -67,4 +67,4 @@ async function readArtistPages(builderId, { limit = 10, offset = 0 } = {}) {
67
67
  return { rows: all.slice(offset, offset + limit), total: all.length, inventory_known: !!inv.ok };
68
68
  }
69
69
 
70
- module.exports = { tallyCreditRows, readArtistStats, readArtistPages, TALLY_ROW_CAP };
70
+ module.exports = { tallyCreditRows, readArtistStats, readArtistPages };
@@ -326,7 +326,7 @@ async function resolvePageAsks({ pageId, taskId, resolvedBy, shippedAt }) {
326
326
  }
327
327
 
328
328
  module.exports = {
329
- SCOPES, FLAG_SCOPES, PAGE_SCOPE, STATUSES, KINDS, CLOSING_STATUSES, MIN_REASON_CHARS, MAX_REASON_CHARS, MAX_NOTE_CHARS,
329
+ SCOPES, FLAG_SCOPES, STATUSES, KINDS, CLOSING_STATUSES, MIN_REASON_CHARS, MAX_REASON_CHARS, MAX_NOTE_CHARS,
330
330
  tidy, normalizeFlagPayload, normalizeResolution, normalizePageAsk,
331
331
  insertFlag, listFlags, getFlag, closeFlag,
332
332
  findOpenPageAsk, countPageAskers, pageAskSummary, resolvePageAsks,
@@ -86,4 +86,4 @@ function checkList(readings, list = loadList()) {
86
86
  // Test seam: a fixture list for the route-level tests; null goes back to the file.
87
87
  function _setList(list) { cached = list; }
88
88
 
89
- module.exports = { _setList, LIST_PATH, loadList, guardsFor, guardForLine, guardWarnings, checkList, missingPhrases };
89
+ module.exports = { _setList, loadList, guardForLine, guardWarnings, checkList };
@@ -943,19 +943,14 @@ module.exports = {
943
943
  composeEditor,
944
944
  TALLY_REASON_PREFIX,
945
945
  NEXT_ALTERNATIVES,
946
- NEXT_TIERS,
947
946
  composeNext,
948
- SURFACE_ORDER,
949
- SURFACE_LABELS,
950
947
  STATUS,
951
948
  indexRounds,
952
949
  countsFor,
953
950
  driftFor,
954
951
  roundState,
955
- changelogFor,
956
952
  composePages,
957
953
  textLinesOf,
958
- WORST_PAGES,
959
954
  composePage,
960
955
  lastRoundShippedAt,
961
956
  composeTally,
@@ -273,11 +273,9 @@ function resolveTargetVersion(versions) {
273
273
  }
274
274
 
275
275
  module.exports = {
276
- PROPOSAL_SCHEMA,
277
276
  resolveTargetVersion,
278
277
  FENCE,
279
278
  PLACEHOLDER,
280
- MIN_WHY_CHARS,
281
279
  MAX_WHY_CHARS,
282
280
  MAX_TEXT_CHARS,
283
281
  tidy,
@@ -310,7 +310,7 @@ function composeQueue({ registry, index, flags, allFlags }) {
310
310
  }
311
311
 
312
312
  module.exports = {
313
- REGISTRY_REL, REGISTRY_ABS, GENERATOR_CMD,
313
+ REGISTRY_REL,
314
314
  loadRegistry, _resetCache,
315
315
  indexRegistry, hasSurface, occurrencesOf, snapshotFor, searchEntries,
316
316
  annotateFlag, duplicateCandidates, composeQueue,
@@ -76,4 +76,4 @@ async function runDigest({ nowMs = Date.now(), state, post, readStuckImpl = read
76
76
  return { posted: !!(r && r.posted), reason: r && r.reason, text };
77
77
  }
78
78
 
79
- module.exports = { DIGEST_CHANNEL, DIGEST_HOUR_UTC, CACHE_MS, readStuck, readStuckCached, readStuckFor, digestDue, runDigest, _resetCache };
79
+ module.exports = { CACHE_MS, readStuckCached, readStuckFor, runDigest, _resetCache };
@@ -199,10 +199,8 @@ module.exports = {
199
199
  creditsByCraft,
200
200
  foldCraftRows,
201
201
  apportion,
202
- craftOfDiscipline,
203
202
  craftForPreference,
204
203
  earnedCrafts,
205
204
  CRAFTS,
206
- DISCIPLINE_CRAFT,
207
205
  CREDITS_BY_CRAFT_SQL,
208
206
  };
@@ -316,10 +316,7 @@ module.exports = {
316
316
  computeStreak,
317
317
  wouldExtendStreak,
318
318
  streakPreviewsForTasks,
319
- previewFromStreak,
320
319
  // Exported for testing
321
320
  qualifyingShipDays,
322
- todayInBuilderTz,
323
- ymdToOrdinal,
324
321
  computeRunsFromShipDays,
325
322
  };
@@ -87,4 +87,4 @@ async function unclearFor(matterIds) {
87
87
  return out;
88
88
  }
89
89
 
90
- module.exports = { saveAsk, asksFor, flagUnclear, unclearFor, MAX_READ };
90
+ module.exports = { saveAsk, asksFor, flagUnclear, unclearFor };
@@ -256,7 +256,6 @@ module.exports = {
256
256
  CAPS,
257
257
  BUILDINGS,
258
258
  SEAT,
259
- MATTER_ID,
260
259
  ASK_REQUIRED_MESSAGE,
261
260
  checkAsk,
262
261
  refusalLine,
@@ -607,7 +607,6 @@ module.exports = {
607
607
  validateMatterAction,
608
608
  matterActFor,
609
609
  MATTER_ACTIONS,
610
- MATTER_ACT_POINT,
611
610
  openMatter,
612
611
  checkActAlone,
613
612
  leadsView,
@@ -913,23 +913,17 @@ module.exports = {
913
913
  EXPECTED_SOURCES,
914
914
  COMING_SOURCES,
915
915
  COMING_FLOORS,
916
- SOURCE_TIMEOUT_MS,
917
- normalizeFloor,
918
- normalizeHistory,
919
916
  normalizeActs,
920
917
  normalizeDeskRow,
921
918
  loadGovernment,
922
- SETTLED_WINDOW_MS,
923
919
  normalizeMatter,
924
920
  gateAllows,
925
- compareMatters,
926
921
  homeLine,
927
922
  boardMatter,
928
923
  fairnessReading,
929
924
  registeredContributions,
930
925
  buildDocket,
931
926
  docketFor,
932
- attachAsks,
933
927
  findMatter,
934
928
  findMatterFor,
935
929
  loadSeats,
@@ -161,7 +161,6 @@ function leadsView(rows, archons, { includePast = false, rights = null, structur
161
161
  module.exports = {
162
162
  CHARTER_MAX,
163
163
  DEFAULT_CHARTERS,
164
- LEAD_ACTS,
165
164
  isLeadAct,
166
165
  charterLine,
167
166
  answerFor,
@@ -104,4 +104,4 @@ async function readPositions(builderId, reads) {
104
104
  }
105
105
  }
106
106
 
107
- module.exports = { positionsOf, readPositions, titleOf, KINDS, KIND_ORDER };
107
+ module.exports = { positionsOf, readPositions, titleOf, KINDS };
@@ -222,11 +222,8 @@ function recommendationsFor({ type, headcount } = {}) {
222
222
 
223
223
  module.exports = {
224
224
  PROJECT_TYPES,
225
- SIZE_BANDS,
226
225
  JOB_GRANTS,
227
- JOB_NAMES,
228
226
  JOB_CAN,
229
- normalizeType,
230
227
  sizeBandFor,
231
228
  recommendedCharter,
232
229
  recommendedRankSet,
@@ -151,4 +151,4 @@ function passRefusal(matter, viewerId, toSeat, ctx, now = Date.now()) {
151
151
  return null;
152
152
  }
153
153
 
154
- module.exports = { seatOf, seatLabel, resolveSeat, routeMatter, routeAll, passRefusal, BUILDING_NAMES };
154
+ module.exports = { seatOf, resolveSeat, routeMatter, routeAll, passRefusal, BUILDING_NAMES };
@@ -163,4 +163,4 @@ async function openBorrowRows() {
163
163
  return rows.map((r) => ({ row: r, ask: stored.get(treasury.matterId(r.id)) || null }));
164
164
  }
165
165
 
166
- module.exports = { readSpend, listPots, listOpenGoals, listBorrows, getBorrow, readCap, readTreasury, setPot, goalById, fileBorrows, answerBorrow, openBorrowRows };
166
+ module.exports = { getBorrow, readTreasury, setPot, goalById, fileBorrows, answerBorrow, openBorrowRows };
@@ -235,7 +235,7 @@ function borrowMatter(borrow, { title, canAnswer = false } = {}) {
235
235
  }
236
236
 
237
237
  module.exports = {
238
- MATTER_SOURCE, SEAT, ROUND_USD, MAX_BUDGET_USD, ANSWERS, ACT_KEY,
239
- monthKey, prevMonth, monthGone, parseBudget, capView, borrowAmount, needsBorrow,
238
+ MATTER_SOURCE, SEAT, MAX_BUDGET_USD, ANSWERS,
239
+ monthKey, prevMonth, parseBudget, borrowAmount, needsBorrow,
240
240
  buildTreasury, borrowView, matterId, goalName, borrowAsk, answerOf, borrowMatter,
241
241
  };
@@ -256,7 +256,6 @@ function replayRecorded({ signals, workType } = {}) {
256
256
 
257
257
  module.exports = {
258
258
  PIPELINE_STAGES,
259
- WORK_TYPE_PORT_PREFIX,
260
259
  applyDeterministicGate,
261
260
  listWorkTypes,
262
261
  registerWorkType,
@@ -32,9 +32,9 @@
32
32
  // chip (brand-holes.js, task 1004381). Escaped text when it is not loaded.
33
33
  const H = window.OTBBrandHoles || null;
34
34
 
35
- function esc(s) {
36
- return String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
37
- }
35
+ // The shared escaper, window.OTB (dom-utils.js, task 1004876). Browser-only: this
36
+ // file reads window at the top of its IIFE, so it never loads under plain Node.
37
+ function esc(s) { return window.OTB.escapeHtml(s); }
38
38
 
39
39
  function errWords(data, fallback) {
40
40
  const e = data && data.error;
@@ -89,9 +89,10 @@
89
89
 
90
90
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
91
91
 
92
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
92
93
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
93
94
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
94
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
95
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
95
96
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
96
97
  <script src="/builders/palette.js" defer></script>
97
98
  <script src="/builders/atlas.js?v=2026-09-02-index" defer></script>
@@ -290,7 +290,7 @@
290
290
  if (conns.length) html += '<div class="ab-prow">Connects to</div><div class="ab-chips">' + conns.map(function (cc) { return '<button type="button" class="fact-chip ab-jump" data-node="' + esc(cc.id) + '">' + esc(cc.label) + '</button>'; }).join('') + '</div>';
291
291
  return html;
292
292
  }
293
- function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]; }); }
293
+ function esc(s) { return window.OTB.escapeHtml(s); }
294
294
 
295
295
  function openPopup(n, g) {
296
296
  selected = n.id; lightNode(n.id);
@@ -51,14 +51,13 @@
51
51
 
52
52
  <!-- The app shell (sidebar + top bar). Dependency-free; loaded FIRST so the
53
53
  chrome exists before the page script runs. -->
54
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
54
55
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
55
56
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
56
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
57
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
57
58
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
58
59
  <script src="/builders/palette.js" defer></script>
59
- <!-- shared frontend toolkit (window.OTB — rank labels, number formats) + the
60
- branding pack's currency label, loaded BEFORE blockers.js. -->
61
- <script src="/builders/dom-utils.js?v=2026-06-14-domutils"></script>
60
+ <!-- the branding pack's currency label, loaded BEFORE blockers.js. -->
62
61
  <script src="/builders/brand-apply.js"></script>
63
62
  <script src="/builders/hall-kit.js"></script>
64
63
  <!-- task-detail.js still owns the #/blocker/N deep-link overlay every row's
@@ -58,12 +58,12 @@
58
58
 
59
59
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
60
60
 
61
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
61
62
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
62
63
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
63
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
64
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
64
65
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
65
66
  <script src="/builders/palette.js" defer></script>
66
- <script src="/builders/dom-utils.js?v=2026-06-16-board"></script>
67
67
  <script src="/builders/hall-kit.js"></script>
68
68
  <!-- task 1003761: the vocabulary this page and /government both speak. Must load
69
69
  BEFORE board-room.js, which destructures window.OTBBoardLib at IIFE entry. -->
@@ -26,9 +26,9 @@
26
26
 
27
27
  const HOLE_RE = /\{\{([A-Za-z][A-Za-z0-9_]*)\}\}/g;
28
28
 
29
- function esc(s) {
30
- return String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
31
- }
29
+ // The shared escaper: window.OTB in the page; under Node (this file is also require()d as a
30
+ // CommonJS lib — see its module.exports and its tests) dom-utils.js's own export (task 1004876).
31
+ function esc(s) { return (typeof window !== 'undefined' ? window.OTB : require('./dom-utils.js')).escapeHtml(s); }
32
32
 
33
33
  function splitHoles(text) {
34
34
  const s = String(text == null ? '' : text);
@@ -105,9 +105,10 @@
105
105
  </div>
106
106
  </div>
107
107
 
108
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
108
109
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
109
110
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
110
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
111
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
111
112
  <script src="/builders/palette.js" defer></script>
112
113
  <script src="/builders/gov-living.js?v=2026-10-09-positions1"></script>
113
114
  <script src="/builders/gov-feeds.js?v=2026-10-09-living3"></script>
@@ -148,11 +148,11 @@
148
148
 
149
149
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
150
150
 
151
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
151
152
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
152
153
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
153
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
154
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
154
155
  <script src="/builders/palette.js" defer></script>
155
- <script src="/builders/dom-utils.js?v=2026-06-23-contrib"></script>
156
156
  <script src="/builders/collab-lib.js?v=2026-09-24-archive"></script>
157
157
  <script src="/builders/collab.js?v=2026-09-24-archive"></script>
158
158
  </body>
@@ -51,12 +51,12 @@
51
51
 
52
52
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
53
53
 
54
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
54
55
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
55
56
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
56
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
57
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
57
58
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
58
59
  <script src="/builders/palette.js" defer></script>
59
- <script src="/builders/dom-utils.js?v=2026-06-14-domutils"></script>
60
60
  <script src="/builders/hall-kit.js"></script>
61
61
  <script src="/builders/commands-lib.js"></script>
62
62
  <script src="/builders/commands.js"></script>
@@ -14,8 +14,7 @@
14
14
  'use strict';
15
15
 
16
16
  const lib = window.OTBCommandsLib;
17
- const esc = (window.OTBKit && window.OTBKit.esc) || ((s) => String(s == null ? '' : s)
18
- .replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;'));
17
+ const esc = (s) => window.OTB.escapeHtml(s);
19
18
 
20
19
  async function getJson(url) {
21
20
  const r = await fetch(url, { credentials: 'same-origin' });
@@ -177,11 +177,11 @@
177
177
 
178
178
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
179
179
 
180
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
180
181
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
181
182
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
182
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
183
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
183
184
  <script src="/builders/palette.js" defer></script>
184
- <script src="/builders/dom-utils.js?v=2026-06-23-contrib"></script>
185
185
  <script src="/builders/hall-kit.js"></script>
186
186
  <script src="/builders/copy-desk.js?v=2026-09-01-redesign"></script>
187
187
  </body>
@@ -18,11 +18,7 @@
18
18
  'use strict';
19
19
 
20
20
  var SEEN_KEY = 'bongos.coreMove.seen';
21
- function esc(s) {
22
- return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
23
- return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c];
24
- });
25
- }
21
+ function esc(s) { return window.OTB.escapeHtml(s); }
26
22
 
27
23
  /** Draw the notice under the top bar. `opts.api` is shell.js's client; `opts.href` Settings. */
28
24
  function render(moved, opts) {
@@ -509,11 +509,7 @@
509
509
  // localStorage: the mode to keep when "Ask me again next session" is unticked.
510
510
  var KEEP_KEY = 'hall-craft-keep';
511
511
 
512
- function esc(s) {
513
- return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
514
- return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c];
515
- });
516
- }
512
+ function esc(s) { return window.OTB.escapeHtml(s); }
517
513
  function icon(id, cls) {
518
514
  return '<svg class="' + cls + '" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">' + ICONS[id] + '</svg>';
519
515
  }
@@ -43,9 +43,9 @@
43
43
  const MAX_BYTES = 100 * 1024 * 1024;
44
44
  const TYPES = ['video/mp4', 'video/webm'];
45
45
 
46
- function esc(s) {
47
- return String(s == null ? '' : s).replace(/[&<>"']/g, (ch) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[ch]));
48
- }
46
+ // The shared escaper: window.OTB in the page; under Node (this file is also require()d as a
47
+ // CommonJS lib — see its module.exports and its tests) dom-utils.js's own export (task 1004876).
48
+ function esc(s) { return (typeof window !== 'undefined' ? window.OTB : require('./dom-utils.js')).escapeHtml(s); }
49
49
 
50
50
  // The state a row reads as. A server older than the UAT rule sends no
51
51
  // uat_state; then satisfied/open is the whole truth and no UAT control shows.
@@ -76,11 +76,11 @@
76
76
 
77
77
  <div id="toast" class="toast" role="status" aria-live="polite" data-visible="0"></div>
78
78
 
79
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
79
80
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
80
81
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
81
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
82
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
82
83
  <script src="/builders/palette.js" defer></script>
83
- <script src="/builders/dom-utils.js?v=2026-06-16-gate"></script>
84
84
  <script src="/builders/hall-kit.js"></script>
85
85
  <!-- the shared ask card the move is drawn with (task 1004829) -->
86
86
  <script src="/builders/hall-ask.js"></script>
@@ -94,9 +94,10 @@
94
94
 
95
95
  <!-- The app shell (sidebar + top bar + footer). Dependency-free; runs at parse
96
96
  time so the chrome exists before the deferred page scripts execute. -->
97
+ <script src="/builders/dom-utils.js?v=2026-10-25-escape"></script>
97
98
  <script src="/builders/shell-trail.js?v=2026-10-08-city-tab"></script>
98
99
  <script src="/builders/craft-mode.js?v=2026-10-09-living3"></script>
99
- <script src="/builders/shell.js?v=2026-10-25-autobongos"></script>
100
+ <script src="/builders/shell.js?v=2026-10-25-escape"></script>
100
101
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
101
102
  <script src="/builders/palette.js" defer></script>
102
103
  <script src="/builders/diagram-viewer.js?v=2026-06-14-diagviewer-1" defer></script>