@bongos/core 1.21.133 → 1.21.134

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 CHANGED
@@ -2,22 +2,22 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.21.133",
6
- "core_contract": "1.21.133",
7
- "source_commit": "e3e005eed0218082a8724a9aa638657aced70c56",
5
+ "core_version": "1.21.134",
6
+ "core_contract": "1.21.134",
7
+ "source_commit": "7f0bb837924e95ccff5e553a687b228eef70ce30",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-10-15T20:42:02.660Z",
9
+ "built_at": "2026-10-15T21:28:31.615Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
- "docs_redacted": 607,
12
+ "docs_redacted": 608,
13
13
  "agent_docs_stubbed": 28,
14
14
  "functional_verbatim": 3149,
15
15
  "rules": 3,
16
16
  "gate_literals": 3,
17
17
  "gate": "passed"
18
18
  },
19
- "file_count": 3785,
20
- "tree_sha256": "cf35d4f10854a481a256f0d2cec544ac8af781a48de1b57c1c1d796da2247311",
19
+ "file_count": 3786,
20
+ "tree_sha256": "f5dfa49c3f439d7d10d733cc5f9c0940cf30172fa438d8757a49b7a6cd636fc8",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/ask-for-help/SKILL.md",
@@ -2369,10 +2369,15 @@
2369
2369
  "mode": "0000644",
2370
2370
  "sha256": "12602b29d3a701e7ad1e6c411f7cbf6de3c3148b9c08624b6197968de8079c5f"
2371
2371
  },
2372
+ {
2373
+ "path": "docs/adr/0382-a-hardware-card-is-a-passkey-step-up-an-archon-switches-on-per-builder.md",
2374
+ "mode": "0000644",
2375
+ "sha256": "ae20b78283a004ba64d66cd0eec7db2c0d1a6ba211560e37f99d188a94f11668"
2376
+ },
2372
2377
  {
2373
2378
  "path": "docs/adr/README.md",
2374
2379
  "mode": "0000644",
2375
- "sha256": "6d2a97e2c7ce557aad5e82dd02c529dc05f0bdf6c014df9a812d3e65c7216763"
2380
+ "sha256": "c5e8e4a27cf07799da677172e50a0c06d9be9bdf31f511416b40e392d268ffc0"
2376
2381
  },
2377
2382
  {
2378
2383
  "path": "docs/api-reference.md",
@@ -2922,7 +2927,7 @@
2922
2927
  {
2923
2928
  "path": "docs/module-api-changelog.md",
2924
2929
  "mode": "0000644",
2925
- "sha256": "aea7064cd17fd4d1fc01c0200f2308dd2a86d619c5597a08ec6e48ed0fea84c1"
2930
+ "sha256": "e77d3f864bca9f90cc1dbf2cfedd61dc315a27bb37084bbc8873ed144e7afa64"
2926
2931
  },
2927
2932
  {
2928
2933
  "path": "docs/modules-contract.md",
@@ -10517,12 +10522,12 @@
10517
10522
  {
10518
10523
  "path": "package-lock.json",
10519
10524
  "mode": "0000644",
10520
- "sha256": "1cd22cb8399eb1ee3a2d88e4daa62bf7e297bd5fe8c4b2dff3d479d22424397a"
10525
+ "sha256": "16a65f4d7586e27be39c10448d7a39a0782725e1c050655e08ed930e3dc50ed5"
10521
10526
  },
10522
10527
  {
10523
10528
  "path": "package.json",
10524
10529
  "mode": "0000644",
10525
- "sha256": "fab9569c9c6d74288d0600330226824092a5f614cad6dc56fa2aeadc66390562"
10530
+ "sha256": "f6a3dfa7fb0820113d9448f1b011a6e2edaeb3f06656d9530e2dbea160e112f0"
10526
10531
  },
10527
10532
  {
10528
10533
  "path": "public-docs/index.html",
@@ -10542,7 +10547,7 @@
10542
10547
  {
10543
10548
  "path": "release-notes.json",
10544
10549
  "mode": "0000644",
10545
- "sha256": "f1ff443de9dc0455809075798cb9d83b321c92432a551e23531cd53487d9aad7"
10550
+ "sha256": "0a7de5fe356b571a5dcaf748c830d457a365165d17b0d733594b6bfc89ef6267"
10546
10551
  },
10547
10552
  {
10548
10553
  "path": "scripts/cron/style_guide_audit.sh",
@@ -12897,7 +12902,7 @@
12897
12902
  {
12898
12903
  "path": "src/module-api.js",
12899
12904
  "mode": "0000644",
12900
- "sha256": "e23647f9c7de84f53386722f8666995b6e49ee459ff78e037cef956c9d4874eb"
12905
+ "sha256": "d253382a583b4d8ad6289d41cf1e5db7ebe264ed7bf54ab93b5b0b44f46b5135"
12901
12906
  },
12902
12907
  {
12903
12908
  "path": "src/module-loader/catalog.js",
@@ -0,0 +1,64 @@
1
+ # 0382 — A hardware security card is a passkey step-up check, switched on per builder by an Archon
2
+
3
+ - **Status:** Proposed (research draft — nothing is built by this ADR)
4
+ - **Date:** 2026-10-15
5
+ - **Task:** task 1004676 (from idea 1001144)
6
+ - **Decided by:** pending owner review
7
+ - **Related:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (trust boundary: the server enforces)
8
+
9
+ ## Context
10
+
11
+ A builder should be able to tap an NFC card on a reader to prove who they are before reaching sensitive features. The owner has an NFC biometric card with FIDO on it and wants to test it.
12
+
13
+ Findings from the code (2026-10-15):
14
+
15
+ 1. **No passkey / WebAuthn support exists.** `grep` over `src/` and `package.json` finds nothing. Sign-in is GitHub OAuth (`src/bongos/auth-github.js`) or, for hosted projects, the hub as identity provider (`auth-idp.js`). Both end in the same `builder_sessions` row (`auth.js`), and rank is read fresh from the DB on every request.
16
+ 2. **A step-up check fits the existing gates.** `requireBuilder` / `requireRank` / `requirePermission` in `auth.js` already run per request, so one more gate can ask "has this session proven a card recently?".
17
+ 3. **A plain RFID / PC-SC reader is not needed.** A FIDO2 card is a standard WebAuthn authenticator: the browser talks to it over NFC (or USB). No driver or PC/SC middleware is required for this path.
18
+
19
+ ## Decision
20
+
21
+ **D1 — Use WebAuthn (FIDO2) via a vetted library** (`@simplewebauthn/server` + `@simplewebauthn/browser`). No hand-rolled CBOR/COSE parsing.
22
+
23
+ **D2 — The card is a second factor, never the first.** GitHub (or hub) sign-in stays. The card adds a *step-up*: a session that has done a card check in the last **10 minutes** may reach the protected actions. The proof is a timestamp column on the server-side `builder_sessions` row, set only by the verify route; nothing the client sends counts as proof.
24
+
25
+ **D3 — Register first.** A builder registers a card while signed in the normal way. The requirement can only be switched on for a builder who has at least one registered credential, so nobody is locked out by a switch. The Archon route refuses (409) when the builder has no credential.
26
+
27
+ **D4 — An Archon switches the requirement on or off per builder.** Default is off for everyone. The switch is a server-side flag on the builder, set through an Archon-ranked route (rank checked fresh, per ADR 0016). Local file edits cannot flip it.
28
+
29
+ **D5 — What the card guards (first cut, owner to confirm):** rank changes, deploy / go-live, session revocation, and any payout or treasury action. Chosen as the actions where a stolen session does the most damage.
30
+
31
+ **D6 — Challenge and credential hygiene.** Random single-use challenges, server-stored, short-lived; verify origin and RP ID; `userVerification: 'required'` (the card's biometric is the second proof); credentials table with `credential_id`, `public_key`, `sign_count`, `transports`, `aaguid`, `nickname`, `created_at`, `last_used_at`; an opaque random user handle, never the email. A `sign_count` that goes backwards (when the card reports a counter) fails the check and is logged as a possible clone. Indexes on `credential_id` and `builder_id`. Challenges carry a TTL and are swept.
32
+
33
+ **D7 — RP ID.** The RP ID is the registrable domain. Changing it later invalidates every credential, so it is set once, by the owner. Hosted projects on other subdomains need their own decision (one RP ID per host, or the hub as the sole place a card is checked).
34
+
35
+ **D8 — Recovery is its own decision, not part of this ADR.** The owner will define the lost-card protocol. Until then the Archon off-switch (D4) is the recovery path, and a builder may register more than one card.
36
+
37
+ ## Alternatives considered
38
+
39
+ - **PC/SC reader middleware** reading the card's UID: rejected. A UID is a copyable identifier, not a cryptographic proof, and it needs drivers on every machine.
40
+ - **Card as the only login:** rejected. It removes the fallback and makes a lost card a lockout.
41
+
42
+ ## Testing and rollout
43
+
44
+ - **Local:** passkeys work on `http://localhost`. Chrome DevTools' virtual authenticator tests without hardware; the real card is tested on the owner's machine.
45
+ - **Rollout:** ship with the switch off for everyone (safe to land); the owner turns it on for their own account and tries the real card on the live site; then an Archon enables it builder by builder as cards are handed out.
46
+
47
+ ## Hardware and cost
48
+
49
+ One FIDO2 NFC card (owner already has one), plus an NFC reader only if the computer has no NFC (a FIDO-compatible USB NFC reader is roughly $20–40). Phones with NFC need nothing extra.
50
+
51
+ ## Follow-up tasks
52
+
53
+ Filed from this research: tasks 1004746 (registration page), 1004747 (step-up gate), 1004748 (Archon switch), 1004749 (lost-card recovery), and idea 1001246 (WebAuthn foundation). Sizing: one dependency, one table, roughly five small tasks, about a working week in total.
54
+
55
+ 1. WebAuthn foundation: library, credentials table, challenge store.
56
+ 2. Card registration page for a signed-in builder (+ list / rename / remove).
57
+ 3. The step-up gate and the protected actions of D5.
58
+ 4. The Archon per-builder switch (D4) and its audit-log entry.
59
+ 5. Lost-card recovery (waits on the owner's protocol).
60
+
61
+ ## Consequences
62
+
63
+ - One new dependency and one new table; no change to how anyone signs in until the switch is turned on.
64
+ - The protected-action list must be kept in step with new sensitive routes (a fitness check is a worthwhile follow-up).
@@ -500,3 +500,4 @@ These 20 numbers are each shared by exactly two files. They are **accepted histo
500
500
  | 0379 | [**The treasury is pots per goal, a reserve, and borrowing, over real spend** ([task 1004712](https://cloudbongos.com/builders#/task/1004712), goal 1000111). **D1:** spend is cost_log through each task's goal, this month, read every time. **D2:** a pot is a budget the Treasury's holder gives a goal (`government_pots`, government_031). **D3:** the reserve is last month's spend no pot was given, less loans; it may be overdrawn. **D4:** a dry pot files a borrow (poller), its ask stored on `treasury_spending:<id>` and routed to the Treasury. **D5:** answered once (lend, half, no) by its seat. **D6:** the spend cap is a project setting, off by default. **D7:** the docket source and the hall's pots, reserve, beacon and book are real.](0379-the-treasury-is-pots-per-goal-a-reserve-and-borrowing-over-real-spend.md) | government / treasury / city |
501
501
  | 0380 | [**A strictness preset is a bundle of laws, switched by one laws vote and read from the laws in force** ([task 1004715](https://cloudbongos.com/builders#/task/1004715), goal 1000111). **D1:** Open workshop, Guild, Factory are catalogues of laws in `presets.js`; every lock names a stored personal setting. **D2:** a switch is ONE laws amendment through `board.proposeLaws` (`POST /government/board/presets`); only its passing writes. **D3:** the preset in force is read from the laws in force, never stored; nothing is seeded. **D4:** `GET /government/presets` says what each would lock; My agents and the Charter are real.](0380-a-strictness-preset-is-a-bundle-of-laws-switched-by-one-laws-vote.md) | government / laws / my agents |
502
502
  | 0381 | [**The hub moves each hosted project's core on its own, by that project's update rule** ([task 1004729](https://cloudbongos.com/builders#/task/1004729), goal 1000090). Amends ADR 0293's "not automatic" for hosted projects. **D1:** after each snapshot the runner queues a preflight for `recommended`, then the move once that preflight passed. **D2:** through `enqueueIntent` as `runner:auto-upgrade`; never the control-plane row. **D3:** one automatic intent per tick. **D4:** a target that already failed or was refused is held (read from existing rows; task 1004730 is the richer hold). **D5:** `BONGOS_AUTO_CORE_UPGRADE=off` stops it platform-wide; default on; `pinned` is the per-project switch.](0381-the-hub-moves-each-hosted-project-by-its-update-rule.md) | provisioning / core upgrade / automation |
503
+ | 0382 | [**A hardware card is a passkey step-up check, switched on per builder by an Archon** ([task 1004676](https://cloudbongos.com/builders#/task/1004676), proposed). No WebAuthn exists today; sign-in is GitHub OAuth or the hub IdP. **D1:** WebAuthn via a vetted library. **D2:** the card is a second factor, a server-recorded step-up, never the first. **D3:** register first; the requirement needs a registered card. **D4:** an Archon switches it on per builder, default off. **D5:** guards rank changes, deploy, session revoke, payouts. No PC/SC reader needed. Rejected: PC/SC middleware, card as sole login.](0382-a-hardware-card-is-a-passkey-step-up-an-archon-switches-on-per-builder.md) | auth / security |
@@ -3103,5 +3103,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
3103
3103
  landed since 1.21.131 with no explicit bump. run 38783817499. (task 1002620)
3104
3104
  1.21.133 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3105
3105
  landed since 1.21.132 with no explicit bump. run 38803950047. (task 1002620)
3106
+ 1.21.134 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
3107
+ landed since 1.21.133 with no explicit bump. run 38810062389. (task 1002620)
3106
3108
  ---------------------------------------------------------------------------
3107
3109
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.21.133",
3
+ "version": "1.21.134",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.21.133",
9
+ "version": "1.21.134",
10
10
  "license": "AGPL-3.0-or-later",
11
11
  "dependencies": {
12
12
  "express": "^4.21.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.21.133",
3
+ "version": "1.21.134",
4
4
  "description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "main": "src/platform-server.js",
@@ -9800,5 +9800,11 @@
9800
9800
  "id": "1003463",
9801
9801
  "text": "The Goals page can now create a goal and add a done-when criterion to it."
9802
9802
  }
9803
+ ],
9804
+ "1.21.134": [
9805
+ {
9806
+ "id": "1004676",
9807
+ "text": "Researched adding a tap-your-security-card check to Bongos. Plan written up and follow-up build work filed."
9808
+ }
9803
9809
  ]
9804
9810
  }
package/src/module-api.js CHANGED
@@ -75,7 +75,7 @@ const { responsibilityFor, ROLE_RESPONSIBILITIES } = require('./role-responsibil
75
75
  // MAJOR (see allowBoxScope below): passes the request through untouched.
76
76
  function deprecatedNoopMiddleware(_req, _res, next) { next(); }
77
77
 
78
- const CORE_VERSION = '1.21.133'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
78
+ const CORE_VERSION = '1.21.134'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
79
79
 
80
80
  // A namespaced logger so a module's log lines are attributable + consistent.
81
81
  // Usage: const log = api.logger('discord'); log.info('mounted');