Add tenth capability word (STOCK_V10), protocol 0.6.0, ctx API 1.19.0, and
strict seed coverage for bits10. Extend seed RPC, replication adjuncts, Wave 10 /proc JSON + proc index schema 6, boot.policy v10 enforcement in kernel/init.js, sysproc:* workers, NDJSON/OTel/audit schema bumps, CI (verify-kernel-roadmap-wave10.mjs) and doc updates across handbook, developer-guide, compatibility matrix, and seeder kernel parity.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
| Version | Booter (workspace) | Notes |
|
||||
| ------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 1.19.0 | 0.1.0 | Tenth word **`bits10`** + **`STOCK_V10`**; seed **`bits10`** + strict check; Wave 10 **`/proc`** JSON (**`bare-os-wave10-proc.js`**), **`bare_os_proc_index`** schema **6**, **`extensions.json`** schema **7**; boot policy v10 keys; NDJSON lifecycle **9**, OTel **`otlSchemaVersion: 7`**, audit **`auditSchemaVersion: 7`**; **`sysproc:*`** worker group; **`ctx`** wave 10 Pear/Bare stubs; telemetry **`wave10ProbeId`**, **`bareRpcProbeClass`**, **`BARE_OS_LIFECYCLE_SCHEMA_VERSION`** in guest env. Protocol **`0.6.0`**, **`BARE_OS_KERNEL_FEATURE_BITS_DOC=12`**. CI: **`verify-kernel-roadmap-wave10.mjs`**. |
|
||||
| 1.18.0 | 0.1.0 | Ninth word **`bits9`** + **`STOCK_V9`**; seed **`bits9`** + strict check; Wave 9 **`/proc`** JSON (**`bare-os-wave9-proc.js`**), **`bare_os_proc_index`** schema **5**, **`extensions.json`** schema **6**; boot policy v9 keys in **`boot.policy.json`**; NDJSON lifecycle **8**, OTel **`otlSchemaVersion: 6`**, audit **`auditSchemaVersion: 6`**; **`mediaproc:*`** worker group; **`ctx`** wave 9 Pear/Bare stubs (**`bareOsEmitPearStageHint`**, probes, …); **`BARE_OS_SOCKS_PROXY_MAP_JSON`** lookup helper; telemetry **`wave9ProbeId`**. Protocol **`0.5.0`**, **`BARE_OS_KERNEL_FEATURE_BITS_DOC=11`**, extended **`seed-rpc-methods.js`**. CI: **`verify-kernel-roadmap-wave9.mjs`**. |
|
||||
| 1.15.0 | 0.1.0 | Sixth word **`bits6`** + **`STOCK_V6`**; seed **`bits6`** + strict check; Wave 6 **`/proc/bare_os/*.json`** operator metrics; **`bareOsAdvertisedKernelBits6`**, **`bareOsSeedCapabilityBits6`**, **`bareOsBooterPackageVersion`**; Pear hooks **`bareOsPearUpdaterDelegate`**, **`bareOsEmitHyperdhtBootstrapRefresh`**; subprocess snapshot schema **3**; boot policy v6 env (**`requireFeatureBits6`**, **`requireBooterSemver`**, **`requireCtxApiMin`**, extension deny/hash pins, offline LKG strict); NDJSON lifecycle **5**, OTel **`otlSchemaVersion: 3`**, audit **`auditSchemaVersion: 3`**; **`mathproc:*`**, **`BARE_OS_BIN_WORKER_WALL_MS`**; delegate **`hrpc`** stub; **`verify-kernel-roadmap-wave6.mjs`**, **`verify-pear-no-static-node-import.mjs`**. Protocol: **`BARE_OS_KERNEL_FEATURE_BITS_DOC=8`**, extended **`seed-rpc-methods.js`**. |
|
||||
| 1.14.0 | 0.1.0 | Fifth feature word **`bits5`** + **`STOCK_V5`**; seed **`bits5`** + strict check; **`/proc/bare_os/host_os.json`**, **`sync_window.json`**, **`debug.json`**; **`bareOsReadSubprocessBridgeSnapshot`**, **`bareOsRequestKernelProfileReload`**; boot policy v5 (**`requireFeatureBits5`**, **`requireInitJsSha256`**); OTel JSONL **`otlSchemaVersion: 2`**; **`BARE_OS_BIN_WORKER_ALLOW`** pattern groups (**`textproc:*`**); union **`readlink`** shadow; HDMS hints schema **2** + correlation id; net summary **`transport`**; replication sync windows; seeder staging rollback + queue hints env. Protocol: **`BARE_OS_KERNEL_FEATURE_BITS_DOC=7`**, **`seed-rpc-methods.js`**, typed seed RPC errors. CI: **`verify-doc-links`**, **`verify-man-coverage`**, **`verify-compat-matrix`**. |
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V7,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V10,
|
||||
BARE_OS_KERNEL_FEATURE_BITS_DOC,
|
||||
BARE_OS_FEATURE_CRYPTO_URANDOM,
|
||||
BARE_OS_PROTOCOL_PACKAGE_VERSION
|
||||
@@ -35,6 +36,7 @@ import { createBareOsSandboxContext } from './lib/bare-os-sandbox.js'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { buildBareOsWave8ProcJson } from './lib/bare-os-wave8-proc.js'
|
||||
import { buildBareOsWave9ProcJson } from './lib/bare-os-wave9-proc.js'
|
||||
import { buildBareOsWave10ProcJson } from './lib/bare-os-wave10-proc.js'
|
||||
import { createBareOsIpc } from './lib/bare-os-ipc.js'
|
||||
import {
|
||||
execShellLine,
|
||||
@@ -471,11 +473,19 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
'BARE_OS_HTTP_PROXY_MAP_JSON',
|
||||
'BARE_OS_SOCKS_PROXY_MAP_JSON',
|
||||
'BARE_OS_BARE_CRYPTO_VERSION',
|
||||
'BARE_OS_BARE_BOOT_VERSION',
|
||||
'BARE_OS_BARE_LOGGER_VERSION',
|
||||
'BARE_OS_BARE_TLS_VERSION',
|
||||
'BARE_OS_PEAR_IPC_PACKAGE_VERSION',
|
||||
'BARE_OS_PEAR_UPDATER_CHANNEL',
|
||||
'BARE_OS_HAPPY_EYEBALLS_V3_MODE',
|
||||
'BARE_OS_BIN_WORKER_WASM_MS_MAX',
|
||||
'BARE_OS_WAVE9_PROBE_ID',
|
||||
'BARE_OS_WAVE10_PROBE_ID',
|
||||
'BARE_OS_BARE_RPC_PROBE_CLASS',
|
||||
'BARE_OS_MTLS_PROXY_MAP_JSON',
|
||||
'BARE_OS_THREAD_POOL_TELEMETRY_JSON',
|
||||
'BARE_OS_HAPPY_EYEBALLS_V4_MODE',
|
||||
'BARE_OS_PROC_RLIMITS_JSON',
|
||||
'BARE_OS_SUBPROCESS_BRIDGE_UID_GID_MAP_JSON',
|
||||
'BARE_OS_HDMS_VAULT_ROTATE_COUNT',
|
||||
@@ -524,6 +534,9 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
shellEnv.BARE_OS_BOOT_PROFILE_RESOLVED = bootProfileResolved
|
||||
const bareOsSessionId = randomUUID()
|
||||
shellEnv.BARE_OS_SESSION_ID = bareOsSessionId
|
||||
shellEnv.BARE_OS_LIFECYCLE_SCHEMA_VERSION = String(
|
||||
BARE_OS_LIFECYCLE_SCHEMA_VERSION
|
||||
)
|
||||
/** @type {((ev: Record<string, unknown>) => void | Promise<void>)[]} */
|
||||
const hdmsLifecycleSubs = []
|
||||
/** @type {Set<(ev: Record<string, unknown>) => void | Promise<void>>} */
|
||||
@@ -676,6 +689,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
|
||||
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
|
||||
bits9: BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0,
|
||||
bits10: BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0,
|
||||
bootTracePointer: 'stderr:BARE_OS_BOOT_TRACE',
|
||||
atMs: Date.now()
|
||||
})}\n`
|
||||
@@ -709,6 +723,10 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
const o = buildBareOsWave9ProcJson(String(wave9Id || ''), shellEnv)
|
||||
return `${JSON.stringify(o)}\n`
|
||||
},
|
||||
procBareOsWave10JsonText(wave10Id) {
|
||||
const o = buildBareOsWave10ProcJson(String(wave10Id || ''), shellEnv)
|
||||
return `${JSON.stringify(o)}\n`
|
||||
},
|
||||
hostProcStatsRef,
|
||||
procSnapshot: {
|
||||
version: BARE_OS_CTX_API_VERSION,
|
||||
@@ -820,6 +838,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
bits7: seed.bits7,
|
||||
bits8: seed.bits8,
|
||||
bits9: seed.bits9,
|
||||
bits10: seed.bits10,
|
||||
role: seed.role,
|
||||
protocol: seed.protocol
|
||||
}
|
||||
@@ -841,6 +860,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
|
||||
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
|
||||
bits9: BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0,
|
||||
bits10: BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0,
|
||||
urandomCrypto: urandomCryptoOn,
|
||||
seedHandshake,
|
||||
protocolPackageVersion: protocolPackageVersion || undefined,
|
||||
@@ -849,7 +869,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
},
|
||||
procBareOsExtensionsText() {
|
||||
return `${JSON.stringify({
|
||||
schema: 6,
|
||||
schema: 7,
|
||||
featureBitsDoc: BARE_OS_KERNEL_FEATURE_BITS_DOC,
|
||||
entries: kernelExtensionRecords,
|
||||
atMs: Date.now()
|
||||
@@ -1428,6 +1448,8 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0
|
||||
const bareOsAdvertisedKernelBits9Resolved =
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0
|
||||
const bareOsAdvertisedKernelBits10Resolved =
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0
|
||||
|
||||
/** @type {(() => void | Promise<void>)[]} */
|
||||
const bareOsSuspendHooks = []
|
||||
@@ -1472,6 +1494,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
bareOsAdvertisedKernelBits7: bareOsAdvertisedKernelBits7Resolved,
|
||||
bareOsAdvertisedKernelBits8: bareOsAdvertisedKernelBits8Resolved,
|
||||
bareOsAdvertisedKernelBits9: bareOsAdvertisedKernelBits9Resolved,
|
||||
bareOsAdvertisedKernelBits10: bareOsAdvertisedKernelBits10Resolved,
|
||||
bareOsBooterPackageVersion: _BOOTER_PKG_VERSION,
|
||||
bareOsProtocolPackageVersion: BARE_OS_PROTOCOL_PACKAGE_VERSION,
|
||||
bareOsPearRuntimeVersion: String(
|
||||
@@ -1534,6 +1557,12 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
typeof disk.seedCapabilityInfo.bits9 === 'number'
|
||||
? disk.seedCapabilityInfo.bits9 >>> 0
|
||||
: null,
|
||||
bareOsSeedCapabilityBits10:
|
||||
disk.seedCapabilityInfo &&
|
||||
typeof disk.seedCapabilityInfo === 'object' &&
|
||||
typeof disk.seedCapabilityInfo.bits10 === 'number'
|
||||
? disk.seedCapabilityInfo.bits10 >>> 0
|
||||
: null,
|
||||
bareOsSystemRevision: Object.freeze({
|
||||
currentId: String(shellEnv.BARE_OS_SYSTEM_REVISION_ID || '').trim(),
|
||||
pendingId: String(shellEnv.BARE_OS_SYSTEM_REVISION_PENDING || '').trim(),
|
||||
@@ -2367,6 +2396,121 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsEmitPearDoctorHint(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:pear-doctor-hint', {
|
||||
healthClass: String(payload.healthClass || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsPearInspectProbe(payload = {}) {
|
||||
const depth = Math.min(32, Math.max(0, Number(payload.depth) || 0))
|
||||
return {
|
||||
ok: false,
|
||||
depth,
|
||||
note: 'Host-only inspect probe; stock booter returns stub.'
|
||||
}
|
||||
},
|
||||
bareOsEmitBareBootPhaseHint(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:bare-boot-phase-hint', {
|
||||
phase: String(payload.phase || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsBareRpcCapProbe() {
|
||||
return {
|
||||
ok: false,
|
||||
note: 'bare-rpc capability class; host may wire delegate.'
|
||||
}
|
||||
},
|
||||
bareOsEmitPearStampPointer(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:pear-stamp-pointer', {
|
||||
stampClass: String(payload.stampClass || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
/** @param {(ev: Record<string, unknown>) => void} fn */
|
||||
bareOsRegisterBareLoggerTap(fn) {
|
||||
if (typeof fn !== 'function') return () => {}
|
||||
let n = 0
|
||||
const cap = 256
|
||||
const wrapped = (ev) => {
|
||||
if (n >= cap) return
|
||||
n++
|
||||
try {
|
||||
fn(ev && typeof ev === 'object' ? ev : {})
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (typeof globalThis.process?.on === 'function') {
|
||||
globalThis.process.on('bare-os:bare-logger-tap', wrapped)
|
||||
}
|
||||
return () => {
|
||||
if (typeof globalThis.process?.off === 'function') {
|
||||
globalThis.process.off('bare-os:bare-logger-tap', wrapped)
|
||||
}
|
||||
}
|
||||
},
|
||||
bareOsEmitAutobaseDiscoveryHint(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:autobase-discovery-hint', {
|
||||
channelClass: String(payload.channelClass || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsEmitBlindPairingSketch(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:blind-pairing-sketch', {
|
||||
sketchClass: String(payload.sketchClass || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsBareStreamBackpressureHint(payload = {}) {
|
||||
if (typeof globalThis.process?.emit !== 'function') return false
|
||||
try {
|
||||
globalThis.process.emit('bare-os:bare-stream-backpressure-hint', {
|
||||
backlogClass: String(payload.backlogClass || '').slice(0, 128),
|
||||
ts: Date.now()
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
},
|
||||
bareOsPearTerminalCapsProbe() {
|
||||
return {
|
||||
ok: false,
|
||||
note: 'Terminal capability flags; host interprets pear-terminal class.'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Optional hrpc round-trip; stock booter never leaves guest without host bridge.
|
||||
* @returns {Promise<unknown>}
|
||||
@@ -2635,7 +2779,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
const auditFn = auditOn
|
||||
? (info) => {
|
||||
const line = JSON.stringify({
|
||||
auditSchemaVersion: 6,
|
||||
auditSchemaVersion: 7,
|
||||
type: 'httpFetch',
|
||||
ts: Date.now(),
|
||||
requestSmugglingClass: 'none',
|
||||
@@ -2758,7 +2902,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
AUDIT_LOG,
|
||||
'json',
|
||||
JSON.stringify({
|
||||
auditSchemaVersion: 6,
|
||||
auditSchemaVersion: 7,
|
||||
type: 'execLine',
|
||||
ts: Date.now(),
|
||||
requestSmugglingClass: 'none',
|
||||
@@ -2927,6 +3071,7 @@ async function loadOsFromOfflineLkg(store, swarm, Hyperdrive, disk, splash, keyH
|
||||
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
|
||||
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
|
||||
bits9: BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0,
|
||||
bits10: BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0,
|
||||
protocol: 'bare-os-v1',
|
||||
note: 'offline boot; bare_os.capabilities RPC not used'
|
||||
}
|
||||
@@ -3038,6 +3183,13 @@ async function loadOsFromPeers(disk, store, swarm, splash) {
|
||||
'BARE_OS_SEED_CAP_STRICT: seeder feature bits9 do not cover stock booter requirements'
|
||||
)
|
||||
}
|
||||
const need10 = BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0
|
||||
const got10 = typeof cap.bits10 === 'number' ? cap.bits10 >>> 0 : 0
|
||||
if (need10 !== 0 && (got10 & need10) !== need10) {
|
||||
throw new Error(
|
||||
'BARE_OS_SEED_CAP_STRICT: seeder feature bits10 do not cover stock booter requirements'
|
||||
)
|
||||
}
|
||||
}
|
||||
try {
|
||||
disk.seedReplicationStatus = await disk.rpc(
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
* Semantic version of the booter `ctx` contract for custom kernels.
|
||||
* Bump when adding/removing/renaming documented `ctx` fields or changing behavior.
|
||||
*/
|
||||
export const BARE_OS_CTX_API_VERSION = '1.18.0'
|
||||
export const BARE_OS_CTX_API_VERSION = '1.19.0'
|
||||
|
||||
+16
@@ -95,6 +95,8 @@ export interface BareOsKernelContext {
|
||||
bareOsSeedCapabilityBits8?: number | null
|
||||
bareOsAdvertisedKernelBits9?: number
|
||||
bareOsSeedCapabilityBits9?: number | null
|
||||
bareOsAdvertisedKernelBits10?: number
|
||||
bareOsSeedCapabilityBits10?: number | null
|
||||
bareOsBooterPackageVersion?: string
|
||||
bareOsProtocolPackageVersion?: string
|
||||
bareOsPearRuntimeVersion?: string
|
||||
@@ -214,6 +216,20 @@ export interface BareOsKernelContext {
|
||||
bareOsEmitTrybootSlot?(payload?: Record<string, unknown>): boolean
|
||||
bareOsEmitMultisigPointer?(payload?: Record<string, unknown>): boolean
|
||||
bareOsBareStorageHint?(payload?: Record<string, unknown>): boolean
|
||||
bareOsEmitPearDoctorHint?(payload?: Record<string, unknown>): boolean
|
||||
bareOsPearInspectProbe?(payload?: {
|
||||
depth?: number
|
||||
}): { ok: boolean; depth?: number; note?: string }
|
||||
bareOsEmitBareBootPhaseHint?(payload?: Record<string, unknown>): boolean
|
||||
bareOsBareRpcCapProbe?(): { ok: boolean; note?: string }
|
||||
bareOsEmitPearStampPointer?(payload?: Record<string, unknown>): boolean
|
||||
bareOsRegisterBareLoggerTap?(
|
||||
fn: (ev: Record<string, unknown>) => void
|
||||
): () => void
|
||||
bareOsEmitAutobaseDiscoveryHint?(payload?: Record<string, unknown>): boolean
|
||||
bareOsEmitBlindPairingSketch?(payload?: Record<string, unknown>): boolean
|
||||
bareOsBareStreamBackpressureHint?(payload?: Record<string, unknown>): boolean
|
||||
bareOsPearTerminalCapsProbe?(): { ok: boolean; note?: string }
|
||||
bareOsHrpcRequest?(
|
||||
service: string,
|
||||
method: string,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Unified version for booter NDJSON telemetry, boot phase events, and var-log mirrors.
|
||||
* Bump when adding required fields or changing semantics (see docs/reference/kernel-extensions.md).
|
||||
*/
|
||||
export const BARE_OS_LIFECYCLE_SCHEMA_VERSION = 8
|
||||
export const BARE_OS_LIFECYCLE_SCHEMA_VERSION = 9
|
||||
|
||||
/** Legacy field still emitted for older parsers; prefer {@link BARE_OS_LIFECYCLE_SCHEMA_VERSION}. */
|
||||
export const BARE_OS_TELEMETRY_SCHEMA_VERSION = 8
|
||||
export const BARE_OS_TELEMETRY_SCHEMA_VERSION = 9
|
||||
|
||||
@@ -69,6 +69,44 @@ export const BARE_OS_PSEUDO_FS_PATHS = Object.freeze([
|
||||
'/proc/bare_os/dns_map_active.json',
|
||||
'/proc/bare_os/git_delegate_stats.json',
|
||||
'/proc/bare_os/snapshot_hints.json',
|
||||
'/proc/bare_os/activity_queue_depth.json',
|
||||
'/proc/bare_os/autobase_writer_hint.json',
|
||||
'/proc/bare_os/bare_boot_phase_map.json',
|
||||
'/proc/bare_os/bare_inspect_policy.json',
|
||||
'/proc/bare_os/bare_logger_policy.json',
|
||||
'/proc/bare_os/bare_performance_counters.json',
|
||||
'/proc/bare_os/bare_rpc_registry_sketch.json',
|
||||
'/proc/bare_os/bare_signals_mask.json',
|
||||
'/proc/bare_os/bare_stream_backpressure.json',
|
||||
'/proc/bare_os/bare_timers_budget.json',
|
||||
'/proc/bare_os/bare_tls_session_hint.json',
|
||||
'/proc/bare_os/bare_ws_gateway_sketch.json',
|
||||
'/proc/bare_os/blind_pairing_sketch.json',
|
||||
'/proc/bare_os/broadcast_encryption_hint.json',
|
||||
'/proc/bare_os/pear_api_allowlist_sketch.json',
|
||||
'/proc/bare_os/pear_doctor_state.json',
|
||||
'/proc/bare_os/pear_rti_pointer.json',
|
||||
'/proc/bare_os/pear_user_dirs_map.json',
|
||||
'/proc/bare_os/pear_workshop_flags.json',
|
||||
'/proc/bare_os_activity_queue_depth.json',
|
||||
'/proc/bare_os_autobase_writer_hint.json',
|
||||
'/proc/bare_os_bare_boot_phase_map.json',
|
||||
'/proc/bare_os_bare_inspect_policy.json',
|
||||
'/proc/bare_os_bare_logger_policy.json',
|
||||
'/proc/bare_os_bare_performance_counters.json',
|
||||
'/proc/bare_os_bare_rpc_registry_sketch.json',
|
||||
'/proc/bare_os_bare_signals_mask.json',
|
||||
'/proc/bare_os_bare_stream_backpressure.json',
|
||||
'/proc/bare_os_bare_timers_budget.json',
|
||||
'/proc/bare_os_bare_tls_session_hint.json',
|
||||
'/proc/bare_os_bare_ws_gateway_sketch.json',
|
||||
'/proc/bare_os_blind_pairing_sketch.json',
|
||||
'/proc/bare_os_broadcast_encryption_hint.json',
|
||||
'/proc/bare_os_pear_api_allowlist_sketch.json',
|
||||
'/proc/bare_os_pear_doctor_state.json',
|
||||
'/proc/bare_os_pear_rti_pointer.json',
|
||||
'/proc/bare_os_pear_user_dirs_map.json',
|
||||
'/proc/bare_os_pear_workshop_flags.json',
|
||||
'/proc/bare_os_snapshot_hints.json',
|
||||
'/proc/bare_os_extensions.json',
|
||||
'/proc/bare_os_hdms_hints.json',
|
||||
|
||||
@@ -112,6 +112,7 @@ async function mirrorBareOsTelemetryNdjson(ctx, rec) {
|
||||
const lineage = String(env.BARE_OS_TELEMETRY_SESSION_LINEAGE_ID || '').trim()
|
||||
const bootAttemptId = String(env.BARE_OS_BOOT_ATTEMPT_ID || '').trim()
|
||||
const wave9ProbeId = String(env.BARE_OS_WAVE9_PROBE_ID || '').trim()
|
||||
const wave10ProbeId = String(env.BARE_OS_WAVE10_PROBE_ID || '').trim()
|
||||
const line =
|
||||
JSON.stringify({
|
||||
telemetrySchemaVersion: BARE_OS_TELEMETRY_SCHEMA_VERSION,
|
||||
@@ -119,6 +120,12 @@ async function mirrorBareOsTelemetryNdjson(ctx, rec) {
|
||||
ts: Date.now(),
|
||||
bootAttemptId: bootAttemptId ? bootAttemptId.slice(0, 128) : undefined,
|
||||
wave9ProbeId: wave9ProbeId ? wave9ProbeId.slice(0, 128) : undefined,
|
||||
wave10ProbeId: wave10ProbeId ? wave10ProbeId.slice(0, 128) : undefined,
|
||||
bareRpcProbeClass: String(
|
||||
env.BARE_OS_BARE_RPC_PROBE_CLASS || ''
|
||||
)
|
||||
.trim()
|
||||
.slice(0, 64) || undefined,
|
||||
bareModuleProbeClass: String(
|
||||
env.BARE_OS_BARE_MODULE_PROBE_CLASS || ''
|
||||
).trim().slice(0, 64) || undefined,
|
||||
@@ -164,7 +171,7 @@ async function mirrorBareOsOtelJsonl(ctx, eventName, attrs) {
|
||||
if (!vfs || typeof vfs.readFile !== 'function') return
|
||||
const line =
|
||||
JSON.stringify({
|
||||
otlSchemaVersion: 6,
|
||||
otlSchemaVersion: 7,
|
||||
resourceLogs: [
|
||||
{
|
||||
resource: {
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* Wave 10 optional `/proc/bare_os/*.json` payloads (env-injected; bounded, non-secret).
|
||||
* Maps Holepunch `bare-*` / `pear-*` stacks — no Node `node:*` built-ins in guest paths.
|
||||
* @param {string} id
|
||||
* @param {Record<string, string>} env
|
||||
*/
|
||||
export function buildBareOsWave10ProcJson(id, env) {
|
||||
const now = Date.now()
|
||||
const esc = (k) => String(env[k] ?? '').trim()
|
||||
|
||||
function parseJsonEnv(key) {
|
||||
const raw = esc(key)
|
||||
if (!raw) return null
|
||||
try {
|
||||
const o = JSON.parse(raw)
|
||||
return o && typeof o === 'object' ? o : null
|
||||
} catch {
|
||||
return { schema: 1, error: 'invalid_json', key, atMs: now }
|
||||
}
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case 'pear_doctor_state':
|
||||
return {
|
||||
schema: 1,
|
||||
state: parseJsonEnv('BARE_OS_PEAR_DOCTOR_STATE_JSON'),
|
||||
note: 'pear-doctor operator health sketch.',
|
||||
atMs: now
|
||||
}
|
||||
case 'pear_workshop_flags':
|
||||
return {
|
||||
schema: 1,
|
||||
flags: parseJsonEnv('BARE_OS_PEAR_WORKSHOP_FLAGS_JSON'),
|
||||
note: 'pear-workshop dev flags.',
|
||||
atMs: now
|
||||
}
|
||||
case 'pear_user_dirs_map':
|
||||
return {
|
||||
schema: 1,
|
||||
map: parseJsonEnv('BARE_OS_PEAR_USER_DIRS_MAP_JSON'),
|
||||
note: 'pear-user-dirs map (non-secret).',
|
||||
atMs: now
|
||||
}
|
||||
case 'pear_api_allowlist_sketch':
|
||||
return {
|
||||
schema: 1,
|
||||
allowlist: parseJsonEnv('BARE_OS_PEAR_API_ALLOWLIST_SKETCH_JSON'),
|
||||
note: 'pear-api surface allow sketch.',
|
||||
atMs: now
|
||||
}
|
||||
case 'pear_rti_pointer':
|
||||
return {
|
||||
schema: 1,
|
||||
pointer: parseJsonEnv('BARE_OS_PEAR_RTI_POINTER_JSON'),
|
||||
note: 'pear-rti pointer doc.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_boot_phase_map':
|
||||
return {
|
||||
schema: 1,
|
||||
phases: parseJsonEnv('BARE_OS_BARE_BOOT_PHASE_MAP_JSON'),
|
||||
note: 'bare-boot phase alignment map.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_rpc_registry_sketch':
|
||||
return {
|
||||
schema: 1,
|
||||
registry: parseJsonEnv('BARE_OS_BARE_RPC_REGISTRY_SKETCH_JSON'),
|
||||
note: 'bare-rpc registry summary (names only).',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_logger_policy':
|
||||
return {
|
||||
schema: 1,
|
||||
policy: parseJsonEnv('BARE_OS_BARE_LOGGER_POLICY_JSON'),
|
||||
note: 'bare-logger / bare-file-logger sink class.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_performance_counters':
|
||||
return {
|
||||
schema: 1,
|
||||
counters: parseJsonEnv('BARE_OS_BARE_PERFORMANCE_COUNTERS_JSON'),
|
||||
note: 'bare-performance / bare-hrtime counters sketch.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_inspect_policy':
|
||||
return {
|
||||
schema: 1,
|
||||
policy: parseJsonEnv('BARE_OS_BARE_INSPECT_POLICY_JSON'),
|
||||
note: 'bare-inspect policy.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_signals_mask':
|
||||
return {
|
||||
schema: 1,
|
||||
mask: parseJsonEnv('BARE_OS_BARE_SIGNALS_MASK_JSON'),
|
||||
note: 'bare-signals mask summary.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_timers_budget':
|
||||
return {
|
||||
schema: 1,
|
||||
budget: parseJsonEnv('BARE_OS_BARE_TIMERS_BUDGET_JSON'),
|
||||
note: 'bare-timers budget.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_stream_backpressure':
|
||||
return {
|
||||
schema: 1,
|
||||
backpressure: parseJsonEnv('BARE_OS_BARE_STREAM_BACKPRESSURE_JSON'),
|
||||
note: 'bare-stream / bare-pipe class.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_ws_gateway_sketch':
|
||||
return {
|
||||
schema: 1,
|
||||
gateway: parseJsonEnv('BARE_OS_BARE_WS_GATEWAY_SKETCH_JSON'),
|
||||
note: 'bare-ws gateway policy.',
|
||||
atMs: now
|
||||
}
|
||||
case 'bare_tls_session_hint':
|
||||
return {
|
||||
schema: 1,
|
||||
tls: parseJsonEnv('BARE_OS_BARE_TLS_SESSION_HINT_JSON'),
|
||||
note: 'bare-tls session cache / pin class.',
|
||||
atMs: now
|
||||
}
|
||||
case 'autobase_writer_hint':
|
||||
return {
|
||||
schema: 1,
|
||||
writer: parseJsonEnv('BARE_OS_AUTOBASE_WRITER_HINT_JSON'),
|
||||
note: 'autobase writer hint (non-secret).',
|
||||
atMs: now
|
||||
}
|
||||
case 'blind_pairing_sketch':
|
||||
return {
|
||||
schema: 1,
|
||||
sketch: parseJsonEnv('BARE_OS_BLIND_PAIRING_SKETCH_JSON'),
|
||||
note: 'blind-pairing operator sketch.',
|
||||
atMs: now
|
||||
}
|
||||
case 'broadcast_encryption_hint':
|
||||
return {
|
||||
schema: 1,
|
||||
hint: parseJsonEnv('BARE_OS_BROADCAST_ENCRYPTION_HINT_JSON'),
|
||||
note: 'broadcast-encryption capability hint.',
|
||||
atMs: now
|
||||
}
|
||||
case 'activity_queue_depth':
|
||||
return {
|
||||
schema: 1,
|
||||
depth: parseJsonEnv('BARE_OS_ACTIVITY_QUEUE_DEPTH_JSON'),
|
||||
note: 'activity-queue depth sketch.',
|
||||
atMs: now
|
||||
}
|
||||
default:
|
||||
return {
|
||||
schema: 1,
|
||||
error: 'unknown_wave10_proc_id',
|
||||
id,
|
||||
atMs: now
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,18 @@ const _BIN_WORKER_IOPROC = new Set(['cat', 'head', 'tail'])
|
||||
|
||||
const _BIN_WORKER_MEDIAPROC = new Set(['ffmpeg', 'ffprobe'])
|
||||
|
||||
/** Process/shell-adjacent builtins allowed under `sysproc:*` (documentary group; bare-process-class). */
|
||||
const _BIN_WORKER_SYSPROC = new Set([
|
||||
'pwd',
|
||||
'echo',
|
||||
'printenv',
|
||||
'uname',
|
||||
'id',
|
||||
'env',
|
||||
'true',
|
||||
'false'
|
||||
])
|
||||
|
||||
/**
|
||||
* @param {string} cmd
|
||||
* @param {Record<string, string | undefined> | null | undefined} env
|
||||
@@ -84,12 +96,17 @@ function binWorkerOffloadEnabled(cmd, env) {
|
||||
if (_BIN_WORKER_MEDIAPROC.has(cmd)) return true
|
||||
continue
|
||||
}
|
||||
if (p === 'sysproc:*') {
|
||||
if (_BIN_WORKER_SYSPROC.has(cmd)) return true
|
||||
continue
|
||||
}
|
||||
if (p.endsWith(':*')) {
|
||||
const pre = p.slice(0, -2)
|
||||
if (pre === 'textproc' && _BIN_WORKER_TEXTPROC.has(cmd)) return true
|
||||
if (pre === 'mathproc' && _BIN_WORKER_MATHPROC.has(cmd)) return true
|
||||
if (pre === 'ioproc' && _BIN_WORKER_IOPROC.has(cmd)) return true
|
||||
if (pre === 'mediaproc' && _BIN_WORKER_MEDIAPROC.has(cmd)) return true
|
||||
if (pre === 'sysproc' && _BIN_WORKER_SYSPROC.has(cmd)) return true
|
||||
continue
|
||||
}
|
||||
if (p === cmd) return true
|
||||
@@ -160,7 +177,7 @@ async function auditDelegateJson(ctx, kind, argv) {
|
||||
AUDIT_LOG,
|
||||
'json',
|
||||
JSON.stringify({
|
||||
auditSchemaVersion: 6,
|
||||
auditSchemaVersion: 7,
|
||||
requestSmugglingClass: 'none',
|
||||
type: 'delegate',
|
||||
kind,
|
||||
|
||||
@@ -105,6 +105,29 @@ export const BARE_OS_WAVE9_PROC_FILE_TO_ID = Object.freeze({
|
||||
bare_os_form_data_delegate_limits_v2: 'form_data_delegate_limits_v2'
|
||||
})
|
||||
|
||||
/** Wave 10 `/proc` pseudo files → {@link ./bare-os-wave10-proc.js} ids. */
|
||||
export const BARE_OS_WAVE10_PROC_FILE_TO_ID = Object.freeze({
|
||||
bare_os_activity_queue_depth: 'activity_queue_depth',
|
||||
bare_os_autobase_writer_hint: 'autobase_writer_hint',
|
||||
bare_os_bare_boot_phase_map: 'bare_boot_phase_map',
|
||||
bare_os_bare_inspect_policy: 'bare_inspect_policy',
|
||||
bare_os_bare_logger_policy: 'bare_logger_policy',
|
||||
bare_os_bare_performance_counters: 'bare_performance_counters',
|
||||
bare_os_bare_rpc_registry_sketch: 'bare_rpc_registry_sketch',
|
||||
bare_os_bare_signals_mask: 'bare_signals_mask',
|
||||
bare_os_bare_stream_backpressure: 'bare_stream_backpressure',
|
||||
bare_os_bare_timers_budget: 'bare_timers_budget',
|
||||
bare_os_bare_tls_session_hint: 'bare_tls_session_hint',
|
||||
bare_os_bare_ws_gateway_sketch: 'bare_ws_gateway_sketch',
|
||||
bare_os_blind_pairing_sketch: 'blind_pairing_sketch',
|
||||
bare_os_broadcast_encryption_hint: 'broadcast_encryption_hint',
|
||||
bare_os_pear_api_allowlist_sketch: 'pear_api_allowlist_sketch',
|
||||
bare_os_pear_doctor_state: 'pear_doctor_state',
|
||||
bare_os_pear_rti_pointer: 'pear_rti_pointer',
|
||||
bare_os_pear_user_dirs_map: 'pear_user_dirs_map',
|
||||
bare_os_pear_workshop_flags: 'pear_workshop_flags'
|
||||
})
|
||||
|
||||
/**
|
||||
* Unified path view: system Hyperdrive for OS paths, personal Hyperdrive under $HOME,
|
||||
* optional HDMS mounts under /mnt/<label>/…, virtual /var with writable /var/log/…
|
||||
@@ -161,6 +184,7 @@ export const BARE_OS_WAVE9_PROC_FILE_TO_ID = Object.freeze({
|
||||
* procBareOsWave7JsonText?: (wave7Id: string) => string,
|
||||
* procBareOsWave8JsonText?: (wave8Id: string) => string,
|
||||
* procBareOsWave9JsonText?: (wave9Id: string) => string,
|
||||
* procBareOsWave10JsonText?: (wave10Id: string) => string,
|
||||
* getUnitJournalNdjson?: (unit: string) => string,
|
||||
* getVirtualReaders?: () => Map<string, unknown>,
|
||||
* unionReadPrefixes?: readonly string[],
|
||||
@@ -351,6 +375,10 @@ export function createVfs(
|
||||
typeof vfsOptions.procBareOsWave9JsonText === 'function'
|
||||
? vfsOptions.procBareOsWave9JsonText
|
||||
: null
|
||||
const procBareOsWave10JsonText =
|
||||
typeof vfsOptions.procBareOsWave10JsonText === 'function'
|
||||
? vfsOptions.procBareOsWave10JsonText
|
||||
: null
|
||||
const getUnitJournalNdjson =
|
||||
typeof vfsOptions.getUnitJournalNdjson === 'function'
|
||||
? vfsOptions.getUnitJournalNdjson
|
||||
@@ -853,9 +881,21 @@ export function createVfs(
|
||||
return utf8Encode(t)
|
||||
}
|
||||
}
|
||||
{
|
||||
const wid10 = BARE_OS_WAVE10_PROC_FILE_TO_ID[f]
|
||||
if (wid10) {
|
||||
const t = procBareOsWave10JsonText
|
||||
? procBareOsWave10JsonText(wid10)
|
||||
: `${JSON.stringify({
|
||||
schema: 1,
|
||||
note: 'wave10 proc provider missing'
|
||||
})}\n`
|
||||
return utf8Encode(t)
|
||||
}
|
||||
}
|
||||
if (f === 'bare_os_proc_index') {
|
||||
const idx = {
|
||||
schema: 5,
|
||||
schema: 6,
|
||||
description:
|
||||
'Stable aliases under /proc/bare_os/ (same payloads as flat /proc/bare_os_* files).',
|
||||
entries: [
|
||||
@@ -1205,6 +1245,82 @@ export function createVfs(
|
||||
{
|
||||
name: 'form_data_delegate_limits_v2.json',
|
||||
path: '/proc/bare_os/form_data_delegate_limits_v2.json'
|
||||
},
|
||||
{
|
||||
name: 'activity_queue_depth.json',
|
||||
path: '/proc/bare_os/activity_queue_depth.json'
|
||||
},
|
||||
{
|
||||
name: 'autobase_writer_hint.json',
|
||||
path: '/proc/bare_os/autobase_writer_hint.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_boot_phase_map.json',
|
||||
path: '/proc/bare_os/bare_boot_phase_map.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_inspect_policy.json',
|
||||
path: '/proc/bare_os/bare_inspect_policy.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_logger_policy.json',
|
||||
path: '/proc/bare_os/bare_logger_policy.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_performance_counters.json',
|
||||
path: '/proc/bare_os/bare_performance_counters.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_rpc_registry_sketch.json',
|
||||
path: '/proc/bare_os/bare_rpc_registry_sketch.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_signals_mask.json',
|
||||
path: '/proc/bare_os/bare_signals_mask.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_stream_backpressure.json',
|
||||
path: '/proc/bare_os/bare_stream_backpressure.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_timers_budget.json',
|
||||
path: '/proc/bare_os/bare_timers_budget.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_tls_session_hint.json',
|
||||
path: '/proc/bare_os/bare_tls_session_hint.json'
|
||||
},
|
||||
{
|
||||
name: 'bare_ws_gateway_sketch.json',
|
||||
path: '/proc/bare_os/bare_ws_gateway_sketch.json'
|
||||
},
|
||||
{
|
||||
name: 'blind_pairing_sketch.json',
|
||||
path: '/proc/bare_os/blind_pairing_sketch.json'
|
||||
},
|
||||
{
|
||||
name: 'broadcast_encryption_hint.json',
|
||||
path: '/proc/bare_os/broadcast_encryption_hint.json'
|
||||
},
|
||||
{
|
||||
name: 'pear_api_allowlist_sketch.json',
|
||||
path: '/proc/bare_os/pear_api_allowlist_sketch.json'
|
||||
},
|
||||
{
|
||||
name: 'pear_doctor_state.json',
|
||||
path: '/proc/bare_os/pear_doctor_state.json'
|
||||
},
|
||||
{
|
||||
name: 'pear_rti_pointer.json',
|
||||
path: '/proc/bare_os/pear_rti_pointer.json'
|
||||
},
|
||||
{
|
||||
name: 'pear_user_dirs_map.json',
|
||||
path: '/proc/bare_os/pear_user_dirs_map.json'
|
||||
},
|
||||
{
|
||||
name: 'pear_workshop_flags.json',
|
||||
path: '/proc/bare_os/pear_workshop_flags.json'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1555,6 +1671,44 @@ export function createVfs(
|
||||
'rlimits.json': 'bare_os_rlimits',
|
||||
hdms_health: 'bare_os_hdms_health',
|
||||
'hdms_health.json': 'bare_os_hdms_health',
|
||||
activity_queue_depth: 'bare_os_activity_queue_depth',
|
||||
'activity_queue_depth.json': 'bare_os_activity_queue_depth',
|
||||
autobase_writer_hint: 'bare_os_autobase_writer_hint',
|
||||
'autobase_writer_hint.json': 'bare_os_autobase_writer_hint',
|
||||
bare_boot_phase_map: 'bare_os_bare_boot_phase_map',
|
||||
'bare_boot_phase_map.json': 'bare_os_bare_boot_phase_map',
|
||||
bare_inspect_policy: 'bare_os_bare_inspect_policy',
|
||||
'bare_inspect_policy.json': 'bare_os_bare_inspect_policy',
|
||||
bare_logger_policy: 'bare_os_bare_logger_policy',
|
||||
'bare_logger_policy.json': 'bare_os_bare_logger_policy',
|
||||
bare_performance_counters: 'bare_os_bare_performance_counters',
|
||||
'bare_performance_counters.json': 'bare_os_bare_performance_counters',
|
||||
bare_rpc_registry_sketch: 'bare_os_bare_rpc_registry_sketch',
|
||||
'bare_rpc_registry_sketch.json': 'bare_os_bare_rpc_registry_sketch',
|
||||
bare_signals_mask: 'bare_os_bare_signals_mask',
|
||||
'bare_signals_mask.json': 'bare_os_bare_signals_mask',
|
||||
bare_stream_backpressure: 'bare_os_bare_stream_backpressure',
|
||||
'bare_stream_backpressure.json': 'bare_os_bare_stream_backpressure',
|
||||
bare_timers_budget: 'bare_os_bare_timers_budget',
|
||||
'bare_timers_budget.json': 'bare_os_bare_timers_budget',
|
||||
bare_tls_session_hint: 'bare_os_bare_tls_session_hint',
|
||||
'bare_tls_session_hint.json': 'bare_os_bare_tls_session_hint',
|
||||
bare_ws_gateway_sketch: 'bare_os_bare_ws_gateway_sketch',
|
||||
'bare_ws_gateway_sketch.json': 'bare_os_bare_ws_gateway_sketch',
|
||||
blind_pairing_sketch: 'bare_os_blind_pairing_sketch',
|
||||
'blind_pairing_sketch.json': 'bare_os_blind_pairing_sketch',
|
||||
broadcast_encryption_hint: 'bare_os_broadcast_encryption_hint',
|
||||
'broadcast_encryption_hint.json': 'bare_os_broadcast_encryption_hint',
|
||||
pear_api_allowlist_sketch: 'bare_os_pear_api_allowlist_sketch',
|
||||
'pear_api_allowlist_sketch.json': 'bare_os_pear_api_allowlist_sketch',
|
||||
pear_doctor_state: 'bare_os_pear_doctor_state',
|
||||
'pear_doctor_state.json': 'bare_os_pear_doctor_state',
|
||||
pear_rti_pointer: 'bare_os_pear_rti_pointer',
|
||||
'pear_rti_pointer.json': 'bare_os_pear_rti_pointer',
|
||||
pear_user_dirs_map: 'bare_os_pear_user_dirs_map',
|
||||
'pear_user_dirs_map.json': 'bare_os_pear_user_dirs_map',
|
||||
pear_workshop_flags: 'bare_os_pear_workshop_flags',
|
||||
'pear_workshop_flags.json': 'bare_os_pear_workshop_flags',
|
||||
'initd_graph.json': 'bare_os_initd_graph'
|
||||
}[rest]
|
||||
if (alias) {
|
||||
@@ -1903,6 +2057,14 @@ export function createVfs(
|
||||
file: stripped
|
||||
}
|
||||
}
|
||||
if (BARE_OS_WAVE10_PROC_FILE_TO_ID[stripped]) {
|
||||
return {
|
||||
virtualPseudo: true,
|
||||
kind: 'proc',
|
||||
node: 'file',
|
||||
file: stripped
|
||||
}
|
||||
}
|
||||
}
|
||||
return { virtualPseudo: true, kind: 'proc', node: 'enoent' }
|
||||
}
|
||||
@@ -2644,22 +2806,36 @@ export function createVfs(
|
||||
if (pr.kind === 'proc' && pr.node === 'root') {
|
||||
return [
|
||||
'bare_os',
|
||||
'bare_os_activity_queue_depth.json',
|
||||
'bare_os_async_hooks_lag.json',
|
||||
'bare_os_autobase_writer_hint.json',
|
||||
'bare_os_autopass_session_sketch.json',
|
||||
'bare_os_bare_boot_phase_map.json',
|
||||
'bare_os_bare_crypto_policy.json',
|
||||
'bare_os_bare_daemon_hooks.json',
|
||||
'bare_os_bare_diagnostics_channel.json',
|
||||
'bare_os_bare_inspect_policy.json',
|
||||
'bare_os_bare_ipc_bridge.json',
|
||||
'bare_os_bare_kit_bridge.json',
|
||||
'bare_os_bare_logger_policy.json',
|
||||
'bare_os_bare_module_resolution.json',
|
||||
'bare_os_bare_net_interfaces.json',
|
||||
'bare_os_bare_performance_counters.json',
|
||||
'bare_os_bare_rpc_registry_sketch.json',
|
||||
'bare_os_bare_signals_mask.json',
|
||||
'bare_os_bare_storage_quota.json',
|
||||
'bare_os_bare_stream_backpressure.json',
|
||||
'bare_os_bare_thread_pool.json',
|
||||
'bare_os_bare_timers_budget.json',
|
||||
'bare_os_bare_tls_session_hint.json',
|
||||
'bare_os_bare_vm_sandbox_sketch.json',
|
||||
'bare_os_bare_worker_pool.json',
|
||||
'bare_os_bare_ws_gateway_sketch.json',
|
||||
'bare_os_blind_pairing_sketch.json',
|
||||
'bare_os_blind_relay_router.json',
|
||||
'bare_os_bootstrap',
|
||||
'bare_os_brittle_snapshot_ci.json',
|
||||
'bare_os_broadcast_encryption_hint.json',
|
||||
'bare_os_build_attestation_pointer.json',
|
||||
'bare_os_capabilities',
|
||||
'bare_os_capabilities.json',
|
||||
@@ -2668,13 +2844,13 @@ export function createVfs(
|
||||
'bare_os_corestore_gc_hint.json',
|
||||
'bare_os_debug.json',
|
||||
'bare_os_delegate_red.json',
|
||||
'bare_os_drive_resolve_cache.json',
|
||||
'bare_os_dht_status.json',
|
||||
'bare_os_dns_map_active.json',
|
||||
'bare_os_drive_resolve_cache.json',
|
||||
'bare_os_extensions.json',
|
||||
'bare_os_features',
|
||||
'bare_os_form_data_delegate_limits.json',
|
||||
'bare_os_form_data_delegate_limits_v2.json',
|
||||
'bare_os_form_data_delegate_limits.json',
|
||||
'bare_os_gip_transport_sketch.json',
|
||||
'bare_os_git_delegate_stats.json',
|
||||
'bare_os_git_lfs_pointer_stats.json',
|
||||
@@ -2699,16 +2875,21 @@ export function createVfs(
|
||||
'bare_os_metrics_live.json',
|
||||
'bare_os_net_summary.json',
|
||||
'bare_os_oidc_publishing_pointer.json',
|
||||
'bare_os_pear_api_allowlist_sketch.json',
|
||||
'bare_os_pear_appling_manifest.json',
|
||||
'bare_os_pear_build_fingerprint.json',
|
||||
'bare_os_pear_doctor_state.json',
|
||||
'bare_os_pear_drop_events.json',
|
||||
'bare_os_pear_ipc_health.json',
|
||||
'bare_os_pear_radio_state.json',
|
||||
'bare_os_pear_rti_pointer.json',
|
||||
'bare_os_pear_sidecar_bundle_index.json',
|
||||
'bare_os_pear_stage_pointer.json',
|
||||
'bare_os_pear_trust.json',
|
||||
'bare_os_pear_updater_state.json',
|
||||
'bare_os_pear_user_dirs_map.json',
|
||||
'bare_os_pear_wakeups_schedule.json',
|
||||
'bare_os_pear_workshop_flags.json',
|
||||
'bare_os_peer_health',
|
||||
'bare_os_protomux_channel_alias_v2.json',
|
||||
'bare_os_protomux_channels.json',
|
||||
@@ -2758,22 +2939,36 @@ export function createVfs(
|
||||
pr.dir === 'bare_os_proc'
|
||||
) {
|
||||
return [
|
||||
'activity_queue_depth.json',
|
||||
'async_hooks_lag.json',
|
||||
'autobase_writer_hint.json',
|
||||
'autopass_session_sketch.json',
|
||||
'bare_boot_phase_map.json',
|
||||
'bare_crypto_policy.json',
|
||||
'bare_daemon_hooks.json',
|
||||
'bare_diagnostics_channel.json',
|
||||
'bare_inspect_policy.json',
|
||||
'bare_ipc_bridge.json',
|
||||
'bare_kit_bridge.json',
|
||||
'bare_logger_policy.json',
|
||||
'bare_module_resolution.json',
|
||||
'bare_net_interfaces.json',
|
||||
'bare_performance_counters.json',
|
||||
'bare_rpc_registry_sketch.json',
|
||||
'bare_signals_mask.json',
|
||||
'bare_storage_quota.json',
|
||||
'bare_stream_backpressure.json',
|
||||
'bare_thread_pool.json',
|
||||
'bare_timers_budget.json',
|
||||
'bare_tls_session_hint.json',
|
||||
'bare_vm_sandbox_sketch.json',
|
||||
'bare_worker_pool.json',
|
||||
'bare_ws_gateway_sketch.json',
|
||||
'blind_pairing_sketch.json',
|
||||
'blind_relay_router.json',
|
||||
'bootstrap',
|
||||
'brittle_snapshot_ci.json',
|
||||
'broadcast_encryption_hint.json',
|
||||
'build_attestation_pointer.json',
|
||||
'capabilities',
|
||||
'capabilities.json',
|
||||
@@ -2782,9 +2977,9 @@ export function createVfs(
|
||||
'corestore_gc_hint.json',
|
||||
'debug.json',
|
||||
'delegate_red.json',
|
||||
'drive_resolve_cache.json',
|
||||
'dht_status.json',
|
||||
'dns_map_active.json',
|
||||
'drive_resolve_cache.json',
|
||||
'extensions.json',
|
||||
'features',
|
||||
'form_data_delegate_limits.json',
|
||||
@@ -2814,17 +3009,22 @@ export function createVfs(
|
||||
'metrics_live.json',
|
||||
'net_summary.json',
|
||||
'oidc_publishing_pointer.json',
|
||||
'pear_api_allowlist_sketch.json',
|
||||
'pear_appling_manifest.json',
|
||||
'pear_build_fingerprint.json',
|
||||
'pear_doctor_state.json',
|
||||
'pear_drop_events.json',
|
||||
'pear_ipc.json',
|
||||
'pear_ipc_health.json',
|
||||
'pear_radio_state.json',
|
||||
'pear_rti_pointer.json',
|
||||
'pear_sidecar_bundle_index.json',
|
||||
'pear_stage_pointer.json',
|
||||
'pear_trust.json',
|
||||
'pear_updater_state.json',
|
||||
'pear_user_dirs_map.json',
|
||||
'pear_wakeups_schedule.json',
|
||||
'pear_workshop_flags.json',
|
||||
'peer_health',
|
||||
'protomux_channel_alias_v2.json',
|
||||
'protomux_channels.json',
|
||||
@@ -2844,6 +3044,7 @@ export function createVfs(
|
||||
'seed_handshake',
|
||||
'session_stats',
|
||||
'slo_hints.json',
|
||||
'snapshot_hints',
|
||||
'snapshot_hints.json',
|
||||
'staging_slot',
|
||||
'structured_clone_budget_v2.json',
|
||||
@@ -2856,6 +3057,7 @@ export function createVfs(
|
||||
'version',
|
||||
'virtual_registry',
|
||||
'worker_budget.json'
|
||||
|
||||
]
|
||||
}
|
||||
if (pr.kind === 'proc' && pr.node === 'dir' && pr.dir === 'net') {
|
||||
|
||||
@@ -856,22 +856,36 @@ test('vfs /proc /sys read-only pseudo files; write rejected', async (t) => {
|
||||
t.ok(root.includes('dev'))
|
||||
t.alike(await vfs.readdir('/proc').then((a) => [...a].sort()), [
|
||||
'bare_os',
|
||||
'bare_os_activity_queue_depth.json',
|
||||
'bare_os_async_hooks_lag.json',
|
||||
'bare_os_autobase_writer_hint.json',
|
||||
'bare_os_autopass_session_sketch.json',
|
||||
'bare_os_bare_boot_phase_map.json',
|
||||
'bare_os_bare_crypto_policy.json',
|
||||
'bare_os_bare_daemon_hooks.json',
|
||||
'bare_os_bare_diagnostics_channel.json',
|
||||
'bare_os_bare_inspect_policy.json',
|
||||
'bare_os_bare_ipc_bridge.json',
|
||||
'bare_os_bare_kit_bridge.json',
|
||||
'bare_os_bare_logger_policy.json',
|
||||
'bare_os_bare_module_resolution.json',
|
||||
'bare_os_bare_net_interfaces.json',
|
||||
'bare_os_bare_performance_counters.json',
|
||||
'bare_os_bare_rpc_registry_sketch.json',
|
||||
'bare_os_bare_signals_mask.json',
|
||||
'bare_os_bare_storage_quota.json',
|
||||
'bare_os_bare_stream_backpressure.json',
|
||||
'bare_os_bare_thread_pool.json',
|
||||
'bare_os_bare_timers_budget.json',
|
||||
'bare_os_bare_tls_session_hint.json',
|
||||
'bare_os_bare_vm_sandbox_sketch.json',
|
||||
'bare_os_bare_worker_pool.json',
|
||||
'bare_os_bare_ws_gateway_sketch.json',
|
||||
'bare_os_blind_pairing_sketch.json',
|
||||
'bare_os_blind_relay_router.json',
|
||||
'bare_os_bootstrap',
|
||||
'bare_os_brittle_snapshot_ci.json',
|
||||
'bare_os_broadcast_encryption_hint.json',
|
||||
'bare_os_build_attestation_pointer.json',
|
||||
'bare_os_capabilities',
|
||||
'bare_os_capabilities.json',
|
||||
@@ -911,16 +925,21 @@ test('vfs /proc /sys read-only pseudo files; write rejected', async (t) => {
|
||||
'bare_os_metrics_live.json',
|
||||
'bare_os_net_summary.json',
|
||||
'bare_os_oidc_publishing_pointer.json',
|
||||
'bare_os_pear_api_allowlist_sketch.json',
|
||||
'bare_os_pear_appling_manifest.json',
|
||||
'bare_os_pear_build_fingerprint.json',
|
||||
'bare_os_pear_doctor_state.json',
|
||||
'bare_os_pear_drop_events.json',
|
||||
'bare_os_pear_ipc_health.json',
|
||||
'bare_os_pear_radio_state.json',
|
||||
'bare_os_pear_rti_pointer.json',
|
||||
'bare_os_pear_sidecar_bundle_index.json',
|
||||
'bare_os_pear_stage_pointer.json',
|
||||
'bare_os_pear_trust.json',
|
||||
'bare_os_pear_updater_state.json',
|
||||
'bare_os_pear_user_dirs_map.json',
|
||||
'bare_os_pear_wakeups_schedule.json',
|
||||
'bare_os_pear_workshop_flags.json',
|
||||
'bare_os_peer_health',
|
||||
'bare_os_protomux_channel_alias_v2.json',
|
||||
'bare_os_protomux_channels.json',
|
||||
|
||||
@@ -91,9 +91,11 @@ export const COREUTILS_COMMANDS = [
|
||||
'sleep',
|
||||
'sort',
|
||||
'split',
|
||||
'ssh-keygen',
|
||||
'stat',
|
||||
'sum',
|
||||
'sync',
|
||||
'tar',
|
||||
'tac',
|
||||
'tail',
|
||||
'tee',
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "ssh-keygen",
|
||||
"section": 1,
|
||||
"title": "ssh-keygen",
|
||||
"synopsis": ["ssh-keygen [OPTION]..."],
|
||||
"description": "Bare OS stub only. Key generation uses bare-crypto / Pear host tooling; guests must not rely on node:crypto.",
|
||||
"options": [],
|
||||
"keywords": ["ssh-keygen", "bare-crypto", "bare-os", "coreutils"],
|
||||
"bareOsNotes": "See developer-guide/node-to-bare-modules.md and handbook ch.9."
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "tar",
|
||||
"section": 1,
|
||||
"title": "tar",
|
||||
"synopsis": ["tar [--bare-os-wave10-xattr-sketch]"],
|
||||
"description": "Bare OS stub. Emits a bounded JSON xattr sketch when --bare-os-wave10-xattr-sketch is passed; otherwise directs operators to Pear/bare-pack tooling.",
|
||||
"options": [],
|
||||
"keywords": ["tar", "xattr", "bare-os", "coreutils"],
|
||||
"bareOsNotes": "Handbook ch.9 — archive operations are not implemented in stock coreutils."
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Non-crypto stub: Pear/Bare guests must not use Node `node:crypto` for keys.
|
||||
* Operators use host **`bare-crypto`** / Pear tooling; see developer-guide Node→Bare map.
|
||||
*/
|
||||
async function run(ctx, argv) {
|
||||
const args = argv.slice(1)
|
||||
if (args.includes('-h') || args.includes('--help') || args.includes('-?')) {
|
||||
ctx.console.log(
|
||||
'Usage: ssh-keygen (stub)\n' +
|
||||
'Bare OS does not generate SSH keys in-guest. Use bare-crypto / Pear host workflows.\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
ctx.console.error(
|
||||
'ssh-keygen: Bare OS stub only — use bare-crypto and host key tooling (no node:crypto in guest).'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
}
|
||||
|
||||
export { run }
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Wave 10: bounded extended-attribute metadata sketch only (no archive I/O).
|
||||
* Full archive workflows use Pear pack / bare-pack tooling outside the stub.
|
||||
*/
|
||||
async function run(ctx, argv) {
|
||||
const args = argv.slice(1)
|
||||
if (
|
||||
args.includes('--bare-os-wave10-xattr-sketch') ||
|
||||
args.includes('--bare-os-xattr-sketch')
|
||||
) {
|
||||
ctx.console.log(
|
||||
JSON.stringify({
|
||||
schema: 1,
|
||||
note: 'tar xattr subset stub; no archive bytes read in stock coreutils',
|
||||
entries: [],
|
||||
atMs: Date.now()
|
||||
}) + '\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
if (args.includes('-h') || args.includes('--help')) {
|
||||
ctx.console.log(
|
||||
'Usage: tar [--bare-os-wave10-xattr-sketch]\n' +
|
||||
'Bare OS tar is a documentation stub; use Pear/bare-pack for bundles.\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
ctx.console.error(
|
||||
'tar: Bare OS stub — pass --bare-os-wave10-xattr-sketch for JSON sketch or use host pack tools.'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
}
|
||||
|
||||
export { run }
|
||||
@@ -3,12 +3,14 @@
|
||||
* Limits: stdin 256KiB, 4096 whitespace/null tokens, 128 args per invocation,
|
||||
* 64 invocations per run. Exceeding limits is a fatal error (exit 125).
|
||||
* Supports -0/--null, -n, -I repl (replace repl in utility argv; implies -n 1 unless -n given).
|
||||
* -P N is accepted; stock booter runs sequentially; N is capped at MAX_P_FLAG (4).
|
||||
*/
|
||||
|
||||
const MAX_STDIN = 256 * 1024
|
||||
const MAX_TOKENS = 4096
|
||||
const MAX_PER_INVOCATION = 128
|
||||
const MAX_INVOCATIONS = 64
|
||||
const MAX_P_FLAG = 4
|
||||
|
||||
async function run(ctx, argv) {
|
||||
if (typeof ctx.runBinCommand !== 'function') {
|
||||
@@ -24,6 +26,7 @@ async function run(ctx, argv) {
|
||||
/** @type {string | null} */
|
||||
let repl = null
|
||||
let nExplicit = false
|
||||
let pCap = 1
|
||||
let i = 0
|
||||
|
||||
while (i < args.length && args[i].startsWith('-')) {
|
||||
@@ -37,6 +40,40 @@ async function run(ctx, argv) {
|
||||
i++
|
||||
continue
|
||||
}
|
||||
if (a === '-P' || a === '--max-procs') {
|
||||
const n = args[i + 1]
|
||||
if (n == null || !/^\d+$/.test(n)) {
|
||||
ctx.console.error('xargs: -P requires a non-negative integer')
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
}
|
||||
const raw = Number(n)
|
||||
pCap = Math.min(MAX_P_FLAG, Math.max(1, raw))
|
||||
if (raw > MAX_P_FLAG) {
|
||||
ctx.console.error(
|
||||
'xargs: -P ' +
|
||||
raw +
|
||||
' exceeds Bare OS cap ' +
|
||||
MAX_P_FLAG +
|
||||
' (parallelism hint only; sequential execution)'
|
||||
)
|
||||
}
|
||||
i += 2
|
||||
continue
|
||||
}
|
||||
if (a.startsWith('-P') && a.length > 2 && /^\d+$/.test(a.slice(2))) {
|
||||
const raw = Number(a.slice(2))
|
||||
pCap = Math.min(MAX_P_FLAG, Math.max(1, raw))
|
||||
if (raw > MAX_P_FLAG) {
|
||||
ctx.console.error(
|
||||
'xargs: -P exceeds Bare OS cap ' +
|
||||
MAX_P_FLAG +
|
||||
' (parallelism hint only; sequential execution)'
|
||||
)
|
||||
}
|
||||
i++
|
||||
continue
|
||||
}
|
||||
if (a === '-n' || a === '--max-args') {
|
||||
const n = args[i + 1]
|
||||
if (n == null || !/^\d+$/.test(n) || Number(n) < 1) {
|
||||
@@ -76,7 +113,9 @@ async function run(ctx, argv) {
|
||||
ctx.console.error(
|
||||
'xargs: Bare OS supports: -0/--null, -n N (max ' +
|
||||
MAX_PER_INVOCATION +
|
||||
' per run), -I repl'
|
||||
' per run), -I repl, -P N (max ' +
|
||||
MAX_P_FLAG +
|
||||
', sequential)'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
@@ -85,6 +124,7 @@ async function run(ctx, argv) {
|
||||
/** @type {string[]} */
|
||||
let cmd = args.slice(i)
|
||||
if (cmd.length === 0) cmd = ['echo']
|
||||
void pCap
|
||||
|
||||
let text = bareStdin(ctx) || ''
|
||||
if (text.length > MAX_STDIN) {
|
||||
|
||||
@@ -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`** … **`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` |
|
||||
| `setupSeedChannel` | Wire Protomux messages 0–6 for RAM block reads, gossip bitfield, manifest path **search**, **RPC** (incl. `bare_os.capabilities` with **`bits`** … **`bits10`** when non-zero, typed errors for unknown RPC methods, `bare_os.replication_status`, `bare_os.replication_queue`, wave 6–10 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_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).
|
||||
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_V10`**; **`BARE_OS_KERNEL_FEATURE_BITS_DOC=12`**; 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
|
||||
|
||||
|
||||
@@ -174,5 +174,19 @@ export {
|
||||
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
|
||||
BARE_OS_FEATURE9_HTTP_DHT_PROXY_ROUTES_V2,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V10,
|
||||
BARE_OS_FEATURE10_CAP_WORD,
|
||||
BARE_OS_FEATURE10_SEED_RPC_WAVE10,
|
||||
BARE_OS_FEATURE10_REPLICATION_JSON_WAVE10,
|
||||
BARE_OS_FEATURE10_PROC_METRICS_WAVE10,
|
||||
BARE_OS_FEATURE10_BOOT_POLICY_V10,
|
||||
BARE_OS_FEATURE10_KERNEL_EXT_REGISTRY_V7,
|
||||
BARE_OS_FEATURE10_PEAR_BARE_BRIDGE_WAVE10,
|
||||
BARE_OS_FEATURE10_VFS_POSIX_WAVE10,
|
||||
BARE_OS_FEATURE10_INITD_SUBPROC_WAVE10,
|
||||
BARE_OS_FEATURE10_WORKER_NET_WAVE10,
|
||||
BARE_OS_FEATURE10_TELEMETRY_AUDIT_WAVE10,
|
||||
BARE_OS_FEATURE10_DOC_CI_WAVE10,
|
||||
BARE_OS_FEATURE10_COMPACT_READY_RPC_V4
|
||||
} from './lib/kernel-feature-bits.js'
|
||||
|
||||
@@ -11,7 +11,8 @@ import {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V6,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V7,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V10
|
||||
} from './kernel-feature-bits.js'
|
||||
import {
|
||||
BARE_OS_SEED_RPC_METHODS,
|
||||
@@ -121,7 +122,37 @@ import {
|
||||
* mirrorDriveCompactionV4Json?: string,
|
||||
* readyGuardV3Json?: string,
|
||||
* blindRelayCircuitV2Json?: string,
|
||||
* httpDhtProxyRoutesV2Json?: string
|
||||
* httpDhtProxyRoutesV2Json?: string,
|
||||
* pearBundleTier?: string,
|
||||
* autobaseDiscoveryHintJson?: string,
|
||||
* handshakeTokenBucketV4Json?: string,
|
||||
* peerFirewallStatsV5Json?: string,
|
||||
* stagingSlotWave10Json?: string,
|
||||
* compactPingV4Json?: string,
|
||||
* seederPearRuntimeBareFingerprint?: string,
|
||||
* pearDoctorHintJson?: string,
|
||||
* pearInfoSketchJson?: string,
|
||||
* pearInspectCapsJson?: string,
|
||||
* pearDumpBudgetJson?: string,
|
||||
* pearResetGuardJson?: string,
|
||||
* pearRestartWindowJson?: string,
|
||||
* pearRunFlagsJson?: string,
|
||||
* pearBundleManifestSliceJson?: string,
|
||||
* pearPackLayoutHintJson?: string,
|
||||
* pearSeedTopologyJson?: string,
|
||||
* pearStateSnapshotJson?: string,
|
||||
* pearStampPointerJson?: string,
|
||||
* pearShakeLatencyJson?: string,
|
||||
* pearCrasherClassJson?: string,
|
||||
* pearErrorsRateHintJson?: string,
|
||||
* pearBridgeHealthJson?: string,
|
||||
* pearLinkMatrixJson?: string,
|
||||
* pearPipeBackpressureJson?: string,
|
||||
* pearOpwaitBudgetJson?: string,
|
||||
* pearTerminalCapsJson?: string,
|
||||
* readyGuardV4Json?: string,
|
||||
* mirrorDriveCompactionV5Json?: string,
|
||||
* blindRelayCircuitV3Json?: string
|
||||
* }} [opts]
|
||||
*/
|
||||
export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
@@ -222,6 +253,14 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
const seederPearApplingId = String(opts.seederPearApplingId ?? '')
|
||||
.trim()
|
||||
.slice(0, 256)
|
||||
const seederPearRuntimeBareFingerprint = String(
|
||||
opts.seederPearRuntimeBareFingerprint ?? ''
|
||||
)
|
||||
.trim()
|
||||
.slice(0, 256)
|
||||
const pearBundleTier = String(opts.pearBundleTier ?? '')
|
||||
.trim()
|
||||
.slice(0, 64)
|
||||
const compactPingEncodingHint = String(opts.compactPingEncodingHint ?? '')
|
||||
.trim()
|
||||
.slice(0, 64)
|
||||
@@ -345,7 +384,9 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
pearRuntimeFingerprint:
|
||||
seederPearRuntimeFingerprint || undefined,
|
||||
booterPackageVersion: booterPackageVersionHint || undefined,
|
||||
pearApplingId: seederPearApplingId || undefined
|
||||
pearApplingId: seederPearApplingId || undefined,
|
||||
pearRuntimeBareFingerprint:
|
||||
seederPearRuntimeBareFingerprint || undefined
|
||||
}),
|
||||
error: ''
|
||||
})
|
||||
@@ -367,6 +408,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
bits7: BARE_OS_KERNEL_FEATURES_STOCK_V7 >>> 0,
|
||||
bits8: BARE_OS_KERNEL_FEATURES_STOCK_V8 >>> 0,
|
||||
bits9: BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0,
|
||||
bits10: BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0,
|
||||
protocolPackageVersion: BARE_OS_PROTOCOL_PACKAGE_VERSION,
|
||||
booterPackageVersion: booterPackageVersionHint || undefined,
|
||||
role: 'seeder',
|
||||
@@ -407,6 +449,11 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
rs.pearUpdaterDelegate = pearUpdaterDelegateClass
|
||||
const tb3 = parseOptJson(opts.handshakeTokenBucketV3Json)
|
||||
if (tb3) rs.handshakeTokenBucketV3 = tb3
|
||||
if (pearBundleTier) rs.pearBundleTier = pearBundleTier
|
||||
const abdisc = parseOptJson(opts.autobaseDiscoveryHintJson)
|
||||
if (abdisc) rs.autobaseDiscoveryHint = abdisc
|
||||
const tb4 = parseOptJson(opts.handshakeTokenBucketV4Json)
|
||||
if (tb4) rs.handshakeTokenBucketV4 = tb4
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
@@ -470,7 +517,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
result: JSON.stringify({
|
||||
role: 'seeder',
|
||||
protocol: PROTOCOL_NAME,
|
||||
schema: 6,
|
||||
schema: 7,
|
||||
activeSlot: stagingActiveSlot,
|
||||
pendingSlot: stagingPendingSlot || null,
|
||||
previousSlot: stagingPreviousSlot || null,
|
||||
@@ -478,12 +525,15 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
drainDeadlineMs: stagingDrainDeadlineMs,
|
||||
quarantine: parseOptJson(opts.stagingQuarantineJson),
|
||||
wave9: parseOptJson(opts.stagingSlotWave9Json),
|
||||
wave10: parseOptJson(opts.stagingSlotWave10Json),
|
||||
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.',
|
||||
schema7Note:
|
||||
'schema 7 adds optional wave10 operator blob; prior fields remain stable.',
|
||||
atMs: Date.now()
|
||||
}),
|
||||
error: ''
|
||||
@@ -636,6 +686,8 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
if (sat) stats.saturationClass = sat
|
||||
const fw4 = parseOptJson(opts.peerFirewallStatsV4Json)
|
||||
if (fw4) stats.wave9 = fw4
|
||||
const fw5 = parseOptJson(opts.peerFirewallStatsV5Json)
|
||||
if (fw5) stats.wave10 = fw5
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
@@ -643,7 +695,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
role: 'seeder',
|
||||
protocol: PROTOCOL_NAME,
|
||||
firewall: stats,
|
||||
firewallSchema: 4,
|
||||
firewallSchema: 5,
|
||||
atMs: Date.now()
|
||||
}),
|
||||
error: ''
|
||||
@@ -754,6 +806,7 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
perf && typeof perf.now === 'function'
|
||||
? Math.floor(perf.now() * 1000)
|
||||
: Date.now() * 1000
|
||||
const v4 = parseOptJson(opts.compactPingV4Json)
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
@@ -762,8 +815,9 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
pong: true,
|
||||
tUs,
|
||||
protocol: PROTOCOL_NAME,
|
||||
schema: 3,
|
||||
encodingHint: compactPingEncodingHint || undefined
|
||||
schema: 4,
|
||||
encodingHint: compactPingEncodingHint || undefined,
|
||||
wave10: v4 || undefined
|
||||
}),
|
||||
error: ''
|
||||
})
|
||||
@@ -1282,6 +1336,194 @@ export function setupSeedChannel(mux, localRAM, replicateDrive, opts = {}) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_doctor_hint') {
|
||||
const h = parseOptJson(opts.pearDoctorHintJson)
|
||||
sendWave9Rpc({
|
||||
doctor: h || { note: 'pear-doctor health class (non-secret)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_info_sketch') {
|
||||
const h = parseOptJson(opts.pearInfoSketchJson)
|
||||
sendWave9Rpc({
|
||||
info: h || { note: 'pear-info build/runtime pointer' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_inspect_caps') {
|
||||
const h = parseOptJson(opts.pearInspectCapsJson)
|
||||
sendWave9Rpc({
|
||||
inspect: h || { note: 'pear-inspect capability flags' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_dump_budget') {
|
||||
const h = parseOptJson(opts.pearDumpBudgetJson)
|
||||
sendWave9Rpc({
|
||||
dumpBudget: h || { note: 'pear-dump export budget class' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_reset_guard') {
|
||||
const h = parseOptJson(opts.pearResetGuardJson)
|
||||
sendWave9Rpc({
|
||||
resetGuard: h || { note: 'pear-reset policy hint' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_restart_window') {
|
||||
const h = parseOptJson(opts.pearRestartWindowJson)
|
||||
sendWave9Rpc({
|
||||
restartWindow: h || { note: 'pear-restart backoff window' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_run_flags') {
|
||||
const h = parseOptJson(opts.pearRunFlagsJson)
|
||||
sendWave9Rpc({
|
||||
runFlags: h || { note: 'pear-run mode flags' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_bundle_manifest_slice') {
|
||||
const h = parseOptJson(opts.pearBundleManifestSliceJson)
|
||||
sendWave9Rpc({
|
||||
bundleSlice: h || { note: 'pear-bundle manifest sample' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_pack_layout_hint') {
|
||||
const h = parseOptJson(opts.pearPackLayoutHintJson)
|
||||
sendWave9Rpc({
|
||||
packLayout: h || { note: 'pear-pack layout operator hint' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_seed_topology') {
|
||||
const h = parseOptJson(opts.pearSeedTopologyJson)
|
||||
sendWave9Rpc({
|
||||
seedTopology: h || { note: 'pear-seed graph sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_state_snapshot') {
|
||||
const h = parseOptJson(opts.pearStateSnapshotJson)
|
||||
sendWave9Rpc({
|
||||
stateSnapshot: h || { note: 'pear-state volatile class' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_stamp_pointer') {
|
||||
const h = parseOptJson(opts.pearStampPointerJson)
|
||||
sendWave9Rpc({
|
||||
stamp: h || { note: 'pear-stamp provenance pointer' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_shake_latency') {
|
||||
const h = parseOptJson(opts.pearShakeLatencyJson)
|
||||
sendWave9Rpc({
|
||||
shakeLatency: h || { note: 'pear-shake handshake latency sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_crasher_class') {
|
||||
const h = parseOptJson(opts.pearCrasherClassJson)
|
||||
sendWave9Rpc({
|
||||
crasherClass: h || { note: 'pear-crasher reporting class (non-secret)' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_errors_rate_hint') {
|
||||
const h = parseOptJson(opts.pearErrorsRateHintJson)
|
||||
sendWave9Rpc({
|
||||
errorsRate: h || { note: 'pear-errors taxonomy rate bucket' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_bridge_health') {
|
||||
const h = parseOptJson(opts.pearBridgeHealthJson)
|
||||
sendWave9Rpc({
|
||||
bridgeHealth: h || { note: 'pear-bridge health sketch' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_link_matrix') {
|
||||
const h = parseOptJson(opts.pearLinkMatrixJson)
|
||||
sendWave9Rpc({
|
||||
linkMatrix: h || { note: 'pear-link alias matrix' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_pipe_backpressure') {
|
||||
const h = parseOptJson(opts.pearPipeBackpressureJson)
|
||||
sendWave9Rpc({
|
||||
pipeBackpressure: h || { note: 'pear-pipe backlog class' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_opwait_budget') {
|
||||
const h = parseOptJson(opts.pearOpwaitBudgetJson)
|
||||
sendWave9Rpc({
|
||||
opwaitBudget: h || { note: 'pear-opwait budget' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'pear_terminal_caps') {
|
||||
const h = parseOptJson(opts.pearTerminalCapsJson)
|
||||
sendWave9Rpc({
|
||||
terminalCaps: h || { note: 'pear-terminal capability flags' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'ready_guard_v4') {
|
||||
const h = parseOptJson(opts.readyGuardV4Json)
|
||||
sendWave9Rpc({
|
||||
readyGuardV4:
|
||||
h || { matrix: [], note: 'ready-guard v4 enum expansion' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'mirror_drive_compaction_v5') {
|
||||
const h = parseOptJson(opts.mirrorDriveCompactionV5Json)
|
||||
sendWave9Rpc({
|
||||
compactionV5:
|
||||
h || { phases: [], note: 'mirror-drive compaction enum v5' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'blind_relay_circuit_v3') {
|
||||
const h = parseOptJson(opts.blindRelayCircuitV3Json)
|
||||
sendWave9Rpc({
|
||||
circuitsV3:
|
||||
h || { note: 'blind-relay circuit v3 reason codes' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (m.module === 'bare_os' && m.method === 'compact_ping_v4') {
|
||||
const perf = globalThis.performance
|
||||
const tUs =
|
||||
perf && typeof perf.now === 'function'
|
||||
? Math.floor(perf.now() * 1000)
|
||||
: Date.now() * 1000
|
||||
const v4 = parseOptJson(opts.compactPingV4Json)
|
||||
chan.messages[6].send({
|
||||
id: m.id,
|
||||
success: true,
|
||||
result: JSON.stringify({
|
||||
role: 'seeder',
|
||||
pong: true,
|
||||
tUs,
|
||||
protocol: PROTOCOL_NAME,
|
||||
schema: 4,
|
||||
variant: 'compact_ping_v4',
|
||||
wave10: v4 || { note: 'compact ping v4 dedicated RPC' },
|
||||
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 = 11
|
||||
export const BARE_OS_KERNEL_FEATURE_BITS_DOC = 12
|
||||
|
||||
/**
|
||||
* Second capability word (bits 0–31, always use `>>> 0` when masking).
|
||||
@@ -474,6 +474,52 @@ export const BARE_OS_KERNEL_FEATURES_STOCK_V9 =
|
||||
BARE_OS_FEATURE9_DOC_CI_WAVE9 |
|
||||
BARE_OS_FEATURE9_HTTP_DHT_PROXY_ROUTES_V2
|
||||
|
||||
/**
|
||||
* Tenth capability word (bits 0–31, use `>>> 0`). Wave 10 mega-phase — ADR 001 §13.
|
||||
*/
|
||||
/** Word10 bit 0: `bits10` on seed `capabilities` + `/proc/bare_os_features`. */
|
||||
export const BARE_OS_FEATURE10_CAP_WORD = 1 << 0
|
||||
/** Word10 bit 1: Extended seed RPCs (pear_doctor_hint, pear_inspect_caps, …). */
|
||||
export const BARE_OS_FEATURE10_SEED_RPC_WAVE10 = 1 << 1
|
||||
/** Word10 bit 2: Replication JSON / staging schema 7 / kernel_info wave 10 adjuncts. */
|
||||
export const BARE_OS_FEATURE10_REPLICATION_JSON_WAVE10 = 1 << 2
|
||||
/** Word10 bit 3: Wave 10 `/proc/bare_os/*.json` (bare-boot, bare-rpc, pear-doctor, …). */
|
||||
export const BARE_OS_FEATURE10_PROC_METRICS_WAVE10 = 1 << 3
|
||||
/** Word10 bit 4: Boot policy v10 (`requireFeatureBits10`, `requireBareBootMin`, …). */
|
||||
export const BARE_OS_FEATURE10_BOOT_POLICY_V10 = 1 << 4
|
||||
/** Word10 bit 5: Kernel extension registry schema 7 + extensionSignerPins v3 hints. */
|
||||
export const BARE_OS_FEATURE10_KERNEL_EXT_REGISTRY_V7 = 1 << 5
|
||||
/** Word10 bit 6: Pear/Bare bridge wave 10 (doctor hint, bare logger tap, …). */
|
||||
export const BARE_OS_FEATURE10_PEAR_BARE_BRIDGE_WAVE10 = 1 << 6
|
||||
/** Word10 bit 7: VFS/POSIX/shell wave 10 (ssh-keygen stub, xargs -P, tar xattr). */
|
||||
export const BARE_OS_FEATURE10_VFS_POSIX_WAVE10 = 1 << 7
|
||||
/** Word10 bit 8: Initd / subprocess / git worktree policy wave 10. */
|
||||
export const BARE_OS_FEATURE10_INITD_SUBPROC_WAVE10 = 1 << 8
|
||||
/** Word10 bit 9: Workers / sandbox / net wave 10 (`sysproc:*`, mTLS map, happy eyeballs v4). */
|
||||
export const BARE_OS_FEATURE10_WORKER_NET_WAVE10 = 1 << 9
|
||||
/** Word10 bit 10: Telemetry NDJSON v9 / OTel v7 / audit v7. */
|
||||
export const BARE_OS_FEATURE10_TELEMETRY_AUDIT_WAVE10 = 1 << 10
|
||||
/** Word10 bit 11: CI (`verify-kernel-roadmap-wave10`). */
|
||||
export const BARE_OS_FEATURE10_DOC_CI_WAVE10 = 1 << 11
|
||||
/** Word10 bit 12: Seed RPC `compact_ping_v4` + `ready_guard_v4` surface. */
|
||||
export const BARE_OS_FEATURE10_COMPACT_READY_RPC_V4 = 1 << 12
|
||||
|
||||
/** Stock booter tenth word (wave 10). */
|
||||
export const BARE_OS_KERNEL_FEATURES_STOCK_V10 =
|
||||
BARE_OS_FEATURE10_CAP_WORD |
|
||||
BARE_OS_FEATURE10_SEED_RPC_WAVE10 |
|
||||
BARE_OS_FEATURE10_REPLICATION_JSON_WAVE10 |
|
||||
BARE_OS_FEATURE10_PROC_METRICS_WAVE10 |
|
||||
BARE_OS_FEATURE10_BOOT_POLICY_V10 |
|
||||
BARE_OS_FEATURE10_KERNEL_EXT_REGISTRY_V7 |
|
||||
BARE_OS_FEATURE10_PEAR_BARE_BRIDGE_WAVE10 |
|
||||
BARE_OS_FEATURE10_VFS_POSIX_WAVE10 |
|
||||
BARE_OS_FEATURE10_INITD_SUBPROC_WAVE10 |
|
||||
BARE_OS_FEATURE10_WORKER_NET_WAVE10 |
|
||||
BARE_OS_FEATURE10_TELEMETRY_AUDIT_WAVE10 |
|
||||
BARE_OS_FEATURE10_DOC_CI_WAVE10 |
|
||||
BARE_OS_FEATURE10_COMPACT_READY_RPC_V4
|
||||
|
||||
/** 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.5.0'
|
||||
export const BARE_OS_PROTOCOL_PACKAGE_VERSION = '0.6.0'
|
||||
|
||||
@@ -65,7 +65,31 @@ export const BARE_OS_SEED_RPC_METHOD_SHORT_NAMES = [
|
||||
'mirror_drive_compaction_v4',
|
||||
'ready_guard_v3',
|
||||
'blind_relay_circuit_v2',
|
||||
'http_dht_proxy_routes_v2'
|
||||
'http_dht_proxy_routes_v2',
|
||||
'pear_doctor_hint',
|
||||
'pear_info_sketch',
|
||||
'pear_inspect_caps',
|
||||
'pear_dump_budget',
|
||||
'pear_reset_guard',
|
||||
'pear_restart_window',
|
||||
'pear_run_flags',
|
||||
'pear_bundle_manifest_slice',
|
||||
'pear_pack_layout_hint',
|
||||
'pear_seed_topology',
|
||||
'pear_state_snapshot',
|
||||
'pear_stamp_pointer',
|
||||
'pear_shake_latency',
|
||||
'pear_crasher_class',
|
||||
'pear_errors_rate_hint',
|
||||
'pear_bridge_health',
|
||||
'pear_link_matrix',
|
||||
'pear_pipe_backpressure',
|
||||
'pear_opwait_budget',
|
||||
'pear_terminal_caps',
|
||||
'ready_guard_v4',
|
||||
'mirror_drive_compaction_v5',
|
||||
'blind_relay_circuit_v3',
|
||||
'compact_ping_v4'
|
||||
]
|
||||
|
||||
/** @type {Set<string>} */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bare-os-protocol",
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.0",
|
||||
"description": "MBR layout, swarm topic, and Protomux encodings for bare-operating-system",
|
||||
"type": "module",
|
||||
"main": "./index.js",
|
||||
|
||||
@@ -17,7 +17,8 @@ import {
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V6,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V7,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V8,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V9,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_V10
|
||||
} from './lib/kernel-feature-bits.js'
|
||||
import { msgDataEncoding, msgSearchReqEncoding } from './lib/messages.js'
|
||||
test('topicKey is deterministic 32-byte hash', (t) => {
|
||||
@@ -98,3 +99,7 @@ test('STOCK_V8 is non-zero wave-8 advertisement', (t) => {
|
||||
test('STOCK_V9 is non-zero wave-9 advertisement', (t) => {
|
||||
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V9 >>> 0) > 0)
|
||||
})
|
||||
|
||||
test('STOCK_V10 is non-zero wave-10 advertisement', (t) => {
|
||||
t.ok((BARE_OS_KERNEL_FEATURES_STOCK_V10 >>> 0) > 0)
|
||||
})
|
||||
|
||||
@@ -385,6 +385,32 @@ async function main() {
|
||||
),
|
||||
httpDhtProxyRoutesV2Json: String(
|
||||
hostEnv?.BARE_OS_SEED_HTTP_DHT_PROXY_ROUTES_V2_JSON ?? ''
|
||||
),
|
||||
pearBundleTier: String(hostEnv?.BARE_OS_SEED_PEAR_BUNDLE_TIER ?? ''),
|
||||
autobaseDiscoveryHintJson: String(
|
||||
hostEnv?.BARE_OS_SEED_AUTOBASE_DISCOVERY_HINT_JSON ?? ''
|
||||
),
|
||||
handshakeTokenBucketV4Json: String(
|
||||
hostEnv?.BARE_OS_SEED_HANDSHAKE_TOKEN_BUCKET_V4_JSON ?? ''
|
||||
),
|
||||
peerFirewallStatsV5Json: String(
|
||||
hostEnv?.BARE_OS_SEED_PEER_FIREWALL_STATS_V5_JSON ?? ''
|
||||
),
|
||||
stagingSlotWave10Json: String(
|
||||
hostEnv?.BARE_OS_SEED_STAGING_SLOT_WAVE10_JSON ?? ''
|
||||
),
|
||||
compactPingV4Json: String(
|
||||
hostEnv?.BARE_OS_SEED_COMPACT_PING_V4_JSON ?? ''
|
||||
),
|
||||
readyGuardV4Json: String(hostEnv?.BARE_OS_SEED_READY_GUARD_V4_JSON ?? ''),
|
||||
mirrorDriveCompactionV5Json: String(
|
||||
hostEnv?.BARE_OS_SEED_MIRROR_DRIVE_COMPACTION_V5_JSON ?? ''
|
||||
),
|
||||
blindRelayCircuitV3Json: String(
|
||||
hostEnv?.BARE_OS_SEED_BLIND_RELAY_CIRCUIT_V3_JSON ?? ''
|
||||
),
|
||||
seederPearRuntimeBareFingerprint: String(
|
||||
hostEnv?.BARE_OS_SEED_PEAR_RUNTIME_BARE_FINGERPRINT ?? ''
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Files in this directory are **read from disk by the seeder** (or copied into `pa
|
||||
## Contents
|
||||
|
||||
- **`init.js`** — Kernel entry: must define `async function start(ctx)`. Boot order: **`/etc/os-release`** → **`/etc/motd`** → optional **`/etc/bare-os/rc.profile.<profile>`** (profile from **`BARE_OS_BOOT_PROFILE`** or first line of **`/etc/bare-os/profile`**; the booter mirrors the resolved name in **`ctx.env.BARE_OS_BOOT_PROFILE_RESOLVED`** and **`/run/bare-os/boot_profile`**) → **`/etc/bare-os/rc`** → **`/etc/bare-os/rc.d/*`** (sorted; digit-prefixed names only; skip dotfiles, `*~`, `README*`, `*.md`; optional **`BARE_OS_RC_D_SKIP`** comma list and **`prefix*`** patterns) → optional **`/etc/bare-os/rc.local`** → **`/etc/bare-os/kernel.d/*`** (same rules as **`rc.d`**) → banner → when **`BARE_OS_SKIP_REPL`**, optional **onboot** lines from **`BARE_OS_ONBOOT`** or **`/etc/bare-os/onboot`** → **`readLine` / `execLine`** loop. Boot **`execLine`** errors in trusted snippets are logged; with **`BARE_OS_BOOT_STRICT=1`** or **`true`**, the first throw calls **`requestBooterExit(1)`** and stops later boot phases. Custom kernels may call **`ctx.registerKernelShutdownHook(fn)`** before initd disposers; use **`ctx.bareOsRuntimeCaps`** for limits, pseudo paths, and **`features`** ([`developer-guide/02-the-context-object.md`](../developer-guide/02-the-context-object.md)).
|
||||
- **`bin/`** — **Tier-1 utilities** built by [bare-os-coreutils](../packages/bare-os-coreutils/README.md) (**~113** commands; list in **`packages/bare-os-coreutils/lib/commands.mjs`**). Each file is **`runtime.js`** + optional preamble (**`lib/md5.js`** for **`md5sum`**, **`lib/*-engine.js`** for **`sed`**/**`awk`**, **`jq-engine.js`**, **`lib/man-render.js`**, **`lib/edit-*.js`** for **`edit`**/**`nano`**, lscolors for **`ls`**/**`dircolors`**, …) + **`async function run(ctx, argv)`** (no ESM **`import`** in **`src/`**). **`/bin/nano`** duplicates **`/bin/edit`** for familiarity; the shell’s default **`nano` → `edit`** alias uses the **`edit`** command name after expansion. **`dir`**/**`vdir`** invoke **`ls`** via **`ctx.runBinCommand`**.
|
||||
- **`bin/`** — **Tier-1 utilities** built by [bare-os-coreutils](../packages/bare-os-coreutils/README.md) (**~115** commands; list in **`packages/bare-os-coreutils/lib/commands.mjs`**). Each file is **`runtime.js`** + optional preamble (**`lib/md5.js`** for **`md5sum`**, **`lib/*-engine.js`** for **`sed`**/**`awk`**, **`jq-engine.js`**, **`lib/man-render.js`**, **`lib/edit-*.js`** for **`edit`**/**`nano`**, lscolors for **`ls`**/**`dircolors`**, …) + **`async function run(ctx, argv)`** (no ESM **`import`** in **`src/`**). **`/bin/nano`** duplicates **`/bin/edit`** for familiarity; the shell’s default **`nano` → `edit`** alias uses the **`edit`** command name after expansion. **`dir`**/**`vdir`** invoke **`ls`** via **`ctx.runBinCommand`**.
|
||||
- **`lib/bare/`** — Optional IIFE bundles + **`manifest.json`** for **`ctx.bare`** drive merge, built by [bare-os-bare-libs](../packages/bare-os-bare-libs/README.md). Same trust model as **`bin/`** (trusted seeded image).
|
||||
- **`share/man/man.json`** — Merged manual database for **`/bin/man`** (built by **`bare-os-coreutils`**; see [handbook ch.10](../handbook/10-manpages-and-online-help.md)).
|
||||
- **`etc/os-release`** — Static OS metadata (`NAME`, `VERSION`, …).
|
||||
@@ -37,7 +37,7 @@ Files in this directory are **read from disk by the seeder** (or copied into `pa
|
||||
|
||||
Pear bundles use the **vendored** tree under `packages/bare-os-seeder/kernel/`; keep it in sync by running the same builds before `pear stage`. **`npm test`** runs **`scripts/verify-kernel-seeder-parity.mjs`**, **`scripts/verify-ctx-api-feature-bits.mjs`**, and **`scripts/validate-example-schemas.mjs`** (after **`bare-os-coreutils`** and **`bare-os-bare-libs`** builds) so the two trees match byte-for-byte, ctx semver / feature words stay wired, example JSON matches **[`docs/schemas/`](../docs/schemas/)**, and every **`kernel/bin/*`** file contains the **`BARE_OS_BIN_API`** pragma (coreutils **`runtime.js`** and hand-written stubs such as **`systemctl`** / **`journalctl`**).
|
||||
|
||||
Optional **system** image examples: **`etc/bare-os/boot.allow.example`** (copy to **`boot.allow`** when using host **`BARE_OS_BOOT_ALLOWLIST=1`**), **`etc/bare-os/boot.policy.example.json`** (install as **`boot.policy.json`** when using **`BARE_OS_BOOT_POLICY=1`**; v2 fields **`maxExecLineDepth`**, **`denyEnvKeys`**, **`requireProcNodes`**; v3 **`requireFeatureBits2`**, **`requireFeatureBits3`**, **`allowedPearIpcChannels`**, **`denyVfsPrefixes`**, **`maxInitdRestartsPerUnit`**; v4 **`requireFeatureBits4`**, **`denyExecLineBuiltins`**, **`allowedCtxMethods`**; v9 **`requireFeatureBits9`**, **`requirePearRuntimeRange`**, **`denyBareModuleSpecifierPatterns`**, **`requireBareCryptoMin`**, **`denyKernelSyscalls`**, **`requirePearIpcMin`**, **`extensionSignerPinsV2`**, **`offlineLkgManifestMaxAgeSec`**, **`bootPhasesRequireProcIndexMinSchema`**; JSON Schema: [`docs/schemas/boot.policy.schema.json`](../docs/schemas/boot.policy.schema.json)), **`etc/bare-os/kernel.extensions.registry.example.json`** (shape for **`/proc/bare_os/extensions.json`** schema 6), **`etc/bare-os/boot-trace-line.example.json`** and **`etc/bare-os/telemetry-ndjson.example.json`** (shape checks for CI), **`etc/bare-os/rc.profile.full`** (sample full profile referenced from **`profile`**), **`etc/bare-os/crontab.example`** (system-wide cron lines merged ahead of user **`~/.crontab`**), **`etc/bare-os/timers/*.timer.example`** (copy to **`~/.config/bare-os/timers/*.timer`** for **`OnCalendar=`**, **`EveryMs=`**, or **`OnInactiveSec=`** jobs). **`kernel.ext.d`** scripts register into **`/proc/bare_os/extensions.json`** when the booter provides **`ctx.bareOsRegisterKernelExtensionRecord`**.
|
||||
Optional **system** image examples: **`etc/bare-os/boot.allow.example`** (copy to **`boot.allow`** when using host **`BARE_OS_BOOT_ALLOWLIST=1`**), **`etc/bare-os/boot.policy.example.json`** (install as **`boot.policy.json`** when using **`BARE_OS_BOOT_POLICY=1`**; v2 fields **`maxExecLineDepth`**, **`denyEnvKeys`**, **`requireProcNodes`**; v3 **`requireFeatureBits2`**, **`requireFeatureBits3`**, **`allowedPearIpcChannels`**, **`denyVfsPrefixes`**, **`maxInitdRestartsPerUnit`**; v4 **`requireFeatureBits4`**, **`denyExecLineBuiltins`**, **`allowedCtxMethods`**; v9 **`requireFeatureBits9`**, **`requirePearRuntimeRange`**, **`denyBareModuleSpecifierPatterns`**, **`requireBareCryptoMin`**, **`denyKernelSyscalls`**, **`requirePearIpcMin`**, **`extensionSignerPinsV2`**, **`offlineLkgManifestMaxAgeSec`**, **`bootPhasesRequireProcIndexMinSchema`**; v10 **`requireFeatureBits10`**, **`requireBareBootMin`**, **`bootPhasesRequireLifecycleMinSchema`**, **`extensionSignerPinsV3`**, …; JSON Schema: [`docs/schemas/boot.policy.schema.json`](../docs/schemas/boot.policy.schema.json)), **`etc/bare-os/kernel.extensions.registry.example.json`** (shape for **`/proc/bare_os/extensions.json`** schema 7), **`etc/bare-os/boot-trace-line.example.json`** and **`etc/bare-os/telemetry-ndjson.example.json`** (shape checks for CI), **`etc/bare-os/rc.profile.full`** (sample full profile referenced from **`profile`**), **`etc/bare-os/crontab.example`** (system-wide cron lines merged ahead of user **`~/.crontab`**), **`etc/bare-os/timers/*.timer.example`** (copy to **`~/.config/bare-os/timers/*.timer`** for **`OnCalendar=`**, **`EveryMs=`**, or **`OnInactiveSec=`** jobs). **`kernel.ext.d`** scripts register into **`/proc/bare_os/extensions.json`** when the booter provides **`ctx.bareOsRegisterKernelExtensionRecord`**.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ function bareOsEmitRaw(ctx, chunk) {
|
||||
return false
|
||||
}
|
||||
|
||||
var BARE_OS_HELP_BIN_SPACED = "arch awk base32 base64 basename basenc cat chgrp chmod chown cksum clear cmp comm cp crontab curl cut date df dir dircolors dirname du echo edit env exit expand expr factor false find fmt fold getconf git git-pear grep groups hdms head help hostid hostname id install join journalctl jq ln login logname logout ls man md5sum mkdir mkfifo mktemp mv nano nl nohup nproc numfmt od oidc-publish openssl paste pathchk pr printenv printf pwd readlink realpath rev rm rmdir savevault sed seq sha1sum sha256sum sha512sum shuf sleep sort split stat sum sync systemctl tac tail tee test theme time timeout touch tr true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc wget which who whoami xargs yes"
|
||||
var BARE_OS_HELP_BIN_SPACED = "arch awk base32 base64 basename basenc cat chgrp chmod chown cksum clear cmp comm cp crontab curl cut date df dir dircolors dirname du echo edit env exit expand expr factor false find fmt fold getconf git git-pear grep groups hdms head help hostid hostname id install join journalctl jq ln login logname logout ls man md5sum mkdir mkfifo mktemp mv nano nl nohup nproc numfmt od oidc-publish openssl paste pathchk pr printenv printf pwd readlink realpath rev rm rmdir savevault sed seq sha1sum sha256sum sha512sum shuf sleep sort split ssh-keygen stat sum sync systemctl tac tail tar tee test theme time timeout touch tr true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc wget which who whoami xargs yes"
|
||||
async function run(ctx, argv) {
|
||||
ctx.console.log(
|
||||
'Bare OS — default user: guest | shell builtins: alias, barerc, cd, command, export, exit, login, logout, readonly, type, umask, unalias, unset, : | /bin: ' +
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* BARE_OS_BIN_API 1.0.0 — bump when staged /bin script semantics change (see developer guide). */
|
||||
/** Shared helpers for drive-resident /bin scripts (prepended before each command). */
|
||||
function bareStdin(ctx) {
|
||||
return typeof ctx.shellStdin === 'string' ? ctx.shellStdin : ''
|
||||
}
|
||||
|
||||
/** @param {number} mode @param {'file' | 'directory' | 'symlink'} type */
|
||||
function bareFormatModeString(mode, type) {
|
||||
const typeChar = type === 'directory' ? 'd' : type === 'symlink' ? 'l' : '-'
|
||||
const perm = mode & 0o777
|
||||
const r = (bit) => (perm & bit ? 'r' : '-')
|
||||
const w = (bit) => (perm & bit ? 'w' : '-')
|
||||
const x = (bit) => (perm & bit ? 'x' : '-')
|
||||
return (
|
||||
typeChar +
|
||||
r(0o400) +
|
||||
w(0o200) +
|
||||
x(0o100) +
|
||||
r(0o040) +
|
||||
w(0o020) +
|
||||
x(0o010) +
|
||||
r(0o004) +
|
||||
w(0o002) +
|
||||
x(0o001)
|
||||
)
|
||||
}
|
||||
|
||||
/** @param {number} mtimeMs @param {number} [nowMs] */
|
||||
function bareFormatLsMtime(mtimeMs, nowMs) {
|
||||
const now = nowMs != null ? nowMs : Date.now()
|
||||
const d = new Date(mtimeMs)
|
||||
const months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'May',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec'
|
||||
]
|
||||
const mon = months[d.getMonth()]
|
||||
const day = String(d.getDate()).padStart(2, ' ')
|
||||
const sixMo = 180 * 24 * 3600 * 1000
|
||||
if (Math.abs(now - mtimeMs) > sixMo) {
|
||||
const yr = String(d.getFullYear()).padStart(4, ' ')
|
||||
return mon + ' ' + day + ' ' + yr
|
||||
}
|
||||
const hh = String(d.getHours()).padStart(2, '0')
|
||||
const mm = String(d.getMinutes()).padStart(2, '0')
|
||||
return mon + ' ' + day + ' ' + hh + ':' + mm
|
||||
}
|
||||
|
||||
/** @param {number} size */
|
||||
function barePosixBlocks(size) {
|
||||
return Math.ceil(Number(size) / 512) || 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw stdout for NUL/binary when **`process.stdout.write`** is missing.
|
||||
* If **`ctx.bareOsBinWrite(Uint8Array|string)`** is set (tests / host), use it.
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {string | Uint8Array} chunk
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function bareOsEmitRaw(ctx, chunk) {
|
||||
if (typeof ctx.bareOsBinWrite === 'function') {
|
||||
const b4 = ctx.b4a
|
||||
const u8 =
|
||||
typeof chunk === 'string'
|
||||
? b4 && typeof b4.from === 'function'
|
||||
? b4.from(chunk)
|
||||
: new TextEncoder().encode(chunk)
|
||||
: chunk
|
||||
ctx.bareOsBinWrite(u8 instanceof Uint8Array ? u8 : new Uint8Array(u8))
|
||||
return true
|
||||
}
|
||||
const w = globalThis.process?.stdout?.write
|
||||
if (typeof w === 'function') {
|
||||
w.call(globalThis.process.stdout, chunk)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Non-crypto stub: Pear/Bare guests must not use Node `node:crypto` for keys.
|
||||
* Operators use host **`bare-crypto`** / Pear tooling; see developer-guide Node→Bare map.
|
||||
*/
|
||||
async function run(ctx, argv) {
|
||||
const args = argv.slice(1)
|
||||
if (args.includes('-h') || args.includes('--help') || args.includes('-?')) {
|
||||
ctx.console.log(
|
||||
'Usage: ssh-keygen (stub)\n' +
|
||||
'Bare OS does not generate SSH keys in-guest. Use bare-crypto / Pear host workflows.\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
ctx.console.error(
|
||||
'ssh-keygen: Bare OS stub only — use bare-crypto and host key tooling (no node:crypto in guest).'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
}
|
||||
|
||||
export { run }
|
||||
@@ -0,0 +1,125 @@
|
||||
/* BARE_OS_BIN_API 1.0.0 — bump when staged /bin script semantics change (see developer guide). */
|
||||
/** Shared helpers for drive-resident /bin scripts (prepended before each command). */
|
||||
function bareStdin(ctx) {
|
||||
return typeof ctx.shellStdin === 'string' ? ctx.shellStdin : ''
|
||||
}
|
||||
|
||||
/** @param {number} mode @param {'file' | 'directory' | 'symlink'} type */
|
||||
function bareFormatModeString(mode, type) {
|
||||
const typeChar = type === 'directory' ? 'd' : type === 'symlink' ? 'l' : '-'
|
||||
const perm = mode & 0o777
|
||||
const r = (bit) => (perm & bit ? 'r' : '-')
|
||||
const w = (bit) => (perm & bit ? 'w' : '-')
|
||||
const x = (bit) => (perm & bit ? 'x' : '-')
|
||||
return (
|
||||
typeChar +
|
||||
r(0o400) +
|
||||
w(0o200) +
|
||||
x(0o100) +
|
||||
r(0o040) +
|
||||
w(0o020) +
|
||||
x(0o010) +
|
||||
r(0o004) +
|
||||
w(0o002) +
|
||||
x(0o001)
|
||||
)
|
||||
}
|
||||
|
||||
/** @param {number} mtimeMs @param {number} [nowMs] */
|
||||
function bareFormatLsMtime(mtimeMs, nowMs) {
|
||||
const now = nowMs != null ? nowMs : Date.now()
|
||||
const d = new Date(mtimeMs)
|
||||
const months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'May',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec'
|
||||
]
|
||||
const mon = months[d.getMonth()]
|
||||
const day = String(d.getDate()).padStart(2, ' ')
|
||||
const sixMo = 180 * 24 * 3600 * 1000
|
||||
if (Math.abs(now - mtimeMs) > sixMo) {
|
||||
const yr = String(d.getFullYear()).padStart(4, ' ')
|
||||
return mon + ' ' + day + ' ' + yr
|
||||
}
|
||||
const hh = String(d.getHours()).padStart(2, '0')
|
||||
const mm = String(d.getMinutes()).padStart(2, '0')
|
||||
return mon + ' ' + day + ' ' + hh + ':' + mm
|
||||
}
|
||||
|
||||
/** @param {number} size */
|
||||
function barePosixBlocks(size) {
|
||||
return Math.ceil(Number(size) / 512) || 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw stdout for NUL/binary when **`process.stdout.write`** is missing.
|
||||
* If **`ctx.bareOsBinWrite(Uint8Array|string)`** is set (tests / host), use it.
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {string | Uint8Array} chunk
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function bareOsEmitRaw(ctx, chunk) {
|
||||
if (typeof ctx.bareOsBinWrite === 'function') {
|
||||
const b4 = ctx.b4a
|
||||
const u8 =
|
||||
typeof chunk === 'string'
|
||||
? b4 && typeof b4.from === 'function'
|
||||
? b4.from(chunk)
|
||||
: new TextEncoder().encode(chunk)
|
||||
: chunk
|
||||
ctx.bareOsBinWrite(u8 instanceof Uint8Array ? u8 : new Uint8Array(u8))
|
||||
return true
|
||||
}
|
||||
const w = globalThis.process?.stdout?.write
|
||||
if (typeof w === 'function') {
|
||||
w.call(globalThis.process.stdout, chunk)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Wave 10: bounded extended-attribute metadata sketch only (no archive I/O).
|
||||
* Full archive workflows use Pear pack / bare-pack tooling outside the stub.
|
||||
*/
|
||||
async function run(ctx, argv) {
|
||||
const args = argv.slice(1)
|
||||
if (
|
||||
args.includes('--bare-os-wave10-xattr-sketch') ||
|
||||
args.includes('--bare-os-xattr-sketch')
|
||||
) {
|
||||
ctx.console.log(
|
||||
JSON.stringify({
|
||||
schema: 1,
|
||||
note: 'tar xattr subset stub; no archive bytes read in stock coreutils',
|
||||
entries: [],
|
||||
atMs: Date.now()
|
||||
}) + '\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
if (args.includes('-h') || args.includes('--help')) {
|
||||
ctx.console.log(
|
||||
'Usage: tar [--bare-os-wave10-xattr-sketch]\n' +
|
||||
'Bare OS tar is a documentation stub; use Pear/bare-pack for bundles.\n'
|
||||
)
|
||||
ctx.exitCode = 0
|
||||
return
|
||||
}
|
||||
ctx.console.error(
|
||||
'tar: Bare OS stub — pass --bare-os-wave10-xattr-sketch for JSON sketch or use host pack tools.'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
}
|
||||
|
||||
export { run }
|
||||
@@ -92,12 +92,14 @@ function bareOsEmitRaw(ctx, chunk) {
|
||||
* Limits: stdin 256KiB, 4096 whitespace/null tokens, 128 args per invocation,
|
||||
* 64 invocations per run. Exceeding limits is a fatal error (exit 125).
|
||||
* Supports -0/--null, -n, -I repl (replace repl in utility argv; implies -n 1 unless -n given).
|
||||
* -P N is accepted; stock booter runs sequentially; N is capped at MAX_P_FLAG (4).
|
||||
*/
|
||||
|
||||
const MAX_STDIN = 256 * 1024
|
||||
const MAX_TOKENS = 4096
|
||||
const MAX_PER_INVOCATION = 128
|
||||
const MAX_INVOCATIONS = 64
|
||||
const MAX_P_FLAG = 4
|
||||
|
||||
async function run(ctx, argv) {
|
||||
if (typeof ctx.runBinCommand !== 'function') {
|
||||
@@ -113,6 +115,7 @@ async function run(ctx, argv) {
|
||||
/** @type {string | null} */
|
||||
let repl = null
|
||||
let nExplicit = false
|
||||
let pCap = 1
|
||||
let i = 0
|
||||
|
||||
while (i < args.length && args[i].startsWith('-')) {
|
||||
@@ -126,6 +129,40 @@ async function run(ctx, argv) {
|
||||
i++
|
||||
continue
|
||||
}
|
||||
if (a === '-P' || a === '--max-procs') {
|
||||
const n = args[i + 1]
|
||||
if (n == null || !/^\d+$/.test(n)) {
|
||||
ctx.console.error('xargs: -P requires a non-negative integer')
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
}
|
||||
const raw = Number(n)
|
||||
pCap = Math.min(MAX_P_FLAG, Math.max(1, raw))
|
||||
if (raw > MAX_P_FLAG) {
|
||||
ctx.console.error(
|
||||
'xargs: -P ' +
|
||||
raw +
|
||||
' exceeds Bare OS cap ' +
|
||||
MAX_P_FLAG +
|
||||
' (parallelism hint only; sequential execution)'
|
||||
)
|
||||
}
|
||||
i += 2
|
||||
continue
|
||||
}
|
||||
if (a.startsWith('-P') && a.length > 2 && /^\d+$/.test(a.slice(2))) {
|
||||
const raw = Number(a.slice(2))
|
||||
pCap = Math.min(MAX_P_FLAG, Math.max(1, raw))
|
||||
if (raw > MAX_P_FLAG) {
|
||||
ctx.console.error(
|
||||
'xargs: -P exceeds Bare OS cap ' +
|
||||
MAX_P_FLAG +
|
||||
' (parallelism hint only; sequential execution)'
|
||||
)
|
||||
}
|
||||
i++
|
||||
continue
|
||||
}
|
||||
if (a === '-n' || a === '--max-args') {
|
||||
const n = args[i + 1]
|
||||
if (n == null || !/^\d+$/.test(n) || Number(n) < 1) {
|
||||
@@ -165,7 +202,9 @@ async function run(ctx, argv) {
|
||||
ctx.console.error(
|
||||
'xargs: Bare OS supports: -0/--null, -n N (max ' +
|
||||
MAX_PER_INVOCATION +
|
||||
' per run), -I repl'
|
||||
' per run), -I repl, -P N (max ' +
|
||||
MAX_P_FLAG +
|
||||
', sequential)'
|
||||
)
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
@@ -174,6 +213,7 @@ async function run(ctx, argv) {
|
||||
/** @type {string[]} */
|
||||
let cmd = args.slice(i)
|
||||
if (cmd.length === 0) cmd = ['echo']
|
||||
void pCap
|
||||
|
||||
let text = bareStdin(ctx) || ''
|
||||
if (text.length > MAX_STDIN) {
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
"requireFeatureBits6": 0,
|
||||
"requireFeatureBits7": 0,
|
||||
"requireFeatureBits8": 0,
|
||||
"requireFeatureBits9": 0,
|
||||
"requireFeatureBits10": 0,
|
||||
"requireBareBootMin": "0.0.0",
|
||||
"denyBareRpcMethodPatterns": [],
|
||||
"maxPearInspectDepth": 0,
|
||||
"requireBareLoggerMin": "0.0.0",
|
||||
"denyAutobaseDiscoveryChannels": [],
|
||||
"requireBareTlsMin": "0.0.0",
|
||||
"extensionSignerPinsV3": {},
|
||||
"offlineLkgRequirePearStamp": false,
|
||||
"bootPhasesRequireLifecycleMinSchema": 0,
|
||||
"requireBareRuntimeMin": "0.0.0",
|
||||
"denySeedRpcMethods": [],
|
||||
"maxProtomuxChannelNameLength": 256,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"otlSchemaVersion": 5,
|
||||
"otlSchemaVersion": 7,
|
||||
"scopeMetrics": [
|
||||
{
|
||||
"scope": { "name": "bare-os-example" },
|
||||
|
||||
@@ -127,6 +127,9 @@ function shouldSkipBootPhase(ctx, phase) {
|
||||
* Boot policy v9 (optional): `requireFeatureBits9`, `requirePearRuntimeRange` (`{ min?, max? }` semver),
|
||||
* `denyBareModuleSpecifierPatterns`, `requireBareCryptoMin`, `denyKernelSyscalls`, `requirePearIpcMin`,
|
||||
* `extensionSignerPinsV2`, `offlineLkgManifestMaxAgeSec`, `bootPhasesRequireProcIndexMinSchema`.
|
||||
* Boot policy v10 (optional): `requireFeatureBits10`, `requireBareBootMin`, `denyBareRpcMethodPatterns`,
|
||||
* `maxPearInspectDepth`, `requireBareLoggerMin`, `denyAutobaseDiscoveryChannels`, `requireBareTlsMin`,
|
||||
* `extensionSignerPinsV3`, `offlineLkgRequirePearStamp`, `bootPhasesRequireLifecycleMinSchema`.
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @returns {Promise<boolean>} false when strict policy fails (caller should abort boot)
|
||||
*/
|
||||
@@ -361,6 +364,24 @@ async function applyBootPolicyFile(ctx) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.requireFeatureBits10 === 'number' &&
|
||||
pol.requireFeatureBits10 > 0
|
||||
) {
|
||||
const adv10 = ctx.bareOsAdvertisedKernelBits10
|
||||
const need10 = pol.requireFeatureBits10 >>> 0
|
||||
const ok =
|
||||
typeof adv10 === 'number' && ((adv10 >>> 0) & need10) === need10
|
||||
if (!ok) {
|
||||
console.error('[boot-policy] requireFeatureBits10 not satisfied')
|
||||
if (strictPol) {
|
||||
if (typeof ctx.requestBooterExit === 'function') {
|
||||
ctx.requestBooterExit(1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
pol.requirePearRuntimeRange &&
|
||||
typeof pol.requirePearRuntimeRange === 'object'
|
||||
@@ -654,6 +675,106 @@ async function applyBootPolicyFile(ctx) {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (
|
||||
pol.extensionSignerPinsV3 &&
|
||||
typeof pol.extensionSignerPinsV3 === 'object' &&
|
||||
ctx.env
|
||||
) {
|
||||
try {
|
||||
ctx.env.BARE_OS_BOOT_POLICY_EXTENSION_SIGNER_PINS_V3_JSON =
|
||||
JSON.stringify(pol.extensionSignerPinsV3)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.requireBareBootMin === 'string' &&
|
||||
String(pol.requireBareBootMin).trim()
|
||||
) {
|
||||
const needS = String(pol.requireBareBootMin).trim()
|
||||
const haveS =
|
||||
ctx.env && String(ctx.env.BARE_OS_BARE_BOOT_VERSION || '').trim()
|
||||
const ok = haveS && semverGte(haveS, needS)
|
||||
if (!ok) {
|
||||
console.error('[boot-policy] requireBareBootMin not satisfied')
|
||||
if (strictPol) {
|
||||
if (typeof ctx.requestBooterExit === 'function') {
|
||||
ctx.requestBooterExit(1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
Array.isArray(pol.denyBareRpcMethodPatterns) &&
|
||||
ctx.env
|
||||
) {
|
||||
try {
|
||||
ctx.env.BARE_OS_BOOT_POLICY_DENY_BARE_RPC_PATTERNS_JSON =
|
||||
JSON.stringify(pol.denyBareRpcMethodPatterns)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.maxPearInspectDepth === 'number' &&
|
||||
pol.maxPearInspectDepth >= 0 &&
|
||||
ctx.env
|
||||
) {
|
||||
ctx.env.BARE_OS_BOOT_POLICY_MAX_PEAR_INSPECT_DEPTH = String(
|
||||
Math.min(64, Math.floor(pol.maxPearInspectDepth))
|
||||
)
|
||||
}
|
||||
if (
|
||||
typeof pol.requireBareLoggerMin === 'string' &&
|
||||
String(pol.requireBareLoggerMin).trim()
|
||||
) {
|
||||
const needS = String(pol.requireBareLoggerMin).trim()
|
||||
const haveS =
|
||||
ctx.env && String(ctx.env.BARE_OS_BARE_LOGGER_VERSION || '').trim()
|
||||
const ok = haveS && semverGte(haveS, needS)
|
||||
if (!ok) {
|
||||
console.error('[boot-policy] requireBareLoggerMin not satisfied')
|
||||
if (strictPol) {
|
||||
if (typeof ctx.requestBooterExit === 'function') {
|
||||
ctx.requestBooterExit(1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
Array.isArray(pol.denyAutobaseDiscoveryChannels) &&
|
||||
ctx.env
|
||||
) {
|
||||
try {
|
||||
ctx.env.BARE_OS_BOOT_POLICY_DENY_AUTOBASE_DISCOVERY_CHANNELS_JSON =
|
||||
JSON.stringify(pol.denyAutobaseDiscoveryChannels)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.requireBareTlsMin === 'string' &&
|
||||
String(pol.requireBareTlsMin).trim()
|
||||
) {
|
||||
const needS = String(pol.requireBareTlsMin).trim()
|
||||
const haveS =
|
||||
ctx.env && String(ctx.env.BARE_OS_BARE_TLS_VERSION || '').trim()
|
||||
const ok = haveS && semverGte(haveS, needS)
|
||||
if (!ok) {
|
||||
console.error('[boot-policy] requireBareTlsMin not satisfied')
|
||||
if (strictPol) {
|
||||
if (typeof ctx.requestBooterExit === 'function') {
|
||||
ctx.requestBooterExit(1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pol.offlineLkgRequirePearStamp === true && ctx.env) {
|
||||
ctx.env.BARE_OS_OFFLINE_LKG_REQUIRE_PEAR_STAMP = '1'
|
||||
}
|
||||
if (
|
||||
typeof pol.offlineLkgManifestMaxAgeSec === 'number' &&
|
||||
pol.offlineLkgManifestMaxAgeSec > 0 &&
|
||||
@@ -712,6 +833,26 @@ async function applyBootPolicyFile(ctx) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.bootPhasesRequireLifecycleMinSchema === 'number' &&
|
||||
pol.bootPhasesRequireLifecycleMinSchema > 0
|
||||
) {
|
||||
const needSch = Math.floor(pol.bootPhasesRequireLifecycleMinSchema)
|
||||
const raw = ctx.env && String(ctx.env.BARE_OS_LIFECYCLE_SCHEMA_VERSION || '').trim()
|
||||
const haveSch = Number.parseInt(raw, 10)
|
||||
const ok = Number.isFinite(haveSch) && haveSch >= needSch
|
||||
if (!ok) {
|
||||
console.error(
|
||||
'[boot-policy] bootPhasesRequireLifecycleMinSchema not satisfied'
|
||||
)
|
||||
if (strictPol) {
|
||||
if (typeof ctx.requestBooterExit === 'function') {
|
||||
ctx.requestBooterExit(1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof pol.bootPhasesRequireProcIndexMinSchema === 'number' &&
|
||||
pol.bootPhasesRequireProcIndexMinSchema > 0
|
||||
|
||||
@@ -37,18 +37,18 @@
|
||||
"protomux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEncoding.js",
|
||||
"keys": [
|
||||
"bareEncoding"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEvents.js",
|
||||
"keys": [
|
||||
"bareEvents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEncoding.js",
|
||||
"keys": [
|
||||
"bareEncoding"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePath.js",
|
||||
"keys": [
|
||||
@@ -67,30 +67,42 @@
|
||||
"bareAbortController"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAddonResolve.js",
|
||||
"keys": [
|
||||
"bareAddonResolve"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareReadline.js",
|
||||
"keys": [
|
||||
"bareReadline"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareCrypto.js",
|
||||
"keys": [
|
||||
"bareCrypto"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareApk.js",
|
||||
"keys": [
|
||||
"bareApk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/fetch.js",
|
||||
"keys": [
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAppKit.js",
|
||||
"keys": [
|
||||
@@ -103,18 +115,6 @@
|
||||
"bareAssert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareCrypto.js",
|
||||
"keys": [
|
||||
"bareCrypto"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/fetch.js",
|
||||
"keys": [
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAsyncHooks.js",
|
||||
"keys": [
|
||||
@@ -139,12 +139,6 @@
|
||||
"bareBundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleCompile.js",
|
||||
"keys": [
|
||||
"bareBundleCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBuffer.js",
|
||||
"keys": [
|
||||
@@ -157,6 +151,12 @@
|
||||
"bareBluetoothApple"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleCompile.js",
|
||||
"keys": [
|
||||
"bareBundleCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleEvaluate.js",
|
||||
"keys": [
|
||||
@@ -176,9 +176,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareChannel.js",
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareChannel"
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -187,24 +187,30 @@
|
||||
"bareDebugLog"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareChannel.js",
|
||||
"keys": [
|
||||
"bareChannel"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDaemon.js",
|
||||
"keys": [
|
||||
"bareDaemon"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDelta.js",
|
||||
"keys": [
|
||||
"bareDelta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEnv.js",
|
||||
"keys": [
|
||||
"bareEnv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDns.js",
|
||||
"keys": [
|
||||
@@ -217,18 +223,6 @@
|
||||
"bareDiagnosticsChannel"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEnv.js",
|
||||
"keys": [
|
||||
"bareEnv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareCov.js",
|
||||
"keys": [
|
||||
@@ -241,6 +235,12 @@
|
||||
"bareDgram"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFfmpeg.js",
|
||||
"keys": [
|
||||
@@ -253,18 +253,18 @@
|
||||
"bareFfmpegEncodings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFormData.js",
|
||||
"keys": [
|
||||
"bareFormData"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFormat.js",
|
||||
"keys": [
|
||||
"bareFormat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFormData.js",
|
||||
"keys": [
|
||||
"bareFormData"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFileLogger.js",
|
||||
"keys": [
|
||||
@@ -278,15 +278,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFs.js",
|
||||
"path": "/lib/bare/bundles/bareHeif.js",
|
||||
"keys": [
|
||||
"bareFs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHrtime"
|
||||
"bareHeif"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -296,9 +290,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHeif.js",
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHeif"
|
||||
"bareHrtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -307,12 +301,6 @@
|
||||
"bareHttpParser"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareImageResample.js",
|
||||
"keys": [
|
||||
"bareImageResample"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIco.js",
|
||||
"keys": [
|
||||
@@ -320,9 +308,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspect.js",
|
||||
"path": "/lib/bare/bundles/bareFs.js",
|
||||
"keys": [
|
||||
"bareInspect"
|
||||
"bareFs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareImageResample.js",
|
||||
"keys": [
|
||||
"bareImageResample"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -331,6 +325,12 @@
|
||||
"bareHttp1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspect.js",
|
||||
"keys": [
|
||||
"bareInspect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttps.js",
|
||||
"keys": [
|
||||
@@ -367,66 +367,66 @@
|
||||
"bareLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLink.js",
|
||||
"keys": [
|
||||
"bareLink"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspector.js",
|
||||
"keys": [
|
||||
"bareInspector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLink.js",
|
||||
"keys": [
|
||||
"bareLink"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMake.js",
|
||||
"keys": [
|
||||
"bareMake"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModuleResolve.js",
|
||||
"keys": [
|
||||
"bareModuleResolve"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModuleLexer.js",
|
||||
"keys": [
|
||||
"bareModuleLexer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModuleResolve.js",
|
||||
"keys": [
|
||||
"bareModuleResolve"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModule.js",
|
||||
"keys": [
|
||||
"bareModule"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNdk.js",
|
||||
"keys": [
|
||||
"bareNdk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModuleTraverse.js",
|
||||
"keys": [
|
||||
"bareModuleTraverse"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeFetch.js",
|
||||
"keys": [
|
||||
"bareNodeFetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNative.js",
|
||||
"keys": [
|
||||
"bareNative"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNdk.js",
|
||||
"keys": [
|
||||
"bareNdk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeFetch.js",
|
||||
"keys": [
|
||||
"bareNodeFetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMedia.js",
|
||||
"keys": [
|
||||
@@ -451,30 +451,24 @@
|
||||
"bareNet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePack.js",
|
||||
"keys": [
|
||||
"barePack"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePerformance.js",
|
||||
"keys": [
|
||||
"barePerformance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePng.js",
|
||||
"keys": [
|
||||
"barePng"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePipe.js",
|
||||
"keys": [
|
||||
"barePipe"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePack.js",
|
||||
"keys": [
|
||||
"barePack"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePackDrive.js",
|
||||
"keys": [
|
||||
@@ -482,9 +476,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"path": "/lib/bare/bundles/barePng.js",
|
||||
"keys": [
|
||||
"bareNodeRuntime"
|
||||
"barePng"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -493,18 +487,24 @@
|
||||
"barePunycode"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareQuerystring.js",
|
||||
"keys": [
|
||||
"bareQuerystring"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePrebuild.js",
|
||||
"keys": [
|
||||
"barePrebuild"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"keys": [
|
||||
"bareNodeRuntime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareQuerystring.js",
|
||||
"keys": [
|
||||
"bareQuerystring"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareQueueMicrotask.js",
|
||||
"keys": [
|
||||
@@ -523,6 +523,12 @@
|
||||
"bareRealm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDev.js",
|
||||
"keys": [
|
||||
@@ -535,30 +541,12 @@
|
||||
"bareRuntime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRpc.js",
|
||||
"keys": [
|
||||
"bareRpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSdl.js",
|
||||
"keys": [
|
||||
"bareSdl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSemver.js",
|
||||
"keys": [
|
||||
@@ -566,15 +554,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSignals.js",
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareSignals"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRepl.js",
|
||||
"keys": [
|
||||
"bareRepl"
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -583,60 +565,78 @@
|
||||
"bareSidecar"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRpc.js",
|
||||
"keys": [
|
||||
"bareRpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRepl.js",
|
||||
"keys": [
|
||||
"bareRepl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSignals.js",
|
||||
"keys": [
|
||||
"bareSignals"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStringDecoder.js",
|
||||
"keys": [
|
||||
"bareStringDecoder"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStream.js",
|
||||
"keys": [
|
||||
"bareStream"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStdio.js",
|
||||
"keys": [
|
||||
"bareStdio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStorage.js",
|
||||
"keys": [
|
||||
"bareStorage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStream.js",
|
||||
"keys": [
|
||||
"bareStream"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStructuredClone.js",
|
||||
"keys": [
|
||||
"bareStructuredClone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStdio.js",
|
||||
"keys": [
|
||||
"bareStdio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSystemLogger.js",
|
||||
"keys": [
|
||||
"bareSystemLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTap.js",
|
||||
"keys": [
|
||||
"bareTap"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSubprocess.js",
|
||||
"keys": [
|
||||
"bareSubprocess"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTap.js",
|
||||
"keys": [
|
||||
"bareTap"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTiff.js",
|
||||
"keys": [
|
||||
@@ -649,24 +649,30 @@
|
||||
"bareTimers"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTpl.js",
|
||||
"keys": [
|
||||
"bareTpl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareThread.js",
|
||||
"keys": [
|
||||
"bareThread"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTpl.js",
|
||||
"keys": [
|
||||
"bareTpl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTcp.js",
|
||||
"keys": [
|
||||
"bareTcp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTls.js",
|
||||
"keys": [
|
||||
"bareTls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareType.js",
|
||||
"keys": [
|
||||
@@ -674,9 +680,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTls.js",
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareTls"
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -691,30 +697,24 @@
|
||||
"bareUnpack"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8.js",
|
||||
"keys": [
|
||||
"bareV8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUnionBundle.js",
|
||||
"keys": [
|
||||
"bareUnionBundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareVm.js",
|
||||
"keys": [
|
||||
"bareVm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUnionBundle.js",
|
||||
"keys": [
|
||||
"bareUnionBundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWalkHandles.js",
|
||||
"keys": [
|
||||
@@ -727,18 +727,18 @@
|
||||
"bareWebKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWebp.js",
|
||||
"keys": [
|
||||
"bareWebp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWebKitGtk.js",
|
||||
"keys": [
|
||||
"bareWebKitGtk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWebp.js",
|
||||
"keys": [
|
||||
"bareWebp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWhich.js",
|
||||
"keys": [
|
||||
@@ -746,9 +746,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"keys": [
|
||||
"bareWinUi"
|
||||
"bareV8ToIstanbul"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -758,9 +758,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"keys": [
|
||||
"bareV8ToIstanbul"
|
||||
"bareWinUi"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -781,17 +781,17 @@
|
||||
"bareZmq"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWorker.js",
|
||||
"keys": [
|
||||
"bareWorker"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWs.js",
|
||||
"keys": [
|
||||
"bareWs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWorker.js",
|
||||
"keys": [
|
||||
"bareWorker"
|
||||
]
|
||||
}
|
||||
],
|
||||
"bundleStats": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user