@bongos/core 1.19.373 → 1.19.375

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 (51) hide show
  1. package/.bongos-core.json +98 -48
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +6 -0
  4. package/clients/bongos-client/index.cjs +6 -0
  5. package/clients/bongos-client/index.d.ts +8 -0
  6. package/clients/bongos-client/index.mjs +6 -0
  7. package/docs/adr/0194-joinability-one-door-decision.md +42 -0
  8. package/docs/adr/README.md +1 -0
  9. package/docs/api/openapi.json +159 -4
  10. package/docs/api-reference.md +7 -4
  11. package/docs/copy-inventory.md +252 -233
  12. package/docs/copy-registry.json +503 -301
  13. package/modules/builder-settings/profile-nudge-prefs.js +125 -0
  14. package/modules/builder-settings/routes/settings.js +48 -0
  15. package/modules/dev-box/app/src/vendor/bongos-client.cjs +6 -0
  16. package/modules/government/catalog.js +1 -1
  17. package/modules/hall-ui/public/builders.js +5 -3
  18. package/modules/hall-ui/public/goal-inbox.js +10 -0
  19. package/modules/hall-ui/public/hall-render.js +63 -22
  20. package/modules/hall-ui/public/index.html +4 -0
  21. package/modules/hall-ui/public/my-projects.js +6 -1
  22. package/modules/hall-ui/public/profile-nudge.js +122 -0
  23. package/modules/hall-ui/public/watch.css +8 -0
  24. package/modules/hall-ui/public/watch.js +56 -3
  25. package/modules/onboarding/module.json +1 -1
  26. package/modules/onboarding/routes/access-requests.js +87 -1
  27. package/modules/platform-identity/routes/my-projects.js +35 -9
  28. package/package-lock.json +2 -2
  29. package/package.json +1 -1
  30. package/public-landing/projects.html +169 -3
  31. package/scripts/gds/fitness-checks-write-validation.js +1 -0
  32. package/scripts/gds/login.js +24 -3
  33. package/scripts/gds/ship-land.js +94 -3
  34. package/src/bongos/auth-admission.js +50 -5
  35. package/src/bongos/auth.js +2 -1
  36. package/src/bongos/routes/auth.js +15 -0
  37. package/src/branding.js +3 -2
  38. package/src/module-api.js +22 -1
  39. package/tests/access_requests_invite.mjs +165 -0
  40. package/tests/auth_admission_gate.mjs +42 -0
  41. package/tests/join_relay_outcome.mjs +61 -0
  42. package/tests/joinability_apply.mjs +72 -0
  43. package/tests/joinability_invite_only.mjs +192 -0
  44. package/tests/joinability_open.mjs +89 -0
  45. package/tests/module_api.mjs +1 -0
  46. package/tests/profile_nudge_prefs.mjs +97 -0
  47. package/tests/projects_hub.mjs +76 -2
  48. package/tests/projects_hub_pre_uat.mjs +4 -2
  49. package/tests/public_landing_projects.mjs +10 -3
  50. package/tests/ship_push_diagnosis.mjs +78 -0
  51. package/tests/sound_player.mjs +38 -0
@@ -309,6 +309,58 @@
309
309
  "security": []
310
310
  }
311
311
  },
312
+ "/access-requests/invite": {
313
+ "post": {
314
+ "operationId": "post_access_requests_invite",
315
+ "tags": [
316
+ "access-requests"
317
+ ],
318
+ "summary": "POST /access-requests/invite",
319
+ "description": "POST /access-requests/invite — an Archon admits a GitHub username BEFORE any request exists (task 1003044): the only way in on an invite-only project, where the public POST refuses, and a shortcut on an apply one. It writes the same access_request row the sign-in gate reads (status 'invited' — hasInvitedAccessRequest), so nothing new is consulted at sign-in; a pending request for that login is resolved in place rather than duplicated. Two Archons inviting the same login at once can each insert a row (the unique index covers pending only): harmless — the gate reads \"any invited row\" — and it shows as two lines in the invited history, so no lock is taken. body: { github_login }. 201 with a new row; 200 with the row when a pending request was resolved; 200 already_invited when an invite already stands; 409 already_member when they have an account. rank: archon — the same gate as resolving a request.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `access_request.review` (all required).",
320
+ "x-rank": "archon",
321
+ "x-source": "modules/onboarding/routes/access-requests.js",
322
+ "x-permissions": [
323
+ "access_request.review"
324
+ ],
325
+ "requestBody": {
326
+ "required": true,
327
+ "content": {
328
+ "application/json": {
329
+ "schema": {
330
+ "$ref": "#/components/schemas/PostAccessRequestsInviteRequest"
331
+ }
332
+ }
333
+ },
334
+ "x-validated": true
335
+ },
336
+ "responses": {
337
+ "200": {
338
+ "description": "Success.",
339
+ "content": {
340
+ "application/json": {
341
+ "schema": {
342
+ "$ref": "#/components/schemas/PostAccessRequestsInviteResponse"
343
+ }
344
+ }
345
+ }
346
+ },
347
+ "400": {
348
+ "$ref": "#/components/responses/ValidationFailed"
349
+ },
350
+ "401": {
351
+ "$ref": "#/components/responses/Unauthorized"
352
+ },
353
+ "403": {
354
+ "$ref": "#/components/responses/Forbidden"
355
+ }
356
+ },
357
+ "security": [
358
+ {
359
+ "builderSession": []
360
+ }
361
+ ]
362
+ }
363
+ },
312
364
  "/access-requests/status": {
313
365
  "get": {
314
366
  "operationId": "get_access_requests_status",
@@ -8204,6 +8256,79 @@
8204
8256
  ]
8205
8257
  }
8206
8258
  },
8259
+ "/me/profile-nudge": {
8260
+ "get": {
8261
+ "operationId": "get_me_profile_nudge",
8262
+ "tags": [
8263
+ "me"
8264
+ ],
8265
+ "summary": "GET /me/profile-nudge",
8266
+ "description": "The \"Complete your profile\" nudge dismissal (task 1002802 / P06). The nudge itself is a DISMISSIBLE line item in the hall's needs-attention inbox — the replacement for the profile-setup wizard Decision 2 rejected. These two routes own only the dismissal FLAG; whether anything is actually missing is composed by the caller, which already holds both inputs (preferred_disciplines from GET /me, bio from GET /me/cross-project — bio lives on the platform identity account, and this module must never reach across to that one). rank: any-builder — own profile config; same posture as /me/render.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
8267
+ "x-rank": "any-builder",
8268
+ "x-source": "modules/builder-settings/routes/settings.js",
8269
+ "responses": {
8270
+ "200": {
8271
+ "description": "Success."
8272
+ },
8273
+ "400": {
8274
+ "$ref": "#/components/responses/BadRequest"
8275
+ },
8276
+ "401": {
8277
+ "$ref": "#/components/responses/Unauthorized"
8278
+ },
8279
+ "403": {
8280
+ "$ref": "#/components/responses/Forbidden"
8281
+ }
8282
+ },
8283
+ "security": [
8284
+ {
8285
+ "builderSession": []
8286
+ }
8287
+ ]
8288
+ },
8289
+ "patch": {
8290
+ "operationId": "patch_me_profile_nudge",
8291
+ "tags": [
8292
+ "me"
8293
+ ],
8294
+ "summary": "PATCH /me/profile-nudge",
8295
+ "description": "PATCH the dismissal. Body: { dismissed: <bool> | null } — null clears the override so the nudge can come back (the undismiss path). Sibling behavior keys are preserved by applyPatch.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
8296
+ "x-rank": "any-builder",
8297
+ "x-source": "modules/builder-settings/routes/settings.js",
8298
+ "requestBody": {
8299
+ "required": false,
8300
+ "content": {
8301
+ "application/json": {
8302
+ "schema": {
8303
+ "type": "object",
8304
+ "additionalProperties": true
8305
+ }
8306
+ }
8307
+ },
8308
+ "x-validated": false,
8309
+ "x-body-undocumented": true
8310
+ },
8311
+ "responses": {
8312
+ "200": {
8313
+ "description": "Success."
8314
+ },
8315
+ "400": {
8316
+ "$ref": "#/components/responses/BadRequest"
8317
+ },
8318
+ "401": {
8319
+ "$ref": "#/components/responses/Unauthorized"
8320
+ },
8321
+ "403": {
8322
+ "$ref": "#/components/responses/Forbidden"
8323
+ }
8324
+ },
8325
+ "security": [
8326
+ {
8327
+ "builderSession": []
8328
+ }
8329
+ ]
8330
+ }
8331
+ },
8207
8332
  "/me/recent-ships": {
8208
8333
  "get": {
8209
8334
  "operationId": "get_me_recent_ships",
@@ -16562,6 +16687,36 @@
16562
16687
  },
16563
16688
  "additionalProperties": false
16564
16689
  },
16690
+ "PostAccessRequestsInviteRequest": {
16691
+ "type": "object",
16692
+ "properties": {
16693
+ "github_login": {
16694
+ "type": "string",
16695
+ "minLength": 1,
16696
+ "maxLength": 60
16697
+ }
16698
+ },
16699
+ "required": [
16700
+ "github_login"
16701
+ ],
16702
+ "additionalProperties": false
16703
+ },
16704
+ "PostAccessRequestsInviteResponse": {
16705
+ "type": "object",
16706
+ "properties": {
16707
+ "ok": {
16708
+ "type": "boolean"
16709
+ },
16710
+ "already_invited": {
16711
+ "type": "boolean"
16712
+ },
16713
+ "github_login": {},
16714
+ "request": {}
16715
+ },
16716
+ "required": [
16717
+ "ok"
16718
+ ]
16719
+ },
16565
16720
  "PostAccessRequestsRequest": {
16566
16721
  "type": "object",
16567
16722
  "properties": {
@@ -20079,9 +20234,9 @@
20079
20234
  "description": "A required dependency/feature is not configured or is temporarily down."
20080
20235
  }
20081
20236
  },
20082
- "x-endpoint-count": 318,
20083
- "x-schema-count": 353,
20084
- "x-undocumented-bodies": 8,
20085
- "x-response-schemas": 237,
20237
+ "x-endpoint-count": 321,
20238
+ "x-schema-count": 355,
20239
+ "x-undocumented-bodies": 9,
20240
+ "x-response-schemas": 238,
20086
20241
  "x-generated-by": "scripts/gds/gen-api-docs.js"
20087
20242
  }
@@ -2,18 +2,19 @@
2
2
 
3
3
  # Bongos API reference
4
4
 
5
- > **Generated from the live route files** — the route file is authoritative. 318 endpoints across 52 route files.
5
+ > **Generated from the live route files** — the route file is authoritative. 321 endpoints across 52 route files.
6
6
  > Machine-readable spec: [`docs/api/openapi.json`](api/openapi.json) (OpenAPI 3.1). Rendered docs site: **`/docs`** (e.g. `cloudbongos.com/docs`).
7
7
 
8
8
  Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>.md)): `public` < `any-builder` < `metic+archon` < `archon`.
9
9
 
10
- ## `access-requests` (4)
10
+ ## `access-requests` (5)
11
11
 
12
12
  | Method | Path | Rank | Body | Description |
13
13
  |---|---|---|---|---|
14
14
  | GET | `/api/bongos/access-requests` | `archon` | — | GET /access-requests?status=pending — Archon queue. |
15
15
  | POST | `/api/bongos/access-requests` | `public` | `github_login`, `display_name`, `note` | POST /access-requests — PUBLIC. |
16
16
  | PATCH | `/api/bongos/access-requests/:id` | `archon` | `status` | PATCH /access-requests/:id — Archon resolves a request. |
17
+ | POST | `/api/bongos/access-requests/invite` | `archon` | `github_login` | POST /access-requests/invite — an Archon admits a GitHub username BEFORE any request exists (task 1003044): the only way in on an invite-… |
17
18
  | GET | `/api/bongos/access-requests/status` | `public` | — | GET /access-requests/status?github_login=X — PUBLIC. |
18
19
 
19
20
  ## `achievements` (1)
@@ -327,7 +328,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
327
328
  | POST | `/api/bongos/llm-cache/lookup` | `metic+archon` | `cache_key`, `tokens_saved_est` | POST /llm-cache/lookup — hit/miss + atomic hit_count bump. |
328
329
  | POST | `/api/bongos/llm-cache/store` | `metic+archon` | `spec`, `result_stdout`, `result_cost_usd` | POST /llm-cache/store — upsert a freshly-produced result. |
329
330
 
330
- ## `me` (25)
331
+ ## `me` (27)
331
332
 
332
333
  | Method | Path | Rank | Body | Description |
333
334
  |---|---|---|---|---|
@@ -347,6 +348,8 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
347
348
  | GET | `/api/bongos/me/model-allocation` | `any-builder` | — | |
348
349
  | PATCH | `/api/bongos/me/model-allocation` | `any-builder` | _undocumented_ | PATCH the model allocation. |
349
350
  | PATCH | `/api/bongos/me/profile` | `any-builder` | `display_name`, `bio`, `links` | the caller's OWN profile fields (P02, task 1002798; spec Decision 4): bio, typed links, account display name. |
351
+ | GET | `/api/bongos/me/profile-nudge` | `any-builder` | — | The "Complete your profile" nudge dismissal (task 1002802 / P06). |
352
+ | PATCH | `/api/bongos/me/profile-nudge` | `any-builder` | _undocumented_ | PATCH the dismissal. |
350
353
  | GET | `/api/bongos/me/recent-ships` | `any-builder` | — | Tasks this builder has shipped, most recent first. |
351
354
  | GET | `/api/bongos/me/render` | `any-builder` | — | Per-builder "render widgets" knob (task 1279, shares the behavior_prefs jsonb / migration 119). |
352
355
  | PATCH | `/api/bongos/me/render` | `any-builder` | _undocumented_ | PATCH the render knob. |
@@ -587,5 +590,5 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
587
590
 
588
591
  ---
589
592
 
590
- > 8 write endpoint(s) take a JSON body with no declared validator schema — their fields are not yet machine-documented. Adding a `validateOrRespond` schema (`src/bongos/routes/_helpers.js`) surfaces them here automatically.
593
+ > 9 write endpoint(s) take a JSON body with no declared validator schema — their fields are not yet machine-documented. Adding a `validateOrRespond` schema (`src/bongos/routes/_helpers.js`) surfaces them here automatically.
591
594