feat(kernel): Wave 9 mega-phase — bits9, protocol 0.5, boot policy v9, Pear/Bare bridge
- Add ninth capability word (bits9), STOCK_V9, FEATURE9_*; bump feature bits doc to 11 - Extend seed RPCs, channel wiring, replication/staging adjuncts; bare_os_proc_index schema 5 - Wave 9 /proc JSON via bare-os-wave9-proc.js + VFS aliases; ctx API 1.18.0 + d.ts hooks - Boot policy v9 + kernel/init.js enforcement; extensions registry schema 6; strict bits9 caps - NDJSON lifecycle 8, OTel 6, audit 6; SOCKS proxy map, worker/WASM/env passthrough - Coreutils openssl stub (bare-crypto doc); mediaproc:* worker group; http-fetch SOCKS lookup - CI: verify-kernel-roadmap-wave9.mjs, wave3/ctx/dts/compat updates; pretest chain - Docs: roadmap Wave 9 table, ADR §12, kernel-extensions/capabilities/matrix/protocol/handbook/ developer-guide (node-to-bare-modules, privacy), kernel README, scripts README, changelogs - Sync packages/bare-os-seeder/kernel (init.js, README); refresh booter /proc readdir test list
This commit is contained in:
@@ -10,9 +10,9 @@ Shared **wire format and constants** for the Bare operating system monorepo: Hyp
|
||||
| `topicKey()` | 32-byte topic for `swarm.join()` |
|
||||
| `BLOCK_SIZE`, `MBR_MAGIC` | 512-byte MBR, magic `BIOS` at offset 0 |
|
||||
| `buildMbr` / `parseMbr` | Pack/unpack primary + optional failover Hyperdrive keys |
|
||||
| `setupSeedChannel` | Wire Protomux messages 0–6 for RAM block reads, gossip bitfield, manifest path **search**, **RPC** (incl. `bare_os.capabilities` with **`bits`/`bits2`/`bits3`/`bits4`/`bits5`**, typed errors for unknown RPC methods, `bare_os.replication_status`, `bare_os.replication_queue`, `bare_os.capability_attestation`, `bare_os.mbr_layout`, `bare_os.manifest_hints`, `bare_os.peer_health`, `bare_os.staging_slot`, `bare_os.snapshot_hints`, `bare_os.peer_firewall_stats`, `bare_os.gossip`), and `drive.replicate` |
|
||||
| `setupSeedChannel` | Wire Protomux messages 0–6 for RAM block reads, gossip bitfield, manifest path **search**, **RPC** (incl. `bare_os.capabilities` with **`bits`** … **`bits9`** when non-zero, typed errors for unknown RPC methods, `bare_os.replication_status`, `bare_os.replication_queue`, wave 6–9 RPC short names in **`seed-rpc-methods.js`**, `bare_os.gossip`), and `drive.replicate` |
|
||||
|
||||
Subpath exports: `bare-os-protocol/constants.js`, `bare-os-protocol/messages` (compact-encoding schemas), `bare-os-protocol/kernel-feature-bits.js` (documented booter capability words **`STOCK_V1`** … **`STOCK_V5`**; surfaced in **`/proc/bare_os_features`** and **`/proc/bare_os/`**), `bare-os-protocol/lib/seed-rpc-methods.js` (authoritative **`bare_os.*`** RPC name list for **`kernel_info`**), `bare-os-protocol/protocol-meta.js` (**`BARE_OS_PROTOCOL_PACKAGE_VERSION`** for the seed handshake).
|
||||
Subpath exports: `bare-os-protocol/constants.js`, `bare-os-protocol/messages` (compact-encoding schemas), `bare-os-protocol/kernel-feature-bits.js` (documented booter capability words **`STOCK_V1`** … **`STOCK_V9`**; **`BARE_OS_KERNEL_FEATURE_BITS_DOC=11`**; surfaced in **`/proc/bare_os_features`** and **`/proc/bare_os/`**), `bare-os-protocol/lib/seed-rpc-methods.js` (authoritative **`bare_os.*`** RPC name list for **`kernel_info`**), `bare-os-protocol/protocol-meta.js` (**`BARE_OS_PROTOCOL_PACKAGE_VERSION`** for the seed handshake).
|
||||
|
||||
## Consumers
|
||||
|
||||
|
||||
@@ -160,5 +160,19 @@ export {
|
||||
BARE_OS_FEATURE8_WORKER_NET_WAVE8,
|
||||
BARE_OS_FEATURE8_TELEMETRY_AUDIT_WAVE8,
|
||||
BARE_OS_FEATURE8_DOC_CI_WAVE8,
|
||||
BARE_OS_FEATURE8_HTTP_DHT_PROXY_ROUTES
|
||||
BARE_OS_FEATURE8_HTTP_DHT_PROXY_ROUTES,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9,
|
||||
BARE_OS_FEATURE9_CAP_WORD,
|
||||
BARE_OS_FEATURE9_SEED_RPC_WAVE9,
|
||||
BARE_OS_FEATURE9_REPLICATION_JSON_WAVE9,
|
||||
BARE_OS_FEATURE9_PROC_METRICS_WAVE9,
|
||||
BARE_OS_FEATURE9_BOOT_POLICY_V9,
|
||||
BARE_OS_FEATURE9_KERNEL_EXT_REGISTRY_V6,
|
||||
BARE_OS_FEATURE9_PEAR_BARE_BRIDGE_WAVE9,
|
||||
BARE_OS_FEATURE9_VFS_POSIX_WAVE9,
|
||||
BARE_OS_FEATURE9_INITD_SUBPROC_WAVE9,
|
||||
BARE_OS_FEATURE9_WORKER_NET_WAVE9,
|
||||
BARE_OS_FEATURE9_TELEMETRY_AUDIT_WAVE9,
|
||||
BARE_OS_FEATURE9_DOC_CI_WAVE9,
|
||||
BARE_OS_FEATURE9_HTTP_DHT_PROXY_ROUTES_V2
|
||||
} from './lib/kernel-feature-bits.js'
|
||||
|
||||
@@ -10,7 +10,8 @@ import {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V5,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V6,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V7,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9
|
||||
} from './kernel-feature-bits.js'
|
||||
import {
|
||||
BARE_OS_SEED_RPC_METHODS,
|
||||
@@ -89,7 +90,38 @@ import {
|
||||
* relayCircuitId?: string,
|
||||
* hyperbee2ReadOnlyHintJson?: string,
|
||||
* stagingQuarantineJson?: string,
|
||||
* peerFirewallTransportJson?: string
|
||||
* peerFirewallTransportJson?: string,
|
||||
* pearRuntimeChannel?: string,
|
||||
* pearUpdaterDelegateClass?: string,
|
||||
* seederPearApplingId?: string,
|
||||
* handshakeTokenBucketV3Json?: string,
|
||||
* peerFirewallStatsV4Json?: string,
|
||||
* stagingSlotWave9Json?: string,
|
||||
* compactPingEncodingHint?: string,
|
||||
* pearStageHintJson?: string,
|
||||
* updaterChannelMatrixJson?: string,
|
||||
* applingBundlePointerJson?: string,
|
||||
* driveResolvePolicyJson?: string,
|
||||
* bundleIdFingerprintJson?: string,
|
||||
* hyperdbMigrationHintJson?: string,
|
||||
* sidecarBundleIndexV2Json?: string,
|
||||
* pearMessageQueueSketchJson?: string,
|
||||
* runtimeBootstrapEtagJson?: string,
|
||||
* forceUpdateGuardJson?: string,
|
||||
* gracedownWindowJson?: string,
|
||||
* trybootSlotJson?: string,
|
||||
* hotmodsAllowlistJson?: string,
|
||||
* prefetcherBudgetJson?: string,
|
||||
* opstreamBackpressureJson?: string,
|
||||
* multisigLinkPointerJson?: string,
|
||||
* mdRenderCapsJson?: string,
|
||||
* bundlebeeCliStageV2Json?: string,
|
||||
* seedManifestDiffV2Json?: string,
|
||||
* peerHandshakeLatencyBudgetJson?: string,
|
||||
* mirrorDriveCompactionV4Json?: string,
|
||||
* readyGuardV3Json?: string,
|
||||
* blindRelayCircuitV2Json?: string,
|
||||
* httpDhtProxyRoutesV2Json?: string
|
||||
* }} [opts]
|
||||
*/
|
||||
export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
@@ -181,6 +213,18 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
opts.stagingDrainDeadlineMs >= 0
|
||||
? Math.min(1e12, Math.floor(opts.stagingDrainDeadlineMs))
|
||||
: null
|
||||
const pearRuntimeChannel = String(opts.pearRuntimeChannel ?? '')
|
||||
.trim()
|
||||
.slice(0, 128)
|
||||
const pearUpdaterDelegateClass = String(opts.pearUpdaterDelegateClass ?? '')
|
||||
.trim()
|
||||
.slice(0, 128)
|
||||
const seederPearApplingId = String(opts.seederPearApplingId ?? '')
|
||||
.trim()
|
||||
.slice(0, 256)
|
||||
const compactPingEncodingHint = String(opts.compactPingEncodingHint ?? '')
|
||||
.trim()
|
||||
.slice(0, 64)
|
||||
|
||||
function parseOptJson(raw) {
|
||||
const s = String(raw ?? '').trim()
|
||||
@@ -300,7 +344,8 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
hostBundleId: seederHostBundleId || undefined,
|
||||
pearRuntimeFingerprint:
|
||||
seederPearRuntimeFingerprint || undefined,
|
||||
booterPackageVersion: booterPackageVersionHint || undefined
|
||||
booterPackageVersion: booterPackageVersionHint || undefined,
|
||||
pearApplingId: seederPearApplingId || undefined
|
||||
}),
|
||||
error: ''
|
||||
})
|
||||
@@ -321,6 +366,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
bits6: BARE_OS_KERNEL_FEATURES_STOCK_V6 >>> 0,
|
||||
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
|
||||
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
|
||||
bits9: BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0,
|
||||
protocolPackageVersion: BARE_OS_PROTOCOL_PACKAGE_VERSION,
|
||||
booterPackageVersion: booterPackageVersionHint || undefined,
|
||||
role: 'seeder',
|
||||
@@ -356,6 +402,11 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
if (lag) rs.hyperdbIndexLagHint = lag
|
||||
const hb2 = parseOptJson(opts.hyperbee2ReadOnlyHintJson)
|
||||
if (hb2) rs.hyperbee2ReadOnlyHint = hb2
|
||||
if (pearRuntimeChannel) rs.pearRuntimeChannel = pearRuntimeChannel
|
||||
if (pearUpdaterDelegateClass)
|
||||
rs.pearUpdaterDelegate = pearUpdaterDelegateClass
|
||||
const tb3 = parseOptJson(opts.handshakeTokenBucketV3Json)
|
||||
if (tb3) rs.handshakeTokenBucketV3 = tb3
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
@@ -419,17 +470,20 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
result: JSON.stringify({
|
||||
role: 'seeder',
|
||||
protocol: PROTOCOL_NAME,
|
||||
schema: 5,
|
||||
schema: 6,
|
||||
activeSlot: stagingActiveSlot,
|
||||
pendingSlot: stagingPendingSlot || null,
|
||||
previousSlot: stagingPreviousSlot || null,
|
||||
canarySlot: stagingCanarySlot || null,
|
||||
drainDeadlineMs: stagingDrainDeadlineMs,
|
||||
quarantine: parseOptJson(opts.stagingQuarantineJson),
|
||||
wave9: parseOptJson(opts.stagingSlotWave9Json),
|
||||
rollbackHint:
|
||||
'pending slot is rollback candidate when switching A/B; verify image before activate',
|
||||
tripleSlotNote:
|
||||
'canarySlot is optional third slot metadata for staged rollouts (operator-defined).',
|
||||
schema6Note:
|
||||
'schema 6 adds optional wave9 operator blob; schema 5 fields remain stable.',
|
||||
atMs: Date.now()
|
||||
}),
|
||||
error: ''
|
||||
@@ -580,6 +634,8 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
if (tj) stats.transportBreakdown = tj
|
||||
const sat = parseOptJson(opts.peerFirewallSaturationJson)
|
||||
if (sat) stats.saturationClass = sat
|
||||
const fw4 = parseOptJson(opts.peerFirewallStatsV4Json)
|
||||
if (fw4) stats.wave9 = fw4
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
@@ -587,6 +643,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
role: 'seeder',
|
||||
protocol: PROTOCOL_NAME,
|
||||
firewall: stats,
|
||||
firewallSchema: 4,
|
||||
atMs: Date.now()
|
||||
}),
|
||||
error: ''
|
||||
@@ -704,7 +761,9 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
role: 'seeder',
|
||||
pong: true,
|
||||
tUs,
|
||||
protocol: PROTOCOL_NAME
|
||||
protocol: PROTOCOL_NAME,
|
||||
schema: 3,
|
||||
encodingHint: compactPingEncodingHint || undefined
|
||||
}),
|
||||
error: ''
|
||||
})
|
||||
@@ -1036,6 +1095,193 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
})
|
||||
return
|
||||
}
|
||||
/** @param {Record<string, unknown>} body */
|
||||
function sendWave9Rpc(body) {
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
result: JSON.stringify({
|
||||
role: 'seeder',
|
||||
protocol: PROTOCOL_NAME,
|
||||
atMs: Date.now(),
|
||||
...body
|
||||
}),
|
||||
error: ''
|
||||
})
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_stage_hint') {
|
||||
const h = parseOptJson(opts.pearStageHintJson)
|
||||
sendWave9Rpc({
|
||||
pearStage: h || { note: 'pear-stage slot sketch (non-secret)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'updater_channel_matrix') {
|
||||
const h = parseOptJson(opts.updaterChannelMatrixJson)
|
||||
sendWave9Rpc({
|
||||
channels:
|
||||
h || { note: 'pear-updater / pear-runtime-updater channel matrix' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'appling_bundle_pointer') {
|
||||
const h = parseOptJson(opts.applingBundlePointerJson)
|
||||
sendWave9Rpc({
|
||||
appling: h || { note: 'pear-appling bundle pointer (capped)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'drive_resolve_policy') {
|
||||
const h = parseOptJson(opts.driveResolvePolicyJson)
|
||||
sendWave9Rpc({
|
||||
policy: h || { note: 'drive-resolve / bare-pack-drive policy blob' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'bundle_id_fingerprint') {
|
||||
const h = parseOptJson(opts.bundleIdFingerprintJson)
|
||||
sendWave9Rpc({
|
||||
fingerprint: h || { note: 'bare-bundle-id fingerprint sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'hyperdb_migration_hint') {
|
||||
const h = parseOptJson(opts.hyperdbMigrationHintJson)
|
||||
sendWave9Rpc({
|
||||
migration: h || { note: 'pear-hyperdb migration hint (read-only)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'sidecar_bundle_index_v2') {
|
||||
const h = parseOptJson(opts.sidecarBundleIndexV2Json)
|
||||
sendWave9Rpc({
|
||||
sidecarIndexV2: h || { note: 'bare-sidecar-bundle index v2' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_message_queue_sketch') {
|
||||
const h = parseOptJson(opts.pearMessageQueueSketchJson)
|
||||
sendWave9Rpc({
|
||||
messageQueue: h || { note: 'pear-message queue depth sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'runtime_bootstrap_etag') {
|
||||
const h = parseOptJson(opts.runtimeBootstrapEtagJson)
|
||||
sendWave9Rpc({
|
||||
bootstrapEtag: h || { note: 'pear-runtime-bootstrap cache etag' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'force_update_guard') {
|
||||
const h = parseOptJson(opts.forceUpdateGuardJson)
|
||||
sendWave9Rpc({
|
||||
guard: h || { note: 'pear-force-update guard class' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'gracedown_window') {
|
||||
const h = parseOptJson(opts.gracedownWindowJson)
|
||||
sendWave9Rpc({
|
||||
gracedown: h || { note: 'pear-gracedown draining window' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'tryboot_slot') {
|
||||
const h = parseOptJson(opts.trybootSlotJson)
|
||||
sendWave9Rpc({
|
||||
tryboot: h || { note: 'pear-tryboot canary slot sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'hotmods_allowlist') {
|
||||
const h = parseOptJson(opts.hotmodsAllowlistJson)
|
||||
sendWave9Rpc({
|
||||
hotmods: h || { note: 'pear-hotmods allowlist sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'prefetcher_budget') {
|
||||
const h = parseOptJson(opts.prefetcherBudgetJson)
|
||||
sendWave9Rpc({
|
||||
prefetcher: h || { note: 'pear-prefetcher budget hint' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'opstream_backpressure') {
|
||||
const h = parseOptJson(opts.opstreamBackpressureJson)
|
||||
sendWave9Rpc({
|
||||
opstream: h || { note: 'pear-opstream backpressure class' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'multisig_link_pointer') {
|
||||
const h = parseOptJson(opts.multisigLinkPointerJson)
|
||||
sendWave9Rpc({
|
||||
multisig: h || { note: 'pear-multisig-link pointer only' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'md_render_caps') {
|
||||
const h = parseOptJson(opts.mdRenderCapsJson)
|
||||
sendWave9Rpc({
|
||||
md: h || { note: 'pear-md render capability flags' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'bundlebee_cli_stage_v2') {
|
||||
const h = parseOptJson(opts.bundlebeeCliStageV2Json)
|
||||
sendWave9Rpc({
|
||||
cliStageV2: h || { note: 'bundlebee-cli stage v2 pointer' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'seed_manifest_diff_v2') {
|
||||
const h = parseOptJson(opts.seedManifestDiffV2Json)
|
||||
sendWave9Rpc({
|
||||
manifestDiff: h || { note: 'structured manifest generation diff v2' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'peer_handshake_latency_budget') {
|
||||
const h = parseOptJson(opts.peerHandshakeLatencyBudgetJson)
|
||||
sendWave9Rpc({
|
||||
latencyBudget: h || { note: 'seed handshake SLO budget (ms)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'mirror_drive_compaction_v4') {
|
||||
const h = parseOptJson(opts.mirrorDriveCompactionV4Json)
|
||||
sendWave9Rpc({
|
||||
compactionV4:
|
||||
h || { phases: [], note: 'mirror-drive compaction enum v4' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'ready_guard_v3') {
|
||||
const h = parseOptJson(opts.readyGuardV3Json)
|
||||
sendWave9Rpc({
|
||||
readyGuardV3:
|
||||
h || { matrix: [], note: 'ready-guard v3 enum expansion' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'blind_relay_circuit_v2') {
|
||||
const h = parseOptJson(opts.blindRelayCircuitV2Json)
|
||||
sendWave9Rpc({
|
||||
circuitsV2:
|
||||
h || { note: 'blind-relay circuit v2 with reason codes' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'http_dht_proxy_routes_v2') {
|
||||
const h = parseOptJson(opts.httpDhtProxyRoutesV2Json)
|
||||
sendWave9Rpc({
|
||||
routesV2:
|
||||
h || { revision: 0, note: 'http-dht-proxy routes revision v2' }
|
||||
})
|
||||
return
|
||||
}
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: false,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/** Protocol document version for this bitmask file (bump when bit semantics or governance changes). */
|
||||
export const BARE_OS_KERNEL_FEATURE_BITS_DOC = 10
|
||||
export const BARE_OS_KERNEL_FEATURE_BITS_DOC = 11
|
||||
|
||||
/**
|
||||
* Second capability word (bits 0–31, always use `>>> 0` when masking).
|
||||
@@ -428,6 +428,52 @@ export const BARE_OS_KERNEL_FEATURES_STOCK_V8 =
|
||||
BARE_OS_FEATURE8_DOC_CI_WAVE8 |
|
||||
BARE_OS_FEATURE8_HTTP_DHT_PROXY_ROUTES
|
||||
|
||||
/**
|
||||
* Ninth capability word (bits 0–31, use `>>> 0`). Wave 9 mega-phase — ADR 001 §12.
|
||||
*/
|
||||
/** Word9 bit 0: `bits9` on seed `capabilities` + `/proc/bare_os_features`. */
|
||||
export const BARE_OS_FEATURE9_CAP_WORD = 1 << 0
|
||||
/** Word9 bit 1: Extended seed RPCs (pear_stage_hint, drive_resolve_policy, …). */
|
||||
export const BARE_OS_FEATURE9_SEED_RPC_WAVE9 = 1 << 1
|
||||
/** Word9 bit 2: Replication JSON / staging schema 6 / kernel_info wave 9 adjuncts. */
|
||||
export const BARE_OS_FEATURE9_REPLICATION_JSON_WAVE9 = 1 << 2
|
||||
/** Word9 bit 3: Wave 9 `/proc/bare_os/*.json` (bare-module, bare-crypto, pear-stage, …). */
|
||||
export const BARE_OS_FEATURE9_PROC_METRICS_WAVE9 = 1 << 3
|
||||
/** Word9 bit 4: Boot policy v9 (`requireFeatureBits9`, `requireBareCryptoMin`, …). */
|
||||
export const BARE_OS_FEATURE9_BOOT_POLICY_V9 = 1 << 4
|
||||
/** Word9 bit 5: Kernel extension registry v6 + extensionSignerPins v2 hints. */
|
||||
export const BARE_OS_FEATURE9_KERNEL_EXT_REGISTRY_V6 = 1 << 5
|
||||
/** Word9 bit 6: Pear/Bare bridge wave 9 (stage hint, bare module probe, …). */
|
||||
export const BARE_OS_FEATURE9_PEAR_BARE_BRIDGE_WAVE9 = 1 << 6
|
||||
/** Word9 bit 7: VFS/POSIX/shell wave 9 (statfs sketch, tar hardlink, crypto stub). */
|
||||
export const BARE_OS_FEATURE9_VFS_POSIX_WAVE9 = 1 << 7
|
||||
/** Word9 bit 8: Initd / subprocess / limits wave 9. */
|
||||
export const BARE_OS_FEATURE9_INITD_SUBPROC_WAVE9 = 1 << 8
|
||||
/** Word9 bit 9: Workers / sandbox / net wave 9 (`mediaproc:*`, SOCKS map, …). */
|
||||
export const BARE_OS_FEATURE9_WORKER_NET_WAVE9 = 1 << 9
|
||||
/** Word9 bit 10: Telemetry NDJSON v8 / OTel v6 / audit v6. */
|
||||
export const BARE_OS_FEATURE9_TELEMETRY_AUDIT_WAVE9 = 1 << 10
|
||||
/** Word9 bit 11: CI (`verify-kernel-roadmap-wave9`). */
|
||||
export const BARE_OS_FEATURE9_DOC_CI_WAVE9 = 1 << 11
|
||||
/** Word9 bit 12: Seed RPC `http_dht_proxy_routes` v2 revision surface. */
|
||||
export const BARE_OS_FEATURE9_HTTP_DHT_PROXY_ROUTES_V2 = 1 << 12
|
||||
|
||||
/** Stock booter ninth word (wave 9). */
|
||||
export const BARE_OS_KERNEL_FEATURES_STOCK_V9 =
|
||||
BARE_OS_FEATURE9_CAP_WORD |
|
||||
BARE_OS_FEATURE9_SEED_RPC_WAVE9 |
|
||||
BARE_OS_FEATURE9_REPLICATION_JSON_WAVE9 |
|
||||
BARE_OS_FEATURE9_PROC_METRICS_WAVE9 |
|
||||
BARE_OS_FEATURE9_BOOT_POLICY_V9 |
|
||||
BARE_OS_FEATURE9_KERNEL_EXT_REGISTRY_V6 |
|
||||
BARE_OS_FEATURE9_PEAR_BARE_BRIDGE_WAVE9 |
|
||||
BARE_OS_FEATURE9_VFS_POSIX_WAVE9 |
|
||||
BARE_OS_FEATURE9_INITD_SUBPROC_WAVE9 |
|
||||
BARE_OS_FEATURE9_WORKER_NET_WAVE9 |
|
||||
BARE_OS_FEATURE9_TELEMETRY_AUDIT_WAVE9 |
|
||||
BARE_OS_FEATURE9_DOC_CI_WAVE9 |
|
||||
BARE_OS_FEATURE9_HTTP_DHT_PROXY_ROUTES_V2
|
||||
|
||||
/** Bit 0: IPC fan-out / pub-sub style channels (booter `bareOsIpc`). */
|
||||
export const BARE_OS_FEATURE_IPC_FANOUT = 1 << 0
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
* Published package version string for seed-channel handshake (keep in sync with package.json).
|
||||
* @type {string}
|
||||
*/
|
||||
export const BARE_OS_PROTOCOL_PACKAGE_VERSION = '0.4.0'
|
||||
export const BARE_OS_PROTOCOL_PACKAGE_VERSION = '0.5.0'
|
||||
|
||||
@@ -41,7 +41,31 @@ export const BARE_OS_SEED_RPC_METHOD_SHORT_NAMES = [
|
||||
'bundlebee_cli_stage',
|
||||
'ready_guard_v2',
|
||||
'blind_relay_circuit_hint',
|
||||
'http_dht_proxy_routes'
|
||||
'http_dht_proxy_routes',
|
||||
'pear_stage_hint',
|
||||
'updater_channel_matrix',
|
||||
'appling_bundle_pointer',
|
||||
'drive_resolve_policy',
|
||||
'bundle_id_fingerprint',
|
||||
'hyperdb_migration_hint',
|
||||
'sidecar_bundle_index_v2',
|
||||
'pear_message_queue_sketch',
|
||||
'runtime_bootstrap_etag',
|
||||
'force_update_guard',
|
||||
'gracedown_window',
|
||||
'tryboot_slot',
|
||||
'hotmods_allowlist',
|
||||
'prefetcher_budget',
|
||||
'opstream_backpressure',
|
||||
'multisig_link_pointer',
|
||||
'md_render_caps',
|
||||
'bundlebee_cli_stage_v2',
|
||||
'seed_manifest_diff_v2',
|
||||
'peer_handshake_latency_budget',
|
||||
'mirror_drive_compaction_v4',
|
||||
'ready_guard_v3',
|
||||
'blind_relay_circuit_v2',
|
||||
'http_dht_proxy_routes_v2'
|
||||
]
|
||||
|
||||
/** @type {Set<string>} */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bare-os-protocol",
|
||||
"version": "0.4.0",
|
||||
"version": "0.5.0",
|
||||
"description": "MBR layout, swarm topic, and Protomux encodings for bare-operating-system",
|
||||
"type": "module",
|
||||
"main": "./index.js",
|
||||
|
||||
@@ -16,7 +16,8 @@ import {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V5,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V6,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V7,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9
|
||||
} from './lib/kernel-feature-bits.js'
|
||||
import { msgDataEncoding, msgSearchReqEncoding } from './lib/messages.js'
|
||||
test('topicKey is deterministic 32-byte hash', (t) => {
|
||||
@@ -93,3 +94,7 @@ test('STOCK_V7 is non-zero wave-7 advertisement', (t) => {
|
||||
test('STOCK_V8 is non-zero wave-8 advertisement', (t) => {
|
||||
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0) > 0)
|
||||
})
|
||||
|
||||
test('STOCK_V9 is non-zero wave-9 advertisement', (t) => {
|
||||
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0) > 0)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user