@bongos/core 1.19.183 → 1.19.185

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 (81) hide show
  1. package/.bongos-core.json +102 -92
  2. package/clients/bongos-client/bongos-client.global.js +19 -19
  3. package/clients/bongos-client/index.cjs +19 -19
  4. package/clients/bongos-client/index.d.ts +29 -29
  5. package/clients/bongos-client/index.mjs +19 -19
  6. package/docs/adr/0157-archon-is-rank-and-identity-only.md +2 -2
  7. package/docs/api/openapi.json +117 -117
  8. package/docs/api-reference.md +10 -10
  9. package/docs/canonical-permissions.md +6 -6
  10. package/modules/dev-box/app/src/vendor/bongos-client.cjs +19 -19
  11. package/modules/{governance → government}/catalog.js +8 -8
  12. package/modules/{governance → government}/config.js +6 -6
  13. package/modules/{governance → government}/db.js +44 -44
  14. package/modules/government/migrations/government_001_rename_from_governance.sql +213 -0
  15. package/modules/government/migrations/government_002_rename_permission_keys.sql +112 -0
  16. package/modules/government/module.json +22 -0
  17. package/modules/{governance → government}/protected-surfaces.json +0 -1
  18. package/modules/{governance/rank-roles.js → government/ranks.js} +18 -18
  19. package/modules/{governance/routes/governance.js → government/routes/government.js} +109 -84
  20. package/modules/{governance/routes/role-sync.js → government/routes/rank-sync.js} +7 -7
  21. package/modules/hall-ui/public/gate.js +1 -1
  22. package/modules/hall-ui/public/governance.js +38 -38
  23. package/modules/hall-ui/public/harbor.js +2 -2
  24. package/modules/hall-ui/public/shell.js +3 -3
  25. package/modules/hall-ui/public/watch.js +1 -1
  26. package/modules/lifecycle/db.js +6 -6
  27. package/modules/lifecycle/routes/gate-approvals.js +1 -1
  28. package/package-lock.json +2 -2
  29. package/package.json +1 -1
  30. package/scripts/gds/fitness.js +11 -1
  31. package/scripts/gds/migration-namespace.js +15 -3
  32. package/scripts/gds/publish-manifest.js +2 -3
  33. package/scripts/gds/seed-governance-tasks.js +3 -3
  34. package/src/bongos/auth.js +16 -16
  35. package/src/bongos/db.js +6 -6
  36. package/src/bongos/module-scope-map.js +7 -22
  37. package/src/bongos/permission-path-check.js +3 -3
  38. package/src/bongos/route-rank-check.js +15 -21
  39. package/src/bongos/serve-internal.js +2 -2
  40. package/src/module-api.js +7 -3
  41. package/tests/auth_page_gate.mjs +2 -2
  42. package/tests/criterion_authoring_gate.mjs +1 -1
  43. package/tests/governance_abuse_matrix.mjs +38 -38
  44. package/tests/governance_catalog.mjs +4 -4
  45. package/tests/governance_claim_eligibility.mjs +1 -1
  46. package/tests/governance_config.mjs +7 -7
  47. package/tests/governance_fold.mjs +4 -4
  48. package/tests/governance_fold_bench.mjs +2 -2
  49. package/tests/governance_live_proof.mjs +6 -6
  50. package/tests/governance_ownership_scope.mjs +2 -2
  51. package/tests/governance_page_gates.mjs +10 -10
  52. package/tests/governance_parity.mjs +3 -3
  53. package/tests/governance_principals.mjs +3 -3
  54. package/tests/governance_protected_surfaces.mjs +44 -19
  55. package/tests/governance_require_permission.mjs +11 -11
  56. package/tests/governance_resolver.mjs +4 -4
  57. package/tests/governance_role_sync.mjs +35 -35
  58. package/tests/governance_routes.mjs +98 -98
  59. package/tests/governance_seed.mjs +27 -4
  60. package/tests/governance_session_scope.mjs +5 -5
  61. package/tests/governance_vanilla_boot.mjs +4 -4
  62. package/tests/hall_page_gate_map.mjs +3 -3
  63. package/tests/memory_isolation.mjs +2 -2
  64. package/tests/module_loader.mjs +1 -1
  65. package/tests/onboarding_observability.mjs +2 -2
  66. package/tests/rank_tier_single_source.mjs +2 -2
  67. package/tests/route_permission_check.mjs +2 -2
  68. package/modules/governance/module.json +0 -11
  69. /package/config/{governance.neutral.json → government.neutral.json} +0 -0
  70. /package/modules/{governance → government}/CLAUDE.md +0 -0
  71. /package/modules/{governance → government}/migrations/governance_001_tables.sql +0 -0
  72. /package/modules/{governance → government}/migrations/governance_002_seed_and_backfill.sql +0 -0
  73. /package/modules/{governance → government}/migrations/governance_003_task_abandon_metic.sql +0 -0
  74. /package/modules/{governance → government}/migrations/governance_004_criterion_create.sql +0 -0
  75. /package/modules/{governance → government}/migrations/governance_005_resync_builder_rank_roles.sql +0 -0
  76. /package/modules/{governance → government}/migrations/governance_006_version_create.sql +0 -0
  77. /package/modules/{governance → government}/migrations/governance_007_delegate_archon_ops_to_metic.sql +0 -0
  78. /package/modules/{governance → government}/protected-surfaces.js +0 -0
  79. /package/modules/{governance → government}/resolver.js +0 -0
  80. /package/modules/{governance → government}/session-scopes.js +0 -0
  81. /package/modules/{governance → government}/session-scopes.json +0 -0
@@ -40,7 +40,7 @@ const rrc = require(path.join(ROOT, 'src', 'bongos', 'route-rank-check.js'));
40
40
  const sequence = require(path.join(ROOT, 'scripts', 'gds', 'sequence.js'));
41
41
  const boxConnect = require(path.join(ROOT, 'scripts', 'gds', 'box-connect-lib.js'));
42
42
  const boxes = require(path.join(ROOT, 'modules', 'dev-box', 'boxes.js'));
43
- const catalog = require(path.join(ROOT, 'modules', 'governance', 'catalog.js'));
43
+ const catalog = require(path.join(ROOT, 'modules', 'government', 'catalog.js'));
44
44
 
45
45
  const LADDER = kernel.LIVE_RANK_LADDER;
46
46
  const TIER = kernel.RANK_TIER;
@@ -142,7 +142,7 @@ const MAP_ALLOWLIST = new Set([
142
142
  // Where a rank-ladder array literal is allowed to exist.
143
143
  const LADDER_ALLOWLIST = new Set([
144
144
  'src/bongos/db-kernel.js', // the canonical source itself
145
- 'modules/governance/catalog.js',
145
+ 'modules/government/catalog.js',
146
146
  'src/bongos/route-rank-check.js',
147
147
  ...STATIC_LADDER_FILES,
148
148
  ]);
@@ -9,7 +9,7 @@
9
9
  // a downgrade that reads as legitimate, and a published API doc that misstates authority.
10
10
  //
11
11
  // THE ORACLE PROBLEM (the trap R103 fell into). The classifier DERIVES a permission's
12
- // rank from modules/governance/catalog.js, so asserting it back against catalog.floor
12
+ // rank from modules/government/catalog.js, so asserting it back against catalog.floor
13
13
  // would move both sides together and prove nothing. Every expectation below is therefore
14
14
  // either a HAND-WRITTEN literal (a floor read off the catalog once, by a human, and
15
15
  // frozen here — so a floor edit reds this file and has to be argued with) or
@@ -67,7 +67,7 @@ const HAND_WRITTEN_FLOORS = {
67
67
  // oracle, not a tautology.
68
68
 
69
69
  test('P0: the parsed floor map matches the catalog module exactly (key set and floors)', () => {
70
- const catalog = require(path.join(ROOT, 'modules', 'governance', 'catalog.js'));
70
+ const catalog = require(path.join(ROOT, 'modules', 'government', 'catalog.js'));
71
71
  const parsed = rrc.permissionFloors();
72
72
  const evaluated = new Map(catalog.PERMISSIONS.map((p) => [p.key, p.floor]));
73
73
  assert.equal(parsed.size, evaluated.size,
@@ -1,11 +0,0 @@
1
- {
2
- "key": "governance",
3
- "title": "Governance (configurable roles & permissions)",
4
- "description": "Discord-style configurable roles and permissions (ADR 0151, BONGOS-V1 goal 1000030). Permissions are the atomic authority unit and the four ranks (xenos/thetes/metic/archon) become seeded roles; this module owns the code-defined permission catalog (each key flagged `system` = trust-boundary, non-grantable, or operational = delegable) plus the compatibility seed that reproduces today's rank thresholds exactly. A core-domain module, default-on: a Cloud Bongos instance ships configurable roles the way it ships its status page. This first slice (BV1.R94) is the catalog + seed as code constants — the single source the resolver (R95), the requirePermission gate (R97), and the Archon tab (R110/R111) all read. Preserves ADR 0016 (authority resolved server-side, per request, uncached).",
5
- "coreVersion": "^1.18.0",
6
- "default": true,
7
- "maintenance": { "status": "core-maintained" },
8
- "contributes": { "migrations": true, "routes": ["governance", "role-sync"] },
9
- "provides": ["governance", "governance.roleSync"],
10
- "consumes": []
11
- }
File without changes
File without changes