@bongos/core 1.25.17 → 1.25.18

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 (68) hide show
  1. package/.bongos-core.json +131 -61
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +10 -0
  4. package/clients/bongos-client/index.cjs +10 -0
  5. package/clients/bongos-client/index.d.ts +15 -1
  6. package/clients/bongos-client/index.mjs +10 -0
  7. package/docs/adr/0408-a-genesis-stage-is-three-doors-onto-one-record.md +1 -0
  8. package/docs/api/openapi.json +243 -6
  9. package/docs/api-reference.md +12 -3
  10. package/docs/copy-inventory.md +118 -108
  11. package/docs/copy-registry.json +315 -172
  12. package/docs/file-map.md +2 -1
  13. package/docs/module-api-changelog.md +2 -0
  14. package/docs/page-inventory.json +3 -0
  15. package/docs/page-readings.json +62 -62
  16. package/modules/app-host/CLAUDE.md +15 -0
  17. package/modules/app-host/module.json +20 -0
  18. package/modules/app-host/public/settings-widget.js +143 -0
  19. package/modules/app-host/routes/app-host.js +88 -0
  20. package/modules/government/charter-advice.js +103 -0
  21. package/modules/government/presets.js +42 -0
  22. package/modules/government/recommendations.js +102 -7
  23. package/modules/government/routes/government.js +1 -0
  24. package/modules/lifecycle/first-read-catalog.js +62 -0
  25. package/modules/lifecycle/first-read-db.js +47 -9
  26. package/modules/lifecycle/first-read.js +88 -23
  27. package/modules/lifecycle/migrations/lifecycle_023_repo_map_dismissed.sql +19 -0
  28. package/modules/lifecycle/routes/first-read.js +27 -5
  29. package/modules/onboarding/genesis-work.js +101 -4
  30. package/modules/onboarding/routes/genesis-work.js +2 -2
  31. package/modules/platform-identity/module.json +1 -1
  32. package/modules/platform-identity/routes/sso-app-status.js +65 -0
  33. package/modules/provisioning/module.json +1 -0
  34. package/modules/provisioning/seams.js +32 -1
  35. package/modules/provisioning/starter-bundles.js +1 -0
  36. package/modules/public-landing/public/assets/guide-core.js +475 -0
  37. package/modules/public-landing/public/assets/guide-hall.css +121 -0
  38. package/modules/public-landing/public/assets/guide-hall.js +164 -0
  39. package/modules/public-landing/public/assets/guide-scene.css +9 -0
  40. package/modules/public-landing/public/assets/guide-scene.js +58 -381
  41. package/modules/public-landing/public/index.html +46 -1
  42. package/modules/public-landing/public/projects.html +11 -2
  43. package/modules/ui-design/kit/serve.js +1 -1
  44. package/package-lock.json +2 -2
  45. package/package.json +1 -1
  46. package/release-notes.json +18 -0
  47. package/scripts/bongos/first-read.js +45 -11
  48. package/scripts/bongos/genesis.js +21 -1
  49. package/scripts/bongos/publish-manifest.js +1 -0
  50. package/scripts/bongos/seam-wiring-guard.js +3 -2
  51. package/scripts/hall-preview/server.js +2 -0
  52. package/src/bongos/auth-admission.js +64 -0
  53. package/src/bongos/auth.js +2 -1
  54. package/src/bongos/module-scope-map.js +4 -0
  55. package/src/bongos/routes/core-update.js +3 -16
  56. package/src/bongos/routes/modules.js +11 -0
  57. package/src/bongos/serve-internal.js +20 -6
  58. package/src/module-api.js +6 -1
  59. package/src/module-loader/loader.js +2 -2
  60. package/tests/app_host.mjs +413 -0
  61. package/tests/first_read.mjs +184 -8
  62. package/tests/genesis_work.mjs +74 -3
  63. package/tests/government_charter_advice.mjs +150 -0
  64. package/tests/landing_guide_hall.mjs +364 -0
  65. package/tests/landing_guide_scene.mjs +8 -5
  66. package/tests/module_api.mjs +1 -0
  67. package/tests/module_loader.mjs +1 -1
  68. package/tests/npm_release_where.mjs +13 -3
@@ -55,6 +55,7 @@ const PUBLISHED_SURFACE = [
55
55
  'artistGate', // added by task 1003575 (ADR 0241): the artist gate — off | advisory | strict, plus the pure verdict helpers over it. Two modules ask it two different questions ("file this review?" and "does an open one hold the deploy?") and both must resolve the knob through this one reader, never branding().project
56
56
  'readApplicantProfileFromHub', // added by task 1002972 (privacy spec D7): the reviewer queue's LIVE per-render read of one applicant's hub profile view. NARROW by design — the underlying call is authenticated with this instance's hub client secret, and loadIdpConfig stays OFF the doorway so no module ever holds the credential that speaks for the whole project
57
57
  'readApplicantViewFromHub', // added by task 1002304 (ADR 0365 D5): the same NARROW hub read as readApplicantProfileFromHub, answering { profile, guild } so the reviewer queue can group a guild's applicants. The guild rides only beside a profile, and the older port is kept so a module on it reads exactly what it did
58
+ 'readAppStatusFromHub', // added by task 1004571: where THIS project's app runs, read from the hub for the options menu's app-host panel. The same NARROW-port reason as readApplicantProfileFromHub: it carries this instance's hub client secret, so it takes no argument and a module can neither widen nor re-address it
58
59
  'notifyHubOfInvite', // added by task 1002818 (ADR 0353): tell the hub about one of THIS project's invites (or its rescind) so the invitee sees it in My Projects. The same NARROW-port reason as readApplicantProfileFromHub: the call carries this instance's hub client secret, so a module passes one login and one direction and can neither widen nor re-address it
59
60
  'inviteExpiry', // added by task 1002969 (ADR 0356): the ONE read-time definition of when a recruit invite's door closes. The sign-in gate reads it in core; the onboarding queues and the hub's notice list are modules, so without the doorway each would restate the 30 days and the predicate, and two copies can close a door on different days
60
61
  'readApplicationVouch', // added by task 1002285 (ADR 0201 D2): the public access-request write's check of the hub's application vouch. NARROW for the same reason — core supplies the hub key and this instance's client_id, so a module passes a token and a login and can neither swap the key nor re-address the audience
@@ -278,7 +278,7 @@ test('the live tree discovers the extracted modules cleanly (BV1.R43/R48/R47/R49
278
278
  // That is precisely how the agents regression reached an open PR (task 1002485).
279
279
  loader._reset();
280
280
  const snap = loader.loaderSnapshot();
281
- assert.deepEqual(snap.loaded, ['agents', 'ai-studio', 'autonomy', 'builder-settings', 'copy-desk', 'design-styles', 'discord', 'economy', 'front-door-guide', 'government', 'grading', 'hall-ui', 'ideas', 'lifecycle', 'market-watch', 'memory', 'npm-release', 'onboarding', 'page-notes', 'pixel-art', 'platform-identity', 'provisioning', 'public-landing', 'raise', 'render-deploy', 'security', 'sessions', 'specialities', 'status-ui', 'ui-design']);
281
+ assert.deepEqual(snap.loaded, ['agents', 'ai-studio', 'app-host', 'autonomy', 'builder-settings', 'copy-desk', 'design-styles', 'discord', 'economy', 'front-door-guide', 'government', 'grading', 'hall-ui', 'ideas', 'lifecycle', 'market-watch', 'memory', 'npm-release', 'onboarding', 'page-notes', 'pixel-art', 'platform-identity', 'provisioning', 'public-landing', 'raise', 'render-deploy', 'security', 'sessions', 'specialities', 'status-ui', 'ui-design']);
282
282
  assert.deepEqual(snap.errors, []);
283
283
  assert.deepEqual(snap.skipped, []);
284
284
  loader._reset();
@@ -290,8 +290,14 @@ test('the module declares the task page section and ships its widget; the seam g
290
290
  assert.deepEqual(manifest.contributes.uiSections, ['task-where']);
291
291
  assert.ok(manifest.contributes.routes.includes('task-where'));
292
292
  assert.ok(fs.existsSync(path.join(ROOT, 'modules/npm-release/public/task-widget.js')));
293
- const guard = fs.readFileSync(path.join(ROOT, 'scripts/bongos/seam-wiring-guard.js'), 'utf8');
294
- assert.match(guard, /alternates: \(dir\) => \[path\.join\(dir, 'public', 'task-widget\.js'\)\]/);
293
+ // Ask the guard itself (task 1004571 converted this from a source-text match): a module
294
+ // whose only widget is task-widget.js counts as wired, and with no widget it does not.
295
+ const { scanSeamWiring } = require('../scripts/bongos/seam-wiring-guard.js');
296
+ const dir = path.join(ROOT, 'modules/npm-release');
297
+ const only = (file) => ({ exists: (p) => p === path.join(dir, 'public', file) });
298
+ const mod = [{ key: 'npm-release', dir, manifest: { contributes: { uiSections: ['task-where'] } } }];
299
+ assert.deepEqual(scanSeamWiring(mod, only('task-widget.js')).findings, []);
300
+ assert.equal(scanSeamWiring(mod, { exists: () => false }).findings.length, 1);
295
301
  });
296
302
 
297
303
  test('the server injects task widgets just before task.js, and names no module doing it', () => {
@@ -302,8 +308,12 @@ test('the server injects task widgets just before task.js, and names no module d
302
308
  assert.ok(out.indexOf('/builders/md-reader.js') < out.indexOf('task-widget.js'));
303
309
  assert.match(out, /<script src="\/modules\/npm-release\/public\/task-widget\.js" defer><\/script>/);
304
310
  assert.equal(injectModuleHallWidgets(page, [], 'task'), page, 'no module, no change');
305
- const index = '<script src="/builders/builders.js?v=1"></script>';
311
+ // The index's builders.js is deferred, so its widgets are too (unchanged). Since task
312
+ // 1004571 a widget loads the way its consumer does, so a plain consumer gets a plain one.
313
+ const index = '<script src="/builders/builders.js?v=1" defer></script>';
306
314
  assert.match(injectModuleHallWidgets(index, [{ key: 'x', src: '/m.js' }]), /^<script src="\/m\.js" defer><\/script><script src="\/builders\/builders\.js/, 'the index injection is unchanged');
315
+ const plain = '<script src="/builders/settings.js?v=1"></script>';
316
+ assert.match(injectModuleHallWidgets(plain, [{ key: 'x', src: '/m.js' }], 'settings'), /^<script src="\/m\.js"><\/script><script src="\/builders\/settings\.js/);
307
317
  const si = fs.readFileSync(path.join(ROOT, 'src/bongos/serve-internal.js'), 'utf8');
308
318
  assert.match(si, /hallWidgetScripts\(\{ isEnabled: isModuleEnabled, file: 'task-widget\.js' \}\),\s*\n\s*'task',/);
309
319
  });