feat(protocol)!: kernel capability wire v2 and ctx capability maps

Replace top-level seed/proc bits (bits, bits2, … bits11) with
kernelCapabilityWords (semantic camelCase keys), kernelCapabilityWireVersion,
and helpers in kernel-capability-wire.js. Bump bare-os-protocol to 0.9.0 and
BARE_OS_KERNEL_FEATURE_BITS_DOC to 15.

Booter: emit/consume v2 on bare_os.capabilities, /proc/bare_os_features, debug
proc, offline LKG seedCapabilityInfo; BARE_OS_SEED_CAP_STRICT walks semantic
keys. Guest ctx exposes frozen bareOsAdvertisedKernelCapabilityWords and
bareOsSeedKernelCapabilityWords; remove per-word bareOsAdvertisedKernelCapabilities*
and bareOsSeedCapability* (BARE_OS_CTX_API_VERSION 1.22.0).

Kernel boot policy (stock init.js + seeder copy) reads advertised/seed words
via those maps. Update bare-os-ctx.d.ts, CI verifiers, compatibility matrix,
capability-words docs, ADR 001, and changelogs.

Fix duplicate re-exports of EXTENDED_SEEDING_PLATFORM and RLIMITS_DELEGATES_SHELL
in bare-os-protocol/index.js (Pear/Bare duplicate export error).
This commit is contained in:
Raven Scott
2026-04-04 07:19:46 -04:00
parent 21a05806b4
commit f13e2db689
62 changed files with 1812 additions and 1734 deletions
+18 -18
View File
@@ -23,47 +23,47 @@ Exits **0** only when **`kernel/`** and **`packages/bare-os-seeder/kernel/`** co
**Usage:** `node scripts/verify-ctx-api-feature-bits.mjs`
Checks that **`packages/bare-os-booter/lib/bare-os-ctx-api.js`** documents a **`BARE_OS_CTX_API_VERSION`** that matches the contract surface (semver discipline) and that stock kernel feature words (**`STOCK_V1`** … **`STOCK_V9`**) in **`bare-os-protocol`** stay referenced from the booter (including **`bits3`** **`bits9`** on the seed handshake). Invoked from the root **`pretest`** hook.
Checks that **`packages/bare-os-booter/lib/bare-os-ctx-api.js`** documents a **`BARE_OS_CTX_API_VERSION`** that matches the contract surface (semver discipline) and that stock kernel feature words (**`BARE_OS_KERNEL_FEATURES_STOCK_WORD_*`**) in **`bare-os-protocol`** stay referenced from the booter (including **`kernelCapabilityWords`** / **`ctx`** maps for wire v2). Invoked from the root **`pretest`** hook.
## `verify-kernel-roadmap-wave3.mjs`
## `verify-kernel-capabilities-contract.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave3.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-contract.mjs`
Static checks for roadmap wave-4…9 plumbing: **`STOCK_V4`** … **`STOCK_V9`**, **`bits4`** **`bits9`** in seed **`capabilities`**, booter **`loadOsFromOfflineLkg`**, strict checks, boot policy schema (through **`requireFeatureBits9`**, **`requirePearRuntimeRange`**, …), kernel **`init.js`** enforcement, and **`seed-rpc-methods.js`** + **`channel.js`** wiring. Root **`pretest`**.
Static checks for capability wire **v2** (**`kernelCapabilityWords`**): stock mask constants in **`kernel-feature-bits.js`**, seed **`capabilities`** in **`channel.js`**, booter **`index.js`** strict checks, boot policy schema keys, kernel **`init.js`** enforcement, and **`seed-rpc-methods.js`** wiring. Root **`pretest`**.
## `verify-kernel-roadmap-wave6.mjs`
## `verify-kernel-capabilities-word-6.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave6.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-6.mjs`
Asserts **[`docs/reference/feature-roadmap.md`](../docs/reference/feature-roadmap.md)** contains a **`## Wave 6`** section with at least **100** numbered table rows (mega-phase checklist). Root **`pretest`**.
Asserts **[`docs/reference/feature-roadmap.md`](../docs/reference/feature-roadmap.md)** contains a **`## Wave 6`** section with at least **100** numbered table rows (integration checklist for word 6). Root **`pretest`**.
## `verify-kernel-roadmap-wave7.mjs`
## `verify-kernel-capabilities-word-7.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave7.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-7.mjs`
Asserts **`feature-roadmap.md`** contains a **`## Wave 7`** section with at least **100** numbered table rows. Root **`pretest`**.
## `verify-kernel-roadmap-wave8.mjs`
## `verify-kernel-capabilities-word-8.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave8.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-8.mjs`
Asserts **`feature-roadmap.md`** contains a **`## Wave 8`** section with at least **100** numbered table rows. Root **`pretest`**.
## `verify-kernel-roadmap-wave9.mjs`
## `verify-kernel-capabilities-word-9.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave9.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-9.mjs`
Asserts **`feature-roadmap.md`** contains a **`## Wave 9`** section with at least **100** numbered table rows. Root **`pretest`**.
## `verify-kernel-roadmap-wave10.mjs`
## `verify-kernel-capabilities-word-10.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave10.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-10.mjs`
Asserts **`feature-roadmap.md`** contains a **`## Wave 10`** section with at least **100** numbered table rows. Root **`pretest`**.
## `verify-kernel-roadmap-wave11.mjs`
## `verify-kernel-capabilities-word-11.mjs`
**Usage:** `node scripts/verify-kernel-roadmap-wave11.mjs`
**Usage:** `node scripts/verify-kernel-capabilities-word-11.mjs`
Asserts **`feature-roadmap.md`** contains a **`## Wave 11`** section with at least **100** numbered table rows. Root **`pretest`**.
@@ -77,7 +77,7 @@ Fails on **`from 'node:…'`** static imports under **`packages/bare-os-booter/i
**Usage:** `node scripts/verify-ctx-dts.mjs`
Ensures **`bare-os-ctx.d.ts`** lists new **`ctx`** fields (**`bareOsAdvertisedKernelBits4`****`bits11`**, Bare runtime semver, protocol/Pear runtime semver, subprocess snapshot, profile reload, delegate fairness, IPC audit, Pear / bundlebee / diagnostics / hrpc / structured-clone / wave911 stubs, …) that exist in **`packages/bare-os-booter/index.js`**. Root **`pretest`**.
Ensures **`bare-os-ctx.d.ts`** lists documented **`ctx`** fields (including **`bareOsAdvertisedKernelCapabilityWords`** / **`bareOsSeedKernelCapabilityWords`**, Bare runtime semver, protocol/Pear runtime semver, subprocess snapshot, profile reload, delegate fairness, IPC audit, Pear / bundlebee / diagnostics / hrpc / structured-clone / wave911 stubs, …) that exist in **`packages/bare-os-booter/index.js`**. Root **`pretest`**.
## `verify-doc-links.mjs`