Commit Graph
369 Commits
Author SHA1 Message Date
Raven Scott d703f000fa Updates
Release rolling / release (push) Successful in 8m17s
2026-07-31 16:01:49 -04:00
Raven Scott b1a112961a Update
Release rolling / release (push) Successful in 8m6s
2026-07-31 15:24:40 -04:00
Raven Scott d8993898a0 Updates
Release rolling / release (push) Failing after 3m33s
2026-07-31 15:19:31 -04:00
Raven Scott 02e18f88dc Updates
Release rolling / release (push) Failing after 3m53s
2026-07-31 15:12:41 -04:00
Raven Scott 24fb26d8aa Ad doc
Release rolling / release (push) Successful in 5m38s
2026-07-31 13:52:38 -04:00
Raven Scott d1725bc89d Update README
Release rolling / release (push) Successful in 5m42s
2026-07-31 13:46:30 -04:00
Raven Scott d30b918442 booter fixes
Release rolling / release (push) Canceled after 1m44s
2026-07-31 13:44:53 -04:00
Raven Scott 302c968bef Update booter
Release rolling / release (push) Successful in 6m48s
2026-07-31 13:00:45 -04:00
Raven Scott 633fe22bff Updates
Release rolling / release (push) Successful in 7m19s
2026-07-31 12:34:03 -04:00
Raven Scott 33937db11c fixes
Release rolling / release (push) Successful in 7m16s
2026-07-31 12:08:11 -04:00
Raven Scott 6105b8d4ac Add installer
Release rolling / release (push) Canceled after 5m29s
2026-07-31 12:02:56 -04:00
Raven Scott cdf776a68f Fix CI
Release rolling / release (push) Successful in 7m10s
2026-07-31 11:52:26 -04:00
Raven Scott 2b7025b22d Bare standalone packaging — scripts/bare-standalone.cjs, make.cjs, hosts.cjs, prepare-pack.mjs (kernel sync, node_modules flatten, optional sshcrypto.node omit)
Release rolling / release (push) Failing after 1m32s
Entries + OTA — bin/bare-os-*.mjs + lib/bare-os-ota.mjs (pear-runtime, --no-updates / BARE_OS_OTA_DISABLE)
Upgrade links on seeder/booter package.json
Gitea rolling — .gitea/workflows/release-rolling.yml + scripts/gitea-rolling-release.sh (RELEASE_TOKEN)
by-arch + pear-ci — scripts/pear-stage-by-arch.sh, ci/snapshot-*.json (PEAR_PRIMARY_KEY)
pear run retired from npm/PM2/docs; see docs/BINARY-RELEASE.md
2026-07-31 11:44:04 -04:00
Raven Scott 026b7ba4ab Update License 2026-06-22 21:16:51 -04:00
snxraven 82dd5855b6 Docs+AutoPass patch 2026-05-27 00:00:13 +00:00
snxraven 21580f21bc Pear Apps work 2026-05-26 23:45:54 +00:00
snxraven ab3f091671 Fixes for pear bin 2026-05-26 23:18:52 +00:00
Raven Scott d7b019d3c3 Updates 2026-05-26 19:03:21 -04:00
Raven Scott 5242bedc37 Updates 2026-05-26 18:58:11 -04:00
Raven Scott 72e74287cd Updates 2026-05-26 18:53:41 -04:00
Raven Scott 8daf7c6271 Updates 2026-05-26 18:38:18 -04:00
Raven Scott e06dd0fb92 Updates to packages 2026-05-26 18:08:59 -04:00
Raven Scott 59593e43f6 Pear updates 2026-05-26 18:02:37 -04:00
Raven Scott 1e3d89e810 Fix pear 2026-05-26 17:58:46 -04:00
Raven Scott 014c70ad09 feat: introduce ctx.pear surface and /bin/pear for in-OS Pear development
Complete the full planned effort for the detailed ctx.bare code audit
and the new ctx.pear surface, delivering the ability to create, stage,
and integrate real Pear applications from within a booted Bare OS.

### Audit (ctx.bare)
- Performed exhaustive code audit of bare-os-ctx-bare.js (host import
  path, drive bundle eval + require.addon wrappers, referrer workarounds).
- Inventoried all manifest/bundle verifiers and related scripts.
- Researched manifest format, implicit tiering model, and dual loading
  strategy (JSON + .data.mjs).
- Deep analysis of the local Holepunch clone (bare-* and pear-* packages)
  to identify realistic guest vs host-delegate boundaries.
- Full cross-reference of call sites, greps, and historical pain points
  (pear:// referrer resolution, nativeHint handling, addon stubs).

### Implementation (ctx.pear)
- Added `pearEntries` tier to bare-module-manifest.json with initial
  high-value packages (pear-build, pear-bundle, pear-ref, etc.).
- Implemented `loadPearModuleManifest()` and `buildPearCtxObjectFromHost()`.
- Wired ctx.pear exposure through the booter into the guest context.
- Updated TypeScript definitions (`bare-os-ctx.d.ts`).

### User-Facing Surface
- Created full `/bin/pear` command with `help`, `info`, `list`, `init`
  (functional skeleton creation), and improved `stage` subcommands.
- Registered as Tier-1 command (now 183 total commands).
- Added man page and rebuilt coreutils (kernel + seeder).

### Agent Autonomy
- Created production-quality `pear-dev` agent skill.
- Added to skill seed list with cross-references to the appstore skill.

### P2P App Store Integration
- Updated appstore skill with explicit Pear development synergy section.
- Updated p2p-app-store design doc to document the new closed loop.
- Added cross-references in both skills and design documents.

### Verification & Hygiene
- Created `scripts/verify-pear-module-manifest-data.mjs`.
- Enhanced `verify-pear-no-static-node-import.mjs` with explicit pear
  command coverage.
- Integrated new verifier into release-checklist and agent hints.
- Performed comprehensive zero-TODO/scaffolding sweep across all new
  Pear artifacts (clean).
- Multiple full verification harness runs (all green).

### Documentation & Governance
- Added complete "Pear Development Environment" thread to feature-roadmap.md.
- Updated developer guide (Chapter 12).
- Maintained living plan document and detailed audit notes with full
  Implementation Log throughout.
- Updated command counts across READMEs and supporting docs.

All changes follow project governance:
- Bare-only guest constraints strictly observed
- Verifier-first discipline maintained
- Living plan + audit documents kept as single source of truth
- Production quality bar matching the completed P2P App Store feature

Plan items 04–21 completed.

See:
- docs/design/ctx-pear-surface-and-bare-audit-plan.md
- docs/audit/ctx-bare-audit-notes.md (full audit + implementation log)
2026-05-26 17:54:06 -04:00
Raven Scott afb591f219 Update key 2026-05-17 12:15:52 -04:00
snxraven 7de85968cc Raven Scott 2026-05-17 16:01:52 +00:00
Raven Scott 0f056c65e2 FIxes for SSH 2026-05-03 01:58:10 -04:00
Raven Scott b99da7bebc patch kex 2026-05-03 01:46:14 -04:00
Raven Scott 38e632e4b2 Updates 2026-04-27 21:56:22 -04:00
Raven Scott ff9ab499a2 New tooling
Entry: scripts/run-bin.mjs
Preload shim (must load first): scripts/run-bin-prelude.mjs
Harness: scripts/lib/run-bin-harness.mjs

Usage:

node scripts/run-bin.mjs ls -la /bin
node scripts/run-bin.mjs cat /etc/passwd
node scripts/run-bin.mjs --cmd sed -n '1,5p' /home/user/note.txt
node scripts/run-bin.mjs --json echo "hello"
printf 'a\nb\n' | node scripts/run-bin.mjs cat
npm run test:coreutils -- --suite basic
npm run test:coreutils -- --build --watch -- echo test   # rebuild + watch src/<cmd>.js (use `--buil
2026-04-27 21:32:50 -04:00
Raven Scott 93742db1cc Abort Controller for whois 2026-04-27 21:04:34 -04:00
Raven Scott 60e2efa64a Try to fix whois 2026-04-27 21:00:49 -04:00
Raven Scott 9074978c83 Chat updates 2026-04-27 20:14:01 -04:00
Raven Scott 12b9c1e200 Updates to Swarm Disk 2026-04-27 19:38:07 -04:00
Raven Scott 97ba72f639 Updates to Chat Protomux and Boot Splash 2026-04-27 19:26:44 -04:00
Raven Scott b133e8afc5 Late peers — Pending block reads were only sent to peers that existed when read() ran; your plan’s rebroadcast on join fixes that.
Protomux timing — Even with a connected socket, messages[0].send() must run after the channel is fully open. A bare send() right after chan.open() often does nothing useful until pairing finishes. Waiting on peer.chan.fullyOpened() (from Protomux) before each send fixed the standalone TCP check and matches real Hyperswarm behavior.
Code changes (packages/bare-os-booter/lib/swarm-disk.js)
read(index) — For each peer, schedule the read request with
peer.chan.fullyOpened().then(() => … send(index)) instead of sending immediately.
addPeer — After this.peers.add(peer), for every pending index in pendingReads, schedule the same fullyOpened() → send path so joiners get block requests once their channel is ready.
2026-04-27 19:02:24 -04:00
Raven Scott 193464bd2e Added a full ctx-level TCP connector path for telnet:
packages/bare-os-booter/index.js
Added ctx.bareOsTelnetConnect(host, port, opts) that prefers ctx.bare.bareTcp.createConnection, then new bareTcp.Socket(), with explicit diagnostics if unavailable.
packages/bare-os-coreutils/src/telnet.js already preferred ctx.bareOsTelnetConnect, so it now uses this richer path first automatically.
Added missing ssh command:

New file: packages/bare-os-coreutils/src/ssh.js
Supports -h/--help
Delegates to ctx.bareOsRunSshCli when present
Emits explicit nonzero unavailable/runtime diagnostics when absent
Registered command:
packages/bare-os-coreutils/lib/commands.mjs
Hardened HDMS create mount visibility:

packages/bare-os-booter/lib/hdms-manager.js
hdms create now verifies mount visibility via getMountMap().has(label) and errors non-silently if missing.
Success message now includes mount path (mounted=/mnt/<label>).
Fixed parser/semantics and explicit failures:

packages/bare-os-coreutils/src/kill.js
-1 is now treated as a target (not misparsed as signal shorthand), so kill -TERM -1 is explicit/non-silent.
packages/bare-os-coreutils/src/test.js
Numeric test comparisons now emit diagnostic + exit 2 for empty integer operand cases (keeps existing non-decimal behavior stable).
packages/bare-os-coreutils/src/crontab.js
Explicitly rejects stdin/fd-style installs (-, /dev/fd/*, /proc/self/fd/*) with nonzero error.
Updated ctx typings:

packages/bare-os-booter/lib/bare-os-ctx.d.ts
Added bareOsRunSshCli?
Added bareOsTelnetConnect?
2026-04-27 09:08:34 -04:00
Raven Scott 27292f2ba6 Network/auth/delegate hardening
hdms
Added ls alias to list.
Made delegate failures explicit and nonzero in packages/bare-os-coreutils/src/hdms.js.
Added nonzero error exit in packages/bare-os-booter/lib/hdms-manager.js.
git-pear
Implemented clone subcommand routing to git clone in packages/bare-os-coreutils/src/git-pear.js.
trustctl
Added ls alias to status/policy output in packages/bare-os-coreutils/src/trustctl.js.
oidc-publish
Added explicit unknown-subcommand handling and publish subcommand compatibility in packages/bare-os-coreutils/src/oidc-publish.js.
ssh-keygen
Wrapped delegate invocation with explicit error propagation in packages/bare-os-coreutils/src/ssh-keygen.js.
Added success output on generated keypair in packages/bare-os-booter/lib/ssh-keygen-cli.js.
sshd
Added -t config test mode and explicit exit semantics in packages/bare-os-booter/lib/bare-openssh.js.
Ensured wrapper sets exit code consistently in packages/bare-os-openssh/src/sshd.js.
telnet
Changed connector preference to use net.createConnection first when available, then syscall bridge fallback, in packages/bare-os-coreutils/src/telnet.js.
crontab -e flow

Implemented edit flow with VISUAL/EDITOR fallback, unlocked-state checks, temp file handling, install, and cleanup in packages/bare-os-coreutils/src/crontab.js.
Shell/runtime hardcore semantics

Added numeric brace range expansion {1..5} in packages/bare-os-booter/lib/shell-glob.js.
Enabled brace expansion by default unless explicitly disabled.
Added normalization for inline brace-expression tokens in packages/bare-os-booter/lib/shell.js.
Added arithmetic command-form handling for (( ... )) in packages/bare-os-booter/lib/shell.js.
Extended shell signal trap dispatch support for USR1/USR2 (in addition to INT/TERM) in packages/bare-os-booter/index.js.
Hardened kill command delivery validation in packages/bare-os-coreutils/src/kill.js.
Regression tests

Added new: packages/bare-os-coreutils/test/hardcore-bugs.test.mjs.
Extended shell tests in packages/bare-os-booter/test.js for:
default cmdsub behavior,
brace range expansion,
arithmetic command form.
Existing regression files still pass after updates.
2026-04-27 08:54:50 -04:00
Raven Scott d5535cdb65 Fixed command substitution behavior in shell expansion:
packages/bare-os-booter/lib/shell.js
$(...)/backticks are now enabled by default unless explicitly disabled via BARE_OS_SHELL_CMDSUBST=0|false|off.
Fixed sh -c exit/status propagation:

packages/bare-os-booter/lib/shell.js
Syncs BARE_OS_EXIT_STATUS after each executed statement so later commands in the same line (like echo $?) see the immediately previous status.
packages/bare-os-coreutils/src/sh.js
In -c mode, reads final BARE_OS_EXIT_STATUS back into ctx.exitCode for consistent result propagation.
Implemented trap behavior for requested scope (EXIT, INT, TERM):

packages/bare-os-booter/lib/shell.js
exit builtin now runs EXIT trap handler before requesting booter exit.
packages/bare-os-booter/index.js
Signal delivery for shell PID now triggers trap dispatch for INT/TERM.
Hardened ulimit -f invalid diagnostics:

packages/bare-os-coreutils/src/ulimit.js
Explicit invalid-value error for malformed -f setter input, with nonzero exit.
Supported-but-unimplemented setter values still return explicit unsupported-setter error.
2026-04-27 08:41:43 -04:00
Raven Scott dd5890b98c Core error propagation hardening:
Updated kernel-runner delegate deny path to emit on stderr in packages/bare-os-booter/lib/kernel-runner.js.
Added structured errno metadata (err.code) via vfsErr(...) and applied it to key VFS traversal/permission throws in packages/bare-os-booter/lib/vfs.js (ENOENT/EACCES paths).
Critical command exit-code fixes:

packages/bare-os-coreutils/src/ls.js
Tracks access/stat failures and sets nonzero exit when any operand fails.
packages/bare-os-coreutils/src/grep.js
Recursive walker now reports traversal/stat errors back to main flow so fatal status becomes 2.
packages/bare-os-coreutils/src/rm.js
-f only suppresses not-found style errors; permission/deny failures stay nonzero.
packages/bare-os-coreutils/src/chmod.js
Treats falsy/no-op backend chmod result as failure (nonzero).
packages/bare-os-coreutils/src/find.js
Added root-path preflight so missing root now reports explicit error + nonzero.
Minor quirks:

packages/bare-os-coreutils/src/xargs.js
-P0 now maps to bounded parallel cap (env/default cap), not forced serial.
packages/bare-os-coreutils/src/ulimit.js
-f with value now returns explicit unsupported-setter diagnostic + nonzero.
-f alone reports unlimited.
Regression tests:

Added packages/bare-os-coreutils/test/error-propagation.test.mjs covering:
grep missing file => exit 2
rm -f permission error => nonzero
find missing root => nonzero + diagnostic
ulimit -f 1M => explicit unsupported + nonzero
xargs -P0 bounded behavior
2026-04-27 08:31:31 -04:00
Raven Scott 237e0ef63a Added missing locale command support:
packages/bare-os-coreutils/src/locale.js
registered in packages/bare-os-coreutils/lib/commands.mjs
Fixed trustctl generated runtime mismatch:

added preamble wiring in packages/bare-os-coreutils/build.mjs (trustctl: ['p2p-suite.js'])
Improved help behavior:

packages/bare-os-coreutils/src/ssh-keygen.js (help, -h, --help, -?)
packages/bare-os-coreutils/src/oidc-publish.js (help detection across args)
Improved procstat empty-state UX while preserving JSON output:

packages/bare-os-coreutils/src/procstat.js
adds sourcePath and additive hint when process table is empty
Enforced stricter network behavior:

packages/bare-os-coreutils/src/whois.js
prefers ctx.httpFetch, adds bounded timeout via AbortController
clearer timeout/policy/offline error mapping
packages/bare-os-coreutils/src/telnet.js
strict-close behavior by default
--strict-close / --no-strict-close
BARE_OS_TELNET_STRICT_CLOSE env override
Implemented expected-item UX/compat updates:

packages/bare-os-coreutils/src/iconv.js: added -l/--list, improved encoding-pair error messaging
packages/bare-os-coreutils/src/crontab.js: clearer -l empty-file message
packages/bare-os-coreutils/src/getconf.js: added PAGE_SIZE / PAGESIZE aliases
packages/bare-os-coreutils/src/nproc.js: clarified help text
packages/bare-os-coreutils/src/time.js: clarified output comments/behavior
2026-04-27 08:22:57 -04:00
Raven Scott beaff551cf Fixed dd /dev/zero truncation in packages/bare-os-coreutils/src/dd.js
if=/dev/zero with finite count*bs now produces requested size directly (not limited by VFS 64KiB pseudo-file).
Raw stdout now uses bareOsEmitRaw, improving pipeline correctness.
Fixed pipeline capture path for FIFO-relevant commands

echo and cat now emit via bareOsEmitRaw (packages/bare-os-coreutils/src/echo.js, packages/bare-os-coreutils/src/cat.js).
Shell pipeline now injects bareOsBinWrite into child contexts when output is captured, so raw writes are captured (packages/bare-os-booter/lib/shell.js).
Improved xattr behavior in packages/bare-os-coreutils/src/xattr.js

Added -p/--print NAME.
-w now logs written attribute name for visible success feedback.
Roundtrip behaviors preserved with sidecar metadata format.
Improved ACL UX in:

packages/bare-os-coreutils/src/getfacl.js
Explicit source header for sidecar and mode fallback (non-compact mode).
packages/bare-os-coreutils/src/setfacl.js
Added -m/--modify ENTRY in addition to stdin blob and -b.
Implemented dynamic ulimit output in packages/bare-os-coreutils/src/ulimit.js

Reads /proc/bare_os/rlimits.json when available.
Supports -a, -n, -Sn, -Hn.
Added shuf -e support in packages/bare-os-coreutils/src/shuf.js.

Added split byte-suffix parsing (k/K/m/M/g/G) and attached -bSIZE support in packages/bare-os-coreutils/src/split.js.
2026-04-27 08:15:50 -04:00
Raven Scott b795397261 Added consistent non-empty version output for:
curl --version in packages/bare-os-coreutils/src/curl.js
wget --version in packages/bare-os-coreutils/src/wget.js
openssl version and openssl --version in packages/bare-os-coreutils/src/openssl.js
nano --version (via edit) in packages/bare-os-coreutils/src/edit.js
Updated tar compatibility in packages/bare-os-booter/lib/tar-cli.js:

Added tar --version
Added grouped short-flag parsing (-czf, etc.)
Added first-arg legacy cluster parsing (czf)
Added - archive target support for create/list/extract stream paths
Kept implementation as ustar subset (accepts z for compatibility parsing)
Fixed pipeline/timeout behavior:

Optimized head line mode to stop scanning early (no full split) in packages/bare-os-coreutils/src/head.js
Added bounded safety for yes cap in packages/bare-os-coreutils/src/yes.js
Hardened timeout so timed-out commands reliably produce exit code 124 in packages/bare-os-coreutils/src/timeout.js
Added scoped expr compatibility in shell:

Prevented pathname expansion of bare * only for expr arithmetic-token case in packages/bare-os-booter/lib/shell.js
Added glob option plumbing in packages/bare-os-booter/lib/shell-glob.js
2026-04-27 08:07:18 -04:00
Raven Scott db3aece34d Implemented all plan to-dos end-to-end, including regeneration of staged bins, and verified with build + booter tests.
What changed
Fixed /bin generation for AsyncFunction execution in build pipeline:
Added appctl preamble wiring (p2p-suite.js) in packages/bare-os-coreutils/build.mjs.
Added a stripRunExport transform to remove trailing export { run } from generated /bin scripts.
Updated cut delimiter parsing in packages/bare-os-coreutils/src/cut.js:
Supports both -d X and attached -dX forms (including -d' ').
Validates -d argument presence and enforces single-character delimiter.
Improved uname -a output in packages/bare-os-coreutils/src/uname.js:
Better release/version derivation from env and /etc/os-release.
Uses env-backed machine architecture fallback instead of hardcoded unknown where available.
Added help aliases in packages/bare-os-coreutils/src/git-pear.js:
git-pear --help and git-pear -h now map to help output.
Reduced persistent invalid timer spam in packages/bare-os-booter/lib/bare-cron.js:
Added per-file parse-error dedupe/rate-limiting (first-seen, content-change, then hourly).
Added actionable invalid timer format hint in log message.
2026-04-27 07:59:00 -04:00
Raven Scott 21ad2f415b fix(shell): propagate identity across pipeline child contexts for savevault 2026-04-27 07:35:48 -04:00
Raven Scott 337b616a74 ix(kernel-runner): execute direct .sh scripts via /bin/sh
Route direct .sh invocations (e.g. ./test.sh) through the shell frontend instead of JS evaluation, and add a regression test to cover direct .sh execution.
2026-04-27 02:54:04 -04:00
Raven Scott 099641a77f Remove No Longer needed data 2026-04-27 01:02:23 -04:00
Raven Scott 6bc5accb66 Agent Updates 2026-04-27 01:00:06 -04:00
Raven Scott aa81fbff5b Close the BareOS shell + Fish REPL roadmap tracker and ship the remaining
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.
2026-04-27 00:41:06 -04:00