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:
@@ -4,15 +4,15 @@ Single place to compare **protocol**, **booter `ctx` API**, **feature-bit docume
|
||||
|
||||
| Artifact | Location | Current (stock) |
|
||||
| --- | --- | --- |
|
||||
| **`bareOsCtxApiVersion`** | [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js) | `1.20.0` |
|
||||
| **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** | [`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js) | `13` |
|
||||
| **Capability words** | `bare_os.capabilities` RPC + `/proc/bare_os_features` | `bits`, `bits2`, `bits3`, **`bits4`**, **`bits5`**, **`bits6`**, **`bits7`**, **`bits8`**, **`bits9`**, **`bits10`**, **`bits11`** |
|
||||
| **`bareOsCtxApiVersion`** | [`packages/bare-os-booter/lib/bare-os-ctx-api.js`](../../packages/bare-os-booter/lib/bare-os-ctx-api.js) | `1.22.0` |
|
||||
| **`BARE_OS_KERNEL_FEATURE_BITS_DOC`** | [`packages/bare-os-protocol/lib/kernel-feature-bits.js`](../../packages/bare-os-protocol/lib/kernel-feature-bits.js) | `15` |
|
||||
| **Capability words (wire v2)** | `bare_os.capabilities` RPC + `/proc/bare_os_features` | Top-level **`kernelCapabilityWords`** object: **`primary`**, **`extendedSeedingPlatform`**, **`rlimitsDelegatesShell`**, **`offlineNetExtensions`**, **`hostTransportDelegates`**, **`replicationOperatorSurface`**, **`pearCorestoreHrpc`**, **`bareRuntimeProtoMux`**, **`bareModuleCryptoStaging`**, **`pearInspectLoggerTls`**, **`hypercorePackHrpcLifecycle`** (eleven `uint32` masks; same bit positions as legacy top-level **`bits`**…**`bits11`**) |
|
||||
| **Lifecycle / telemetry NDJSON** | `BARE_OS_LIFECYCLE_SCHEMA_VERSION` in [`bare-os-lifecycle-schema.js`](../../packages/bare-os-booter/lib/bare-os-lifecycle-schema.js) | `10` |
|
||||
| **Protocol package** | [`bare-os-protocol` `package.json`](../../packages/bare-os-protocol/package.json) | see workspace version |
|
||||
|
||||
## Peer assumptions
|
||||
|
||||
- **Seeder** must answer **`bare_os.capabilities`** with **`bits4`** … **`bits11`** when using a current **`bare-os-protocol`** build; older seeders omit newer words (zeros) — use **`BARE_OS_SEED_CAP_STRICT`** only when peers are upgraded.
|
||||
- **Seeder** must answer **`bare_os.capabilities`** with **`kernelCapabilityWords`** (wire **v2**, **`kernelCapabilityWireVersion`: 2**) when using a current **`bare-os-protocol`** build. **`BARE_OS_SEED_CAP_STRICT`** requires that object and full stock coverage per semantic key.
|
||||
- **Offline LKG** booters skip the swarm peer wait when **`BARE_OS_OFFLINE_LKG_BOOT=1`** and **`BARE_OS_LKG_SYSTEM_KEY_HEX`** is set; the system drive must already contain **`/boot/init.js`** in Corestore.
|
||||
|
||||
## See also
|
||||
|
||||
Reference in New Issue
Block a user