@bongos/core 1.19.354 → 1.19.355

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.
package/.bongos-core.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.19.354",
6
- "core_contract": "1.19.354",
7
- "source_commit": "b3914da0290b60c5eb6ce4f3c7c32b6f9ae07e1f",
5
+ "core_version": "1.19.355",
6
+ "core_contract": "1.19.355",
7
+ "source_commit": "a7ad49c28f305814b88df556ae4c1d18ceca1a01",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-25T13:13:49.790Z",
9
+ "built_at": "2026-08-25T13:24:07.447Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 329,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 1857,
20
- "tree_sha256": "4765f579b8f7f2e758fb27b63db2088b1dab283f54ada499fcaff84c0c86d920",
20
+ "tree_sha256": "abdcd03b753d6da9681bddd073feee645787426d01b5d8ecd460cba64d4a6b73",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -4787,12 +4787,12 @@
4787
4787
  {
4788
4788
  "path": "package-lock.json",
4789
4789
  "mode": "0000644",
4790
- "sha256": "0e7087b6c93131c62fbe40e9b626df9e4a4ec2719b1de4fc48e428d00a3a7e7b"
4790
+ "sha256": "2e354a8f810ac30ec70aab86c458d275f4d598788d8dbbfb1fc2a91a9f035ff1"
4791
4791
  },
4792
4792
  {
4793
4793
  "path": "package.json",
4794
4794
  "mode": "0000644",
4795
- "sha256": "9ef59eab6d6debaa99f34c64cc37bf26ccd2db1dcf08fa89682eb02590da29ca"
4795
+ "sha256": "7dc6f776203244cb6e6b909f1a32c93948d04dc243bfd714d281bf1b8ee8fcdb"
4796
4796
  },
4797
4797
  {
4798
4798
  "path": "public-docs/index.html",
@@ -6617,7 +6617,7 @@
6617
6617
  {
6618
6618
  "path": "src/bongos/serve-internal.js",
6619
6619
  "mode": "0000644",
6620
- "sha256": "bf37dbda6a10fe8b21f6df01e8bdd62aea3f539523464b37666ffd535ceb7e00"
6620
+ "sha256": "025676342224c2944fa2361965c12d9e6cf812fd17541c737a32fab7544c2709"
6621
6621
  },
6622
6622
  {
6623
6623
  "path": "src/bongos/stealth-gate.js",
@@ -6652,7 +6652,7 @@
6652
6652
  {
6653
6653
  "path": "src/module-api.js",
6654
6654
  "mode": "0000644",
6655
- "sha256": "534d2a2ac4a67829ae4589161a0900ee08b1312d512ef18fb4a136419b465f0d"
6655
+ "sha256": "43ca06d2e5757257056bcaac608518df57c750d552ad667ec751a6ca28a0c00a"
6656
6656
  },
6657
6657
  {
6658
6658
  "path": "src/module-loader/catalog.js",
@@ -8147,7 +8147,7 @@
8147
8147
  {
8148
8148
  "path": "tests/landing_page.mjs",
8149
8149
  "mode": "0000644",
8150
- "sha256": "2efddbab276f2ef38dbcf09ef6b76d4c1ff58f68c8b11a8803c7a27b605b385f"
8150
+ "sha256": "7457d53dee7cce5770c17ec908c0f051e72092d2fa1cf5a9a1198fbdac64145a"
8151
8151
  },
8152
8152
  {
8153
8153
  "path": "tests/lib_sh_resolution.mjs",
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.354",
3
+ "version": "1.19.355",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.354",
9
+ "version": "1.19.355",
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.19.354",
3
+ "version": "1.19.355",
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",
@@ -169,7 +169,8 @@ function applyBrandTokens(html, brand = clientBranding(), origin = safePublicOri
169
169
  const tagline = (brand.copy && brand.copy.tagline) || '';
170
170
  const cur = (brand.currency && brand.currency.label) || 'credits';
171
171
  const Cur = cur ? cur.charAt(0).toUpperCase() + cur.slice(1) : cur;
172
- return String(html == null ? '' : html)
172
+ const hall = hallOrigin || origin || '';
173
+ return dropEmptyHrefLinks(String(html == null ? '' : html), { publicOrigin: origin || '', buildersOrigin: hall, sourceRepoUrl: sourceRepo || '' })
173
174
  .split('{{worldName}}').join(esc(world))
174
175
  .split('{{productName}}').join(esc(product))
175
176
  .split('{{Currency}}').join(esc(Cur))
@@ -178,10 +179,23 @@ function applyBrandTokens(html, brand = clientBranding(), origin = safePublicOri
178
179
  .split('{{publicOrigin}}').join(esc(origin || ''))
179
180
  // a pack that names no hall of its own resolves to its OWN apex — never to
180
181
  // whichever instance authored the file
181
- .split('{{buildersOrigin}}').join(esc(hallOrigin || origin || ''))
182
+ .split('{{buildersOrigin}}').join(esc(hall))
182
183
  .split('{{sourceRepoUrl}}').join(esc(sourceRepo || ''))
183
184
  .split('{{instanceBase}}').join(esc(instanceBase || ''));
184
185
  }
186
+ // A link whose href is a BARE origin token that resolves empty is dropped whole,
187
+ // server-side (task 1003242; the branding contract): a pack that names no domains
188
+ // would otherwise stamp `href=""` — a dead hall pill on every page carrying one,
189
+ // and only index.html scrubs those client-side. Exact-token hrefs only: a token
190
+ // inside a longer URL still stamps (an empty prefix leaves a relative path).
191
+ function dropEmptyHrefLinks(html, values) {
192
+ let out = html;
193
+ for (const [token, value] of Object.entries(values)) {
194
+ if (value) continue;
195
+ out = out.replace(new RegExp(`<a\\b[^>]*\\bhref="\\{\\{${token}\\}\\}"[^>]*>[\\s\\S]*?<\\/a>`, 'g'), '');
196
+ }
197
+ return out;
198
+ }
185
199
  // Every token lands in HTML — as element text, or inside a double-quoted
186
200
  // attribute (href/content). Escaping is defence in depth, not a live fix: the
187
201
  // only source is config/branding.json, which is committed, code-reviewed and
package/src/module-api.js CHANGED
@@ -1138,8 +1138,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
1138
1138
  // landed since 1.19.352 with no explicit bump. run 32851392269. (task 1002620)
1139
1139
  // 1.19.354 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1140
1140
  // landed since 1.19.353 with no explicit bump. run 32852045058. (task 1002620)
1141
+ // 1.19.355 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1142
+ // landed since 1.19.354 with no explicit bump. run 32853063015. (task 1002620)
1141
1143
  // ---------------------------------------------------------------------------
1142
- const CORE_VERSION = '1.19.354'; // CI auto-patch carrier (ADR 0161); see changelog above
1144
+ const CORE_VERSION = '1.19.355'; // CI auto-patch carrier (ADR 0161); see changelog above
1143
1145
 
1144
1146
  // A namespaced logger so a module's log lines are attributable + consistent.
1145
1147
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -142,6 +142,24 @@ test('an unstamped link is removed, not left dangling', () => {
142
142
  assert.ok(out.length > 0);
143
143
  });
144
144
 
145
+ test('a pack with NO domains drops the hall pill server-side rather than stamping href="" (task 1003242)', () => {
146
+ // the hub has no client scrubber, so an empty token must never reach it as a dead link
147
+ const HUB = fs.readFileSync(path.join(ROOT, 'public-landing', 'projects.html'), 'utf8');
148
+ assert.match(HUB, /data-link-hall href="\{\{buildersOrigin\}\}"/, 'the hub pill is token-stamped');
149
+ const none = applyBrandTokens(HUB, BRAND, '', '');
150
+ assert.doesNotMatch(none, /href=""/, 'no empty href survives the stamp');
151
+ assert.doesNotMatch(none, /data-link-hall/, 'the pill element is omitted whole, not left dead');
152
+ assert.doesNotMatch(none, /\{\{[a-zA-Z]+\}\}/, 'every other token still stamps');
153
+ const apexOnly = applyBrandTokens(HUB, BRAND, 'https://spike-harbor.example', '');
154
+ assert.match(apexOnly, /data-link-hall href="https:\/\/spike-harbor\.example"/, 'an apex alone keeps the pill, pointed at the apex');
155
+ const both = applyBrandTokens(HUB, BRAND, 'https://spike-harbor.example', 'https://builders.spike-harbor.example');
156
+ assert.match(both, /data-link-hall href="https:\/\/builders\.spike-harbor\.example"/);
157
+ // the landing page too — its client-side scrubber is no longer the only guard
158
+ assert.doesNotMatch(applyBrandTokens(HTML, BRAND, '', ''), /<a\b[^>]*href=""/);
159
+ // a token INSIDE a longer href is a relative path once stamped empty, not a dead link — left alone
160
+ assert.equal(applyBrandTokens('<a href="{{publicOrigin}}/docs">Docs</a>', BRAND, '', ''), '<a href="/docs">Docs</a>');
161
+ });
162
+
145
163
  // ── the branding cascade + portability ─────────────────────────────────────
146
164
 
147
165
  test('the page declares no :root — a page-local one defeats re-branding (C1)', () => {