shell surfaces in-tree. Roadmap / CI - docs/data/shell-roadmap-features.json: all shell-001…shell-100 rows and P1–P8 phases marked implemented; note documents closure date and pointers. - scripts/verify-shell-roadmap.mjs: validate JSON (schema 1, 8 phases, 100 implemented items) plus existing source needles; wire npm run verify:shell-roadmap into root pretest (package.json). - scripts/README.md: document verifier behavior. Lexer & expansion (packages/bare-os-booter/lib) - shell-lex.js: central lexShellLine; ANSI-C $'…' via decodeBareOsDollarQuote; keep diagnostics/tokenizer aligned with execution tokenizer. - shell.js: stray reserved words at statement start → syntax error exit 2; optional [[ … ]] when BARE_OS_SHELL_DOUBLE_BRACKET=1 (==, !=); alias expansion before function dispatch (ordering tests); expandWordWithCmdSubst: balanced $(…) vs skipped $((…)); backtick command substitution when BARE_OS_SHELL_CMDSUBST; default ctx.execLine for nested cmdsubst when unset; index passthrough for DOUBLE_BRACKET env. - shell-glob.js: ~login → HOME when USER matches, else /home/login (bounded login pattern); tests for pathname + execShellLine. - shell-tokenizer.js: align with shell-lex detailed spans/modes where needed. Completion / REPL - completion-engine.js: completion depth / collectors per shell program work. - packages/bare-os-booter/index.js: small wiring for shell env passthrough. /bin/sh front-end - packages/bare-os-coreutils/src/sh.js; kernel/bin/sh; seeder copies: stay in sync with shell behavior and env flags. Tests - packages/bare-os-booter/test.js: coverage for misplaced reserved words, gated [[ ]], alias vs function, ~user/~~ paths, $'…', cmdsubst $(…) and backticks, and related regressions. Documentation - docs/reference/shell-grammar.md: $'…', $(…) / backticks vs $((…)). - handbook/09-posix-utilities-shell-and-vfs.md, environment appendix, shell-troubleshooting / shell-unsupported-behavior, release checklist, docs/reference/README.md: shell behavior and operator surfaces. - developer-guide/19-how-to-fish-keybinding-completer.md: Fish keybinding / completer how-to (new). Generated / synced artifacts - kernel/lib/bare/manifest.json, kernel/share/man/man.json, kernel/lib/bare/shell-completion.json, posix_utilities.json, docs/audit/bundle-health.json: regenerated or synced with tooling. - scripts/bench-shell-phases.mjs: bench script touch.
bare-os-seeder
Pear / Bare application that owns the canonical system Hyperdrive: it walks a kernel tree on disk, writes /boot/init.js, /bin/*, /etc/* into the drive (no host temp dirs), builds a 512-byte MBR with the drive key, joins Hyperswarm on bare-os-v1, and serves MBR block reads + Protomux bare-os-v1 replication to peers.
When to use: run the seeder when you want to publish the canonical system image for booters to replicate (typical dev: one terminal with npm run os:seeder). Eligible already-booted peers can later mirror block 0, but the seeder remains the trust anchor for initial publication.
Documentation: Concepts — Boot · Seeder reference · User manual ch.3 · Protocol reference.
Run
From package directory (after npm ci at repo root):
node index.js
Or with Bare/Pear:
npm run pear:dev
From repo root (recommended — fixes workspace node_modules for Pear):
npm run os:seeder
Environment
BARE_OS_KERNEL_ROOT— Absolute path to kernel tree to stage (default: packagekernel/vendored copy, or repokernel/under Nodefile:URL)BARE_OS_HOST_DATA— Base directory for host state (default~/.bare-os)BARE_OS_SEED_STORE— Corestore directory (default~/.bare-os/corestore/seeder)BARE_OS_SEED_CAPABILITY_ATTESTATION_JSON— Optional JSON string for seed RPCbare_os.capability_attestation(operators verify on host; guest does not crypto-verify)
Pear vs Node
import.meta.urlisfile:— seeder may dynamically importbare-os-coreutils/build.mjsandbare-os-bare-libs/build.mjs, rebuilding/binandkernel/lib/barebefore staging.pear:bundle — coreutils and/lib/barebundles must be pre-built intokernel/; runnpm run build -w bare-os-coreutilsandnpm run build -w bare-os-bare-libsbeforepear run(rootnpm run os:seederdoes both).
Layout
index.js— Entry: Corestore, Hyperdrive,stageKernelTree, swarm,setupSeedChannel(RPCs include optionalbare_os.snapshot_hintsandbare_os.peer_firewall_statswhen implemented)lib/paths.js—packageRootDir, kernel root, Corestore path (Pear RTI–aware)kernel/— Vendored mirror of repokernel/for Pear staging — must matchkernel/byte-for-byte (npm testpretestrunsscripts/verify-kernel-seeder-parity.mjs)
Dependencies
bare-os-protocol (workspace), hyperdrive, corestore, hyperswarm, protomux, b4a, compact-encoding, safety-catch, bare-os.