Release baretop
This commit is contained in:
@@ -193,6 +193,20 @@ When **`BARE_OS_VFS_UNION_PREFIXES`** overlays the personal drive on system path
|
||||
| **`edit`** | Full-screen in-terminal editor over **`ctx.vfs`**: multi-line buffer, search / goto / save-as, optional syntax highlighting. Requires a TTY (**`stdin.isTTY`** in **`src/edit.js`**); exits with a clear error if stdin is not a TTY. On exit, the TUI leaves **alternate-screen** mode (**`?1049l`**) when enabled (default), restoring the pre-editor terminal view; set **`BARE_EDIT_NO_ALTSCREEN`** to any non-empty value to use a **full clear** (**`2J`**) instead on terminals where alternate-screen misbehaves. Source: **`src/edit.js`** with preamble **`lib/edit-ansi.js`**, **`edit-highlight.js`**, **`edit-buffer.js`**, **`edit-key-parse.js`**, **`edit-tui.js`**. |
|
||||
| **`nano`** | Same built artifact as **`edit`** (**`build.mjs`** maps **`nano`** → **`src/edit.js`** and the same preamble). **`/bin/nano`** is installed for muscle memory; the default shell alias **`nano` → `edit`** (see **`defaultShellAliases`** in **`shell.js`**) makes **`nano`** invoke that binary. **`man edit`** and **`man nano`** describe flags and keys. |
|
||||
|
||||
### 5.2a1 Session monitor (`baretop`)
|
||||
|
||||
| Command | Notes |
|
||||
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **`baretop`** | Full-screen **htop-style** terminal dashboard for **session / operator** state (not a Linux per-PID process list). Pulls **`/proc/bare_os/metrics_live.json`**, **`ctx.bareOsReadProcMetricsLive`**, **`/proc/bare_os_resources`** / **`ctx.bareOsGetResourceStatus`**, pseudo **`/proc/meminfo`** / **`loadavg`** / **`cpuinfo`**, **`ctx.bareOsReadBareTopSnapshot`** (booter batch read of many **`/proc/bare_os/*`** mirrors), plus optional **`ctx.bareOsReadDelegateFairnessSnapshot`**, **`ctx.bareOsReadSubprocessBridgeSnapshot`**, **`ctx.bareOsHostStats`**. **Ten tabs:** overview (sparklines, pipeline % bars, delegate histogram, health score, staleness), initd (filter **`/`**), network, features, diagnostics (**`debug`**, **`delegate_red`**, **`ipc_backpressure`**), operator (replication / swarm / sync / staging / snapshot_hints), Pear (**`pear_ipc`**, health, trust, peer_health), catalog (index, version, bootstrap, provenance, quotas, rlimits, extensions, capabilities), host (worker_budget, sandbox, git stats, HDMS, DHT, session_stats), keys. **Interaction:** **`[`** **`]`** cycle tabs; **`1`–`9`**, **`0`** jump; pause **`Space`**; step **`.`**; delta **`d`**; export **`e`** (**`BARE_TOP_EXPORT_PATH`**); **`SIGWINCH` / stdout `resize`** redraw; suspend/resume via **`bareOsRegisterSuspendHook`**. Themes **`BARE_TOP_THEME`**, EMA **`BARE_TOP_EMA_ALPHA`**, **`BARE_TOP_UI_MIN_MS`**, **`BARE_TOP_FETCH_CONCURRENCY`**, **`man baretop`** for the full env list. Alternate-screen teardown like **`edit`** (**`BARE_TOP_NO_ALTSCREEN`**). Shell alias **`top` → `baretop`**. Source: **`src/baretop.js`** + **`lib/baretop-snapshot.js`**, **`lib/baretop-tui.js`** (with **`edit-ansi.js`**, **`edit-key-parse.js`**). |
|
||||
|
||||
#### 5.2a1a Operator proc catalog (baretop panels)
|
||||
|
||||
Stable paths are also listed under **`/proc/bare_os/`** in **`packages/bare-os-booter/lib/vfs.js`**. The snapshot batch keys (keep aligned with **`BARE_TOP_SNAPSHOT_PROC_ENTRIES`** in **`lib/baretop-snapshot.js`** and **`bareOsReadBareTopSnapshot`** in **`packages/bare-os-booter/index.js`**) include: **`index.json`**, **`version`**, **`host_os.json`**, **`debug.json`**, **`session_stats`**, **`quotas`**, **`capabilities`** (+ **`.json`**), **`seed_handshake`**, **`bootstrap`**, **`provenance`**, **`snapshot_hints.json`**, **`staging_slot`**, **`peer_health`**, **`pear_ipc.json`**, **`pear_ipc_health.json`**, **`pear_trust.json`**, **`replication`**, **`replication_backpressure.json`**, **`swarm`**, **`sync_window.json`**, **`hdms_health.json`**, **`hdms_hints.json`**, **`dht_status.json`**, **`udx_extended.json`**, **`ipc_backpressure.json`**, **`delegate_red.json`**, **`git_delegate_stats.json`**, **`git_lfs_pointer_stats.json`**, **`worker_budget.json`**, **`sandbox_profile.json`**, **`rlimits.json`**, **`extensions.json`**, **`initd_dag.json`**. Missing nodes show **`N/A`** per panel rather than failing the whole TUI.
|
||||
|
||||
#### 5.2a1b Contributors — Bare vs Node builtins
|
||||
|
||||
**`/bin`** utilities are concatenated bundles evaluated as **`AsyncFunction`** — they must not static-import **`node:crypto`**, **`node:module`**, or other **`node:`** builtins Pear/Bare cannot resolve from a **`pear://`** image. Use **`ctx.vfs`**, **`JSON.parse`**, and **`ctx.b4a`** only inside **`baretop`**. For background on the Bare module stack (**`bare-crypto`**, **`bare-module`**, etc.), see the Holepunch **`holepunch-repos`** tree (e.g. **`docs/05-BARE-RUNTIME.md`**) in a local Pear workspace; paths vary by checkout.
|
||||
|
||||
### 5.2b HTTP clients (`curl` / `wget`)
|
||||
|
||||
**`curl`** and **`wget`** are **booter-delegated** CLIs, not coreutils engines. They implement Fetch-based **subsets** of the familiar tools; the **`/bin/curl`** and **`/bin/wget`** files on the system image exist for **`ls /bin`** / **`which`** parity and are **stubs** if ever executed without delegation.
|
||||
|
||||
+2247
File diff suppressed because it is too large
Load Diff
+2247
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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 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"
|
||||
var BARE_OS_HELP_BIN_SPACED = "arch awk baretop base32 base64 basename basenc btop 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: ' +
|
||||
|
||||
+180
-180
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"bundles": [
|
||||
{
|
||||
"path": "/lib/bare/bundles/safetyCatch.js",
|
||||
"keys": [
|
||||
"safetyCatch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/b4a.js",
|
||||
"keys": [
|
||||
"b4a"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/safetyCatch.js",
|
||||
"keys": [
|
||||
"safetyCatch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/hypercoreIdEncoding.js",
|
||||
"keys": [
|
||||
@@ -37,6 +37,12 @@
|
||||
"bareUrl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEvents.js",
|
||||
"keys": [
|
||||
"bareEvents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEncoding.js",
|
||||
"keys": [
|
||||
@@ -49,12 +55,6 @@
|
||||
"barePath"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEvents.js",
|
||||
"keys": [
|
||||
"bareEvents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAbort.js",
|
||||
"keys": [
|
||||
@@ -67,18 +67,18 @@
|
||||
"bareAbortController"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareReadline.js",
|
||||
"keys": [
|
||||
"bareReadline"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAddonResolve.js",
|
||||
"keys": [
|
||||
@@ -91,6 +91,18 @@
|
||||
"bareCrypto"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAppKit.js",
|
||||
"keys": [
|
||||
"bareAppKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAssert.js",
|
||||
"keys": [
|
||||
"bareAssert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAsyncHooks.js",
|
||||
"keys": [
|
||||
@@ -103,24 +115,12 @@
|
||||
"bareApk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAssert.js",
|
||||
"keys": [
|
||||
"bareAssert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAtomics.js",
|
||||
"keys": [
|
||||
"bareAtomics"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAppKit.js",
|
||||
"keys": [
|
||||
"bareAppKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/fetch.js",
|
||||
"keys": [
|
||||
@@ -145,18 +145,18 @@
|
||||
"bareBundleCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBuffer.js",
|
||||
"keys": [
|
||||
"bareBuffer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBluetoothApple.js",
|
||||
"keys": [
|
||||
"bareBluetoothApple"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBuffer.js",
|
||||
"keys": [
|
||||
"bareBuffer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleEvaluate.js",
|
||||
"keys": [
|
||||
@@ -175,18 +175,18 @@
|
||||
"bareBoot"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDaemon.js",
|
||||
"keys": [
|
||||
"bareDaemon"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDebugLog.js",
|
||||
"keys": [
|
||||
@@ -223,12 +223,6 @@
|
||||
"bareEnv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareCov.js",
|
||||
"keys": [
|
||||
@@ -236,15 +230,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDgram.js",
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareDgram"
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFfmpegEncodings.js",
|
||||
"path": "/lib/bare/bundles/bareDgram.js",
|
||||
"keys": [
|
||||
"bareFfmpegEncodings"
|
||||
"bareDgram"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -259,18 +253,36 @@
|
||||
"bareFormat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFfmpegEncodings.js",
|
||||
"keys": [
|
||||
"bareFfmpegEncodings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareGif.js",
|
||||
"keys": [
|
||||
"bareGif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFileLogger.js",
|
||||
"keys": [
|
||||
"bareFileLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFormData.js",
|
||||
"keys": [
|
||||
"bareFormData"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHrtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHeif.js",
|
||||
"keys": [
|
||||
@@ -283,18 +295,6 @@
|
||||
"bareGtk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHrtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFileLogger.js",
|
||||
"keys": [
|
||||
"bareFileLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttpParser.js",
|
||||
"keys": [
|
||||
@@ -307,12 +307,6 @@
|
||||
"bareFs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIco.js",
|
||||
"keys": [
|
||||
"bareIco"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareImageResample.js",
|
||||
"keys": [
|
||||
@@ -320,9 +314,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttp1.js",
|
||||
"path": "/lib/bare/bundles/bareIco.js",
|
||||
"keys": [
|
||||
"bareHttp1"
|
||||
"bareIco"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -331,24 +325,18 @@
|
||||
"bareInspect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttp1.js",
|
||||
"keys": [
|
||||
"bareHttp1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttps.js",
|
||||
"keys": [
|
||||
"bareHttps"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIntl.js",
|
||||
"keys": [
|
||||
"bareIntl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIpc.js",
|
||||
"keys": [
|
||||
"bareIpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareJpeg.js",
|
||||
"keys": [
|
||||
@@ -356,15 +344,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLogger.js",
|
||||
"path": "/lib/bare/bundles/bareIpc.js",
|
||||
"keys": [
|
||||
"bareLogger"
|
||||
"bareIpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspector.js",
|
||||
"path": "/lib/bare/bundles/bareIntl.js",
|
||||
"keys": [
|
||||
"bareInspector"
|
||||
"bareIntl"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -373,12 +361,24 @@
|
||||
"bareLief"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLogger.js",
|
||||
"keys": [
|
||||
"bareLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLink.js",
|
||||
"keys": [
|
||||
"bareLink"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspector.js",
|
||||
"keys": [
|
||||
"bareInspector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMake.js",
|
||||
"keys": [
|
||||
@@ -397,6 +397,12 @@
|
||||
"bareModuleLexer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMedia.js",
|
||||
"keys": [
|
||||
"bareMedia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModule.js",
|
||||
"keys": [
|
||||
@@ -427,18 +433,6 @@
|
||||
"bareNodeFetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNet.js",
|
||||
"keys": [
|
||||
"bareNet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMedia.js",
|
||||
"keys": [
|
||||
"bareMedia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareOpen.js",
|
||||
"keys": [
|
||||
@@ -452,15 +446,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePerformance.js",
|
||||
"path": "/lib/bare/bundles/bareNet.js",
|
||||
"keys": [
|
||||
"barePerformance"
|
||||
"bareNet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"path": "/lib/bare/bundles/barePerformance.js",
|
||||
"keys": [
|
||||
"bareNodeRuntime"
|
||||
"barePerformance"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -475,6 +469,12 @@
|
||||
"barePackDrive"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDev.js",
|
||||
"keys": [
|
||||
"bareDev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePng.js",
|
||||
"keys": [
|
||||
@@ -482,9 +482,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePipe.js",
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"keys": [
|
||||
"barePipe"
|
||||
"bareNodeRuntime"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -500,9 +500,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDev.js",
|
||||
"path": "/lib/bare/bundles/barePipe.js",
|
||||
"keys": [
|
||||
"bareDev"
|
||||
"barePipe"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -541,6 +541,12 @@
|
||||
"bareSdl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSemver.js",
|
||||
"keys": [
|
||||
@@ -553,18 +559,6 @@
|
||||
"bareRpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRepl.js",
|
||||
"keys": [
|
||||
@@ -572,9 +566,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSidecar.js",
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareSidecar"
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -590,9 +584,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"path": "/lib/bare/bundles/bareSidecar.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
"bareSidecar"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -607,36 +601,24 @@
|
||||
"bareStorage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStdio.js",
|
||||
"keys": [
|
||||
"bareStdio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSubprocess.js",
|
||||
"keys": [
|
||||
"bareSubprocess"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStructuredClone.js",
|
||||
"keys": [
|
||||
"bareStructuredClone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSystemLogger.js",
|
||||
"keys": [
|
||||
"bareSystemLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTiff.js",
|
||||
"keys": [
|
||||
"bareTiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTap.js",
|
||||
"keys": [
|
||||
@@ -644,15 +626,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTimers.js",
|
||||
"path": "/lib/bare/bundles/bareStructuredClone.js",
|
||||
"keys": [
|
||||
"bareTimers"
|
||||
"bareStructuredClone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareThread.js",
|
||||
"path": "/lib/bare/bundles/bareTiff.js",
|
||||
"keys": [
|
||||
"bareThread"
|
||||
"bareTiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSubprocess.js",
|
||||
"keys": [
|
||||
"bareSubprocess"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -661,12 +649,24 @@
|
||||
"bareTpl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTimers.js",
|
||||
"keys": [
|
||||
"bareTimers"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTcp.js",
|
||||
"keys": [
|
||||
"bareTcp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareThread.js",
|
||||
"keys": [
|
||||
"bareThread"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareType.js",
|
||||
"keys": [
|
||||
@@ -679,12 +679,6 @@
|
||||
"bareTls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUiKit.js",
|
||||
"keys": [
|
||||
@@ -692,9 +686,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUnpack.js",
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareUnpack"
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -704,15 +698,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareVm.js",
|
||||
"path": "/lib/bare/bundles/bareUnpack.js",
|
||||
"keys": [
|
||||
"bareVm"
|
||||
"bareUnpack"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWalkHandles.js",
|
||||
"path": "/lib/bare/bundles/bareVm.js",
|
||||
"keys": [
|
||||
"bareWalkHandles"
|
||||
"bareVm"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -722,9 +716,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUtils.js",
|
||||
"path": "/lib/bare/bundles/bareWalkHandles.js",
|
||||
"keys": [
|
||||
"bareUtils"
|
||||
"bareWalkHandles"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -733,18 +727,6 @@
|
||||
"bareWebKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"keys": [
|
||||
"bareV8ToIstanbul"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWhich.js",
|
||||
"keys": [
|
||||
"bareWhich"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWebp.js",
|
||||
"keys": [
|
||||
@@ -758,9 +740,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"path": "/lib/bare/bundles/bareUtils.js",
|
||||
"keys": [
|
||||
"bareWinUi"
|
||||
"bareUtils"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"keys": [
|
||||
"bareV8ToIstanbul"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWhich.js",
|
||||
"keys": [
|
||||
"bareWhich"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -769,6 +763,12 @@
|
||||
"bareXdiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"keys": [
|
||||
"bareWinUi"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareZlib.js",
|
||||
"keys": [
|
||||
@@ -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
@@ -3,6 +3,7 @@
|
||||
## Maintenance
|
||||
|
||||
- **Pear / Bare**: [`lib/kernel-runner.js`](lib/kernel-runner.js) must not **static**-import **`node:module`** (Bare’s resolver cannot load **`node:`** builtins from a **`pear://`** bundle). Optional **`BARE_OS_BIN_WORKER_OFFLOAD`** now obtains **`createRequire`** via **dynamic** **`import('bare-module')`** when running outside Node.
|
||||
- **`baretop`**: optional **`ctx.bareOsReadBareTopSnapshot()`** in [`index.js`](index.js) returns **`{ atMs, files }`** with the same keys as **`BARE_TOP_SNAPSHOT_PROC_ENTRIES`** in **`packages/bare-os-coreutils/lib/baretop-snapshot.js`** — keep those lists in sync when adding operator **`/proc/bare_os`** nodes.
|
||||
|
||||
## Context API (`bareOsCtxApiVersion`)
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ node index.js
|
||||
|
||||
| Module | Role |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `index.js` | Swarm, `SwarmDisk`, boot timeout, `executeKernel`, ctx assembly, boot/audit/env passthrough |
|
||||
| `index.js` | Swarm, `SwarmDisk`, boot timeout, `executeKernel`, ctx assembly, boot/audit/env passthrough; **`bareOsReadBareTopSnapshot`** batches **`/proc/bare_os/*`** reads for **`baretop`** |
|
||||
| `swarm-disk.js` | Peer mux, MBR/read RPC, replication hooks |
|
||||
| `kernel-runner.js` | `runKernelFromSource`, `runBinCommand`, `resolveBinInPath` (PATH on system drive); `git` / `curl` / `wget` delegates |
|
||||
| `vfs.js` | Two-drive routing; `mkdir`/`rmdir` (`.bareos_empty`), `chmod`, `symlink`, pseudo `/proc`/`/sys`, `watch`, … |
|
||||
| `shell.js` | Tokenize, pipelines, redirections, builtins (`barerc`, `unset`, `readonly`, `umask`, `command`, `type`, …), `execShellLine`, `loadBarerc`; default aliases include **`nano` → `edit`** (TTY editor) |
|
||||
| `shell.js` | Tokenize, pipelines, redirections, builtins (`barerc`, `unset`, `readonly`, `umask`, `command`, `type`, …), `execShellLine`, `loadBarerc`; default aliases include **`nano` → `edit`** (TTY editor), **`top` → `baretop`** and **`btop` → `baretop`** (session monitor) |
|
||||
| `bare-os-theme-presets.js` | Named themes (`BARE_OS_THEME`), `applyBareOsThemeFromEnv`, `BARE_OS_COLOR_DEPTH` downgrades for REPL colors |
|
||||
| `bare-os-ipc.js` | FIFOs, JSON-RPC (`pushJson`/`takeJson`, token + line limits), fan-out pub/sub, `stats` |
|
||||
| `bare-os-abort.js` | `raceWithAbortAndTimeout` for `execLine` / `readLine` / VFS / `runBinCommand` |
|
||||
|
||||
@@ -1840,6 +1840,69 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Batch-read `/proc/bare_os/*` mirrors for baretop(1). Keys must stay aligned with
|
||||
* `BARE_TOP_SNAPSHOT_PROC_ENTRIES` in packages/bare-os-coreutils/lib/baretop-snapshot.js.
|
||||
* @returns {Promise<{ atMs: number, files: Record<string, string> }>}
|
||||
*/
|
||||
async bareOsReadBareTopSnapshot() {
|
||||
const atMs = Date.now()
|
||||
/** @type {Record<string, string>} */
|
||||
const files = Object.create(null)
|
||||
const entries = [
|
||||
['index', '/proc/bare_os/index.json'],
|
||||
['version', '/proc/bare_os/version'],
|
||||
['hostOs', '/proc/bare_os/host_os.json'],
|
||||
['debug', '/proc/bare_os/debug.json'],
|
||||
['sessionStats', '/proc/bare_os/session_stats'],
|
||||
['quotas', '/proc/bare_os/quotas'],
|
||||
['capabilitiesJson', '/proc/bare_os/capabilities.json'],
|
||||
['capabilitiesNode', '/proc/bare_os/capabilities'],
|
||||
['seedHandshake', '/proc/bare_os/seed_handshake'],
|
||||
['bootstrap', '/proc/bare_os/bootstrap'],
|
||||
['provenance', '/proc/bare_os/provenance'],
|
||||
['snapshotHints', '/proc/bare_os/snapshot_hints.json'],
|
||||
['stagingSlot', '/proc/bare_os/staging_slot'],
|
||||
['peerHealth', '/proc/bare_os/peer_health'],
|
||||
['pearIpc', '/proc/bare_os/pear_ipc.json'],
|
||||
['pearIpcHealth', '/proc/bare_os/pear_ipc_health.json'],
|
||||
['pearTrust', '/proc/bare_os/pear_trust.json'],
|
||||
['replication', '/proc/bare_os/replication'],
|
||||
['replicationBackpressure', '/proc/bare_os/replication_backpressure.json'],
|
||||
['swarm', '/proc/bare_os/swarm'],
|
||||
['syncWindow', '/proc/bare_os/sync_window.json'],
|
||||
['hdmsHealth', '/proc/bare_os/hdms_health.json'],
|
||||
['hdmsHints', '/proc/bare_os/hdms_hints.json'],
|
||||
['dhtStatus', '/proc/bare_os/dht_status.json'],
|
||||
['udxExtended', '/proc/bare_os/udx_extended.json'],
|
||||
['ipcBackpressure', '/proc/bare_os/ipc_backpressure.json'],
|
||||
['delegateRed', '/proc/bare_os/delegate_red.json'],
|
||||
['gitDelegateStats', '/proc/bare_os/git_delegate_stats.json'],
|
||||
['gitLfsPointerStats', '/proc/bare_os/git_lfs_pointer_stats.json'],
|
||||
['workerBudget', '/proc/bare_os/worker_budget.json'],
|
||||
['sandboxProfile', '/proc/bare_os/sandbox_profile.json'],
|
||||
['rlimits', '/proc/bare_os/rlimits.json'],
|
||||
['extensions', '/proc/bare_os/extensions.json'],
|
||||
['initdDag', '/proc/bare_os/initd_dag.json']
|
||||
]
|
||||
if (!vfs || typeof vfs.readFile !== 'function') return { atMs, files }
|
||||
const conc = 6
|
||||
for (let i = 0; i < entries.length; i += conc) {
|
||||
const slice = entries.slice(i, i + conc)
|
||||
await Promise.all(
|
||||
slice.map(async ([key, path]) => {
|
||||
try {
|
||||
const buf = await vfs.readFile(path)
|
||||
files[key] =
|
||||
typeof buf === 'string' ? buf : b4a.toString(buf)
|
||||
} catch {
|
||||
files[key] = ''
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
return { atMs, files }
|
||||
},
|
||||
/**
|
||||
* Register `/run/bare-os/virtual/<name>` reader (cap-gated: `virtualRegisterFiles`).
|
||||
* @param {string} name
|
||||
|
||||
@@ -130,6 +130,13 @@ export interface BareOsKernelContext {
|
||||
bareOsIpc?: BareOsIpc
|
||||
bareOsGetResourceStatus(): BareOsResourceStatus
|
||||
bareOsReadProcMetricsLive(): Record<string, unknown>
|
||||
/**
|
||||
* Optional batch `/proc/bare_os/*` read for baretop(1); keys match baretop-snapshot preamble.
|
||||
*/
|
||||
bareOsReadBareTopSnapshot?(): Promise<{
|
||||
atMs: number
|
||||
files: Record<string, string>
|
||||
}>
|
||||
bareOsRegisterVirtualFile(
|
||||
name: string,
|
||||
reader:
|
||||
|
||||
@@ -126,6 +126,8 @@ export function getBareOsPipelineLimits(env) {
|
||||
export function defaultShellAliases() {
|
||||
return {
|
||||
nano: 'edit',
|
||||
top: 'baretop',
|
||||
btop: 'baretop',
|
||||
ll: 'ls -la',
|
||||
la: 'ls -A',
|
||||
l: 'ls',
|
||||
|
||||
@@ -1493,6 +1493,14 @@ test('defaultShellAliases does not remap sed', async (t) => {
|
||||
t.is(defaultShellAliases().sed, undefined)
|
||||
})
|
||||
|
||||
test('defaultShellAliases top maps to baretop', async (t) => {
|
||||
t.is(defaultShellAliases().top, 'baretop')
|
||||
})
|
||||
|
||||
test('defaultShellAliases btop maps to baretop', async (t) => {
|
||||
t.is(defaultShellAliases().btop, 'baretop')
|
||||
})
|
||||
|
||||
test('defaultShellAliases nano maps to edit', async (t) => {
|
||||
t.is(defaultShellAliases().nano, 'edit')
|
||||
t.alike(expandArgvAliases(['nano', 'x'], defaultShellAliases()), [
|
||||
@@ -1761,6 +1769,55 @@ test('runBinCommand edit requires TTY', async (t) => {
|
||||
rmSync(dir, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
test('runBinCommand baretop --help prints usage', async (t) => {
|
||||
const binPath = path.join(__dirname, '../../kernel/bin/baretop')
|
||||
const src = await readFile(binPath, 'utf8')
|
||||
const dir = testCorestoreDir('baretophlp')
|
||||
const store = new Corestore(dir)
|
||||
const drive = new Hyperdrive(store)
|
||||
const personal = new Hyperdrive(store.namespace('bth'))
|
||||
await drive.ready()
|
||||
await personal.ready()
|
||||
await drive.put('/bin/baretop', b4a.from(src))
|
||||
const lines = []
|
||||
const ctx = testCtx(drive, personal)
|
||||
ctx.console = {
|
||||
log: (s) => lines.push(String(s)),
|
||||
error: (...a) => lines.push(a.join(' '))
|
||||
}
|
||||
await runBinCommand(ctx, ['baretop', '--help'])
|
||||
const out = lines.join('\n')
|
||||
t.ok(out.includes('usage:'))
|
||||
t.ok(out.includes('TTY'))
|
||||
t.ok(out.toLowerCase().includes('dashboard'))
|
||||
await store.close()
|
||||
rmSync(dir, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
test('runBinCommand baretop requires TTY', async (t) => {
|
||||
const binPath = path.join(__dirname, '../../kernel/bin/baretop')
|
||||
const src = await readFile(binPath, 'utf8')
|
||||
const dir = testCorestoreDir('baretopntty')
|
||||
const store = new Corestore(dir)
|
||||
const drive = new Hyperdrive(store)
|
||||
const personal = new Hyperdrive(store.namespace('btnt'))
|
||||
await drive.ready()
|
||||
await personal.ready()
|
||||
await drive.put('/bin/baretop', b4a.from(src))
|
||||
const lines = []
|
||||
const ctx = testCtx(drive, personal)
|
||||
ctx.replStdin = { isTTY: false }
|
||||
ctx.console = {
|
||||
log: (s) => lines.push(String(s)),
|
||||
error: (...a) => lines.push(a.join(' '))
|
||||
}
|
||||
await runBinCommand(ctx, ['baretop'])
|
||||
t.is(ctx.exitCode, 1)
|
||||
t.ok(lines.some((l) => l.includes('TTY')))
|
||||
await store.close()
|
||||
rmSync(dir, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
test('runBinCommand nano --help matches edit bundle', async (t) => {
|
||||
const nanoPath = path.join(__dirname, '../../kernel/bin/nano')
|
||||
const nanoSrc = await readFile(nanoPath, 'utf8')
|
||||
|
||||
@@ -33,10 +33,12 @@ Or `node packages/bare-os-coreutils/build.mjs`.
|
||||
|
||||
**Source of truth:** **`lib/commands.mjs`** — **`COREUTILS_COMMANDS`** (imported by **`build.mjs`** and **`scripts/build-man-db.mjs`**). Each name must have **`man/pages/<name>.json`**.
|
||||
|
||||
`arch`, `awk`, `base32`, `base64`, `basename`, `basenc`, `cat`, `chgrp`, `chmod`, `chown`, `cksum`, `clear`, `comm`, `cp`, `crontab`, `curl`, `cut`, `date`, `df`, `dir`, `dirname`, `dircolors`, `du`, `edit`, `echo`, `env`, `exit`, `expand`, `expr`, `factor`, `false`, `find`, `fmt`, `fold`, `getconf`, `git-pear`, `grep`, `groups`, `head`, `hdms`, `help`, `hostid`, `hostname`, `id`, `install`, `join`, `jq`, `ln`, `login`, `logout`, `logname`, `ls`, `man`, `md5sum`, `mkdir`, `mkfifo`, `mktemp`, `mv`, `nano`, `nl`, `nproc`, `numfmt`, `od`, `paste`, `pathchk`, `pr`, `printenv`, `printf`, `pwd`, `readlink`, `realpath`, `rev`, `rm`, `rmdir`, `savevault`, `sed`, `seq`, `sha1sum`, `sha256sum`, `sha512sum`, `shuf`, `sleep`, `sort`, `split`, `stat`, `sum`, `sync`, `tac`, `tail`, `tee`, `test`, `theme`, `time`, `timeout`, `touch`, `tr`, `truncate`, `true`, `tsort`, `tty`, `uname`, `uniq`, `unlink`, `unexpand`, `uptime`, `users`, `vdir`, `wc`, `wget`, `which`, `who`, `whoami`, `xargs`, `yes`
|
||||
`arch`, `awk`, `base32`, `base64`, `basename`, `basenc`, `baretop`, `btop`, `cat`, `chgrp`, `chmod`, `chown`, `cksum`, `clear`, `comm`, `cp`, `crontab`, `curl`, `cut`, `date`, `df`, `dir`, `dirname`, `dircolors`, `du`, `edit`, `echo`, `env`, `exit`, `expand`, `expr`, `factor`, `false`, `find`, `fmt`, `fold`, `getconf`, `git-pear`, `grep`, `groups`, `head`, `hdms`, `help`, `hostid`, `hostname`, `id`, `install`, `join`, `jq`, `ln`, `login`, `logout`, `logname`, `ls`, `man`, `md5sum`, `mkdir`, `mkfifo`, `mktemp`, `mv`, `nano`, `nl`, `nproc`, `numfmt`, `od`, `paste`, `pathchk`, `pr`, `printenv`, `printf`, `pwd`, `readlink`, `realpath`, `rev`, `rm`, `rmdir`, `savevault`, `sed`, `seq`, `sha1sum`, `sha256sum`, `sha512sum`, `shuf`, `sleep`, `sort`, `split`, `stat`, `sum`, `sync`, `tac`, `tail`, `tee`, `test`, `theme`, `time`, `timeout`, `touch`, `tr`, `truncate`, `true`, `tsort`, `tty`, `uname`, `uniq`, `unlink`, `unexpand`, `uptime`, `users`, `vdir`, `wc`, `wget`, `which`, `who`, `whoami`, `xargs`, `yes`
|
||||
|
||||
**`edit`** is a full-screen TTY buffer editor (syntax highlighting, search, save). **`nano`** is built from the same **`src/edit.js`** with the same **`lib/edit-*.js`** preamble; **`/bin/nano`** exists for familiarity, and the stock shell alias **`nano` → `edit`** routes **`nano`** to that utility (see **`packages/bare-os-booter/lib/shell.js`**). Both require a real TTY (**`stdout.isTTY`**).
|
||||
|
||||
**`baretop`** is the stock **`top`** alias target: a multi-tab TTY dashboard over **`/proc/bare_os/*`** (session metrics, Pear, replication, initd, …). **`btop`** is the same bundle as **`/bin/baretop`** (short name); the stock shell alias **`btop` → `baretop`** matches **`nano` → `edit`**. The booter may expose **`ctx.bareOsReadBareTopSnapshot`** to batch-read the same mirrors **`baretop`** would **`vfs.readFile`** individually. Rebuild **`kernel/bin/baretop`** and **`kernel/bin/btop`** after editing **`lib/baretop-snapshot.js`** or **`lib/baretop-tui.js`**.
|
||||
|
||||
**`ls`** prepends **[`bare-os-lscolors`](../bare-os-lscolors/bare-os-lscolors.js)** for **`LS_COLORS`** / dircolors parsing. **`dircolors`** and **`theme`** integrate with the booter’s **`bare-os-theme-presets.js`** (see [docs/themes/README.md](../../docs/themes/README.md)).
|
||||
|
||||
**`grep`** uses JavaScript **`RegExp`** (and **`-F`** fixed strings); POSIX/GNU-like **subset** (including **`-x`**, **`-m`**, **`-o`** among common flags). It is **not** PCRE- or GNU-bit-identical; use **`-F`** when literals must not be treated as regex.
|
||||
|
||||
@@ -32,12 +32,19 @@ const preamble = {
|
||||
'edit-buffer.js',
|
||||
'edit-key-parse.js',
|
||||
'edit-tui.js'
|
||||
],
|
||||
baretop: [
|
||||
'edit-ansi.js',
|
||||
'edit-key-parse.js',
|
||||
'baretop-snapshot.js',
|
||||
'baretop-tui.js'
|
||||
]
|
||||
}
|
||||
|
||||
/** @param {string} binName */
|
||||
function commandSourceFile(binName) {
|
||||
if (binName === 'nano') return 'edit'
|
||||
if (binName === 'btop') return 'baretop'
|
||||
return binName
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
/** Fetch /proc and ctx snapshots for /bin/baretop (preamble; no import). */
|
||||
|
||||
/**
|
||||
* Keep in sync with `bareOsReadBareTopSnapshot` path list in packages/bare-os-booter/index.js
|
||||
* @type {readonly [string, string][]}
|
||||
*/
|
||||
var BARE_TOP_SNAPSHOT_PROC_ENTRIES = [
|
||||
['index', '/proc/bare_os/index.json'],
|
||||
['version', '/proc/bare_os/version'],
|
||||
['hostOs', '/proc/bare_os/host_os.json'],
|
||||
['debug', '/proc/bare_os/debug.json'],
|
||||
['sessionStats', '/proc/bare_os/session_stats'],
|
||||
['quotas', '/proc/bare_os/quotas'],
|
||||
['capabilitiesJson', '/proc/bare_os/capabilities.json'],
|
||||
['capabilitiesNode', '/proc/bare_os/capabilities'],
|
||||
['seedHandshake', '/proc/bare_os/seed_handshake'],
|
||||
['bootstrap', '/proc/bare_os/bootstrap'],
|
||||
['provenance', '/proc/bare_os/provenance'],
|
||||
['snapshotHints', '/proc/bare_os/snapshot_hints.json'],
|
||||
['stagingSlot', '/proc/bare_os/staging_slot'],
|
||||
['peerHealth', '/proc/bare_os/peer_health'],
|
||||
['pearIpc', '/proc/bare_os/pear_ipc.json'],
|
||||
['pearIpcHealth', '/proc/bare_os/pear_ipc_health.json'],
|
||||
['pearTrust', '/proc/bare_os/pear_trust.json'],
|
||||
['replication', '/proc/bare_os/replication'],
|
||||
['replicationBackpressure', '/proc/bare_os/replication_backpressure.json'],
|
||||
['swarm', '/proc/bare_os/swarm'],
|
||||
['syncWindow', '/proc/bare_os/sync_window.json'],
|
||||
['hdmsHealth', '/proc/bare_os/hdms_health.json'],
|
||||
['hdmsHints', '/proc/bare_os/hdms_hints.json'],
|
||||
['dhtStatus', '/proc/bare_os/dht_status.json'],
|
||||
['udxExtended', '/proc/bare_os/udx_extended.json'],
|
||||
['ipcBackpressure', '/proc/bare_os/ipc_backpressure.json'],
|
||||
['delegateRed', '/proc/bare_os/delegate_red.json'],
|
||||
['gitDelegateStats', '/proc/bare_os/git_delegate_stats.json'],
|
||||
['gitLfsPointerStats', '/proc/bare_os/git_lfs_pointer_stats.json'],
|
||||
['workerBudget', '/proc/bare_os/worker_budget.json'],
|
||||
['sandboxProfile', '/proc/bare_os/sandbox_profile.json'],
|
||||
['rlimits', '/proc/bare_os/rlimits.json'],
|
||||
['extensions', '/proc/bare_os/extensions.json'],
|
||||
['initdDag', '/proc/bare_os/initd_dag.json']
|
||||
]
|
||||
|
||||
/** @param {unknown} buf @param {unknown} b4a @returns {string} */
|
||||
function bareTopBufToString(buf, b4a) {
|
||||
if (buf == null) return ''
|
||||
if (typeof buf === 'string') return buf
|
||||
try {
|
||||
if (b4a && typeof b4a.toString === 'function') return b4a.toString(buf)
|
||||
} catch {
|
||||
/* fall through */
|
||||
}
|
||||
try {
|
||||
return new TextDecoder().decode(
|
||||
buf instanceof Uint8Array ? buf : new Uint8Array(/** @type {ArrayLike<number>} */ (buf))
|
||||
)
|
||||
} catch {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
/** @param {string} s @returns {unknown} */
|
||||
function bareTopJsonParse(s) {
|
||||
const t = String(s || '').trim()
|
||||
if (!t) return null
|
||||
try {
|
||||
return JSON.parse(t)
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {string} path
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
async function bareTopReadProc(ctx, path) {
|
||||
const vfs = ctx.vfs
|
||||
if (!vfs || typeof vfs.readFile !== 'function') return ''
|
||||
try {
|
||||
const buf = await vfs.readFile(path)
|
||||
return bareTopBufToString(buf, ctx.b4a)
|
||||
} catch {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {readonly [string, string][]} entries
|
||||
* @param {number} concurrency
|
||||
* @returns {Promise<Record<string, string>>}
|
||||
*/
|
||||
async function bareTopReadProcBatch(ctx, entries, concurrency) {
|
||||
/** @type {Record<string, string>} */
|
||||
const out = {}
|
||||
const conc = Math.max(1, Math.min(16, concurrency | 0) || 6)
|
||||
for (let i = 0; i < entries.length; i += conc) {
|
||||
const slice = entries.slice(i, i + conc)
|
||||
await Promise.all(
|
||||
slice.map(async ([key, path]) => {
|
||||
out[key] = await bareTopReadProc(ctx, path)
|
||||
})
|
||||
)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {unknown} o
|
||||
* @param {number} maxChars
|
||||
* @returns {string}
|
||||
*/
|
||||
function bareTopTruncateJsonPretty(o, maxChars) {
|
||||
const raw = JSON.stringify(o, null, 2)
|
||||
if (raw.length <= maxChars) return raw
|
||||
return raw.slice(0, Math.max(0, maxChars - 24)) + '\n… (truncated) …\n'
|
||||
}
|
||||
|
||||
/** @param {number} n @returns {string} */
|
||||
function bareTopFormatBytes(n) {
|
||||
const x = Number(n)
|
||||
if (!Number.isFinite(x) || x < 0) return '—'
|
||||
if (x < 1024) return String(Math.floor(x)) + ' B'
|
||||
if (x < 1048576) return (x / 1024).toFixed(1) + ' KiB'
|
||||
if (x < 1073741824) return (x / 1048576).toFixed(1) + ' MiB'
|
||||
return (x / 1073741824).toFixed(2) + ' GiB'
|
||||
}
|
||||
|
||||
/** @param {number} ms @returns {string} */
|
||||
function bareTopFormatDuration(ms) {
|
||||
const x = Number(ms)
|
||||
if (!Number.isFinite(x) || x < 0) return '—'
|
||||
if (x < 1000) return String(Math.floor(x)) + ' ms'
|
||||
if (x < 60000) return (x / 1000).toFixed(1) + ' s'
|
||||
if (x < 3600000) return Math.floor(x / 60000) + ' m'
|
||||
return (x / 3600000).toFixed(1) + ' h'
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown> | null} m metrics live
|
||||
* @param {number} peers
|
||||
* @returns {number} 0–100
|
||||
*/
|
||||
function bareTopHealthScore(m, peers) {
|
||||
let score = 72
|
||||
if (m && typeof m.delegateInflight === 'object' && m.delegateInflight) {
|
||||
const o = /** @type {Record<string, unknown>} */ (m.delegateInflight)
|
||||
const n = Object.keys(o).length
|
||||
score -= Math.min(25, n * 3)
|
||||
}
|
||||
if (peers < 0) score -= 5
|
||||
if (score < 0) score = 0
|
||||
if (score > 100) score = 100
|
||||
return score
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} prev
|
||||
* @param {number} value
|
||||
* @param {number} alpha 0–1
|
||||
* @returns {number}
|
||||
*/
|
||||
function bareTopEma(prev, value, alpha) {
|
||||
const a = Math.min(1, Math.max(0, alpha))
|
||||
return prev * (1 - a) + value * a
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {Record<string, string>} files
|
||||
* @param {string} key
|
||||
* @returns {Record<string, unknown> | null}
|
||||
*/
|
||||
function bareTopParsedFile(files, key) {
|
||||
const t = files[key]
|
||||
if (!t) return null
|
||||
const p = bareTopJsonParse(t)
|
||||
return p && typeof p === 'object'
|
||||
? /** @type {Record<string, unknown>} */ (p)
|
||||
: null
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @returns {Promise<Record<string, unknown>>}
|
||||
*/
|
||||
/** One coalesced operator frame; keep VFS read fan-out bounded (batch size + concurrency). */
|
||||
async function bareTopFetchSnapshot(ctx) {
|
||||
const fetchStart = Date.now()
|
||||
let readErr = null
|
||||
const env =
|
||||
ctx.env && typeof ctx.env === 'object'
|
||||
? /** @type {Record<string, string>} */ (ctx.env)
|
||||
: {}
|
||||
const concRaw = parseInt(env.BARE_TOP_FETCH_CONCURRENCY || '6', 10)
|
||||
const concurrency = Number.isFinite(concRaw) ? concRaw : 6
|
||||
|
||||
/** @type {Record<string, string>} */
|
||||
let fileTexts = {}
|
||||
let fastAtMs = 0
|
||||
|
||||
try {
|
||||
if (typeof ctx.bareOsReadBareTopSnapshot === 'function') {
|
||||
const r = await ctx.bareOsReadBareTopSnapshot()
|
||||
if (r && typeof r === 'object') {
|
||||
const o = /** @type {Record<string, unknown>} */ (r)
|
||||
const files = o.files
|
||||
if (files && typeof files === 'object') {
|
||||
for (const k of Object.keys(files)) {
|
||||
const v = files[k]
|
||||
if (typeof v === 'string') fileTexts[k] = v
|
||||
}
|
||||
}
|
||||
const am = o.atMs
|
||||
if (typeof am === 'number' && Number.isFinite(am)) fastAtMs = am
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
readErr = (e && /** @type {{ message?: string }} */ (e).message) || String(e)
|
||||
}
|
||||
|
||||
if (Object.keys(fileTexts).length === 0) {
|
||||
fileTexts = await bareTopReadProcBatch(ctx, BARE_TOP_SNAPSHOT_PROC_ENTRIES, concurrency)
|
||||
}
|
||||
|
||||
const atMs = fastAtMs || Date.now()
|
||||
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let metricsLive = null
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let resources = null
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let features = null
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let netSummary = null
|
||||
/** @type {unknown} */
|
||||
let initdGraph = null
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let fairnessSnapshot = null
|
||||
/** @type {unknown} */
|
||||
let subprocessBridge = null
|
||||
/** @type {Record<string, unknown> | null} */
|
||||
let hostStats = null
|
||||
|
||||
try {
|
||||
if (typeof ctx.bareOsReadProcMetricsLive === 'function') {
|
||||
const o = ctx.bareOsReadProcMetricsLive()
|
||||
if (o && typeof o === 'object') metricsLive = /** @type {Record<string, unknown>} */ (o)
|
||||
}
|
||||
} catch (e) {
|
||||
if (!readErr)
|
||||
readErr = (e && /** @type {{ message?: string }} */ (e).message) || String(e)
|
||||
}
|
||||
|
||||
if (!metricsLive) {
|
||||
const t = await bareTopReadProc(ctx, '/proc/bare_os/metrics_live.json')
|
||||
const p = bareTopJsonParse(t)
|
||||
if (p && typeof p === 'object') metricsLive = /** @type {Record<string, unknown>} */ (p)
|
||||
}
|
||||
|
||||
try {
|
||||
if (typeof ctx.bareOsGetResourceStatus === 'function') {
|
||||
const o = ctx.bareOsGetResourceStatus()
|
||||
if (o && typeof o === 'object') resources = /** @type {Record<string, unknown>} */ (o)
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
if (!resources) {
|
||||
const t = await bareTopReadProc(ctx, '/proc/bare_os_resources')
|
||||
const p = bareTopJsonParse(t)
|
||||
if (p && typeof p === 'object') resources = /** @type {Record<string, unknown>} */ (p)
|
||||
}
|
||||
|
||||
let fp = bareTopJsonParse(await bareTopReadProc(ctx, '/proc/bare_os/features'))
|
||||
if (!fp) fp = bareTopJsonParse(await bareTopReadProc(ctx, '/proc/bare_os_features'))
|
||||
if (fp && typeof fp === 'object') features = /** @type {Record<string, unknown>} */ (fp)
|
||||
|
||||
const netT = await bareTopReadProc(ctx, '/proc/bare_os/net_summary.json')
|
||||
const np = bareTopJsonParse(netT)
|
||||
if (np && typeof np === 'object') netSummary = /** @type {Record<string, unknown>} */ (np)
|
||||
|
||||
const initT = await bareTopReadProc(ctx, '/proc/bare_os/initd_graph.json')
|
||||
initdGraph = bareTopJsonParse(initT)
|
||||
if (initdGraph === null) {
|
||||
const alt = bareTopJsonParse(fileTexts.initdDag || '')
|
||||
initdGraph = alt
|
||||
}
|
||||
|
||||
try {
|
||||
if (typeof ctx.bareOsReadDelegateFairnessSnapshot === 'function') {
|
||||
const o = ctx.bareOsReadDelegateFairnessSnapshot()
|
||||
if (o && typeof o === 'object')
|
||||
fairnessSnapshot = /** @type {Record<string, unknown>} */ (o)
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
try {
|
||||
if (typeof ctx.bareOsReadSubprocessBridgeSnapshot === 'function') {
|
||||
subprocessBridge = ctx.bareOsReadSubprocessBridgeSnapshot()
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
try {
|
||||
const hs = ctx.bareOsHostStats
|
||||
if (hs && typeof hs === 'object') hostStats = /** @type {Record<string, unknown>} */ (hs)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
const memRaw = await bareTopReadProc(ctx, '/proc/meminfo')
|
||||
let meminfoLine = ''
|
||||
for (const line of memRaw.split('\n')) {
|
||||
const L = line.trim()
|
||||
if (L.startsWith('MemTotal:') || L.startsWith('MemAvailable:')) {
|
||||
meminfoLine = L
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!meminfoLine) meminfoLine = memRaw.split('\n')[0]?.trim() || ''
|
||||
|
||||
const loadavgLine = (await bareTopReadProc(ctx, '/proc/loadavg')).split('\n')[0]?.trim() || ''
|
||||
|
||||
let cpuLine = ''
|
||||
const cpuRaw = await bareTopReadProc(ctx, '/proc/cpuinfo')
|
||||
for (const line of cpuRaw.split('\n')) {
|
||||
if (line.startsWith('model name') || line.startsWith('Model')) {
|
||||
cpuLine = line.replace(/^[^:]+:\s*/, '').trim().slice(0, 72)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const hostOs = bareTopParsedFile(fileTexts, 'hostOs')
|
||||
const metaAt =
|
||||
metricsLive && typeof metricsLive.atMs === 'number' ? metricsLive.atMs : atMs
|
||||
|
||||
/** @type {Record<string, Record<string, unknown> | null>} */
|
||||
const extra = {}
|
||||
for (const [key] of BARE_TOP_SNAPSHOT_PROC_ENTRIES) {
|
||||
extra[key] = bareTopParsedFile(fileTexts, key)
|
||||
}
|
||||
|
||||
const fetchWallMs = Date.now() - fetchStart
|
||||
|
||||
return {
|
||||
metricsLive,
|
||||
resources,
|
||||
features,
|
||||
initdGraph,
|
||||
netSummary,
|
||||
meminfoLine,
|
||||
loadavgLine,
|
||||
cpuLine,
|
||||
hostOs,
|
||||
atMs,
|
||||
metaAtMs: metaAt,
|
||||
readErr,
|
||||
fileTexts,
|
||||
extra,
|
||||
fairnessSnapshot,
|
||||
subprocessBridge,
|
||||
hostStats,
|
||||
fetchWallMs,
|
||||
healthScore: bareTopHealthScore(
|
||||
metricsLive,
|
||||
Number(metricsLive && metricsLive.peers) || 0
|
||||
)
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,8 @@
|
||||
export const COREUTILS_COMMANDS = [
|
||||
'arch',
|
||||
'awk',
|
||||
'baretop',
|
||||
'btop',
|
||||
'base32',
|
||||
'base64',
|
||||
'basename',
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "baretop",
|
||||
"section": 1,
|
||||
"title": "baretop",
|
||||
"synopsis": [
|
||||
"baretop [OPTION]..."
|
||||
],
|
||||
"description": "Full-screen terminal dashboard for Bare OS session and kernel-adjacent state. Visually similar to htop, but Bare OS does not expose a Linux-style per-PID process table: the UI focuses on metrics_live session counters, Hyperswarm peers, delegate inflight and rate buckets, pipeline limits, optional ctx snapshots (fairness, subprocess bridge, host stats), and a broad set of /proc/bare_os JSON mirrors (replication, Pear IPC, HDMS, quotas, extensions, etc.). Data is read via ctx.vfs.readFile with optional fast paths ctx.bareOsReadProcMetricsLive, ctx.bareOsGetResourceStatus, and ctx.bareOsReadBareTopSnapshot (booter batch read). Implementation: packages/bare-os-coreutils/src/baretop.js with preamble lib/baretop-snapshot.js and lib/baretop-tui.js (plus edit-ansi.js, edit-key-parse.js).",
|
||||
"options": [],
|
||||
"environment": [
|
||||
"BARE_TOP_INTERVAL_MS — refresh period in ms (default 1000; clamped 250–10000)",
|
||||
"BARE_TOP_UI_MIN_MS — minimum ms between full redraws (0 disables throttling)",
|
||||
"BARE_TOP_FETCH_CONCURRENCY — parallel batch size for extra /proc/bare_os reads (default 6)",
|
||||
"BARE_TOP_NO_ALTSCREEN — any non-empty value disables xterm alternate screen; uses full clear on exit",
|
||||
"BARE_TOP_ASCII_GRAPH — set to 1 for ASCII sparklines instead of Unicode block glyphs",
|
||||
"BARE_TOP_ASCII_UI — set to 1 to bias ASCII fallbacks when LANG suggests plain terminals",
|
||||
"BARE_TOP_BRAILLE_SPARK — set to 1 for braille sparkline glyphs (Unicode)",
|
||||
"BARE_TOP_LOG_SPARK — set to 1 for log-scaled sparkline normalization",
|
||||
"BARE_TOP_EMA_ALPHA — 0–1 exponential smoothing on per-tick deltas (0 = off)",
|
||||
"BARE_TOP_THEME — dark | light | none (SGR palette)",
|
||||
"BARE_TOP_HIGH_CONTRAST — set to 1 for stronger emphasis (bold/underline)",
|
||||
"BARE_TOP_COLOR256 — set to 1 to use 256-color hints for histogram bars when supported",
|
||||
"BARE_TOP_VI_KEYS — set to 1 to enable hjkl navigation in scrollable views",
|
||||
"BARE_TOP_LAYOUT — stacked | even (wide-terminal overview hint)",
|
||||
"BARE_TOP_EXPORT_PATH — path for JSON snapshot export (key e; default /tmp/baretop-snapshot.json)",
|
||||
"BARE_TOP_ICONS — set to 1 for a bullet prefix in the title bar",
|
||||
"NO_COLOR — disable colors",
|
||||
"COLORTERM — consulted with BARE_TOP_COLOR256 for 256-color bar mode"
|
||||
],
|
||||
"diagnostics": [
|
||||
"If the UI leaves garbage on exit, set BARE_TOP_NO_ALTSCREEN=1.",
|
||||
"If Unicode graphs garble, set BARE_TOP_ASCII_GRAPH=1 or BARE_TOP_ASCII_UI=1.",
|
||||
"On very narrow terminals (<80 cols), secondary columns are omitted automatically.",
|
||||
"Diagnostics tab may include /proc/bare_os/debug.json; treat as operator-sensitive and avoid logging in untrusted contexts."
|
||||
],
|
||||
"keywords": [
|
||||
"baretop",
|
||||
"monitor",
|
||||
"metrics",
|
||||
"bare-os",
|
||||
"coreutils",
|
||||
"proc"
|
||||
],
|
||||
"bareOsNotes": "Uses ctx.vfs.readFile on /proc paths; uses ctx.bareOsReadProcMetricsLive, ctx.bareOsGetResourceStatus, ctx.bareOsReadBareTopSnapshot, ctx.bareOsReadDelegateFairnessSnapshot, ctx.bareOsReadSubprocessBridgeSnapshot, and ctx.bareOsHostStats when present. Requires a TTY; integrates with fish suspend/resume and bareOsRegisterSuspendHook/ResumeHook like edit(1). No node: imports in the /bin bundle — use JSON.parse and ctx.b4a only."
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "btop",
|
||||
"section": 1,
|
||||
"title": "btop",
|
||||
"synopsis": [
|
||||
"btop [OPTION]..."
|
||||
],
|
||||
"description": "Short name for baretop(1): the same full-screen session / operator dashboard and /proc/bare_os panels. The /bin bundle is built from packages/bare-os-coreutils/src/baretop.js with the same preamble as baretop. Default shell alias: btop expands to baretop.",
|
||||
"options": [],
|
||||
"seeAlso": [
|
||||
{
|
||||
"name": "baretop",
|
||||
"section": 1
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"btop",
|
||||
"baretop",
|
||||
"monitor",
|
||||
"bare-os",
|
||||
"coreutils"
|
||||
],
|
||||
"bareOsNotes": "Same ctx and TTY requirements as baretop(1)."
|
||||
}
|
||||
@@ -5,16 +5,11 @@
|
||||
"synopsis": [
|
||||
"edit [OPTION]... [OPERAND]..."
|
||||
],
|
||||
"description": "Full-screen terminal editor over the VFS (same binary as nano). Requires a TTY. On exit, restores the main terminal view using the alternate screen (xterm-style ?1049) when supported, or clears the display otherwise. See packages/bare-os-coreutils/src/edit.js and lib/edit-tui.js.",
|
||||
"description": "Bare OS implementation of edit. Full behavior is defined in packages/bare-os-coreutils/src/edit.js.",
|
||||
"options": [],
|
||||
"environment": [
|
||||
"NO_COLOR — disable syntax highlighting colors",
|
||||
"BARE_EDIT_NO_ALTSCREEN — any non-empty value skips alternate-screen mode; exit uses a full display clear instead of ?1049l"
|
||||
],
|
||||
"keywords": [
|
||||
"edit",
|
||||
"bare-os",
|
||||
"coreutils"
|
||||
],
|
||||
"bareOsNotes": "Integrated with the fish-style REPL via suspend/resume around raw TTY mode; teardown runs in a finally block so the cursor and screen state are restored on normal exit."
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"synopsis": [
|
||||
"nano [OPTION]... [OPERAND]..."
|
||||
],
|
||||
"description": "Same full-screen editor as edit(1); built from src/edit.js. See man edit for terminal teardown and environment.",
|
||||
"description": "Bare OS implementation of nano. Full behavior is defined in packages/bare-os-coreutils/src/nano.js.",
|
||||
"options": [],
|
||||
"keywords": [
|
||||
"nano",
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
"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.",
|
||||
"synopsis": [
|
||||
"ssh-keygen [OPTION]... [OPERAND]..."
|
||||
],
|
||||
"description": "Bare OS implementation of ssh-keygen. Full behavior is defined in packages/bare-os-coreutils/src/ssh-keygen.js.",
|
||||
"options": [],
|
||||
"keywords": ["ssh-keygen", "bare-crypto", "bare-os", "coreutils"],
|
||||
"bareOsNotes": "See developer-guide/node-to-bare-modules.md and handbook ch.9."
|
||||
"keywords": [
|
||||
"ssh-keygen",
|
||||
"bare-os",
|
||||
"coreutils"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
"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.",
|
||||
"synopsis": [
|
||||
"tar [OPTION]... [OPERAND]..."
|
||||
],
|
||||
"description": "Bare OS implementation of tar. Full behavior is defined in packages/bare-os-coreutils/src/tar.js.",
|
||||
"options": [],
|
||||
"keywords": ["tar", "xattr", "bare-os", "coreutils"],
|
||||
"bareOsNotes": "Handbook ch.9 — archive operations are not implemented in stock coreutils."
|
||||
"keywords": [
|
||||
"tar",
|
||||
"bare-os",
|
||||
"coreutils"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"description": "Build JS /bin utilities for bare-operating-system (concat + stage to kernel/)",
|
||||
"scripts": {
|
||||
"build": "node ./scripts/ensure-man-pages.mjs && node ./build.mjs",
|
||||
"test": "node ./test/help-bin-list.test.mjs && node ./test/edit-key-parse.test.mjs && node ./test/edit-teardown.test.mjs"
|
||||
"test": "node ./test/help-bin-list.test.mjs && node ./test/edit-key-parse.test.mjs && node ./test/edit-teardown.test.mjs && node ./test/baretop-bundle.test.mjs && node ./test/baretop-fixture.test.mjs"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
async function run(ctx, argv) {
|
||||
const args = argv.slice(1)
|
||||
if (args.includes('-h') || args.includes('--help')) {
|
||||
ctx.console.log(
|
||||
'usage: ' +
|
||||
(argv[0] || 'baretop') +
|
||||
'\n' +
|
||||
'Full-screen session / kernel dashboard (htop-inspired; not a Linux process list).\n' +
|
||||
'Shows metrics_live, peers, delegates, pipeline limits, many /proc/bare_os JSON mirrors,\n' +
|
||||
'and optional ctx fast paths (bareOsReadBareTopSnapshot, fairness, subprocess bridge).\n' +
|
||||
'Requires a TTY.\n' +
|
||||
'\n' +
|
||||
'Tabs: 1 overview 2 initd 3 network 4 features 5 diagnostics 6 operator\n' +
|
||||
' 7 pear 8 catalog 9 keys / help | [ ] cycle tabs 0 = tab 10 (keys)\n' +
|
||||
'\n' +
|
||||
'Environment:\n' +
|
||||
' BARE_TOP_INTERVAL_MS Refresh period (default 1000; clamped 250–10000)\n' +
|
||||
' BARE_TOP_UI_MIN_MS Minimum milliseconds between full redraws (0 = off)\n' +
|
||||
' BARE_TOP_FETCH_CONCURRENCY Parallel /proc reads per batch (default 6)\n' +
|
||||
' BARE_TOP_NO_ALTSCREEN Any non-empty value skips alternate-screen mode\n' +
|
||||
' BARE_TOP_ASCII_GRAPH Set to 1 for ASCII sparklines\n' +
|
||||
' BARE_TOP_ASCII_UI Set to 1 to prefer ASCII box/spark fallbacks\n' +
|
||||
' BARE_TOP_BRAILLE_SPARK Set to 1 for braille sparkline glyphs\n' +
|
||||
' BARE_TOP_LOG_SPARK Set to 1 for log-scaled sparklines\n' +
|
||||
' BARE_TOP_EMA_ALPHA 0–1 smoothing for delta samples (0 = off)\n' +
|
||||
' BARE_TOP_THEME dark | light | none\n' +
|
||||
' BARE_TOP_HIGH_CONTRAST Set to 1 for bold/underline emphasis\n' +
|
||||
' BARE_TOP_COLOR256 Set to 1 to force 256-color bar hints\n' +
|
||||
' BARE_TOP_VI_KEYS Set to 1 for hjkl navigation in lists\n' +
|
||||
' BARE_TOP_LAYOUT stacked | even (wide overview layout hint)\n' +
|
||||
' BARE_TOP_EXPORT_PATH JSON export target for the e key\n' +
|
||||
' BARE_TOP_ICONS Set to 1 for bullet prefix in title\n' +
|
||||
' NO_COLOR Disable ANSI colors\n' +
|
||||
'\n' +
|
||||
'Keys: q quit r refresh+burst sp pause . step d delta e export f fullscreen\n' +
|
||||
' t UTC clock / filter initd [ ] tabs h/? help\n' +
|
||||
'\n' +
|
||||
'Contributors: /bin bundles cannot use node:crypto or node:module; use ctx.vfs and\n' +
|
||||
'JSON.parse only. See holepunch-repos/docs/05-BARE-RUNTIME.md (Bare module stack).'
|
||||
)
|
||||
return
|
||||
}
|
||||
const stdin = ctx.replStdin
|
||||
const stdout = ctx.replStdout || ctx.stdout
|
||||
if (!stdin || !/** @type {{ isTTY?: boolean }} */ (stdin).isTTY) {
|
||||
ctx.console.error('baretop: a terminal (TTY) is required')
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
}
|
||||
if (!stdout) {
|
||||
ctx.console.error('baretop: missing stdout')
|
||||
ctx.exitCode = 1
|
||||
return
|
||||
}
|
||||
await bareOsRunBareTopTui(ctx)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import test from 'brittle'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const tuiPath = join(__dirname, '../lib/baretop-tui.js')
|
||||
const kernelBaretop = join(__dirname, '../../../kernel/bin/baretop')
|
||||
const kernelBtop = join(__dirname, '../../../kernel/bin/btop')
|
||||
|
||||
test('baretop-tui uses alternate screen teardown pattern', async (t) => {
|
||||
const src = await readFile(tuiPath, 'utf8')
|
||||
t.ok(src.includes('[?1049h'), 'expected alternate-screen enter')
|
||||
t.ok(src.includes('[?1049l'), 'expected alternate-screen leave in finally')
|
||||
t.ok(src.includes('BARE_TOP_NO_ALTSCREEN'), 'expected env gate')
|
||||
t.ok(
|
||||
(src.match(/\\x1b\[2J\\x1b\[H/g) || []).length >= 1,
|
||||
'expected full clear fallback in finally'
|
||||
)
|
||||
})
|
||||
|
||||
test('shipped kernel/bin/baretop includes snapshot + TUI', async (t) => {
|
||||
const bin = await readFile(kernelBaretop, 'utf8')
|
||||
t.ok(bin.includes('bareTopFetchSnapshot'), 'expected snapshot in bundle')
|
||||
t.ok(bin.includes('bareOsRunBareTopTui'), 'expected TUI runner in bundle')
|
||||
t.ok(bin.includes('[?1049l'), 'expected teardown in bundle')
|
||||
t.ok(bin.includes('BARE_TOP_THEME'), 'expected theme env in bundle')
|
||||
t.ok(bin.includes('bareTopStrings'), 'expected i18n string table in bundle')
|
||||
t.ok(bin.includes('SIGWINCH'), 'expected resize hook in bundle')
|
||||
})
|
||||
|
||||
test('shipped kernel/bin/btop matches baretop bundle', async (t) => {
|
||||
const a = await readFile(kernelBaretop, 'utf8')
|
||||
const b = await readFile(kernelBtop, 'utf8')
|
||||
t.is(a, b, 'btop should be same concatenated bundle as baretop')
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
import test from 'brittle'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const fixturePath = join(__dirname, 'fixtures/baretop-sample-metrics.json')
|
||||
const snapPath = join(__dirname, '../lib/baretop-snapshot.js')
|
||||
|
||||
test('fixture metrics_live-shaped JSON parses with expected keys', async (t) => {
|
||||
const raw = await readFile(fixturePath, 'utf8')
|
||||
const o = JSON.parse(raw)
|
||||
t.ok(o && typeof o.session === 'object')
|
||||
t.is(Number(o.session.execLineCount), 42)
|
||||
t.ok(typeof o.delegateInflight === 'object')
|
||||
})
|
||||
|
||||
test('baretop-snapshot preamble lists batch proc entries', async (t) => {
|
||||
const src = await readFile(snapPath, 'utf8')
|
||||
t.ok(src.includes('BARE_TOP_SNAPSHOT_PROC_ENTRIES'))
|
||||
t.ok(src.includes("'/proc/bare_os/index.json'"))
|
||||
t.ok(src.includes('bareOsReadBareTopSnapshot'))
|
||||
t.ok(src.includes('bareTopHealthScore'))
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"schema": 2,
|
||||
"atMs": 1700000000000,
|
||||
"session": {
|
||||
"execLineCount": 42,
|
||||
"pipelineBytesTotal": 8192,
|
||||
"execLineWallMsTotal": 1500
|
||||
},
|
||||
"peers": 3,
|
||||
"pipeline": { "maxBytes": 1048576, "maxDepth": 8 },
|
||||
"delegateInflight": { "http": 1, "dns": 0 },
|
||||
"delegateRateBuckets": { "http": [1, 0, 2] }
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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 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"
|
||||
var BARE_OS_HELP_BIN_SPACED = "arch awk baretop base32 base64 basename basenc btop 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: ' +
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"bundles": [
|
||||
{
|
||||
"path": "/lib/bare/bundles/safetyCatch.js",
|
||||
"keys": [
|
||||
"safetyCatch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/b4a.js",
|
||||
"keys": [
|
||||
"b4a"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/safetyCatch.js",
|
||||
"keys": [
|
||||
"safetyCatch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/hypercoreIdEncoding.js",
|
||||
"keys": [
|
||||
@@ -37,6 +37,12 @@
|
||||
"bareUrl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEvents.js",
|
||||
"keys": [
|
||||
"bareEvents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEncoding.js",
|
||||
"keys": [
|
||||
@@ -49,12 +55,6 @@
|
||||
"barePath"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareEvents.js",
|
||||
"keys": [
|
||||
"bareEvents"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAbort.js",
|
||||
"keys": [
|
||||
@@ -67,18 +67,18 @@
|
||||
"bareAbortController"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareReadline.js",
|
||||
"keys": [
|
||||
"bareReadline"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAnsiEscapes.js",
|
||||
"keys": [
|
||||
"bareAnsiEscapes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAddonResolve.js",
|
||||
"keys": [
|
||||
@@ -91,6 +91,18 @@
|
||||
"bareCrypto"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAppKit.js",
|
||||
"keys": [
|
||||
"bareAppKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAssert.js",
|
||||
"keys": [
|
||||
"bareAssert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAsyncHooks.js",
|
||||
"keys": [
|
||||
@@ -103,24 +115,12 @@
|
||||
"bareApk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAssert.js",
|
||||
"keys": [
|
||||
"bareAssert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAtomics.js",
|
||||
"keys": [
|
||||
"bareAtomics"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareAppKit.js",
|
||||
"keys": [
|
||||
"bareAppKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/fetch.js",
|
||||
"keys": [
|
||||
@@ -145,18 +145,18 @@
|
||||
"bareBundleCompile"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBuffer.js",
|
||||
"keys": [
|
||||
"bareBuffer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBluetoothApple.js",
|
||||
"keys": [
|
||||
"bareBluetoothApple"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBuffer.js",
|
||||
"keys": [
|
||||
"bareBuffer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleEvaluate.js",
|
||||
"keys": [
|
||||
@@ -175,18 +175,18 @@
|
||||
"bareBoot"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDaemon.js",
|
||||
"keys": [
|
||||
"bareDaemon"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareBundleId.js",
|
||||
"keys": [
|
||||
"bareBundleId"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDebugLog.js",
|
||||
"keys": [
|
||||
@@ -223,12 +223,6 @@
|
||||
"bareEnv"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareCov.js",
|
||||
"keys": [
|
||||
@@ -236,15 +230,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDgram.js",
|
||||
"path": "/lib/bare/bundles/bareExif.js",
|
||||
"keys": [
|
||||
"bareDgram"
|
||||
"bareExif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFfmpegEncodings.js",
|
||||
"path": "/lib/bare/bundles/bareDgram.js",
|
||||
"keys": [
|
||||
"bareFfmpegEncodings"
|
||||
"bareDgram"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -259,18 +253,36 @@
|
||||
"bareFormat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFfmpegEncodings.js",
|
||||
"keys": [
|
||||
"bareFfmpegEncodings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareGif.js",
|
||||
"keys": [
|
||||
"bareGif"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFileLogger.js",
|
||||
"keys": [
|
||||
"bareFileLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFormData.js",
|
||||
"keys": [
|
||||
"bareFormData"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHrtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHeif.js",
|
||||
"keys": [
|
||||
@@ -283,18 +295,6 @@
|
||||
"bareGtk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHrtime.js",
|
||||
"keys": [
|
||||
"bareHrtime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareFileLogger.js",
|
||||
"keys": [
|
||||
"bareFileLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttpParser.js",
|
||||
"keys": [
|
||||
@@ -307,12 +307,6 @@
|
||||
"bareFs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIco.js",
|
||||
"keys": [
|
||||
"bareIco"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareImageResample.js",
|
||||
"keys": [
|
||||
@@ -320,9 +314,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttp1.js",
|
||||
"path": "/lib/bare/bundles/bareIco.js",
|
||||
"keys": [
|
||||
"bareHttp1"
|
||||
"bareIco"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -331,24 +325,18 @@
|
||||
"bareInspect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttp1.js",
|
||||
"keys": [
|
||||
"bareHttp1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareHttps.js",
|
||||
"keys": [
|
||||
"bareHttps"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIntl.js",
|
||||
"keys": [
|
||||
"bareIntl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareIpc.js",
|
||||
"keys": [
|
||||
"bareIpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareJpeg.js",
|
||||
"keys": [
|
||||
@@ -356,15 +344,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLogger.js",
|
||||
"path": "/lib/bare/bundles/bareIpc.js",
|
||||
"keys": [
|
||||
"bareLogger"
|
||||
"bareIpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspector.js",
|
||||
"path": "/lib/bare/bundles/bareIntl.js",
|
||||
"keys": [
|
||||
"bareInspector"
|
||||
"bareIntl"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -373,12 +361,24 @@
|
||||
"bareLief"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLogger.js",
|
||||
"keys": [
|
||||
"bareLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareLink.js",
|
||||
"keys": [
|
||||
"bareLink"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareInspector.js",
|
||||
"keys": [
|
||||
"bareInspector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMake.js",
|
||||
"keys": [
|
||||
@@ -397,6 +397,12 @@
|
||||
"bareModuleLexer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMedia.js",
|
||||
"keys": [
|
||||
"bareMedia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareModule.js",
|
||||
"keys": [
|
||||
@@ -427,18 +433,6 @@
|
||||
"bareNodeFetch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNet.js",
|
||||
"keys": [
|
||||
"bareNet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareMedia.js",
|
||||
"keys": [
|
||||
"bareMedia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareOpen.js",
|
||||
"keys": [
|
||||
@@ -452,15 +446,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePerformance.js",
|
||||
"path": "/lib/bare/bundles/bareNet.js",
|
||||
"keys": [
|
||||
"barePerformance"
|
||||
"bareNet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"path": "/lib/bare/bundles/barePerformance.js",
|
||||
"keys": [
|
||||
"bareNodeRuntime"
|
||||
"barePerformance"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -475,6 +469,12 @@
|
||||
"barePackDrive"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDev.js",
|
||||
"keys": [
|
||||
"bareDev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePng.js",
|
||||
"keys": [
|
||||
@@ -482,9 +482,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePipe.js",
|
||||
"path": "/lib/bare/bundles/bareNodeRuntime.js",
|
||||
"keys": [
|
||||
"barePipe"
|
||||
"bareNodeRuntime"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -500,9 +500,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareDev.js",
|
||||
"path": "/lib/bare/bundles/barePipe.js",
|
||||
"keys": [
|
||||
"bareDev"
|
||||
"barePipe"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -541,6 +541,12 @@
|
||||
"bareSdl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSemver.js",
|
||||
"keys": [
|
||||
@@ -553,18 +559,6 @@
|
||||
"bareRpc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/barePromClient.js",
|
||||
"keys": [
|
||||
"barePromClient"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareRepl.js",
|
||||
"keys": [
|
||||
@@ -572,9 +566,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSidecar.js",
|
||||
"path": "/lib/bare/bundles/bareRun.js",
|
||||
"keys": [
|
||||
"bareSidecar"
|
||||
"bareRun"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -590,9 +584,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"path": "/lib/bare/bundles/bareSidecar.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
"bareSidecar"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -607,36 +601,24 @@
|
||||
"bareStorage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSvg.js",
|
||||
"keys": [
|
||||
"bareSvg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStdio.js",
|
||||
"keys": [
|
||||
"bareStdio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSubprocess.js",
|
||||
"keys": [
|
||||
"bareSubprocess"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareStructuredClone.js",
|
||||
"keys": [
|
||||
"bareStructuredClone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSystemLogger.js",
|
||||
"keys": [
|
||||
"bareSystemLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTiff.js",
|
||||
"keys": [
|
||||
"bareTiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTap.js",
|
||||
"keys": [
|
||||
@@ -644,15 +626,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTimers.js",
|
||||
"path": "/lib/bare/bundles/bareStructuredClone.js",
|
||||
"keys": [
|
||||
"bareTimers"
|
||||
"bareStructuredClone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareThread.js",
|
||||
"path": "/lib/bare/bundles/bareTiff.js",
|
||||
"keys": [
|
||||
"bareThread"
|
||||
"bareTiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareSubprocess.js",
|
||||
"keys": [
|
||||
"bareSubprocess"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -661,12 +649,24 @@
|
||||
"bareTpl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTimers.js",
|
||||
"keys": [
|
||||
"bareTimers"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTcp.js",
|
||||
"keys": [
|
||||
"bareTcp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareThread.js",
|
||||
"keys": [
|
||||
"bareThread"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareType.js",
|
||||
"keys": [
|
||||
@@ -679,12 +679,6 @@
|
||||
"bareTls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUiKit.js",
|
||||
"keys": [
|
||||
@@ -692,9 +686,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUnpack.js",
|
||||
"path": "/lib/bare/bundles/bareTty.js",
|
||||
"keys": [
|
||||
"bareUnpack"
|
||||
"bareTty"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -704,15 +698,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareVm.js",
|
||||
"path": "/lib/bare/bundles/bareUnpack.js",
|
||||
"keys": [
|
||||
"bareVm"
|
||||
"bareUnpack"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWalkHandles.js",
|
||||
"path": "/lib/bare/bundles/bareVm.js",
|
||||
"keys": [
|
||||
"bareWalkHandles"
|
||||
"bareVm"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -722,9 +716,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareUtils.js",
|
||||
"path": "/lib/bare/bundles/bareWalkHandles.js",
|
||||
"keys": [
|
||||
"bareUtils"
|
||||
"bareWalkHandles"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -733,18 +727,6 @@
|
||||
"bareWebKit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"keys": [
|
||||
"bareV8ToIstanbul"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWhich.js",
|
||||
"keys": [
|
||||
"bareWhich"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWebp.js",
|
||||
"keys": [
|
||||
@@ -758,9 +740,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"path": "/lib/bare/bundles/bareUtils.js",
|
||||
"keys": [
|
||||
"bareWinUi"
|
||||
"bareUtils"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareV8ToIstanbul.js",
|
||||
"keys": [
|
||||
"bareV8ToIstanbul"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWhich.js",
|
||||
"keys": [
|
||||
"bareWhich"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -769,6 +763,12 @@
|
||||
"bareXdiff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareWinUi.js",
|
||||
"keys": [
|
||||
"bareWinUi"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/lib/bare/bundles/bareZlib.js",
|
||||
"keys": [
|
||||
@@ -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