- Add bits8 / STOCK_V8 / FEATURE8_* and wire strict seed + ctx API bumps

- Protocol 0.4.0: new seed RPCs, channel/replication adjuncts, STOCK_V8 test
- Booter: wave8 /proc surfaces, vfs routes, boot policy env passthrough, limits
- Kernel: boot.policy v8 (feature bits, bare runtime min, deny RPCs, protomux cap)
- Schemas/examples: extensions v5, telemetry/audit bumps; seeder/kernel rsync parity
- Docs: roadmap Wave 8 (100 rows), ADR Word 8, capabilities index, privacy/GDPR, DNSSEC
- CI: verify-kernel-roadmap-wave8, wave3/ctx/compat updates; scripts/README
- Fix /proc flat + nested listing order to match default string sort (vfs + tests)
This commit is contained in:
Raven Scott
2026-04-04 05:35:56 -04:00
parent faaf5f13d8
commit c01ecb29c3
63 changed files with 3568 additions and 510 deletions
+29 -1
View File
@@ -132,5 +132,33 @@ export {
BARE_OS_FEATURE6_TELEMETRY_AUDIT_WAVE6,
BARE_OS_FEATURE6_DOC_CI_WAVE6,
BARE_OS_FEATURE6_HANDSHAKE_TOKEN_BUCKET,
BARE_OS_FEATURE6_COMPACT_SEED_PING
BARE_OS_FEATURE6_COMPACT_SEED_PING,
BARE_OS_KERNEL_FEATURES_STOCK_V7,
BARE_OS_FEATURE7_CAP_WORD,
BARE_OS_FEATURE7_SEED_RPC_WAVE7,
BARE_OS_FEATURE7_REPLICATION_JSON_WAVE7,
BARE_OS_FEATURE7_PROC_METRICS_WAVE7,
BARE_OS_FEATURE7_BOOT_POLICY_V7,
BARE_OS_FEATURE7_KERNEL_EXT_REGISTRY_V4,
BARE_OS_FEATURE7_PEAR_BARE_BRIDGE_WAVE7,
BARE_OS_FEATURE7_VFS_POSIX_WAVE7,
BARE_OS_FEATURE7_INITD_SUBPROC_WAVE7,
BARE_OS_FEATURE7_WORKER_NET_WAVE7,
BARE_OS_FEATURE7_TELEMETRY_AUDIT_WAVE7,
BARE_OS_FEATURE7_DOC_CI_WAVE7,
BARE_OS_FEATURE7_COMPACT_MUX_ADVERT,
BARE_OS_KERNEL_FEATURES_STOCK_V8,
BARE_OS_FEATURE8_CAP_WORD,
BARE_OS_FEATURE8_SEED_RPC_WAVE8,
BARE_OS_FEATURE8_REPLICATION_JSON_WAVE8,
BARE_OS_FEATURE8_PROC_METRICS_WAVE8,
BARE_OS_FEATURE8_BOOT_POLICY_V8,
BARE_OS_FEATURE8_KERNEL_EXT_REGISTRY_V5,
BARE_OS_FEATURE8_PEAR_BARE_BRIDGE_WAVE8,
BARE_OS_FEATURE8_VFS_POSIX_WAVE8,
BARE_OS_FEATURE8_INITD_SUBPROC_WAVE8,
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
} from './lib/kernel-feature-bits.js'
+404 -2
View File
@@ -8,7 +8,9 @@ import {
BARE_OS_KERNEL_FEATURES_STOCK_V3,
BARE_OS_KERNEL_FEATURES_STOCK_V4,
BARE_OS_KERNEL_FEATURES_STOCK_V5,
BARE_OS_KERNEL_FEATURES_STOCK_V6
BARE_OS_KERNEL_FEATURES_STOCK_V6,
BARE_OS_KERNEL_FEATURES_STOCK_V7,
BARE_OS_KERNEL_FEATURES_STOCK_V8
} from './kernel-feature-bits.js'
import {
BARE_OS_SEED_RPC_METHODS,
@@ -58,7 +60,36 @@ import {
* relayVsDirectNote?: string,
* seederHostBundleId?: string,
* seederPearRuntimeFingerprint?: string,
* booterPackageVersionHint?: string
* booterPackageVersionHint?: string,
* corestoreStatsJson?: string,
* snapshotManifestSliceJson?: string,
* mirrorDriveHintV2Json?: string,
* hrpcRegistrySummaryJson?: string,
* protomuxCapabilityAdHex?: string,
* dhtAddressBookJson?: string,
* replicationThrottleHintJson?: string,
* bundlebeeStageJson?: string,
* httpDhtProxyHintJson?: string,
* protomuxRpcPoolHintJson?: string,
* hyperblobStoreHintJson?: string,
* signingRequestQueueHintJson?: string,
* coreStorageLayoutHintJson?: string,
* mirrorDriveCompactionV3Json?: string,
* bundlebeeCliStageJson?: string,
* readyGuardV2Json?: string,
* blindRelayCircuitHintJson?: string,
* httpDhtProxyRoutesJson?: string,
* udxLossEstimateBps?: number,
* tcpFallbackReason?: string,
* hyperdbIndexLagHintJson?: string,
* stagingDrainDeadlineMs?: number,
* peerFirewallSaturationJson?: string,
* notReadyReason?: string,
* udxRttMsEstimate?: number,
* relayCircuitId?: string,
* hyperbee2ReadOnlyHintJson?: string,
* stagingQuarantineJson?: string,
* peerFirewallTransportJson?: string
* }} [opts]
*/
export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
@@ -125,6 +156,31 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
const booterPackageVersionHint = String(opts.booterPackageVersionHint ?? '')
.trim()
.slice(0, 64)
const notReadyReason = String(opts.notReadyReason ?? '')
.trim()
.slice(0, 128)
const udxRttMsEstimate =
typeof opts.udxRttMsEstimate === 'number' && opts.udxRttMsEstimate >= 0
? Math.min(1e9, Math.floor(opts.udxRttMsEstimate))
: null
const relayCircuitId = String(opts.relayCircuitId ?? '')
.trim()
.slice(0, 128)
const protomuxCapabilityAdHex = String(opts.protomuxCapabilityAdHex ?? '')
.trim()
.slice(0, 2048)
const udxLossEstimateBps =
typeof opts.udxLossEstimateBps === 'number' && opts.udxLossEstimateBps >= 0
? Math.min(1e9, Math.floor(opts.udxLossEstimateBps))
: null
const tcpFallbackReason = String(opts.tcpFallbackReason ?? '')
.trim()
.slice(0, 128)
const stagingDrainDeadlineMs =
typeof opts.stagingDrainDeadlineMs === 'number' &&
opts.stagingDrainDeadlineMs >= 0
? Math.min(1e12, Math.floor(opts.stagingDrainDeadlineMs))
: null
function parseOptJson(raw) {
const s = String(raw ?? '').trim()
@@ -239,6 +295,8 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
protocol: PROTOCOL_NAME,
rpc: BARE_OS_SEED_RPC_METHODS,
note: 'Kernel and image semver are resolved at boot on the booter; this channel is seeder-local.',
channelFingerprintNote:
'pear-runtime channel vs bare-runtime fingerprint coupling is operator-defined; non-secret hints only.',
hostBundleId: seederHostBundleId || undefined,
pearRuntimeFingerprint:
seederPearRuntimeFingerprint || undefined,
@@ -261,6 +319,8 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
bits4: BARE_OS_KERNEL_FEATURES_STOCK_V4 >>> 0,
bits5: BARE_OS_KERNEL_FEATURES_STOCK_V5 >>> 0,
bits6: BARE_OS_KERNEL_FEATURES_STOCK_V6 >>> 0,
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
protocolPackageVersion: BARE_OS_PROTOCOL_PACKAGE_VERSION,
booterPackageVersion: booterPackageVersionHint || undefined,
role: 'seeder',
@@ -287,6 +347,15 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
if (corestoreSnapshotTag) rs.corestoreSnapshotTag = corestoreSnapshotTag
if (queuedPeerCount != null) rs.queuedPeerCount = queuedPeerCount
if (relayVsDirectNote) rs.relayVsDirectNote = relayVsDirectNote
if (notReadyReason) rs.notReadyReason = notReadyReason
if (udxRttMsEstimate != null) rs.udxRttMsEstimate = udxRttMsEstimate
if (relayCircuitId) rs.relayCircuitId = relayCircuitId
if (udxLossEstimateBps != null) rs.udxLossEstimateBps = udxLossEstimateBps
if (tcpFallbackReason) rs.tcpFallbackReason = tcpFallbackReason
const lag = parseOptJson(opts.hyperdbIndexLagHintJson)
if (lag) rs.hyperdbIndexLagHint = lag
const hb2 = parseOptJson(opts.hyperbee2ReadOnlyHintJson)
if (hb2) rs.hyperbee2ReadOnlyHint = hb2
chan.messages[6].send({
id: m.id,
success: true,
@@ -350,10 +419,13 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
schema: 5,
activeSlot: stagingActiveSlot,
pendingSlot: stagingPendingSlot || null,
previousSlot: stagingPreviousSlot || null,
canarySlot: stagingCanarySlot || null,
drainDeadlineMs: stagingDrainDeadlineMs,
quarantine: parseOptJson(opts.stagingQuarantineJson),
rollbackHint:
'pending slot is rollback candidate when switching A/B; verify image before activate',
tripleSlotNote:
@@ -504,6 +576,10 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
stats = { ...stats, error: 'invalid peerFirewallStatsJson' }
}
}
const tj = parseOptJson(opts.peerFirewallTransportJson)
if (tj) stats.transportBreakdown = tj
const sat = parseOptJson(opts.peerFirewallSaturationJson)
if (sat) stats.saturationClass = sat
chan.messages[6].send({
id: m.id,
success: true,
@@ -634,6 +710,332 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
})
return
}
if (m.module === 'bare_os' && m.method === 'corestore_stats') {
const st = parseOptJson(opts.corestoreStatsJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
stats:
st || {
note: 'bounded vault/corestore hint JSON; guest does not verify'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'snapshot_manifest_slice') {
const sl = parseOptJson(opts.snapshotManifestSliceJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
slice:
sl || {
paths: [],
tags: [],
note: 'capped snapshot paths/tags only; no secret hashes'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'mirror_drive_hint_v2') {
const h = parseOptJson(opts.mirrorDriveHintV2Json)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
hint:
h || {
role: 'unknown',
keyLabels: [],
note: 'mirror-drive structured hint (operator)'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'hrpc_registry_summary') {
const h = parseOptJson(opts.hrpcRegistrySummaryJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
services:
h || {
logicalNames: [],
note: 'audit-only hrpc service name list; host may expose subset'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'protomux_capability_ad') {
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
adHex: protomuxCapabilityAdHex || null,
note: 'optional hex-capped mux ad; see FEATURE7_COMPACT_MUX_ADVERT',
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'dht_address_book') {
const b = parseOptJson(opts.dhtAddressBookJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
entries:
b || {
multiAddrs: [],
note: 'hyperdht-address-style bounded entries'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'replication_throttle_hint') {
const th = parseOptJson(opts.replicationThrottleHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
throttle:
th || { note: 'operator advisory pacing JSON for guest-side hints' },
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'bundlebee_stage') {
const bb = parseOptJson(opts.bundlebeeStageJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
stage:
bb || {
note: 'non-secret bundlebee staging channel hint (doc tie-in)'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'http_dht_proxy_hint') {
const px = parseOptJson(opts.httpDhtProxyHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
httpDhtProxy:
px || {
note: 'DHT HTTP proxy hint RPC; non-secret operator JSON only'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'protomux_rpc_pool_hint') {
const h = parseOptJson(opts.protomuxRpcPoolHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
pool:
h || {
note: 'protomux-rpc-client-pool depth/idle hint (bounded JSON)'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'hyperblob_store_hint') {
const h = parseOptJson(opts.hyperblobStoreHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
store:
h || {
note: 'hyperblobs-shaped non-secret store id / role enum'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'signing_request_queue_hint') {
const h = parseOptJson(opts.signingRequestQueueHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
queue:
h || {
note: 'hypercore-signing-request queue depth sketch; no payloads'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'core_storage_layout_hint') {
const h = parseOptJson(opts.coreStorageLayoutHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
layout:
h || {
note: 'hypercore-storage operator layout pointer JSON'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'mirror_drive_compaction_v3') {
const h = parseOptJson(opts.mirrorDriveCompactionV3Json)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
compaction:
h || {
phases: [],
note: 'extended mirror-drive compaction phase enum v3'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'bundlebee_cli_stage') {
const h = parseOptJson(opts.bundlebeeCliStageJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
cliStage:
h || { note: 'bundlebee-cli non-secret stage id pointer' },
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'ready_guard_v2') {
const h = parseOptJson(opts.readyGuardV2Json)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
readyGuard:
h || {
matrix: [],
note: 'ready-guard v2 reason + subsystem enum (structured)'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'blind_relay_circuit_hint') {
const h = parseOptJson(opts.blindRelayCircuitHintJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
circuits:
h || {
note: 'blind-relay-service opaque circuit class counts'
},
atMs: Date.now()
}),
error: ''
})
return
}
if (m.module === 'bare_os' && m.method === 'http_dht_proxy_routes') {
const h = parseOptJson(opts.httpDhtProxyRoutesJson)
chan.messages[6].send({
id: m.id,
success: true,
result: JSON.stringify({
role: 'seeder',
protocol: PROTOCOL_NAME,
routes:
h || {
revision: 0,
note: 'http-dht-proxy route table revision (capped)'
},
atMs: Date.now()
}),
error: ''
})
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 = 8
export const BARE_OS_KERNEL_FEATURE_BITS_DOC = 10
/**
* Second capability word (bits 031, always use `>>> 0` when masking).
@@ -336,6 +336,98 @@ export const BARE_OS_KERNEL_FEATURES_STOCK_V6 =
BARE_OS_FEATURE6_HANDSHAKE_TOKEN_BUCKET |
BARE_OS_FEATURE6_COMPACT_SEED_PING
/**
* Seventh capability word (bits 031, use `>>> 0`). Wave 7 mega-phase — ADR 001 §10.
*/
/** Word7 bit 0: `bits7` on seed `capabilities` + `/proc/bare_os_features`. */
export const BARE_OS_FEATURE7_CAP_WORD = 1 << 0
/** Word7 bit 1: Extended seed RPCs (corestore_stats, dht_address_book, …). */
export const BARE_OS_FEATURE7_SEED_RPC_WAVE7 = 1 << 1
/** Word7 bit 2: Replication JSON / handshake wave 7 adjuncts. */
export const BARE_OS_FEATURE7_REPLICATION_JSON_WAVE7 = 1 << 2
/** Word7 bit 3: Wave 7 `/proc/bare_os/*.json` (diagnostics, hrpc, bare-net, …). */
export const BARE_OS_FEATURE7_PROC_METRICS_WAVE7 = 1 << 3
/** Word7 bit 4: Boot policy v7 (`requireFeatureBits7`, `requirePearRuntimeMin`, …). */
export const BARE_OS_FEATURE7_BOOT_POLICY_V7 = 1 << 4
/** Word7 bit 5: Kernel extension registry v4 + topological load order. */
export const BARE_OS_FEATURE7_KERNEL_EXT_REGISTRY_V4 = 1 << 5
/** Word7 bit 6: Pear/Bare bridge wave 7 (`bareOsEmitBundlebeeHint`, diagnostics tap, …). */
export const BARE_OS_FEATURE7_PEAR_BARE_BRIDGE_WAVE7 = 1 << 6
/** Word7 bit 7: VFS/POSIX wave 7 (resolve map, env `-C`, …). */
export const BARE_OS_FEATURE7_VFS_POSIX_WAVE7 = 1 << 7
/** Word7 bit 8: Initd / subprocess / limits mirror wave 7. */
export const BARE_OS_FEATURE7_INITD_SUBPROC_WAVE7 = 1 << 8
/** Word7 bit 9: Workers / delegates / netproc group wave 7. */
export const BARE_OS_FEATURE7_WORKER_NET_WAVE7 = 1 << 9
/** Word7 bit 10: Telemetry NDJSON v6 / OTel v4 / audit v4. */
export const BARE_OS_FEATURE7_TELEMETRY_AUDIT_WAVE7 = 1 << 10
/** Word7 bit 11: CI (`verify-kernel-roadmap-wave7`). */
export const BARE_OS_FEATURE7_DOC_CI_WAVE7 = 1 << 11
/** Word7 bit 12: Compact-encoding / protomux capability ad on seed wire (doc opt-in). */
export const BARE_OS_FEATURE7_COMPACT_MUX_ADVERT = 1 << 12
/** Stock booter seventh word (wave 7). */
export const BARE_OS_KERNEL_FEATURES_STOCK_V7 =
BARE_OS_FEATURE7_CAP_WORD |
BARE_OS_FEATURE7_SEED_RPC_WAVE7 |
BARE_OS_FEATURE7_REPLICATION_JSON_WAVE7 |
BARE_OS_FEATURE7_PROC_METRICS_WAVE7 |
BARE_OS_FEATURE7_BOOT_POLICY_V7 |
BARE_OS_FEATURE7_KERNEL_EXT_REGISTRY_V4 |
BARE_OS_FEATURE7_PEAR_BARE_BRIDGE_WAVE7 |
BARE_OS_FEATURE7_VFS_POSIX_WAVE7 |
BARE_OS_FEATURE7_INITD_SUBPROC_WAVE7 |
BARE_OS_FEATURE7_WORKER_NET_WAVE7 |
BARE_OS_FEATURE7_TELEMETRY_AUDIT_WAVE7 |
BARE_OS_FEATURE7_DOC_CI_WAVE7 |
BARE_OS_FEATURE7_COMPACT_MUX_ADVERT
/**
* Eighth capability word (bits 031, use `>>> 0`). Wave 8 mega-phase — ADR 001 §11.
*/
/** Word8 bit 0: `bits8` on seed `capabilities` + `/proc/bare_os_features`. */
export const BARE_OS_FEATURE8_CAP_WORD = 1 << 0
/** Word8 bit 1: Extended seed RPCs (protomux_rpc_pool_hint, hyperblob_store_hint, …). */
export const BARE_OS_FEATURE8_SEED_RPC_WAVE8 = 1 << 1
/** Word8 bit 2: Replication JSON / staging / firewall wave 8 adjuncts. */
export const BARE_OS_FEATURE8_REPLICATION_JSON_WAVE8 = 1 << 2
/** Word8 bit 3: Wave 8 `/proc/bare_os/*.json` (structured-clone, bare-kit, …). */
export const BARE_OS_FEATURE8_PROC_METRICS_WAVE8 = 1 << 3
/** Word8 bit 4: Boot policy v8 (`requireFeatureBits8`, `requireBareRuntimeMin`, …). */
export const BARE_OS_FEATURE8_BOOT_POLICY_V8 = 1 << 4
/** Word8 bit 5: Kernel extension registry v5 + compatPearBundleId. */
export const BARE_OS_FEATURE8_KERNEL_EXT_REGISTRY_V5 = 1 << 5
/** Word8 bit 6: Pear/Bare bridge wave 8 (structured clone cap, protomux alias, …). */
export const BARE_OS_FEATURE8_PEAR_BARE_BRIDGE_WAVE8 = 1 << 6
/** Word8 bit 7: VFS/POSIX/shell wave 8 (FIFO metrics v2, resolve map, …). */
export const BARE_OS_FEATURE8_VFS_POSIX_WAVE8 = 1 << 7
/** Word8 bit 8: Initd / subprocess / limits wave 8. */
export const BARE_OS_FEATURE8_INITD_SUBPROC_WAVE8 = 1 << 8
/** Word8 bit 9: Workers / sandbox / delegates wave 8 (`ioproc:*`, …). */
export const BARE_OS_FEATURE8_WORKER_NET_WAVE8 = 1 << 9
/** Word8 bit 10: Telemetry NDJSON v7 / OTel v5 / audit v5. */
export const BARE_OS_FEATURE8_TELEMETRY_AUDIT_WAVE8 = 1 << 10
/** Word8 bit 11: CI (`verify-kernel-roadmap-wave8`). */
export const BARE_OS_FEATURE8_DOC_CI_WAVE8 = 1 << 11
/** Word8 bit 12: Seed RPC `http_dht_proxy_routes` revision surface. */
export const BARE_OS_FEATURE8_HTTP_DHT_PROXY_ROUTES = 1 << 12
/** Stock booter eighth word (wave 8). */
export const BARE_OS_KERNEL_FEATURES_STOCK_V8 =
BARE_OS_FEATURE8_CAP_WORD |
BARE_OS_FEATURE8_SEED_RPC_WAVE8 |
BARE_OS_FEATURE8_REPLICATION_JSON_WAVE8 |
BARE_OS_FEATURE8_PROC_METRICS_WAVE8 |
BARE_OS_FEATURE8_BOOT_POLICY_V8 |
BARE_OS_FEATURE8_KERNEL_EXT_REGISTRY_V5 |
BARE_OS_FEATURE8_PEAR_BARE_BRIDGE_WAVE8 |
BARE_OS_FEATURE8_VFS_POSIX_WAVE8 |
BARE_OS_FEATURE8_INITD_SUBPROC_WAVE8 |
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
/** 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.2.0'
export const BARE_OS_PROTOCOL_PACKAGE_VERSION = '0.4.0'
@@ -23,7 +23,25 @@ export const BARE_OS_SEED_RPC_METHOD_SHORT_NAMES = [
'mirror_compaction_hint',
'updater_state',
'blind_peer_topology_v2',
'compact_ping'
'compact_ping',
'corestore_stats',
'snapshot_manifest_slice',
'mirror_drive_hint_v2',
'hrpc_registry_summary',
'protomux_capability_ad',
'dht_address_book',
'replication_throttle_hint',
'bundlebee_stage',
'http_dht_proxy_hint',
'protomux_rpc_pool_hint',
'hyperblob_store_hint',
'signing_request_queue_hint',
'core_storage_layout_hint',
'mirror_drive_compaction_v3',
'bundlebee_cli_stage',
'ready_guard_v2',
'blind_relay_circuit_hint',
'http_dht_proxy_routes'
]
/** @type {Set<string>} */
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "bare-os-protocol",
"version": "0.2.0",
"version": "0.4.0",
"description": "MBR layout, swarm topic, and Protomux encodings for bare-operating-system",
"type": "module",
"main": "./index.js",
+11 -1
View File
@@ -14,7 +14,9 @@ import {
} from './lib/seed-rpc-methods.js'
import {
BARE_OS_KERNEL_FEATURES_STOCK_V5,
BARE_OS_KERNEL_FEATURES_STOCK_V6
BARE_OS_KERNEL_FEATURES_STOCK_V6,
BARE_OS_KERNEL_FEATURES_STOCK_V7,
BARE_OS_KERNEL_FEATURES_STOCK_V8
} from './lib/kernel-feature-bits.js'
import { msgDataEncoding, msgSearchReqEncoding } from './lib/messages.js'
test('topicKey is deterministic 32-byte hash', (t) => {
@@ -83,3 +85,11 @@ test('STOCK_V5 is non-zero wave-5 advertisement', (t) => {
test('STOCK_V6 is non-zero wave-6 advertisement', (t) => {
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V6 >>> 0) > 0)
})
test('STOCK_V7 is non-zero wave-7 advertisement', (t) => {
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0) > 0)
})
test('STOCK_V8 is non-zero wave-8 advertisement', (t) => {
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0) > 0)
})