@bongos/core 1.19.185 → 1.19.187
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 +90 -85
- package/clients/bongos-client/index.d.ts +2 -2
- package/config/government.neutral.json +6 -6
- package/docs/adr/0172-editable-rank-roles-substrate-axis.md +1 -1
- package/docs/api/openapi.json +12 -12
- package/docs/api-reference.md +7 -7
- package/modules/builder-settings/wandering-prefs.js +13 -13
- package/modules/government/catalog.js +79 -79
- package/modules/government/config.js +43 -33
- package/modules/government/db.js +58 -58
- package/modules/government/protected-surfaces.js +7 -7
- package/modules/government/protected-surfaces.json +4 -4
- package/modules/government/ranks.js +17 -17
- package/modules/government/resolver.js +24 -24
- package/modules/government/routes/government.js +88 -88
- package/modules/government/routes/rank-sync.js +8 -8
- package/modules/government/session-scopes.js +7 -7
- package/modules/government/session-scopes.json +5 -5
- package/modules/hall-ui/public/gate.js +2 -2
- package/modules/hall-ui/public/{governance.css → government.css} +11 -11
- package/modules/hall-ui/public/{governance.html → government.html} +14 -14
- package/modules/hall-ui/public/{governance.js → government.js} +108 -108
- package/modules/hall-ui/public/harbor.js +2 -2
- package/modules/hall-ui/public/shell.js +19 -15
- package/modules/hall-ui/public/watch.js +1 -1
- package/modules/lifecycle/claim-eligibility.js +1 -1
- package/modules/lifecycle/db.js +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/fitness.js +138 -0
- package/scripts/hall-preview/server.js +1 -1
- package/src/bongos/auth.js +11 -11
- package/src/bongos/serve-internal.js +8 -8
- package/src/module-api.js +5 -1
- package/tests/auth_page_gate.mjs +2 -2
- package/tests/auth_resolve_failure.mjs +4 -4
- package/tests/{governance_abuse_matrix.mjs → government_abuse_matrix.mjs} +39 -39
- package/tests/{governance_catalog.mjs → government_catalog.mjs} +11 -11
- package/tests/{governance_claim_eligibility.mjs → government_claim_eligibility.mjs} +2 -2
- package/tests/{governance_config.mjs → government_config.mjs} +54 -54
- package/tests/{governance_fold.mjs → government_fold.mjs} +6 -6
- package/tests/{governance_fold_bench.mjs → government_fold_bench.mjs} +3 -3
- package/tests/{governance_live_proof.mjs → government_live_proof.mjs} +5 -5
- package/tests/{governance_ownership_scope.mjs → government_ownership_scope.mjs} +16 -16
- package/tests/{governance_page_gates.mjs → government_page_gates.mjs} +14 -14
- package/tests/{governance_parity.mjs → government_parity.mjs} +3 -3
- package/tests/{governance_principals.mjs → government_principals.mjs} +14 -14
- package/tests/{governance_protected_surfaces.mjs → government_protected_surfaces.mjs} +1 -1
- package/tests/{governance_role_sync.mjs → government_rank_sync.mjs} +2 -2
- package/tests/{governance_require_permission.mjs → government_require_permission.mjs} +1 -1
- package/tests/{governance_resolver.mjs → government_resolver.mjs} +6 -6
- package/tests/{governance_routes.mjs → government_routes.mjs} +36 -36
- package/tests/{governance_seed.mjs → government_seed.mjs} +8 -8
- package/tests/{governance_session_scope.mjs → government_session_scope.mjs} +10 -10
- package/tests/{governance_vanilla_boot.mjs → government_vanilla_boot.mjs} +26 -26
- package/tests/government_vocabulary.mjs +94 -0
- package/tests/hall_nav.mjs +8 -7
- package/tests/hall_page_gate_map.mjs +9 -9
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// GUARD (task 1002710): pins WHICH page gate each hall URL routes to.
|
|
4
4
|
//
|
|
5
|
-
// tests/
|
|
5
|
+
// tests/government_page_gates.mjs proves each gate FUNCTION admits the right
|
|
6
6
|
// audience. Nothing proved the other half — that a given /builders/* URL is
|
|
7
7
|
// wired to the gate it is supposed to be wired to. That gap is not theoretical:
|
|
8
8
|
// /sessions and /scouting each shipped with NO page gate at all, relying on a
|
|
@@ -35,9 +35,9 @@ const SRC = fs.readFileSync(path.join(ROOT, 'src/bongos/serve-internal.js'), 'ut
|
|
|
35
35
|
// Audiences (the floors live in modules/government/catalog.js; the gate
|
|
36
36
|
// functions in src/bongos/auth.js):
|
|
37
37
|
// requireBuilderPage page.view.public any signed-in builder (xenos+)
|
|
38
|
-
//
|
|
38
|
+
// requireGovernmentPage page.view.government metic+ (ADR 0157)
|
|
39
39
|
// requireProjectCuratePage project.curate metic+
|
|
40
|
-
//
|
|
40
|
+
// requireGovernmentManagePage government.manage archon
|
|
41
41
|
const ORACLE = {
|
|
42
42
|
// Any signed-in builder — no rank floor.
|
|
43
43
|
'/builders/work': 'requireBuilderPage',
|
|
@@ -57,10 +57,10 @@ const ORACLE = {
|
|
|
57
57
|
'/builders/diagrams/02-b.png': 'requireBuilderPage',
|
|
58
58
|
|
|
59
59
|
// Metic+ operator surfaces (the Governance nav group).
|
|
60
|
-
'/builders/watch': '
|
|
61
|
-
'/builders/harbor': '
|
|
62
|
-
'/builders/gate': '
|
|
63
|
-
'/builders/sessions': '
|
|
60
|
+
'/builders/watch': 'requireGovernmentPage',
|
|
61
|
+
'/builders/harbor': 'requireGovernmentPage',
|
|
62
|
+
'/builders/gate': 'requireGovernmentPage',
|
|
63
|
+
'/builders/sessions': 'requireGovernmentPage',
|
|
64
64
|
|
|
65
65
|
// Metic+ via the `project.curate` atom — the exact permission GET /scouting
|
|
66
66
|
// checks, so neither page can drift wider than the API it fronts.
|
|
@@ -68,7 +68,7 @@ const ORACLE = {
|
|
|
68
68
|
'/builders/scouting': 'requireProjectCuratePage',
|
|
69
69
|
|
|
70
70
|
// Archon.
|
|
71
|
-
'/builders/
|
|
71
|
+
'/builders/government': 'requireGovernmentManagePage',
|
|
72
72
|
|
|
73
73
|
// Deliberately UNGATED — the landing card, the rank ladder, the reward
|
|
74
74
|
// schedule and a builder's public portfolio all render for a stranger.
|
|
@@ -124,7 +124,7 @@ test('the static parse actually found the gate wiring', () => {
|
|
|
124
124
|
// If this file is ever restructured past the parser, these two fail LOUDLY
|
|
125
125
|
// rather than letting every row below pass vacuously against an empty map.
|
|
126
126
|
assert.ok(DISPATCH.some((d) => d.gate === 'requireBuilderPage'));
|
|
127
|
-
assert.ok(DISPATCH.some((d) => d.gate === '
|
|
127
|
+
assert.ok(DISPATCH.some((d) => d.gate === 'requireGovernmentPage'));
|
|
128
128
|
});
|
|
129
129
|
|
|
130
130
|
test('every hall URL routes to the page gate the oracle names', () => {
|