@bongos/core 1.20.73 → 1.20.75
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 +66 -46
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +4 -0
- package/clients/bongos-client/index.cjs +4 -0
- package/clients/bongos-client/index.d.ts +8 -0
- package/clients/bongos-client/index.mjs +4 -0
- package/docs/adr/0359-nobody-sets-a-module-score-by-hand-metic-can-ask-for-a-re-check.md +40 -0
- package/docs/adr/README.md +1 -0
- package/docs/api/openapi.json +185 -3
- package/docs/api-reference.md +5 -3
- package/docs/architecture.md +1 -1
- package/docs/copy-inventory.md +447 -373
- package/docs/copy-registry.json +1157 -468
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-inventory.json +6 -1
- package/docs/page-readings.json +1044 -650
- package/modules/government/catalog.js +3 -0
- package/modules/government/migrations/government_021_module_assessment_rerun.sql +36 -0
- package/modules/provisioning/routes/provisioning.js +35 -0
- package/modules/public-landing/public/assets/cosmos.css +1 -1
- package/modules/public-landing/public/projects.html +589 -63
- package/modules/public-landing/public/projects.probes.json +8 -5
- package/modules/public-landing/public/projects.states.json +19 -14
- package/modules/ui-design/kit/lib.js +4 -2
- package/modules/ui-design/kit/serve.js +5 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +12 -0
- package/src/bongos/route-rank-check.js +3 -0
- package/src/bongos/routes/modules.js +27 -0
- package/src/module-api.js +1 -1
- package/tests/module_store_reassess.mjs +120 -0
- package/tests/projects_hub.mjs +9 -5
- package/tests/projects_hub_app_status.mjs +1 -1
- package/tests/projects_hub_app_step.mjs +10 -10
- package/tests/projects_hub_look.mjs +7 -7
- package/tests/projects_hub_module_picker.mjs +9 -9
- package/tests/projects_hub_pre_uat.mjs +2 -1
- package/tests/wizard_demo.mjs +1 -1
- package/tests/wizard_draft_resume.mjs +1 -1
- package/tests/wizard_front_door.mjs +11 -7
- package/tests/wizard_intent_resume.mjs +9 -9
- package/tests/wizard_physics.mjs +264 -0
|
@@ -216,6 +216,9 @@ const PERMISSIONS = [
|
|
|
216
216
|
{ key: 'goal.scope.widen', system: false, floor: 'metic', guards: 'POST /goals/:id/scope (same-tier; cross-tier = goal.scope.manage, system)' },
|
|
217
217
|
{ key: 'module.enable', system: false, floor: 'metic', guards: 'POST /modules/:key/enable' },
|
|
218
218
|
{ key: 'module.submit', system: false, floor: 'metic', guards: 'POST /modules/:key/submit, GET /modules/submissions' },
|
|
219
|
+
// Re-run a store version's automatic assessment (task 1003796, ADR 0359). Never a
|
|
220
|
+
// hand-set score: the owner ruled a person may ask for a re-check, not change the number.
|
|
221
|
+
{ key: 'module.assessment.rerun', system: false, floor: 'metic', guards: 'POST /store/modules/:key/versions/:version/reassess' },
|
|
219
222
|
{ key: 'security.report.file', system: false, floor: 'metic', guards: 'POST /security/reports, GET /security/adr' },
|
|
220
223
|
{ key: 'llm_cache.use', system: false, floor: 'metic', guards: 'POST /llm-cache/{lookup,store}' },
|
|
221
224
|
{ key: 'backup.manage', system: false, floor: 'metic', guards: 'GET /backup/status, POST /backup/trigger' },
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
-- government_021_module_assessment_rerun.sql — grant the new
|
|
2
|
+
-- `module.assessment.rerun` atom to Metic and Archon (task 1003796, ADR 0359).
|
|
3
|
+
--
|
|
4
|
+
-- WHAT IT IS. A Metic+ person may ask the store to re-run a published version's
|
|
5
|
+
-- automatic assessment (the Security gate, the Docs grader, then the score). It
|
|
6
|
+
-- never sets a score by hand: the owner ruled (2026-10-01) that nobody may change
|
|
7
|
+
-- a module's score, only trigger a re-check. A re-run costs about 5 cents (one
|
|
8
|
+
-- Docs grader call), which is why it is Metic+ and not open to every builder.
|
|
9
|
+
--
|
|
10
|
+
-- WHY THIS FILE EXISTS. RANK_SEED is derived from the catalog's floors, and the
|
|
11
|
+
-- drift guard (tests/government_seed.mjs) compares it against the union of the
|
|
12
|
+
-- run-once seed plus every later grant migration, per rank. A metic-floor key is
|
|
13
|
+
-- held by metic AND archon, so both are granted here.
|
|
14
|
+
--
|
|
15
|
+
-- Additive only: one new permission key granted to two ranks; nothing is revoked.
|
|
16
|
+
-- Approved by the owner (Will, Archon) on 2026-10-01.
|
|
17
|
+
-- Idempotent (ON CONFLICT DO NOTHING); forward-safe (INSERT only).
|
|
18
|
+
--
|
|
19
|
+
-- The `SELECT '<rank>', unnest(ARRAY[…])` shape is load-bearing: the drift guard
|
|
20
|
+
-- scans for it literally.
|
|
21
|
+
|
|
22
|
+
BEGIN;
|
|
23
|
+
|
|
24
|
+
INSERT INTO government_rank_permissions (rank_key, permission_key)
|
|
25
|
+
SELECT 'metic', unnest(ARRAY[
|
|
26
|
+
'module.assessment.rerun'
|
|
27
|
+
])
|
|
28
|
+
ON CONFLICT (rank_key, permission_key) DO NOTHING;
|
|
29
|
+
|
|
30
|
+
INSERT INTO government_rank_permissions (rank_key, permission_key)
|
|
31
|
+
SELECT 'archon', unnest(ARRAY[
|
|
32
|
+
'module.assessment.rerun'
|
|
33
|
+
])
|
|
34
|
+
ON CONFLICT (rank_key, permission_key) DO NOTHING;
|
|
35
|
+
|
|
36
|
+
COMMIT;
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
// An `adopt` ALSO passes the credential
|
|
22
22
|
// preflight — ../credential-preflight.js,
|
|
23
23
|
// task 1002909; greenfield is exempt; a full box → 409, ../capacity-gate.js)
|
|
24
|
+
// POST /provisioning/physics-check — the planet-physics read before anything exists:
|
|
25
|
+
// the screening stop + the soft-limit table
|
|
26
|
+
// for the answers so far; writes nothing (task 1004418)
|
|
24
27
|
// GET /provisioning/instances — list the caller's instances
|
|
25
28
|
// GET /provisioning/instances/:id — read one of the caller's instances
|
|
26
29
|
// (also SELF-HEALS its catalog projection,
|
|
@@ -196,6 +199,14 @@ module.exports = function provisioningRoutes() {
|
|
|
196
199
|
max: 10,
|
|
197
200
|
key: (req) => (req.builder ? `b:${req.builder.id}` : clientIp(req)),
|
|
198
201
|
});
|
|
202
|
+
// Limiter for the planet-physics read (task 1004418). Signed-in and writes nothing,
|
|
203
|
+
// but the wizard asks it as the founder answers the four questions, so it is a
|
|
204
|
+
// repeated check like the slug one: 60 a minute is roomy for a person clicking
|
|
205
|
+
// through and sheds a loop. Keyed on the BUILDER for the slug check's reason.
|
|
206
|
+
const physicsCheckRateLimit = makeAskRateLimiter({
|
|
207
|
+
max: 60,
|
|
208
|
+
key: (req) => (req.builder ? `b:${req.builder.id}` : clientIp(req)),
|
|
209
|
+
});
|
|
199
210
|
|
|
200
211
|
// Route ORDER is deliberate (the box.js precedent): the Archon-gated routes are
|
|
201
212
|
// declared FIRST, then the any-builder routes. The route-rank auditor
|
|
@@ -285,6 +296,30 @@ module.exports = function provisioningRoutes() {
|
|
|
285
296
|
}
|
|
286
297
|
});
|
|
287
298
|
|
|
299
|
+
// POST /provisioning/physics-check — the planet-physics questions' read BEFORE anything
|
|
300
|
+
// exists (task 1004418, BV2.PS07). The create wizard asks it as the founder answers:
|
|
301
|
+
// would this description stop at the screening screen, and which options do the
|
|
302
|
+
// answers so far hide, grey or annotate (the PS02 soft-limit table, spec D6)? It is
|
|
303
|
+
// the same screen and the same table the create runs, so the screens can never
|
|
304
|
+
// disagree with the Create. Writes nothing, and the soft limits stay advice
|
|
305
|
+
// (`enforced: false`); the create still re-checks everything itself.
|
|
306
|
+
router.post('/provisioning/physics-check', auth.requireBuilder, physicsCheckRateLimit, (req, res) => {
|
|
307
|
+
if (validateOrRespond(req, res, {
|
|
308
|
+
description: { type: 'string', maxLength: provisioning.DESCRIPTION_MAX },
|
|
309
|
+
detail: { type: 'object' },
|
|
310
|
+
})) return;
|
|
311
|
+
const body = req.body || {};
|
|
312
|
+
const detailFault = badProjectDetail(body.detail);
|
|
313
|
+
if (detailFault) return res.fail(detailFault.code, { status: 400, message: detailFault.message });
|
|
314
|
+
const screened = screenedOut(body.description);
|
|
315
|
+
res.set('Cache-Control', 'no-store');
|
|
316
|
+
res.json({
|
|
317
|
+
stop: !!screened,
|
|
318
|
+
message: screened ? screened.message : null,
|
|
319
|
+
soft_limits: provisioning.softLimitsFor(body.detail || {}),
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
|
|
288
323
|
// POST /provisioning/instances — request a new instance. rank: any authenticated
|
|
289
324
|
// builder (own resource) for `byo-host`, and for their FIRST live `cloud-host` (task
|
|
290
325
|
// 1004412, ADR 0354). A further cloud-host needs provisioning.fleet.manage, and
|
|
@@ -1603,7 +1603,7 @@ p.sec-p{font-size:var(--fs-lede);font-weight:500;color:var(--ink-soft);line-heig
|
|
|
1603
1603
|
/* the six-step strip as the rail: six hairlines, a 7px dot, one lit step on the
|
|
1604
1604
|
accent with its halo, the number in the display voice, the name in the label
|
|
1605
1605
|
face; a step already answered (role=button) stays a way back */
|
|
1606
|
-
#view-new .steps{display:grid;grid-template-columns:repeat(
|
|
1606
|
+
#view-new .steps{display:grid;grid-template-columns:repeat(10,1fr);gap:0 10px;align-items:start;margin:0 0 40px;}
|
|
1607
1607
|
#view-new .steps li{display:block;position:relative;border-top:1px solid var(--rule);padding:12px 0 0;gap:0;}
|
|
1608
1608
|
#view-new .steps li::before{content:"";position:absolute;top:-4px;left:0;right:auto;width:7px;height:7px;margin:0;border-radius:50%;border:1px solid var(--rule);background:var(--bg);}
|
|
1609
1609
|
#view-new .steps .snum{display:block;width:auto;height:auto;border:0;border-radius:0;background:none;font-family:var(--font-display);font-weight:300;font-size:22px;letter-spacing:-.02em;line-height:1.1;color:var(--ink-faint);margin-bottom:2px;}
|