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
+3 -3
View File
@@ -9,7 +9,7 @@ Former **DOCUMENTATION.md** §10. [Reference index →](README.md)
| Item | Detail |
| --------------------------- | -------------------------------------------------------------------------- |
| `name` | `bare-os-protocol` |
| `version` | `0.7.0` (wave 11: **`bits11`**, twenty new seed RPCs through **`mirror_drive_compaction_v6`**, **`compact_ping_v5`**; couple boot policy **`requireProtocolPackageMin`** to this semver) |
| `version` | `0.9.0` (wire v2: **`kernelCapabilityWords`**; couple boot policy **`requireProtocolPackageMin`** to this semver) |
| `main` / `exports["."]` | `./index.js` |
| `exports["./constants.js"]` | `./constants.js` (for `bare-os-protocol/constants.js` imports) |
| `exports["./messages"]` | `./lib/messages.js` |
@@ -28,7 +28,7 @@ Re-exports from `./lib/channel.js`: `setupSeedChannel`.
Re-exports from `./lib/seed-rpc-methods.js`: `BARE_OS_SEED_RPC_METHODS`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAMES`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAME_SET`.
Re-exports **`STOCK_V5`****`STOCK_V11`** and **`BARE_OS_FEATURE5_*`** … **`FEATURE11_*`** from `./lib/kernel-feature-bits.js` (alongside earlier stock words). **`BARE_OS_PROTOCOL_PACKAGE_VERSION`** is published from `./lib/protocol-meta.js` for **`ctx.bareOsProtocolPackageVersion`** comparisons.
Re-exports **`BARE_OS_KERNEL_FEATURES_STOCK_WORD_*`** stock masks and **`BARE_OS_FEATURE5_*`** … **`FEATURE11_*`** from `./lib/kernel-feature-bits.js` (alongside earlier words). Re-exports wire v2 helpers from **`./lib/kernel-capability-wire.js`** (**`kernelCapabilityWords`** shape, **`BARE_OS_KERNEL_CAPABILITY_WORD_KEYS`**, …). **`BARE_OS_PROTOCOL_PACKAGE_VERSION`** is published from `./lib/protocol-meta.js` for **`ctx.bareOsProtocolPackageVersion`** comparisons.
### 10.3 [packages/bare-os-protocol/constants.js](../../packages/bare-os-protocol/constants.js)
@@ -78,5 +78,5 @@ Brittle tests:
5. `msgSearchReqEncoding` encode/decode.
6. `TOPIC_STRING === 'bare-os-v1'`.
7. Seed RPC method list length matches **`BARE_OS_SEED_RPC_METHODS`** / **`kernel_info`** surface.
8. **`BARE_OS_KERNEL_FEATURES_STOCK_V5`** is non-zero.
8. **`BARE_OS_KERNEL_FEATURES_STOCK_WORD_HOST_TRANSPORT_DELEGATES`** is non-zero.