@bongos/core 1.24.5 → 1.24.7
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 +79 -54
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +6 -0
- package/clients/bongos-client/index.cjs +6 -0
- package/clients/bongos-client/index.d.ts +8 -1
- package/clients/bongos-client/index.mjs +6 -0
- package/docs/adr/0371-auto-pickup-applies-a-submitted-tweak-on-the-runner.md +1 -0
- package/docs/adr/0396-google-sign-in-a-stand-in-login-and-a-browser-approved-cli-sign-in.md +8 -0
- package/docs/api/openapi.json +114 -6
- package/docs/api-reference.md +7 -4
- package/docs/copy-inventory.md +52 -43
- package/docs/copy-registry.json +145 -63
- package/docs/module-api-changelog.md +4 -0
- package/docs/page-inventory.json +2 -1
- package/docs/page-readings.json +71 -63
- package/migrations/core_286_credit_log_no_spend.sql +128 -0
- package/modules/copy-desk/auto-close.js +5 -3
- package/modules/copy-desk/page-status.js +7 -4
- package/modules/copy-desk/tests/copy_page_auto_close.mjs +4 -4
- package/modules/hall-ui/public/project-settings.html +4 -4
- package/modules/hall-ui/public/project-settings.js +51 -1
- package/modules/lifecycle/autopickup.js +26 -9
- package/modules/lifecycle/db-claims.js +1 -1
- package/modules/lifecycle/routes/claims.js +7 -1
- package/modules/lifecycle/routes/project-settings.js +71 -10
- package/modules/platform-identity/account-logins.js +131 -0
- package/modules/platform-identity/migrations/platform_identity_035_account_login_email_idx.sql +19 -0
- package/modules/platform-identity/routes/profile.js +29 -1
- package/modules/platform-identity/routes/sso.js +25 -3
- package/modules/public-landing/public/account.html +114 -0
- package/modules/public-landing/public/account.states.json +1 -0
- package/modules/ui-design/kit/serve.js +24 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +24 -0
- package/scripts/bongos/run-unit-tests.js +4 -0
- package/src/bongos/auth-github.js +24 -7
- package/src/bongos/project-settings.js +59 -15
- package/src/bongos/routes/auth-google.js +71 -5
- package/src/bongos/routes/auth-link.js +132 -0
- package/src/bongos/routes.js +2 -0
- package/src/bongos/sign-in-pages.js +20 -1
- package/src/module-api.js +1 -1
- package/tests/account_linking.mjs +289 -0
- package/tests/account_logins_db.mjs +56 -0
- package/tests/autopickup_cap.mjs +203 -11
- package/tests/claims_batch_routes.mjs +79 -12
- package/tests/copy_desk_page_release.mjs +20 -0
- package/tests/copy_stuck_page_tweaks.mjs +2 -2
- package/tests/credit_log_no_spend_db.mjs +160 -0
- package/tests/effective_visibility_predicate.mjs +8 -0
- package/tests/hub_account_page.mjs +91 -5
- package/tests/project_settings_page.mjs +8 -5
package/docs/api/openapi.json
CHANGED
|
@@ -2173,6 +2173,27 @@
|
|
|
2173
2173
|
"security": []
|
|
2174
2174
|
}
|
|
2175
2175
|
},
|
|
2176
|
+
"/auth/link/github/start": {
|
|
2177
|
+
"get": {
|
|
2178
|
+
"operationId": "get_auth_link_github_start",
|
|
2179
|
+
"tags": [
|
|
2180
|
+
"auth"
|
|
2181
|
+
],
|
|
2182
|
+
"summary": "GET /auth/link/github/start",
|
|
2183
|
+
"description": "an OAuth entry point that gates itself: with no live session it sends the person to /account, so only a signed-in person ever links (ADR 0396).\n\n**Rank:** `public` — No authentication — any caller.",
|
|
2184
|
+
"x-rank": "public",
|
|
2185
|
+
"x-source": "src/bongos/routes/auth-link.js",
|
|
2186
|
+
"responses": {
|
|
2187
|
+
"200": {
|
|
2188
|
+
"description": "Success."
|
|
2189
|
+
},
|
|
2190
|
+
"400": {
|
|
2191
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
"security": []
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2176
2197
|
"/auth/logout": {
|
|
2177
2198
|
"post": {
|
|
2178
2199
|
"operationId": "post_auth_logout",
|
|
@@ -2364,6 +2385,27 @@
|
|
|
2364
2385
|
"security": []
|
|
2365
2386
|
}
|
|
2366
2387
|
},
|
|
2388
|
+
"/auth/web/callback/link": {
|
|
2389
|
+
"get": {
|
|
2390
|
+
"operationId": "get_auth_web_callback_link",
|
|
2391
|
+
"tags": [
|
|
2392
|
+
"auth"
|
|
2393
|
+
],
|
|
2394
|
+
"summary": "GET /auth/web/callback/link",
|
|
2395
|
+
"description": "the OAuth callback for linking; the state cookie + code are the bearer, and the live session cookie names the person (no session: /account).\n\n**Rank:** `public` — No authentication — any caller.",
|
|
2396
|
+
"x-rank": "public",
|
|
2397
|
+
"x-source": "src/bongos/routes/auth-link.js",
|
|
2398
|
+
"responses": {
|
|
2399
|
+
"200": {
|
|
2400
|
+
"description": "Success."
|
|
2401
|
+
},
|
|
2402
|
+
"400": {
|
|
2403
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
"security": []
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2367
2409
|
"/auth/web/handoff": {
|
|
2368
2410
|
"get": {
|
|
2369
2411
|
"operationId": "get_auth_web_handoff",
|
|
@@ -4162,7 +4204,7 @@
|
|
|
4162
4204
|
"claims"
|
|
4163
4205
|
],
|
|
4164
4206
|
"summary": "POST /claims/batch",
|
|
4165
|
-
"description": "Atomic multi-claim. Body: { task_ids: [n,n,n], worktree_name?: string }. All-or-nothing: if any single task fails (already claimed, not ready, or touches conflict with another active claim OR another task in the batch), the whole transaction rolls back and we return 409 with a structured failures[] enumerating every problem found in one pass. rank: any-builder — atomic multi-claim; same Xenos row-level filter applies. V3.R13 (task 237): same newcomer gate as POST /claims — a fresh builder can't sneak around the \"one claim at a time\" rule by batching.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
4207
|
+
"description": "Atomic multi-claim. Body: { task_ids: [n,n,n], worktree_name?: string }. All-or-nothing: if any single task fails (already claimed, not ready, or touches conflict with another active claim OR another task in the batch), the whole transaction rolls back and we return 409 with a structured failures[] enumerating every problem found in one pass. rank: any-builder — atomic multi-claim; same Xenos row-level filter applies. V3.R13 (task 237): same newcomer gate as POST /claims — a fresh builder can't sneak around the \"one claim at a time\" rule by batching. task 1005005: and the same gateOneActiveClaimPerSession as POST /claims, in the same order, so a session already holding a claim in this tree cannot batch more work into it. It reads the SESSION's existing active claims (the batch's own rows do not exist yet), keyed on the body's worktree_name — the caller's tree, which a batch also uses as its row-name prefix. A bind_session:false batch (the hall) has no session and passes, as on /claims.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
4166
4208
|
"x-rank": "any-builder",
|
|
4167
4209
|
"x-source": "modules/lifecycle/routes/claims.js",
|
|
4168
4210
|
"requestBody": {
|
|
@@ -15999,7 +16041,7 @@
|
|
|
15999
16041
|
"me"
|
|
16000
16042
|
],
|
|
16001
16043
|
"summary": "GET /me/sign-in-methods",
|
|
16002
|
-
"description": "the ways the caller's OWN account signs in (task 1004992, ADR 0393): GitHub, Google, or both, with the address each provider vouched for. Keyed on the authenticated github_id (the person key); the provider's user id never crosses. A system:* principal has no platform account: [].\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
16044
|
+
"description": "the ways the caller's OWN account signs in (task 1004992, ADR 0393): GitHub, Google, or both, with the address each provider vouched for. Keyed on the authenticated github_id (the person key); the provider's user id never crosses. A system:* principal has no platform account: []. Each method carries `unlink_refused` (null, 'last_way_in' or 'born_with') so the page can say why a Remove is missing (task 1004995).\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
16003
16045
|
"x-rank": "any-builder",
|
|
16004
16046
|
"x-source": "modules/platform-identity/routes/profile.js",
|
|
16005
16047
|
"responses": {
|
|
@@ -16030,6 +16072,58 @@
|
|
|
16030
16072
|
]
|
|
16031
16073
|
}
|
|
16032
16074
|
},
|
|
16075
|
+
"/me/sign-in-methods/{provider}": {
|
|
16076
|
+
"delete": {
|
|
16077
|
+
"operationId": "delete_me_sign_in_methods_provider",
|
|
16078
|
+
"tags": [
|
|
16079
|
+
"me"
|
|
16080
|
+
],
|
|
16081
|
+
"summary": "DELETE /me/sign-in-methods/:provider",
|
|
16082
|
+
"description": "remove one way in from the caller's OWN account (task 1004995), keyed on the authenticated person key. Never the last way in, and never GitHub from an account born with it (its key is its GitHub id). Adding a way in is a sign-in, so it lives with the sign-in routes, not here.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
16083
|
+
"x-rank": "any-builder",
|
|
16084
|
+
"x-source": "modules/platform-identity/routes/profile.js",
|
|
16085
|
+
"parameters": [
|
|
16086
|
+
{
|
|
16087
|
+
"name": "provider",
|
|
16088
|
+
"in": "path",
|
|
16089
|
+
"required": true,
|
|
16090
|
+
"schema": {
|
|
16091
|
+
"type": "string"
|
|
16092
|
+
},
|
|
16093
|
+
"description": "Path parameter `provider`."
|
|
16094
|
+
}
|
|
16095
|
+
],
|
|
16096
|
+
"responses": {
|
|
16097
|
+
"200": {
|
|
16098
|
+
"description": "Success.",
|
|
16099
|
+
"content": {
|
|
16100
|
+
"application/json": {
|
|
16101
|
+
"schema": {
|
|
16102
|
+
"$ref": "#/components/schemas/DeleteMeSignInMethodsProviderResponse"
|
|
16103
|
+
}
|
|
16104
|
+
}
|
|
16105
|
+
}
|
|
16106
|
+
},
|
|
16107
|
+
"400": {
|
|
16108
|
+
"$ref": "#/components/responses/BadRequest"
|
|
16109
|
+
},
|
|
16110
|
+
"401": {
|
|
16111
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
16112
|
+
},
|
|
16113
|
+
"403": {
|
|
16114
|
+
"$ref": "#/components/responses/Forbidden"
|
|
16115
|
+
},
|
|
16116
|
+
"404": {
|
|
16117
|
+
"$ref": "#/components/responses/NotFound"
|
|
16118
|
+
}
|
|
16119
|
+
},
|
|
16120
|
+
"security": [
|
|
16121
|
+
{
|
|
16122
|
+
"builderSession": []
|
|
16123
|
+
}
|
|
16124
|
+
]
|
|
16125
|
+
}
|
|
16126
|
+
},
|
|
16033
16127
|
"/me/skill-prefs": {
|
|
16034
16128
|
"get": {
|
|
16035
16129
|
"operationId": "get_me_skill_prefs",
|
|
@@ -19839,7 +19933,7 @@
|
|
|
19839
19933
|
"project-settings"
|
|
19840
19934
|
],
|
|
19841
19935
|
"summary": "PATCH /project-settings/tweak-autopickup",
|
|
19842
|
-
"description": "PATCH /project-settings/tweak-autopickup — body { mode?: 'off' | 'on', cap?: n }. rank: project.settings.manage (metic+, government_010), the same atom as the other writes on this page. Each field is validated by the resolver's own parser, and
|
|
19936
|
+
"description": "PATCH /project-settings/tweak-autopickup — body { mode?: 'off' | 'on', cap?: n, rank_caps?: { <rank>: n | null } }. rank: project.settings.manage (metic+, government_010), the same atom as the other writes on this page. Each field is validated by the resolver's own parser, and all are checked before any is written, so a half-valid body writes nothing. rank_caps (task 1005003) is a PARTIAL update: a rank named with a number gets that cap, a rank named with null loses its own cap (and follows the project cap again), and a rank not named is left as it was. A rank must be on the live ladder; each number goes through parseAutopickupCap, the project cap's parser.\n\n**Rank:** `metic+archon` — Metic or Archon rank (review/triage powers).\n\n**Permissions:** `project.settings.manage` (all required).",
|
|
19843
19937
|
"x-rank": "metic+archon",
|
|
19844
19938
|
"x-source": "modules/lifecycle/routes/project-settings.js",
|
|
19845
19939
|
"x-permissions": [
|
|
@@ -29998,6 +30092,17 @@
|
|
|
29998
30092
|
"views"
|
|
29999
30093
|
]
|
|
30000
30094
|
},
|
|
30095
|
+
"DeleteMeSignInMethodsProviderResponse": {
|
|
30096
|
+
"type": "object",
|
|
30097
|
+
"properties": {
|
|
30098
|
+
"ok": {
|
|
30099
|
+
"type": "boolean"
|
|
30100
|
+
}
|
|
30101
|
+
},
|
|
30102
|
+
"required": [
|
|
30103
|
+
"ok"
|
|
30104
|
+
]
|
|
30105
|
+
},
|
|
30001
30106
|
"DeleteMemoryFileResponse": {
|
|
30002
30107
|
"type": "object",
|
|
30003
30108
|
"properties": {
|
|
@@ -33274,6 +33379,9 @@
|
|
|
33274
33379
|
},
|
|
33275
33380
|
"cap": {
|
|
33276
33381
|
"type": "number"
|
|
33382
|
+
},
|
|
33383
|
+
"rank_caps": {
|
|
33384
|
+
"type": "object"
|
|
33277
33385
|
}
|
|
33278
33386
|
},
|
|
33279
33387
|
"additionalProperties": false
|
|
@@ -40436,9 +40544,9 @@
|
|
|
40436
40544
|
"description": "A required dependency/feature is not configured or is temporarily down."
|
|
40437
40545
|
}
|
|
40438
40546
|
},
|
|
40439
|
-
"x-endpoint-count":
|
|
40440
|
-
"x-schema-count":
|
|
40547
|
+
"x-endpoint-count": 639,
|
|
40548
|
+
"x-schema-count": 687,
|
|
40441
40549
|
"x-undocumented-bodies": 12,
|
|
40442
|
-
"x-response-schemas":
|
|
40550
|
+
"x-response-schemas": 442,
|
|
40443
40551
|
"x-generated-by": "scripts/bongos/gen-api-docs.js"
|
|
40444
40552
|
}
|
package/docs/api-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Bongos API reference
|
|
4
4
|
|
|
5
|
-
> **Generated from the live route files** — the route file is authoritative.
|
|
5
|
+
> **Generated from the live route files** — the route file is authoritative. 639 endpoints across 106 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/0016-trust-boundary-server-enforced-permissions.md)): `public` < `any-builder` < `metic+archon` < `archon`.
|
|
@@ -78,7 +78,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
78
78
|
|---|---|---|---|---|
|
|
79
79
|
| GET | `/api/bongos/audit-log` | `metic+archon` | — | GET /api/bongos/audit-log?limit=&offset=&builder_id=&method= Paginated, newest-first. |
|
|
80
80
|
|
|
81
|
-
## `auth` (
|
|
81
|
+
## `auth` (21)
|
|
82
82
|
|
|
83
83
|
| Method | Path | Rank | Body | Description |
|
|
84
84
|
|---|---|---|---|---|
|
|
@@ -94,11 +94,13 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
94
94
|
| POST | `/api/bongos/auth/discord/unlink` | `any-builder` | — | unlink your OWN Discord. |
|
|
95
95
|
| GET | `/api/bongos/auth/google/callback` | `public` | — | OAuth callback; the state cookie + code are the bearer. |
|
|
96
96
|
| GET | `/api/bongos/auth/google/start` | `public` | — | entry into the Google OAuth handshake; identity establishment only. |
|
|
97
|
+
| GET | `/api/bongos/auth/link/github/start` | `public` | — | an OAuth entry point that gates itself: with no live session it sends the person to /account, so only a signed-in person ever links (ADR … |
|
|
97
98
|
| POST | `/api/bongos/auth/logout` | `any-builder` | — | own session, no rank gate (a Xenos can log themselves out). |
|
|
98
99
|
| POST | `/api/bongos/auth/revoke` | `archon` | `session_id` | POST /auth/revoke — V3.R38 / task 259. |
|
|
99
100
|
| POST | `/api/bongos/auth/revoke-all` | `archon` | `builder_id` | POST /auth/revoke-all — V3.R38 / task 259. |
|
|
100
101
|
| GET | `/api/bongos/auth/web/admission-status` | `public` | — | GET /auth/web/admission-status?login=X — the probe renderAccessPendingPage polls (task 1002097). |
|
|
101
102
|
| GET | `/api/bongos/auth/web/callback` | `public` | — | OAuth callback; the state cookie + code are the bearer. |
|
|
103
|
+
| GET | `/api/bongos/auth/web/callback/link` | `public` | — | the OAuth callback for linking; the state cookie + code are the bearer, and the live session cookie names the person (no session: <redacted> |
|
|
102
104
|
| GET | `/api/bongos/auth/web/handoff` | `public` | — | GET /auth/web/handoff?code=&return= — the far side of the one-time session handoff (task 1004357). |
|
|
103
105
|
| GET | `/api/bongos/auth/web/start` | `public` | — | /auth/web — browser flow (used by the /builders page). |
|
|
104
106
|
|
|
@@ -525,7 +527,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
525
527
|
| GET | `/api/bongos/market-watch/ask` | `any-builder` | — | every member reads their own card; nobody else's (isMember in gate()). |
|
|
526
528
|
| POST | `/api/bongos/market-watch/ask/answer` | `any-builder` | `week_of`, `picks`, `names`, `nothing`, `builder_id` | a member answers for themselves only (isMember in gate()). |
|
|
527
529
|
|
|
528
|
-
## `me` (
|
|
530
|
+
## `me` (55)
|
|
529
531
|
|
|
530
532
|
| Method | Path | Rank | Body | Description |
|
|
531
533
|
|---|---|---|---|---|
|
|
@@ -576,6 +578,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
576
578
|
| POST | `/api/bongos/me/sessions/revoke` | `any-builder` | `session_id` | POST /api/bongos/me/sessions/revoke — kill ONE of the caller's own sessions. |
|
|
577
579
|
| POST | `/api/bongos/me/sessions/revoke-all` | `any-builder` | validated | POST /api/bongos/me/sessions/revoke-all — sign out everywhere. |
|
|
578
580
|
| GET | `/api/bongos/me/sign-in-methods` | `any-builder` | — | the ways the caller's OWN account signs in (task 1004992, ADR 0393): GitHub, Google, or both, with the address each provider vouched for. |
|
|
581
|
+
| DELETE | `/api/bongos/me/sign-in-methods/:provider` | `any-builder` | — | remove one way in from the caller's OWN account (task 1004995), keyed on the authenticated person key. |
|
|
579
582
|
| GET | `/api/bongos/me/skill-prefs` | `any-builder` | — | Per-builder skill model preferences (V3.R85 / task 304, migration 037). |
|
|
580
583
|
| PATCH | `/api/bongos/me/skill-prefs` | `any-builder` | _undocumented_ | PATCH a partial set of skill overrides. |
|
|
581
584
|
| GET | `/api/bongos/me/sound-prefs` | `any-builder` | — | Per-builder per-sound on/off preferences (V3.R91 / task 786, migration 075). |
|
|
@@ -723,7 +726,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
723
726
|
| PATCH | `/api/bongos/project-settings/ship-mode` | `metic+archon` | `mode` | PATCH /project-settings/ship-mode — body { mode: 'auto' \| 'manual' }. |
|
|
724
727
|
| PATCH | `/api/bongos/project-settings/spend-cap` | `metic+archon` | `usd` | PATCH /project-settings/spend-cap — body { usd: number \| null } (task 1004712, ADR 0379). |
|
|
725
728
|
| GET | `/api/bongos/project-settings/tweak-autopickup` | `any-builder` | — | |
|
|
726
|
-
| PATCH | `/api/bongos/project-settings/tweak-autopickup` | `metic+archon` | `mode`, `cap` | PATCH /project-settings/tweak-autopickup — body { mode?: 'off' \| 'on', cap?: n }. |
|
|
729
|
+
| PATCH | `/api/bongos/project-settings/tweak-autopickup` | `metic+archon` | `mode`, `cap`, `rank_caps` | PATCH /project-settings/tweak-autopickup — body { mode?: 'off' \| 'on', cap?: n, rank_caps?: { <rank>: n \| null } }. |
|
|
727
730
|
|
|
728
731
|
## `projects` (8)
|
|
729
732
|
|