@bongos/core 1.22.1 → 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 (121) hide show
  1. package/.bongos-core.json +131 -126
  2. package/docs/module-api-changelog.md +2 -0
  3. package/modules/agents/lib/answer-hold.js +1 -1
  4. package/modules/agents/lib/fire-budget.js +1 -1
  5. package/modules/autonomy/cadence.js +3 -3
  6. package/modules/autonomy/config-idle.js +1 -1
  7. package/modules/autonomy/fence.js +1 -1
  8. package/modules/autonomy/gauge.js +2 -2
  9. package/modules/autonomy/governor-docket.js +0 -1
  10. package/modules/autonomy/server-schedule.js +1 -1
  11. package/modules/builder-settings/builder-needs.js +1 -3
  12. package/modules/builder-settings/event-sound-prefs.js +0 -1
  13. package/modules/builder-settings/law-locks.js +0 -1
  14. package/modules/builder-settings/model-alloc-prefs.js +0 -5
  15. package/modules/builder-settings/profile-nudge-prefs.js +0 -1
  16. package/modules/builder-settings/render-prefs.js +0 -1
  17. package/modules/builder-settings/skill-prefs.js +0 -2
  18. package/modules/builder-settings/sound-prefs.js +0 -3
  19. package/modules/builder-settings/wandering-prefs.js +0 -2
  20. package/modules/copy-desk/artist-stats.js +1 -1
  21. package/modules/copy-desk/flags.js +1 -1
  22. package/modules/copy-desk/guarded-lines.js +1 -1
  23. package/modules/copy-desk/page-status.js +0 -5
  24. package/modules/copy-desk/proposals.js +0 -2
  25. package/modules/copy-desk/registry.js +1 -1
  26. package/modules/copy-desk/stuck-tweaks.js +1 -1
  27. package/modules/economy/credits-by-craft.js +0 -2
  28. package/modules/economy/streak.js +0 -3
  29. package/modules/government/asks-db.js +1 -1
  30. package/modules/government/asks.js +0 -1
  31. package/modules/government/decision-board.js +0 -1
  32. package/modules/government/docket.js +0 -6
  33. package/modules/government/leads.js +0 -1
  34. package/modules/government/positions.js +1 -1
  35. package/modules/government/recommendations.js +0 -3
  36. package/modules/government/routing.js +1 -1
  37. package/modules/government/treasury-db.js +1 -1
  38. package/modules/government/treasury.js +2 -2
  39. package/modules/grading/grade-engine.js +0 -1
  40. package/modules/ideas/completeness.js +1 -1
  41. package/modules/ideas/descent.js +0 -1
  42. package/modules/ideas/governor-docket.js +0 -2
  43. package/modules/ideas/idea-state.js +0 -1
  44. package/modules/ideas/ideator-stats.js +1 -1
  45. package/modules/ideas/votes.js +1 -1
  46. package/modules/lifecycle/autopickup-files.js +0 -3
  47. package/modules/lifecycle/conflict-resolve.js +0 -1
  48. package/modules/lifecycle/criterion-uat-db.js +0 -4
  49. package/modules/lifecycle/dead-deps.js +2 -2
  50. package/modules/lifecycle/est-advisory.js +1 -1
  51. package/modules/lifecycle/goal-category.js +0 -3
  52. package/modules/lifecycle/goal-spec-task.js +1 -1
  53. package/modules/lifecycle/governor-docket.js +0 -1
  54. package/modules/lifecycle/kickoff-seed.js +1 -1
  55. package/modules/lifecycle/mingle.js +3 -3
  56. package/modules/lifecycle/page-tweak-claim.js +1 -1
  57. package/modules/lifecycle/rebase-gate.js +1 -1
  58. package/modules/lifecycle/removal-derivation.js +0 -1
  59. package/modules/lifecycle/routes/abandon-handler.js +1 -1
  60. package/modules/lifecycle/routes/version-route-authz.js +0 -1
  61. package/modules/lifecycle/ship-card.js +1 -1
  62. package/modules/lifecycle/ship-preflight.js +0 -1
  63. package/modules/lifecycle/sky.js +1 -1
  64. package/modules/lifecycle/task-classifier.js +0 -1
  65. package/modules/lifecycle/task-visuals.js +0 -2
  66. package/modules/lifecycle/version-close.js +0 -1
  67. package/modules/memory/memory.js +0 -1
  68. package/modules/memory/search-chunker.js +1 -1
  69. package/modules/memory/search.js +0 -3
  70. package/modules/npm-release/preview/divert.js +1 -1
  71. package/modules/npm-release/preview/runtime.js +1 -1
  72. package/modules/onboarding/founding-builders.js +1 -1
  73. package/modules/onboarding/founding-mode.js +1 -1
  74. package/modules/onboarding/howto-guide.js +1 -1
  75. package/modules/onboarding/howto-state.js +1 -1
  76. package/modules/onboarding/onboarding-state.js +0 -4
  77. package/modules/onboarding/onboarding.js +0 -6
  78. package/modules/page-notes/notes.js +0 -1
  79. package/modules/platform-identity/community-leaderboard.js +0 -1
  80. package/modules/platform-identity/hub-keys.js +0 -2
  81. package/modules/platform-identity/instance-feedback.js +0 -1
  82. package/modules/platform-identity/read-rate-limit.js +1 -1
  83. package/modules/platform-identity/visibility-pull.js +0 -9
  84. package/modules/provisioning/app-status.js +1 -1
  85. package/modules/provisioning/catalog-bridge.js +0 -1
  86. package/modules/provisioning/core-upgrade.js +1 -1
  87. package/modules/provisioning/credential-preflight.js +1 -1
  88. package/modules/provisioning/demo.js +2 -2
  89. package/modules/provisioning/look.js +1 -1
  90. package/modules/provisioning/routes/callback-page.js +1 -1
  91. package/modules/raise/raise.js +1 -1
  92. package/modules/render-deploy/deploys.js +1 -1
  93. package/modules/security/artifact-scan/aggregate.js +0 -4
  94. package/modules/security/artifact-scan/detectors/capabilities.js +1 -1
  95. package/modules/security/artifact-scan/detectors/config-obfuscation.js +1 -1
  96. package/modules/security/artifact-scan/detectors/credentials.js +1 -1
  97. package/modules/security/artifact-scan/detectors/dependencies.js +1 -1
  98. package/modules/security/artifact-scan/detectors/injection.js +1 -1
  99. package/modules/security/artifact-scan/detectors/network.js +1 -1
  100. package/modules/security/artifact-scan/detectors/npm-lifecycle.js +1 -1
  101. package/modules/security/artifact-scan/detectors/permissions.js +1 -1
  102. package/modules/security/artifact-scan/detectors/shared.js +0 -3
  103. package/modules/security/artifact-scan/floor.js +0 -3
  104. package/modules/security/artifact-scan/mirror.js +1 -1
  105. package/modules/security/artifact-scan/quarantine.js +0 -1
  106. package/modules/security/artifact-scan/rebuild-spec.js +0 -2
  107. package/modules/security/artifact-scan/report.js +1 -1
  108. package/modules/security/artifact-scan/sanitize.js +0 -2
  109. package/modules/security/secret-scrub.js +0 -4
  110. package/modules/security/security.js +0 -2
  111. package/modules/sessions/accessibility.js +0 -2
  112. package/modules/sessions/bfg.js +0 -4
  113. package/modules/sessions/upload-health.js +0 -3
  114. package/modules/specialities/db.js +1 -1
  115. package/modules/specialities/specialities.js +1 -1
  116. package/modules/ui-design/kit/lib.js +2 -2
  117. package/package-lock.json +2 -2
  118. package/package.json +1 -1
  119. package/release-notes.json +6 -0
  120. package/src/module-api.js +1 -1
  121. package/tests/modules_external_export_contract.mjs +48 -0
@@ -101,7 +101,6 @@ async function getCloseSuggestionsForBuildingVersions() {
101
101
  }
102
102
 
103
103
  module.exports = {
104
- PERCENT_GATE,
105
104
  suggestClose,
106
105
  getCloseSuggestionsForBuildingVersions,
107
106
  };
@@ -568,5 +568,4 @@ module.exports = {
568
568
  assertBfgPath,
569
569
  isReservedNamespacePath,
570
570
  BFG_NAMESPACE_PREFIX,
571
- BFG_KINDS,
572
571
  };
@@ -275,4 +275,4 @@ function chunkMarkdown({ path, content, maxTokens = DEFAULT_MAX_TOKENS, targetTo
275
275
  return { path: path || null, title, frontmatter: frontmatter || null, chunks };
276
276
  }
277
277
 
278
- module.exports = { chunkMarkdown, parseFrontMatter, estTokens, fileLabel, stripPrivate, sanitizeForText, PG_INVALID_TEXT_RE, DEFAULT_TARGET_TOKENS, DEFAULT_MAX_TOKENS };
278
+ module.exports = { chunkMarkdown, parseFrontMatter, estTokens, stripPrivate, sanitizeForText };
@@ -581,8 +581,5 @@ module.exports = {
581
581
  RANK_LADDER,
582
582
  DEFAULT_LIMIT,
583
583
  MAX_LIMIT,
584
- RRF_K,
585
584
  TRGM_THRESHOLD,
586
- USEFULNESS_WEIGHT,
587
- USEFULNESS_SCALE,
588
585
  };
@@ -102,4 +102,4 @@ function createDivert({ supervisor, forward, requireBuilder, requirePermission }
102
102
  };
103
103
  }
104
104
 
105
- module.exports = { createDivert, cookieVersion, clearCookie, setCookie, AUTH_PATH, PREVIEW_PATH };
105
+ module.exports = { createDivert, cookieVersion, clearCookie, setCookie, AUTH_PATH };
@@ -114,4 +114,4 @@ function createRuntime({ liveDb, log, env = process.env, instanceRoot = null } =
114
114
  return supervisor;
115
115
  }
116
116
 
117
- module.exports = { createRuntime, runCommand, probeHealth };
117
+ module.exports = { createRuntime, probeHealth };
@@ -124,4 +124,4 @@ async function foundingBuildersFor(deps = {}) {
124
124
  }
125
125
  }
126
126
 
127
- module.exports = { stageAt, shapeFoundingBuilders, foundingBuildersFor, MAX_MARKS };
127
+ module.exports = { stageAt, shapeFoundingBuilders, foundingBuildersFor };
@@ -204,6 +204,6 @@ async function setFoundingMode({ active, stage } = {}, builderId = null, deps =
204
204
 
205
205
  module.exports = {
206
206
  STAGES, WAKES, WAKES_WHEN_ALIVE, KEYS, stageAtKey,
207
- parseActive, asleepRooms, dayOf, shapeFoundingMode, waitingOnFromGovernment,
207
+ dayOf, shapeFoundingMode, waitingOnFromGovernment,
208
208
  foundingModeFor, setFoundingMode,
209
209
  };
@@ -262,4 +262,4 @@ if (require.main === module) {
262
262
  }
263
263
  }
264
264
 
265
- module.exports = { MOMENTS, STEPS, MOMENT_IDS, stepById, stepsForMoment, nextUnread, formatStep, formatGuide };
265
+ module.exports = { MOMENTS, STEPS, MOMENT_IDS, stepById, stepsForMoment, nextUnread, formatGuide };
@@ -105,4 +105,4 @@ async function reset(builderId, { steps, all = false } = {}, deps = {}) {
105
105
  return { ok: true, state: await readState(builderId, deps) };
106
106
  }
107
107
 
108
- module.exports = { HOWS, checkSteps, shapeState, readState, markRead, reset };
108
+ module.exports = { shapeState, readState, markRead, reset };
@@ -495,12 +495,8 @@ module.exports = {
495
495
  GRADUATED,
496
496
  ALL_STAGES,
497
497
  PRE_AUTH_STEP,
498
- SHIP_GRADUATION_TARGET,
499
- STAGE_LABELS,
500
498
  STAGE_HINTS,
501
- DISPLAY_STEPS,
502
499
  DISPLAY_LABELS,
503
- DISPLAY_HINTS,
504
500
  isKnownStage,
505
501
  nextStage,
506
502
  hasCleared,
@@ -489,20 +489,14 @@ function buildIdeaPayload({ sessionMeta = {}, analysis, signals = {} }) {
489
489
 
490
490
  module.exports = {
491
491
  ONBOARDING_FRICTION_TAG,
492
- ONBOARDING_FRICTION_KIND,
493
492
  // parsing
494
493
  parseTranscript,
495
- stripMachineNoise,
496
494
  // signals
497
495
  detectFrictionSignals,
498
- LONG_RESPONSE_CHARS,
499
- SIMILARITY_THRESHOLD,
500
496
  // subagent
501
497
  buildAnalysisPrompt,
502
- compactTranscript,
503
498
  extractJson,
504
499
  validateAnalysis,
505
- VALID_MOMENT_KINDS,
506
500
  // payload
507
501
  buildIdeaPayload,
508
502
  };
@@ -236,7 +236,6 @@ module.exports = {
236
236
  wholeDocIdea,
237
237
  noteLink,
238
238
  SITE_SURFACE,
239
- STUDIO_PATH,
240
239
  isSiteNote,
241
240
  siteListItem,
242
241
  ideaBody,
@@ -231,5 +231,4 @@ module.exports = {
231
231
  MAX_LIMIT,
232
232
  MAX_OFFSET,
233
233
  MAX_DISCIPLINE_CHARS,
234
- TOTALS_TTL_MS,
235
234
  };
@@ -157,8 +157,6 @@ function mintHubApplicationVouch({ clientId, githubId, githubLogin, handle }, op
157
157
  }
158
158
 
159
159
  module.exports = {
160
- ASSERTION_TTL_MS,
161
- ISSUER,
162
160
  LOGOUT_PURPOSE,
163
161
  generateHubKeypair,
164
162
  loadHubSigningKey,
@@ -229,7 +229,6 @@ module.exports = {
229
229
  sha256Hex,
230
230
  projectOrigin,
231
231
  isHostedBy,
232
- verifyDirectReport,
233
232
  fileDirectReport,
234
233
  FEEDBACK_KINDS,
235
234
  MESSAGE_MAX,
@@ -65,4 +65,4 @@ function createReadRateLimit({ scope, limit, windowMs = 60 * 1000, maxTrackedIps
65
65
  return limiter;
66
66
  }
67
67
 
68
- module.exports = { createReadRateLimit, MAX_TRACKED_IPS };
68
+ module.exports = { createReadRateLimit };
@@ -59,14 +59,6 @@ const { pool: defaultPool } = require('../../src/module-api');
59
59
  const { ORB_BY_STATE } = require('./projects-feed');
60
60
  const projectStats = require('./project-stats');
61
61
 
62
- // The manifest route every Cloud Bongos instance already serves, unauthenticated and
63
- // CORS-open (ADR 0114's discovery surface; `src/bongos/routes/instance.js`). Nothing is
64
- // added to it by this task — ADR 0252 §2.3: the field already ships in every core, so
65
- // there is no wire change on anyone else's upgrade schedule. The API router is
66
- // dual-mounted at `/api/bongos` (canonical) and at the permanent legacy alias ADR 0252
67
- // happened to write, so either prefix reaches it; the fetch uses the canonical one.
68
- const MANIFEST_ROUTE = '/api/bongos/instance';
69
-
70
62
  // Rows the PULL may write: the ones the ADR 0246 control-plane bridge has never claimed.
71
63
  // `IS DISTINCT FROM` rather than `<> `, deliberately — a NULL source is the unclaimed
72
64
  // state and plain inequality would drop exactly those rows on a NULL comparison.
@@ -190,7 +182,6 @@ async function sweepVisibilityOnce({ pool = defaultPool, limit = 200, fetchVisib
190
182
  }
191
183
 
192
184
  module.exports = {
193
- MANIFEST_ROUTE,
194
185
  PULLABLE_SQL,
195
186
  visibilityFromManifest,
196
187
  pullDecision,
@@ -93,4 +93,4 @@ function retryAnswers(h) {
93
93
  return r;
94
94
  }
95
95
 
96
- module.exports = { appStatus, appUrl, serviceLinks, oneSentence, retryAnswers, STAGES, QUIET_AFTER_MS, RENDER_URL_RE, SERVICE_ID_RE };
96
+ module.exports = { appStatus, appUrl, serviceLinks, oneSentence, retryAnswers, STAGES, QUIET_AFTER_MS, RENDER_URL_RE };
@@ -161,7 +161,6 @@ async function healInstanceCatalog(db, row) {
161
161
  }
162
162
 
163
163
  module.exports = {
164
- CATALOG_HIDDEN_STATES,
165
164
  catalogEntryForInstance,
166
165
  // the disconnect runner leg forgets exactly what a publish wrote (task 1003249)
167
166
  catalogOriginForInstance, ownerGithubIdForInstance,
@@ -551,5 +551,5 @@ function makeUpdateChannelHandler({ provisioning, pool, parseId, validateOrRespo
551
551
  };
552
552
  }
553
553
 
554
- module.exports = { loadPreview, UPDATE_CHANNELS, DEFAULT_UPDATE_CHANNEL, updateChannelOf, selfUpdateChannel, makeUpdateChannelHandler, CORE_UPGRADE_FROM, lastCoreMove, lastMoveSuperseded, parseRepoNote, preflightForOffer, UPGRADE_SHAPES, VERSION_RE, isCoreVersion, coreUpgradeFault, enqueueCoreUpgrade, makeCoreUpgradeHandler, previewFromSnapshot, makeCoreUpgradePreviewHandler, makeControlPlaneHandler };
554
+ module.exports = { loadPreview, UPDATE_CHANNELS, DEFAULT_UPDATE_CHANNEL, updateChannelOf, selfUpdateChannel, makeUpdateChannelHandler, lastCoreMove, lastMoveSuperseded, parseRepoNote, UPGRADE_SHAPES, VERSION_RE, coreUpgradeFault, enqueueCoreUpgrade, makeCoreUpgradeHandler, previewFromSnapshot, makeCoreUpgradePreviewHandler, makeControlPlaneHandler };
555
555
 
@@ -167,4 +167,4 @@ async function adoptCredentialFault({ builderId, onboardMode, targetRef }, deps)
167
167
  return null;
168
168
  }
169
169
 
170
- module.exports = { adoptCredentialFault, parseTargetRef, readOwnerRepoToken, fetchRepoVisibility };
170
+ module.exports = { adoptCredentialFault, parseTargetRef };
@@ -171,6 +171,6 @@ async function sweepDemos(db, { enqueueTeardown, recordEvent, now = new Date() }
171
171
  }
172
172
 
173
173
  module.exports = {
174
- DEMO_LIMITS, DEMO_OFFLINE_DAYS, DEMO_WARN_DAYS, DEMO_DETAIL, DEMO_SETTINGS, OUTCOMES,
175
- parseDemo, fitCheck, withDemoDetail, demoRecord, demoView, startDemo, startDemoProject, settleDemo, sweepDemos,
174
+ DEMO_LIMITS, DEMO_SETTINGS, OUTCOMES,
175
+ parseDemo, fitCheck, withDemoDetail, demoRecord, demoView, startDemoProject, settleDemo, sweepDemos,
176
176
  };
@@ -165,5 +165,5 @@ module.exports = {
165
165
  upsertLogo, deleteLogo, readLogo,
166
166
  LIBRARY_LOOKS, LOOK_SETTINGS_VOCAB, LOOK_DEFAULTS, LOOK_COMPANION_ENV,
167
167
  lookChoice, lookAdjustAccent, lookAccentOf, logoUrlOf,
168
- LOGO_MAX_BYTES, LOGO_MIME, screenLogo, sniffLogo, logoFileName, LOGO_FILE,
168
+ LOGO_MAX_BYTES, LOGO_MIME, screenLogo, logoFileName, LOGO_FILE,
169
169
  };
@@ -190,4 +190,4 @@ function callbackPage({ ok, title, body, state, domain, next }) {
190
190
  </body></html>`;
191
191
  }
192
192
 
193
- module.exports = { esc, callbackPage, returnHref, RETURN_PATH };
193
+ module.exports = { esc, callbackPage, returnHref };
@@ -170,5 +170,5 @@ module.exports = {
170
170
  TOKENS, SETTING_KEYS, MAX_BLOCK, EDIT_MIN_RANK, TBA,
171
171
  defaultCopy, defaultSettings, ndaBody, ndaVersion, isEditableKey,
172
172
  esc, usd, kindOf, normalizeBlock, renderInline, renderBlock, renderContext, fill, cleanSetting,
173
- hashPassword, passwordOk, validLinkedin, normalizeSignin, newSessionToken, hashToken, plainForDiscord,
173
+ hashPassword, passwordOk, normalizeSignin, newSessionToken, hashToken, plainForDiscord,
174
174
  };
@@ -197,7 +197,7 @@ async function saveApp(pool, { ownerId, serviceId, serviceName, builderId }) {
197
197
  }
198
198
 
199
199
  module.exports = {
200
- KEY_RE, OWNER_RE, SERVICE_RE, DEPLOY_RE, HISTORY_LIMIT,
200
+ KEY_RE, OWNER_RE, SERVICE_RE, DEPLOY_RE,
201
201
  statusWords, taskIdsIn, previewOf, costOf, shapeHistory, readHistory, getApp, saveApp,
202
202
  ROLLBACK_STATUSES,
203
203
  };
@@ -33,7 +33,6 @@ const TIER_CLAMP = Object.freeze({
33
33
  // A lens that did not finish cleanly contributes caution, never silence: an
34
34
  // errored/timed-out/budget-exhausted lens means its surface went UNREVIEWED.
35
35
  const LENS_OK = 'ok';
36
- const LENS_PROBLEM_STATUSES = Object.freeze(['error', 'timeout', 'budget_exhausted']);
37
36
 
38
37
  const rank = (v) => VERDICT_RANK[v] ?? VERDICT_RANK.dangerous; // unknown → worst
39
38
  const maxVerdict = (a, b) => (rank(a) >= rank(b) ? a : b);
@@ -123,11 +122,8 @@ function reduceVerdict({ floorReport = {}, lenses = [], tier = 'low', declaredDe
123
122
 
124
123
  module.exports = {
125
124
  VERDICTS,
126
- TIER_CLAMP,
127
125
  LENS_OK,
128
- LENS_PROBLEM_STATUSES,
129
126
  panelOutcome,
130
- lensHealth,
131
127
  coverageCap,
132
128
  reduceVerdict,
133
129
  };
@@ -50,4 +50,4 @@ function inventory(corpus) {
50
50
 
51
51
  // Constants exported as the white-box surface: the reducer/report stages and
52
52
  // tests read them to stay in lockstep with what the inventory actually covers.
53
- module.exports = { inventory, CAPABILITY_PATTERNS, SCRIPT_EXTENSIONS };
53
+ module.exports = { inventory };
@@ -38,4 +38,4 @@ function detect(corpus) {
38
38
  return findings;
39
39
  }
40
40
 
41
- module.exports = { detect, isJsonConfig };
41
+ module.exports = { detect };
@@ -114,4 +114,4 @@ function detect(corpus) {
114
114
  return findings;
115
115
  }
116
116
 
117
- module.exports = { detect, perFileHits, CREDENTIAL_PATTERNS };
117
+ module.exports = { detect, perFileHits };
@@ -112,4 +112,4 @@ function detect(corpus) {
112
112
  return findings;
113
113
  }
114
114
 
115
- module.exports = { detect, specSeverity, DEP_SECTIONS };
115
+ module.exports = { detect };
@@ -115,4 +115,4 @@ function detect(corpus) {
115
115
  return findings;
116
116
  }
117
117
 
118
- module.exports = { detect, OVERRIDE_PHRASES, SCANNER_PHRASES, codepointClasses };
118
+ module.exports = { detect };
@@ -64,4 +64,4 @@ function detect(corpus) {
64
64
  return findings;
65
65
  }
66
66
 
67
- module.exports = { detect, perFileHits, NETWORK_PATTERNS };
67
+ module.exports = { detect, perFileHits };
@@ -78,4 +78,4 @@ function detect(corpus) {
78
78
  return findings;
79
79
  }
80
80
 
81
- module.exports = { detect, AUTO_RUN_SCRIPTS };
81
+ module.exports = { detect };
@@ -88,4 +88,4 @@ function detect(corpus) {
88
88
  return findings;
89
89
  }
90
90
 
91
- module.exports = { detect, BYPASS_MARKERS };
91
+ module.exports = { detect };
@@ -202,14 +202,11 @@ function escapedConfigKeyCount(text) {
202
202
  }
203
203
 
204
204
  module.exports = {
205
- EXCERPT_MAX_CHARS,
206
205
  SEVERITIES,
207
- SENSITIVE_BASENAMES,
208
206
  isSensitivePath,
209
207
  basename,
210
208
  finding,
211
209
  excerpt,
212
- sanitizeDetail,
213
210
  lineAt,
214
211
  parseJsonStrict,
215
212
  rawKeyCounts,
@@ -359,12 +359,9 @@ async function runFloor({ pristineDir, quarantineRoot, entries, sha = null, cont
359
359
 
360
360
  module.exports = {
361
361
  FLOOR_VERSION,
362
- REPORT_BASENAME,
363
362
  VERDICT_RANK,
364
363
  DETECTORS,
365
364
  buildCorpus,
366
- computeFloorVerdict,
367
- countBySeverity,
368
365
  coOccurrence,
369
366
  coverageFindings,
370
367
  dedupeFindings,
@@ -155,4 +155,4 @@ async function buildMirror({ pristineDir, mirrorDir, quarantineRoot, entries, ca
155
155
  return { mirrored, stubs, unreviewedBytes, fenceDelim, indexPath };
156
156
  }
157
157
 
158
- module.exports = { buildMirror, MIRROR_CAPS, INDEX_BASENAME };
158
+ module.exports = { buildMirror, MIRROR_CAPS };
@@ -254,7 +254,6 @@ function createQuarantine({ tmpRoot = os.tmpdir(), forbiddenRoots } = {}) {
254
254
  module.exports = {
255
255
  canonical,
256
256
  isInsideLexical,
257
- canonicalUncached,
258
257
  clearCanonicalCache,
259
258
  CAPS,
260
259
  REPO_ROOT,
@@ -112,8 +112,6 @@ function assembleRebuildSpec({
112
112
  }
113
113
 
114
114
  module.exports = {
115
- SPEC_LIMITS,
116
- GROUND_RULES,
117
115
  isDocPath,
118
116
  selectDocFiles,
119
117
  assembleRebuildSpec,
@@ -152,4 +152,4 @@ function assembleReport({
152
152
  return out.join('\n');
153
153
  }
154
154
 
155
- module.exports = { assembleReport, findingLine };
155
+ module.exports = { assembleReport };
@@ -313,8 +313,6 @@ async function buildSanitizedCopy({ pristineDir, quarantineRoot, entries, remova
313
313
  }
314
314
 
315
315
  module.exports = {
316
- SANITIZED_DIRNAME,
317
- DIFF_BASENAME,
318
316
  hasMaliceIndicator,
319
317
  planSanitize,
320
318
  buildSanitizedCopy,
@@ -255,15 +255,11 @@ function scrubSecrets(text, extraSecrets = [], opts = undefined) {
255
255
  module.exports = {
256
256
  REDACTED,
257
257
  SECRET_PATTERNS,
258
- SECRET_ASSIGNMENT_RE,
259
258
  shannonEntropy,
260
- charClasses,
261
259
  looksHighEntropySecret,
262
- ENTROPY_CANDIDATE_RE,
263
260
  redactHighEntropy,
264
261
  ENV_SECRET_KEY_RE,
265
262
  ENV_SECRET_PREFIX_RE,
266
- ENV_BENIGN_KEY_RE,
267
263
  collectEnvSecrets,
268
264
  scrubSecrets,
269
265
  };
@@ -283,8 +283,6 @@ async function linkVulnerabilityReportFix(id, fixTaskId) {
283
283
  module.exports = {
284
284
  SEVERITIES,
285
285
  VULN_STATUSES,
286
- DEFAULT_BOUNTY,
287
- SEVERITY_BLURB,
288
286
  envName,
289
287
  bountyTable,
290
288
  bountyTableDetailed,
@@ -356,7 +356,6 @@ module.exports = {
356
356
  scoreAccessibility,
357
357
  // Exported so the tests can pin the contracts (waivers, leniency, each
358
358
  // detector) without reconstructing a whole digest for every case.
359
- resolveProfile,
360
359
  waiversFor,
361
360
  leniencyFor,
362
361
  assistantProse,
@@ -366,7 +365,6 @@ module.exports = {
366
365
  bandFor,
367
366
  SIGNAL_SPEC,
368
367
  JARGON_TERMS,
369
- UI_BACKED_SUBJECTS,
370
368
  LOW_CONFIDENCE_CHARS,
371
369
  PROFILE_DEFAULTS,
372
370
  PROFILE_VALUES,
@@ -346,12 +346,8 @@ module.exports = {
346
346
  buildAdoptionSuggestion,
347
347
  // 6C.2 correction builder
348
348
  buildCorrection,
349
- TRANSFERABLE_TYPES,
350
- PII_PATTERNS,
351
349
  // exported for tests + reuse
352
350
  parseFrontmatter,
353
- stripFrontmatter,
354
351
  clamp01,
355
352
  QUALITY_WEIGHTS,
356
- ALLOWED_MEMORY_TYPES,
357
353
  };
@@ -187,11 +187,8 @@ function uploadHealthVerdict(rows, opts = {}) {
187
187
  module.exports = {
188
188
  DEFAULT_WINDOW_HOURS,
189
189
  DEFAULT_LOOKBACK_DAYS,
190
- DEFAULT_MIN_SHIPS,
191
- DEFAULT_MAX_UNCOVERED_SHARE,
192
190
  clampLookbackDays,
193
191
  clampWindowHours,
194
192
  clampSampleLimit,
195
- normalizeBuilderRows,
196
193
  uploadHealthVerdict,
197
194
  };
@@ -278,5 +278,5 @@ module.exports = {
278
278
  createSpeciality, getSpeciality, listVisibleTo, updateSpeciality,
279
279
  addDocument, listDocuments, deleteDocument,
280
280
  linkLearning, countTraining,
281
- adopt, abandon, deactivateCraft, activeForCraft, listAdoptions, setEnabledSkills,
281
+ adopt, abandon, activeForCraft, listAdoptions, setEnabledSkills,
282
282
  };
@@ -303,4 +303,4 @@ function offeredTo(specialities, viewer, adoptions = []) {
303
303
  });
304
304
  }
305
305
 
306
- module.exports = { VISIBILITIES, LIMITS, SKILL_NAME_RE, slugify, validateDraft, skillListErrors, enabledSkillsErrors, canAdopt, describeForApi, offeredTo };
306
+ module.exports = { VISIBILITIES, LIMITS, SKILL_NAME_RE, slugify, validateDraft, enabledSkillsErrors, canAdopt, describeForApi, offeredTo };
@@ -524,9 +524,9 @@ function packColors(pack) {
524
524
  }
525
525
 
526
526
  module.exports = {
527
- REPO_ROOT, KIT_DIR, STYLES_DIR, EXIT, FLOORS, SIZES, DEFAULT_SIZES, MODES, CHANNELS, SETTLE_MS, ACTIONS, EXPECT_KEYS,
527
+ REPO_ROOT, KIT_DIR, STYLES_DIR, EXIT, FLOORS, SIZES, DEFAULT_SIZES, MODES, CHANNELS, SETTLE_MS, ACTIONS,
528
528
  argOf, hasFlag, listArg, pageName, normalizePageArg, resolveSurfaceDir, sidecarPath, readJson,
529
- validateActions, runActions, validateExpect, factsInPage, expectProblems, auditFloors, reducedMotionProblems, craftTells,
529
+ runActions, factsInPage, expectProblems, auditFloors, reducedMotionProblems, craftTells,
530
530
  validateStatesFile, validateProbesFile, NoBrowserError, launchBrowser, attachCollectors, withMode,
531
531
  freePort, startStub, parseColor, composite, luminance, contrastRatio, instancePack, packColors,
532
532
  listStyles, resolveStyle, styleBrandingFile,
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.22.1",
3
+ "version": "1.22.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.22.1",
9
+ "version": "1.22.2",
10
10
  "license": "AGPL-3.0-or-later",
11
11
  "dependencies": {
12
12
  "express": "^4.21.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.22.1",
3
+ "version": "1.22.2",
4
4
  "description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "main": "src/platform-server.js",
@@ -10376,5 +10376,11 @@
10376
10376
  "id": "1004876",
10377
10377
  "text": "Builder-written text now goes through one safety filter in the browser and one on the server instead of 42 hand-made copies, six of which let a stray quote through — and a check stops a new copy from creeping back."
10378
10378
  }
10379
+ ],
10380
+ "1.22.2": [
10381
+ {
10382
+ "id": "1004891",
10383
+ "text": "Cleaned up 220 internal code hooks nothing else used, cutting the project's dead-code count from 439 to 213."
10384
+ }
10379
10385
  ]
10380
10386
  }
package/src/module-api.js CHANGED
@@ -79,7 +79,7 @@ const { escapeHtml } = require('./html-escape');
79
79
  // MAJOR (see allowBoxScope below): passes the request through untouched.
80
80
  function deprecatedNoopMiddleware(_req, _res, next) { next(); }
81
81
 
82
- const CORE_VERSION = '1.22.1'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
82
+ const CORE_VERSION = '1.22.2'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
83
83
 
84
84
  // A namespaced logger so a module's log lines are attributable + consistent.
85
85
  // Usage: const log = api.logger('discord'); log.info('mounted');
@@ -0,0 +1,48 @@
1
+ // tests/modules_external_export_contract.mjs — modules/ exports whose callers no
2
+ // code-file scan can see (task 1004891).
3
+ //
4
+ // Task 1004891 un-exported every modules/ export that no other code file names
5
+ // (knip's finding, filtered by countKnipFindings in scripts/bongos/fitness-ratchets.js).
6
+ // Six were deliberately KEPT, because their consumer is a document rather than code:
7
+ // - gatherInteractionSignals: the bfg scheduled task calls it by path
8
+ // (`node -e "require('./modules/sessions/bfg').gatherInteractionSignals(...)"`),
9
+ // so dropping it breaks that routine at run time with no test or scan noticing;
10
+ // - fieldCatalog, recordPulse, OWNERLESS_CATEGORIES, SOFT_CAP_FRACTION,
11
+ // CONTROL_PLANE_SHAPES: each module's CLAUDE.md names it as that module's API.
12
+ // This file pins them, so the next dead-export sweep cannot quietly take them.
13
+ import assert from 'node:assert/strict';
14
+ import { test } from 'node:test';
15
+ import { createRequire } from 'node:module';
16
+ import fs from 'node:fs';
17
+ import path from 'node:path';
18
+ import { fileURLToPath } from 'node:url';
19
+
20
+ const require = createRequire(import.meta.url);
21
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
22
+ const read = (rel) => fs.readFileSync(path.join(ROOT, rel), 'utf8');
23
+
24
+ test('bfg.gatherInteractionSignals stays exported: the bfg scheduled task calls it by path', () => {
25
+ const skill = read('.claude/scheduled-tasks/bfg/SKILL.md');
26
+ assert.match(skill, /require\('\.\/modules\/sessions\/bfg'\)/, 'the skill still requires bfg by path');
27
+ assert.match(skill, /\.gatherInteractionSignals\(/, 'the skill still calls gatherInteractionSignals');
28
+ const bfg = require(path.join(ROOT, 'modules/sessions/bfg.js'));
29
+ assert.equal(typeof bfg.gatherInteractionSignals, 'function');
30
+ });
31
+
32
+ const DOCUMENTED = [
33
+ ['modules/builder-settings/interaction-prefs.js', 'fieldCatalog', 'function'],
34
+ ['modules/sessions/pulse.js', 'recordPulse', 'function'],
35
+ ['modules/economy/cost-classify.js', 'OWNERLESS_CATEGORIES', 'object'],
36
+ ['modules/economy/cost-classify.js', 'SOFT_CAP_FRACTION', 'number'],
37
+ ['modules/provisioning/onboard-plan.js', 'CONTROL_PLANE_SHAPES', 'object'],
38
+ ];
39
+
40
+ for (const [file, name, type] of DOCUMENTED) {
41
+ test(`${file} keeps exporting ${name}: its module CLAUDE.md names it as the module's API`, () => {
42
+ const doc = read(path.join(path.dirname(file), 'CLAUDE.md'));
43
+ assert.ok(doc.includes(name), `${name} is still documented in ${path.dirname(file)}/CLAUDE.md`);
44
+ const mod = require(path.join(ROOT, file));
45
+ assert.ok(name in mod, `${name} is exported from ${file}`);
46
+ assert.equal(typeof mod[name], type);
47
+ });
48
+ }