Orginize
This commit is contained in:
@@ -13,7 +13,7 @@ Workspace package bump after coreutils hardening (self-copy/`rm`/`touch`/`trunca
|
||||
- **`bare-openssh` + `bare-os-ssh-holesail.js**` — Stock managed row `**bare-ssh-<port>**` in the **same** **`state.json`** after sshd **`listen`**; **`BARE_OS_SSH_HOLESAIL=0`** disables auto-merge. Post-login ensure in **`bare-user-session-stack.js`** if sshd started before **`bare-holesail`**.
|
||||
- **Managed Holesail (`bare-holesail-managed.js`)** — Default **`BARE_OS_HOLESAIL_STATE`** is `**~/.holesail/state.json**` (logical; legacy `**/.bare/holesail/*.json**` merged when empty). **Server** rows persist **`seed`** (64-hex or z32 ctor material) and **`key`** (full `**hs://…**` after `**ready()`**). Second service pass starts **onlyNew** tunnels after a yield. Handbook [ch.4 — The booter runtime](../../handbook/04-the-booter-runtime.md) (**§ bare-holesail**).
|
||||
- **Shell completion / Fish REPL:** canonical documentation is `[docs/reference/shell-completion-and-repl-editor.md](../../docs/reference/shell-completion-and-repl-editor.md)` (engine in **`lib/completion-engine.js`**, UI in **`lib/fish-readline.js`**, **`BARE_OS_FISH`**, **`BARE_OS_COMPACT_MENU`**).
|
||||
- `**baretop` snapshot**: **`ctx.bareOsReadBareTopSnapshot({ lite: true })`** returns a reduced **`files`** map (see **`BARE_TOP_SNAPSHOT_LITE_ENTRIES`** in **`packages/bare-os-coreutils/lib/baretop-snapshot.js`**). Full batch includes **`securityPosture`** → **`/proc/bare_os/security_posture.json`**. **`metrics_live`** JSON uses **`schema: 4`** with embedded **`processTable`** when present; kernel counters include optional **`vfs.readfile.samples`** ( **`BARE_OS_VFS_READ_METRICS`** ), **`initd.unit_failed_final`**, and **`shell.pipeline_last_stages`** gauge from the shell.
|
||||
- `**baretop` snapshot**: **`ctx.bareOsReadBareTopSnapshot({ lite: true })`** returns a reduced **`files`** map (see **`BARE_TOP_SNAPSHOT_LITE_ENTRIES`** in **`packages/bare-os-coreutils/lib/baretop/baretop-snapshot.js`**). Full batch includes **`securityPosture`** → **`/proc/bare_os/security_posture.json`**. **`metrics_live`** JSON uses **`schema: 4`** with embedded **`processTable`** when present; kernel counters include optional **`vfs.readfile.samples`** ( **`BARE_OS_VFS_READ_METRICS`** ), **`initd.unit_failed_final`**, and **`shell.pipeline_last_stages`** gauge from the shell.
|
||||
- **`/proc/bare_os/net_summary.json`**: `**schemaVersion` 2** adds scalar **`replicationQueueDepth`**, firewall session totals, optional **`BARE_OS_BSD_SOCKET_BRIDGE_STATS_JSON`** merge into **`bsdSocketGuestBridge`**; **`peer_firewall_stats`** field alignment documented in **`bare-os-protocol`** channel handler.
|
||||
- **Holepunch stack (2026-08)**: workspace pins **`compact-encoding` 3**, **`bare-fetch` / `bare-tls` / `bare-https` / `bare-ws` 3**, **`bare-subprocess` 6**, **`bare-signals` 5**, **`corestore` 7.12**, **`protomux` 3.11**, **`hypercore-crypto` 3.7**, **`bare-os` 3.9**, **`bare-fs` 4.8**. Identity / **`ssh-keygen`** use **`KeyObject.export()`**. Corestore **`suspend()`** flushes sessions first; ctor **`treeCache`**. Chat waits for **`fullyOpened()`**. Host **`/proc/bare_os/host_os.json`** schema **2**; **`/proc/bare_os_resources` `statvfs`** schema **3** (**`hostStatfs`**). **`bareOsTrySpawnHostSubprocess`** optional IPC. Catalog sync preserves **`pearEntries`**.
|
||||
- **Host filesystem**: first-party booter and seeder sources use **`import … from '#host-fs'`** / **`#host-path`** (and seeder **`#host-fs-promises`**) so Bare resolves **`bare-fs`** / **`bare-path`** and Node resolves the built-in **`fs`** / **`path`** modules via the default **`imports`** condition. **`bare-fs`** is a direct **`dependencies`** entry of **`bare-os-booter`**. CI: **`scripts/verify-pear-no-static-node-import.mjs`** rejects bare **`fs`** / **`path`** specifiers.
|
||||
@@ -24,7 +24,7 @@ Workspace package bump after coreutils hardening (self-copy/`rm`/`touch`/`trunca
|
||||
- **Vendored bundles**: post-esbuild **`scripts/sanitize-bare-bundles.mjs`** (from **`bare-os-bare-libs/build.mjs`**) strips CI-forbidden markers and replaces **`node:`** requires in **`bareDev.js`** with `**bare-*`** modules.
|
||||
- **Boot hooks (naming)**: canonical **`bareOsRegisterBootStepHook`**, **`bareOsInvokeBootStepHooks`**, **`bareOsEmitBareBootStepHint`**; legacy `***BootPhase*`** methods remain thin wrappers (**no `bareOsCtxApiVersion` bump**). See [docs/reference/naming-alias-matrix.md](../../docs/reference/naming-alias-matrix.md).
|
||||
- **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, metricsLiveText }`** (**`metricsLiveText`** = coalesced **`metrics_live`** JSON string) with the same **`files`** 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.
|
||||
- **`baretop`**: optional **`ctx.bareOsReadBareTopSnapshot()`** in `[index.js](index.js)` returns **`{ atMs, files, metricsLiveText }`** (**`metricsLiveText`** = coalesced **`metrics_live`** JSON string) with the same **`files`** keys as **`BARE_TOP_SNAPSHOT_PROC_ENTRIES`** in **`packages/bare-os-coreutils/lib/baretop/baretop-snapshot.js`** — keep those lists in sync when adding operator **`/proc/bare_os`** nodes.
|
||||
- **hrpc allowlist**: shared parser in `[lib/bare-os-hrpc-allowlist.js](lib/bare-os-hrpc-allowlist.js)`; **`ctx.bareOsHrpcRequest`** and **`ctx.bareOsHrpcAllowlistProbe`** stay aligned. Host passthrough copies **`BARE_OS_HRPC_ALLOWLIST_JSON`**, **`BARE_OS_CORESTORE_SNAPSHOT_WORKFLOW_JSON`**, **`BARE_OS_BLIND_RELAY_TOPOLOGY_JSON`**, **`BARE_OS_MIRROR_DRIVE_COMPOSITION_HINT_JSON`**, **`BARE_OS_REPLICATION_PLAN_JSON`**, and pear-doctor env keys into session env.
|
||||
- **Snapshot hints**: **`ctx.bareOsReadSnapshotHintsJson()`** merges **`BARE_OS_CORESTORE_SNAPSHOT_WORKFLOW_JSON`** like **`/proc/bare_os/snapshot_hints.json`**.
|
||||
- **Pipeline / IPC / rlimits tuning** — Simulated pipeline capture honors **`BARE_OS_PIPELINE_ABS_MAX_BYTES`** / **`BARE_OS_PIPELINE_ABS_MAX_LINES`** (defaults **512 MiB** / **2 000 000** lines after the streaming multiplier). When the host leaves pipeline keys unset, the stock booter seeds **`BARE_OS_SHELL_STREAMING=1`**, **`BARE_OS_SHELL_STREAMING_MULT=2`**, **`BARE_OS_PIPELINE_MAX_BYTES`** (**512 MiB**), **`BARE_OS_PIPELINE_MAX_LINES`** (**2 000 000**). When the host leaves **`BARE_OS_INITD_MAX_PARALLEL`**, **`BARE_OS_SHELL_CMDSUBST`**, **`BARE_OS_VFS_BIN_CACHE`**, and **`BARE_OS_TELEMETRY_NDJSON`** unset, the booter seeds **`4`**, **`1`**, **`1`**, and **`/var/log/bare-os/telemetry.ndjson`** respectively (**`BARE_OS_AUDIT`** / **`BARE_OS_AUDIT_JSON`** remain off unless set). Host passthrough includes **`BARE_OS_IPC_MAX_CHANNELS`**, POSIX MQ defaults (**`BARE_OS_POSIX_MQ_MAX_MSGS`**, **`BARE_OS_POSIX_MQ_MSG_BYTES`**), **`BARE_OS_VFS_MAX_OPEN`** → **`/proc/bare_os/rlimits.json`** **`RLIMIT_NOFILE`**, and convenience aliases **`BARE_OS_STREAMING_MULTIPLIER`**, **`BARE_OS_TIMER_BUDGET_MS`**, **`BARE_OS_TELEMETRY_OTEL`**. See [environment appendix §14](../../docs/reference/environment-and-posix-appendix.md#14-environment-variables-complete-list) and [developer guide ch.11](../../developer-guide/11-kernel-pear-cookbook.md).
|
||||
|
||||
+119
-119
@@ -5,7 +5,7 @@ import b4a from 'b4a'
|
||||
import safetyCatch from 'safety-catch'
|
||||
import Hyperdrive from 'hyperdrive'
|
||||
import Corestore from 'corestore'
|
||||
import './lib/bare-os-host-ota-boot.mjs'
|
||||
import './lib/host/bare-os-host-ota-boot.mjs'
|
||||
import fs from '#host-fs'
|
||||
import path from '#host-path'
|
||||
import {
|
||||
@@ -45,100 +45,100 @@ import {
|
||||
BARE_OS_POSIX_PROFILE_REFERENCE,
|
||||
BARE_OS_PROTOMUX_CHANNEL_SCHEMA_VERSION
|
||||
} from 'bare-os-protocol'
|
||||
import { SwarmDisk } from './lib/swarm-disk.js'
|
||||
import { SwarmDisk } from './lib/p2p/swarm-disk.js'
|
||||
import {
|
||||
bareOsInstallCorestoreSuspendResumeHooks,
|
||||
bareOsRegisterCorestoreSuspendResumeHooks,
|
||||
bareOsCorestoreSnapshotOperatorHint
|
||||
} from './lib/corestore-host-lifecycle.js'
|
||||
import { bareOsCorestoreConstructOpts } from './lib/corestore-opts.js'
|
||||
import { BareOsSwarmConnectionManager } from './lib/bare-os-swarm-connection-manager.js'
|
||||
import { createBareOsProtomuxAliasRegistry } from './lib/bare-os-protomux-alias-registry.js'
|
||||
} from './lib/host/corestore-host-lifecycle.js'
|
||||
import { bareOsCorestoreConstructOpts } from './lib/host/corestore-opts.js'
|
||||
import { BareOsSwarmConnectionManager } from './lib/p2p/bare-os-swarm-connection-manager.js'
|
||||
import { createBareOsProtomuxAliasRegistry } from './lib/p2p/bare-os-protomux-alias-registry.js'
|
||||
import {
|
||||
runKernelFromSource,
|
||||
runBinCommand,
|
||||
runUserScriptFromSource
|
||||
} from './lib/kernel-runner.js'
|
||||
import { attachBareOsTuiSdk } from './lib/bare-os-tui-sdk.js'
|
||||
} from './lib/boot/kernel-runner.js'
|
||||
import { attachBareOsTuiSdk } from './lib/services/bare-os-tui-sdk.js'
|
||||
import {
|
||||
bareOsIrcHostAllowed,
|
||||
bareOsIrcPlaintextAllowed
|
||||
} from './lib/bare-os-irc-policy.js'
|
||||
} from './lib/services/bare-os-irc-policy.js'
|
||||
import {
|
||||
bareOsHyperswarmOptsFromEnv,
|
||||
bareOsBootJoinPeerHexFromEnv,
|
||||
bareOsProtomuxTuningFromEnv
|
||||
} from './lib/swarm-opts.js'
|
||||
} from './lib/p2p/swarm-opts.js'
|
||||
import {
|
||||
bareOsBootInitPrefetchEnabled,
|
||||
bareOsBootWarmBinDownloadDiffEnabled
|
||||
} from './lib/boot-prefetch.js'
|
||||
import { runCurlCli } from './lib/curl-cli.js'
|
||||
import { runWgetCli } from './lib/wget-cli.js'
|
||||
import { runOpensslCli } from './lib/openssl-cli.js'
|
||||
import { runSshKeygenCli } from './lib/ssh-keygen-cli.js'
|
||||
import { runTarCli } from './lib/tar-cli.js'
|
||||
import { runSystemctlCli } from './lib/systemctl-cli.js'
|
||||
import { runHolesailCli } from './lib/holesail-cli.js'
|
||||
import { createBareOsDiskOsBridge } from './lib/bare-os-disk-os-bridge.js'
|
||||
} from './lib/boot/boot-prefetch.js'
|
||||
import { runCurlCli } from './lib/tools/curl-cli.js'
|
||||
import { runWgetCli } from './lib/tools/wget-cli.js'
|
||||
import { runOpensslCli } from './lib/tools/openssl-cli.js'
|
||||
import { runSshKeygenCli } from './lib/services/ssh-keygen-cli.js'
|
||||
import { runTarCli } from './lib/tools/tar-cli.js'
|
||||
import { runSystemctlCli } from './lib/initd/systemctl-cli.js'
|
||||
import { runHolesailCli } from './lib/p2p/holesail-cli.js'
|
||||
import { createBareOsDiskOsBridge } from './lib/host/bare-os-disk-os-bridge.js'
|
||||
import {
|
||||
buildPeerSeedSnapshots,
|
||||
computePeerSystemSeedEligibility,
|
||||
peerSystemSeedExplicitAffirmative
|
||||
} from './lib/bare-os-peer-system-seed.js'
|
||||
import { buildBareOsHyperbeeGuestHint } from './lib/bare-os-hyperbee-guest-hint.js'
|
||||
import { invokeBareOsPearUpdaterDelegate } from './lib/bare-os-pear-updater-bridge.js'
|
||||
} from './lib/p2p/bare-os-peer-system-seed.js'
|
||||
import { buildBareOsHyperbeeGuestHint } from './lib/tools/bare-os-hyperbee-guest-hint.js'
|
||||
import { invokeBareOsPearUpdaterDelegate } from './lib/tools/bare-os-pear-updater-bridge.js'
|
||||
import { verifyBootManifestEd25519 } from '#bare-os-boot-manifest-sig'
|
||||
import {
|
||||
verifyPathCapabilityEnvelope,
|
||||
verifyPathCapabilityEnvelopeTrusted
|
||||
} from './lib/bare-os-path-capability.js'
|
||||
import { getBareInitdJournalNdjson } from './lib/bare-initd-journal.js'
|
||||
import { createBareOsSandboxContext } from './lib/bare-os-sandbox.js'
|
||||
} from './lib/security/bare-os-path-capability.js'
|
||||
import { getBareInitdJournalNdjson } from './lib/initd/bare-initd-journal.js'
|
||||
import { createBareOsSandboxContext } from './lib/security/bare-os-sandbox.js'
|
||||
import {
|
||||
bareOsHyperdriveDiffCollect as collectBareOsHyperdriveDiff,
|
||||
bareOsVfsBatchPut,
|
||||
classifyBareOsVfsPathClass,
|
||||
createVfs
|
||||
} from './lib/vfs.js'
|
||||
import { buildBareOsBareRuntimeProtoMuxProcJson } from './lib/bare-os-proc-bare-runtime-proto-mux.js'
|
||||
import { buildBareOsBareModuleCryptoStagingProcJson } from './lib/bare-os-proc-bare-module-crypto-staging.js'
|
||||
import { buildBareOsPearInspectLoggerTlsProcJson } from './lib/bare-os-proc-pear-inspect-logger-tls.js'
|
||||
import { buildBareOsHypercorePackHrpcLifecycleProcJson } from './lib/bare-os-proc-hypercore-pack-hrpc-lifecycle.js'
|
||||
} from './lib/vfs/vfs.js'
|
||||
import { buildBareOsBareRuntimeProtoMuxProcJson } from './lib/proc/bare-os-proc-bare-runtime-proto-mux.js'
|
||||
import { buildBareOsBareModuleCryptoStagingProcJson } from './lib/proc/bare-os-proc-bare-module-crypto-staging.js'
|
||||
import { buildBareOsPearInspectLoggerTlsProcJson } from './lib/proc/bare-os-proc-pear-inspect-logger-tls.js'
|
||||
import { buildBareOsHypercorePackHrpcLifecycleProcJson } from './lib/proc/bare-os-proc-hypercore-pack-hrpc-lifecycle.js'
|
||||
import {
|
||||
bareOsHostBooterInfo,
|
||||
bareOsHostBooterWarn
|
||||
} from './lib/bare-os-host-booter-log.js'
|
||||
} from './lib/host/bare-os-host-booter-log.js'
|
||||
import {
|
||||
bareOsShutdownSocketBridgeFd,
|
||||
prepareBridgeSendmsg
|
||||
} from './lib/bare-os-socket-bridge.js'
|
||||
import { createBareOsIpc } from './lib/bare-os-ipc.js'
|
||||
import { parseBareOsHrpcAllowlistJson } from './lib/bare-os-hrpc-allowlist.js'
|
||||
import { createStockBareOsHrpcRequest } from './lib/bare-os-hrpc-stock-request.js'
|
||||
import { createBareOsSyscall } from './lib/bare-os-syscall.js'
|
||||
} from './lib/posix/bare-os-socket-bridge.js'
|
||||
import { createBareOsIpc } from './lib/tools/bare-os-ipc.js'
|
||||
import { parseBareOsHrpcAllowlistJson } from './lib/tools/bare-os-hrpc-allowlist.js'
|
||||
import { createStockBareOsHrpcRequest } from './lib/tools/bare-os-hrpc-stock-request.js'
|
||||
import { createBareOsSyscall } from './lib/posix/bare-os-syscall.js'
|
||||
import {
|
||||
execShellLine,
|
||||
dispatchShellTrapSignal,
|
||||
syncBareOsExitStatusEnv,
|
||||
getBareOsPipelineLimits
|
||||
} from './lib/shell.js'
|
||||
import { packageRootDir, defaultBootCorestorePath } from './lib/paths.js'
|
||||
} from './lib/shell/shell.js'
|
||||
import { packageRootDir, defaultBootCorestorePath } from './lib/host/paths.js'
|
||||
import {
|
||||
createBareReadlineQuestion,
|
||||
createStreamLineReader,
|
||||
looksLikeInteractiveStdin,
|
||||
createSessionReadMaskedLine
|
||||
} from './lib/cli-readline.js'
|
||||
import { resolveStdio } from './lib/resolve-stdio.js'
|
||||
import { createKernelReplSession } from './lib/repl-session.js'
|
||||
} from './lib/cli/cli-readline.js'
|
||||
import { resolveStdio } from './lib/cli/resolve-stdio.js'
|
||||
import { createKernelReplSession } from './lib/cli/repl-session.js'
|
||||
import {
|
||||
suspendFishStdinForSubprocess,
|
||||
resumeFishStdinAfterSubprocess
|
||||
} from './lib/fish-readline.js'
|
||||
import { createBootSplash } from './lib/boot-splash.js'
|
||||
import { bareOsDelegateInflightSnapshot } from './lib/bare-os-delegate-concurrent.js'
|
||||
import { bareOsDelegateRateBucketsSnapshot } from './lib/delegate-rate-limit.js'
|
||||
} from './lib/cli/fish-readline.js'
|
||||
import { createBootSplash } from './lib/boot/boot-splash.js'
|
||||
import { bareOsDelegateInflightSnapshot } from './lib/tools/bare-os-delegate-concurrent.js'
|
||||
import { bareOsDelegateRateBucketsSnapshot } from './lib/tools/delegate-rate-limit.js'
|
||||
import {
|
||||
applyGuestEnv,
|
||||
ensureGuestHome,
|
||||
@@ -148,8 +148,8 @@ import {
|
||||
saveVaultToDrive,
|
||||
applyLoginKeys,
|
||||
bareOsAppendVaultRotationCheckpoint
|
||||
} from './lib/identity-session.js'
|
||||
import { HdmsController, runHdmsCli } from './lib/hdms-manager.js'
|
||||
} from './lib/identity/identity-session.js'
|
||||
import { HdmsController, runHdmsCli } from './lib/p2p/hdms-manager.js'
|
||||
import {
|
||||
startBareInitd,
|
||||
registerKernelShutdownHook,
|
||||
@@ -160,20 +160,20 @@ import {
|
||||
bareInitdReadinessSnapshot,
|
||||
bareInitdSuspendForBareMobile,
|
||||
bareInitdResumeAfterBareMobile
|
||||
} from './lib/bare-initd.js'
|
||||
import { BARE_OS_LIFECYCLE_SCHEMA_VERSION } from './lib/bare-os-lifecycle-schema.js'
|
||||
import { createBooterBootEmitter } from './lib/bare-os-boot-phases.js'
|
||||
import { createBooterProcHelpers } from './lib/bare-os-booter-proc-helpers.js'
|
||||
import { createBareOsVirtualSignalDeliverer } from './lib/bare-os-virtual-signal.js'
|
||||
import { createKernelLoaderAuditAppend } from './lib/bare-os-loader-audit.js'
|
||||
import { createBareOsPosixFdSimMethods } from './lib/bare-os-posix-fd-sim.js'
|
||||
import { createBareOsPathconfMethods } from './lib/bare-os-pathconf.js'
|
||||
import { createBareOsLogicalFdMethods } from './lib/bare-os-logical-fd.js'
|
||||
import { createBareOsLifecycleHookMethods } from './lib/bare-os-lifecycle-hooks.js'
|
||||
import { createBareOsProcessControlMethods } from './lib/bare-os-process-control.js'
|
||||
import { createBareOsQvacBridge } from './lib/bare-os-qvac-host.mjs'
|
||||
import { bareOsQvacEnsureModelsHdms } from './lib/bare-os-qvac-models-store.mjs'
|
||||
import { buildPearIpcRegistryJson } from './lib/bare-os-pear-ipc-registry.js'
|
||||
} from './lib/initd/bare-initd.js'
|
||||
import { BARE_OS_LIFECYCLE_SCHEMA_VERSION } from './lib/host/bare-os-lifecycle-schema.js'
|
||||
import { createBooterBootEmitter } from './lib/boot/bare-os-boot-phases.js'
|
||||
import { createBooterProcHelpers } from './lib/proc/bare-os-booter-proc-helpers.js'
|
||||
import { createBareOsVirtualSignalDeliverer } from './lib/posix/bare-os-virtual-signal.js'
|
||||
import { createKernelLoaderAuditAppend } from './lib/host/bare-os-loader-audit.js'
|
||||
import { createBareOsPosixFdSimMethods } from './lib/posix/bare-os-posix-fd-sim.js'
|
||||
import { createBareOsPathconfMethods } from './lib/posix/bare-os-pathconf.js'
|
||||
import { createBareOsLogicalFdMethods } from './lib/posix/bare-os-logical-fd.js'
|
||||
import { createBareOsLifecycleHookMethods } from './lib/host/bare-os-lifecycle-hooks.js'
|
||||
import { createBareOsProcessControlMethods } from './lib/posix/bare-os-process-control.js'
|
||||
import { createBareOsQvacBridge } from './lib/services/bare-os-qvac-host.mjs'
|
||||
import { bareOsQvacEnsureModelsHdms } from './lib/services/bare-os-qvac-models-store.mjs'
|
||||
import { buildPearIpcRegistryJson } from './lib/tools/bare-os-pear-ipc-registry.js'
|
||||
import {
|
||||
appendVarLog,
|
||||
AUDIT_LOG,
|
||||
@@ -181,25 +181,25 @@ import {
|
||||
LOGGER_JSON_LOG,
|
||||
appendBareOsCrashEvent,
|
||||
mirrorBareOsTelemetryNdjson
|
||||
} from './lib/bare-os-var-log.js'
|
||||
import { persistBareOsMountsSnapshot } from './lib/bare-os-mounts-persist.js'
|
||||
import { installBareOsHostSignalsBridge } from './lib/bare-os-host-signals-bridge.js'
|
||||
} from './lib/vfs/bare-os-var-log.js'
|
||||
import { persistBareOsMountsSnapshot } from './lib/vfs/bare-os-mounts-persist.js'
|
||||
import { installBareOsHostSignalsBridge } from './lib/host/bare-os-host-signals-bridge.js'
|
||||
import {
|
||||
BARE_OS_STOCK_SYSCALL_OPS,
|
||||
BARE_OS_SYSCALL_OPS_DETAIL
|
||||
} from './lib/bare-os-syscall-ops.js'
|
||||
import { buildBareOsSyscallsProcJson } from './lib/bare-os-syscalls-proc-json.js'
|
||||
} from './lib/posix/bare-os-syscall-ops.js'
|
||||
import { buildBareOsSyscallsProcJson } from './lib/posix/bare-os-syscalls-proc-json.js'
|
||||
import {
|
||||
bareOsIsPosixSignalName,
|
||||
bareOsNormalizeSignalName
|
||||
} from './lib/bare-os-posix-signals.js'
|
||||
} from './lib/posix/bare-os-posix-signals.js'
|
||||
import {
|
||||
bareOsWasmKernelCompile as compileBareOsWasmKernelModule,
|
||||
bareOsWasmKernelInstantiate as instantiateBareOsWasmKernelModule
|
||||
} from './lib/bare-os-wasm-kernel.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/bare-os-ctx-api.js'
|
||||
import { buildBareOsPearCorestoreHrpcProcJson } from './lib/bare-os-proc-pear-corestore-hrpc.js'
|
||||
import { buildBareOsRuntimeCaps } from './lib/bare-os-runtime-caps.js'
|
||||
} from './lib/boot/bare-os-wasm-kernel.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/ctx/bare-os-ctx-api.js'
|
||||
import { buildBareOsPearCorestoreHrpcProcJson } from './lib/proc/bare-os-proc-pear-corestore-hrpc.js'
|
||||
import { buildBareOsRuntimeCaps } from './lib/ctx/bare-os-runtime-caps.js'
|
||||
import {
|
||||
bareOsBareModulesEnabled,
|
||||
buildBareCtxObjectFromHost,
|
||||
@@ -208,119 +208,119 @@ import {
|
||||
verifyBareModuleLockfile,
|
||||
buildPearCtxObjectFromHost,
|
||||
ensureGlobalRequireForCtxBareHostImports
|
||||
} from './lib/bare-os-ctx-bare.js'
|
||||
} from './lib/ctx/bare-os-ctx-bare.js'
|
||||
import {
|
||||
loadBareDiscordJs,
|
||||
applyDiscordHostEnvToShellEnv,
|
||||
getBareDiscordJsLoadError
|
||||
} from './lib/bare-discord-js-loader.js'
|
||||
import { bareOsStandaloneHostModulesByPackage } from './lib/bare-os-ctx-bare-host-modules.mjs'
|
||||
import { raceWithAbortAndTimeout } from './lib/bare-os-abort.js'
|
||||
} from './lib/services/bare-discord-js-loader.js'
|
||||
import { bareOsStandaloneHostModulesByPackage } from './lib/ctx/bare-os-ctx-bare-host-modules.mjs'
|
||||
import { raceWithAbortAndTimeout } from './lib/security/bare-os-abort.js'
|
||||
import {
|
||||
bindFallbackEnabled,
|
||||
isAddrInUse,
|
||||
readListeningTcpPort
|
||||
} from './lib/bare-os-bind-fallback.js'
|
||||
import { bareOsHrtimeSnapshot } from './lib/bare-os-monotonic-time.js'
|
||||
} from './lib/posix/bare-os-bind-fallback.js'
|
||||
import { bareOsHrtimeSnapshot } from './lib/posix/bare-os-monotonic-time.js'
|
||||
import {
|
||||
coerceBareFetchExport,
|
||||
ensureBareFetchGlobals,
|
||||
primeGlobalFetchFromBareLibrary
|
||||
} from './lib/bare-os-ensure-bare-fetch.js'
|
||||
} from './lib/ctx/bare-os-ensure-bare-fetch.js'
|
||||
import {
|
||||
bareOsHttpPolicyFromEnv,
|
||||
wrapFetchWithBareOsHttpPolicy
|
||||
} from './lib/bare-os-http-policy.js'
|
||||
} from './lib/security/bare-os-http-policy.js'
|
||||
import {
|
||||
applyBareOsThemeFromEnv,
|
||||
bareOsListThemeNames
|
||||
} from './lib/bare-os-theme-presets.js'
|
||||
import './lib/bare-cron.js'
|
||||
import { maybeStartBareHolesailKernelFromBooter } from './lib/bare-holesail.js'
|
||||
} from './lib/cli/bare-os-theme-presets.js'
|
||||
import './lib/initd/bare-cron.js'
|
||||
import { maybeStartBareHolesailKernelFromBooter } from './lib/p2p/bare-holesail.js'
|
||||
import {
|
||||
bareOsChatMuxEnabled,
|
||||
ensureDiskBareOsChatTransport
|
||||
} from './lib/bare-os-chat-service.js'
|
||||
} from './lib/services/bare-os-chat-service.js'
|
||||
import {
|
||||
bareOsMeshdropMuxEnabled,
|
||||
ensureDiskBareOsMeshdropTransport
|
||||
} from './lib/bare-os-meshdrop-service.js'
|
||||
import { runSshdCli, getBareOpensshProcJsonText } from './lib/bare-openssh.js'
|
||||
} from './lib/p2p/bare-os-meshdrop-service.js'
|
||||
import { runSshdCli, getBareOpensshProcJsonText } from './lib/services/bare-openssh.js'
|
||||
import { createHash } from 'bare-crypto'
|
||||
import { buildBareOsHostProcJsonText } from './lib/bare-os-host-proc-snapshot.js'
|
||||
import { computeReplicationSyncWindow } from './lib/bare-os-sync-window.js'
|
||||
import { buildBareOsReplicationOperatorSurfaceProcJson } from './lib/bare-os-proc-replication-operator-surface.js'
|
||||
import { buildBareOsReplicationLiveSketch } from './lib/bare-os-replication-proc-live.js'
|
||||
import { bareOsFormatSwarmSubsystemProcJson } from './lib/bare-os-swarm-subsystem-proc.js'
|
||||
import { buildBareOsBootGraphProcJson } from './lib/bare-os-boot-graph-proc.js'
|
||||
import { buildBareOsHostProcJsonText } from './lib/proc/bare-os-host-proc-snapshot.js'
|
||||
import { computeReplicationSyncWindow } from './lib/p2p/bare-os-sync-window.js'
|
||||
import { buildBareOsReplicationOperatorSurfaceProcJson } from './lib/proc/bare-os-proc-replication-operator-surface.js'
|
||||
import { buildBareOsReplicationLiveSketch } from './lib/p2p/bare-os-replication-proc-live.js'
|
||||
import { bareOsFormatSwarmSubsystemProcJson } from './lib/p2p/bare-os-swarm-subsystem-proc.js'
|
||||
import { buildBareOsBootGraphProcJson } from './lib/boot/bare-os-boot-graph-proc.js'
|
||||
import {
|
||||
bareOsSecretHandleAcquire,
|
||||
bareOsSecretHandleRelease,
|
||||
bareOsSecretHandleSnapshot,
|
||||
bareOsSecretHandleTouch
|
||||
} from './lib/bare-os-secret-handle-registry.js'
|
||||
} from './lib/identity/bare-os-secret-handle-registry.js'
|
||||
import {
|
||||
bareOsAuditAppend as bareOsAuditChainLinkAppend,
|
||||
bareOsAuditAppendBatch as bareOsAuditChainLinkAppendBatch,
|
||||
bareOsAuditChainSnapshot
|
||||
} from './lib/bare-os-audit-chain.js'
|
||||
import { evaluateBareOsAcl } from './lib/bare-os-acl-eval.js'
|
||||
} from './lib/security/bare-os-audit-chain.js'
|
||||
import { evaluateBareOsAcl } from './lib/security/bare-os-acl-eval.js'
|
||||
import {
|
||||
bareOsKernelMetricInc,
|
||||
bareOsKernelMetricsSnapshot
|
||||
} from './lib/bare-os-kernel-metrics.js'
|
||||
import { bareOsSwarmLifecycleSnapshot } from './lib/bare-os-swarm-lifecycle.js'
|
||||
import { bareOsReadHostProfile } from './lib/bare-os-host-profile.js'
|
||||
} from './lib/boot/bare-os-kernel-metrics.js'
|
||||
import { bareOsSwarmLifecycleSnapshot } from './lib/p2p/bare-os-swarm-lifecycle.js'
|
||||
import { bareOsReadHostProfile } from './lib/host/bare-os-host-profile.js'
|
||||
import {
|
||||
bareOsProcessTableSnapshot,
|
||||
bareOsBuildLogicalMemoryMapsProc,
|
||||
bareOsBuildProcessThreadsProc
|
||||
} from './lib/bare-os-process-table.js'
|
||||
import { buildBareOsProtomuxExtensionsProcJson } from './lib/bare-os-protomux-extensions-proc.js'
|
||||
} from './lib/proc/bare-os-process-table.js'
|
||||
import { buildBareOsProtomuxExtensionsProcJson } from './lib/p2p/bare-os-protomux-extensions-proc.js'
|
||||
import {
|
||||
bareOsStatvfsFromHyperdrive,
|
||||
bareOsStatvfsFromHostFs
|
||||
} from './lib/bare-os-statvfs-from-drive.js'
|
||||
} from './lib/vfs/bare-os-statvfs-from-drive.js'
|
||||
import {
|
||||
maybeBareOsBuildBinHyperbeeHint,
|
||||
maybeBareOsBuildBinManifest
|
||||
} from './lib/bare-os-bin-index.js'
|
||||
import { BARE_OS_ACCOUNT_CRYPTO_PROFILE_V2 } from './lib/identity-account.js'
|
||||
} from './lib/tools/bare-os-bin-index.js'
|
||||
import { BARE_OS_ACCOUNT_CRYPTO_PROFILE_V2 } from './lib/identity/identity-account.js'
|
||||
import {
|
||||
evaluateBareOsPeerAdmission,
|
||||
bareOsFormatPeerAdmissionAuditEvent,
|
||||
bareOsPeerAdmissionAuditRateAllow
|
||||
} from './lib/bare-os-peer-admission.js'
|
||||
} from './lib/p2p/bare-os-peer-admission.js'
|
||||
import {
|
||||
bareOsTryAcquireCooperativeLock,
|
||||
bareOsRemoveFcntlWaiter,
|
||||
bareOsDrainFcntlLockWaiters
|
||||
} from './lib/bare-os-fcntl-cooperative-lock.js'
|
||||
import { prioritizeReplicationPaths } from './lib/bare-os-replication-priority.js'
|
||||
} from './lib/posix/bare-os-fcntl-cooperative-lock.js'
|
||||
import { prioritizeReplicationPaths } from './lib/p2p/bare-os-replication-priority.js'
|
||||
import {
|
||||
buildStockKernelCapabilityWords,
|
||||
freezeKernelCapabilityWordsFromCapabilities
|
||||
} from './lib/bare-os-capability-registry.js'
|
||||
} from './lib/security/bare-os-capability-registry.js'
|
||||
import {
|
||||
loadOsFromOfflineLkg,
|
||||
loadOsFromPeers
|
||||
} from './lib/bare-os-kernel-loader.js'
|
||||
} from './lib/boot/bare-os-kernel-loader.js'
|
||||
import {
|
||||
exitHostProcess,
|
||||
teardownBareOsBootResources
|
||||
} from './lib/bare-os-lifecycle-manager.js'
|
||||
} from './lib/host/bare-os-lifecycle-manager.js'
|
||||
import {
|
||||
applyHostFlagsFromArgv,
|
||||
hostArgv
|
||||
} from '../../lib/bare-os-host-flags.mjs'
|
||||
import { redactAuditShellLine as redactAuditShellLineFromEnv } from './lib/bare-os-audit-redact.js'
|
||||
import { BARE_OS_HOST_ENV_FORWARD_KEYS } from './lib/bare-os-host-env-keys.js'
|
||||
import { redactAuditShellLine as redactAuditShellLineFromEnv } from './lib/security/bare-os-audit-redact.js'
|
||||
import { BARE_OS_HOST_ENV_FORWARD_KEYS } from './lib/host/bare-os-host-env-keys.js'
|
||||
import {
|
||||
parseUnionReadPrefixes,
|
||||
parseUnionWriteDenyPrefixes,
|
||||
parseIpcChannelMaxBytesMap,
|
||||
createReadLine
|
||||
} from './lib/booter-host-session.js'
|
||||
} from './lib/host/booter-host-session.js'
|
||||
import {
|
||||
wantPosixFcntlBlockingWait,
|
||||
bareOsPosixDgramRecvQueueMax,
|
||||
@@ -329,7 +329,7 @@ import {
|
||||
bareOsPosixAcceptBlockMsMax,
|
||||
bareOsFcntlLockWaitMsMax,
|
||||
bareOsResolveCooperativeLockPath
|
||||
} from './lib/bare-os-posix-syscall-helpers.js'
|
||||
} from './lib/posix/bare-os-posix-syscall-helpers.js'
|
||||
|
||||
const { randomUUID, randomBytes } = bareCrypto
|
||||
|
||||
@@ -1436,7 +1436,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
},
|
||||
initdSystemdSubset: {
|
||||
schema: 1,
|
||||
unitDropInReference: 'packages/bare-os-booter/lib/bare-initd-user.js',
|
||||
unitDropInReference: 'packages/bare-os-booter/lib/initd/bare-initd-user.js',
|
||||
supportedKeysSample: [
|
||||
'After',
|
||||
'Requires',
|
||||
@@ -3872,7 +3872,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
/**
|
||||
* Run a /bin or PATH command (same resolution as the shell). Used by utilities like `time`.
|
||||
* @param {string[]} argv
|
||||
* @param {import('./lib/bare-os-abort.js').BareOsAbortOpts} [runOpts]
|
||||
* @param {import('./lib/security/bare-os-abort.js').BareOsAbortOpts} [runOpts]
|
||||
*/
|
||||
async runBinCommand(argv, runOpts) {
|
||||
return runBinCommand(this, argv, runOpts)
|
||||
@@ -4812,7 +4812,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
},
|
||||
/**
|
||||
* Batch-read `/proc/bare_os/*` mirrors for baretop(1). Keys should stay aligned with
|
||||
* `BARE_TOP_SNAPSHOT_PROC_ENTRIES` in packages/bare-os-coreutils/lib/baretop-snapshot.js.
|
||||
* `BARE_TOP_SNAPSHOT_PROC_ENTRIES` in packages/bare-os-coreutils/lib/baretop/baretop-snapshot.js.
|
||||
* Supports profile and requested-key hints for smoother tab-aware snapshots.
|
||||
* @returns {Promise<{ atMs: number, files: Record<string, string>, metricsLiveText?: string, snapshotBytes?: number, profile?: string, truncated?: boolean }>}
|
||||
*/
|
||||
@@ -5108,7 +5108,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
shellEnv.BARE_OS_SANDBOX_WORKER === '1' ||
|
||||
shellEnv.BARE_OS_SANDBOX_WORKER === 'true'
|
||||
const sb = createBareOsSandboxContext(this)
|
||||
const { raceWithAbortAndTimeout } = await import('./lib/bare-os-abort.js')
|
||||
const { raceWithAbortAndTimeout } = await import('./lib/security/bare-os-abort.js')
|
||||
const runInner = () =>
|
||||
raceWithAbortAndTimeout(
|
||||
runUserScriptFromSource(sb, String(source), argv, 'sandbox'),
|
||||
@@ -6240,7 +6240,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
) {
|
||||
return
|
||||
}
|
||||
void import('./lib/bare-os-var-log.js').then(
|
||||
void import('./lib/vfs/bare-os-var-log.js').then(
|
||||
({ appendVarLog, AUDIT_LOG }) => {
|
||||
void appendVarLog(
|
||||
this,
|
||||
@@ -6499,7 +6499,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
let execNestingDepth = 0
|
||||
/**
|
||||
* @param {string} line
|
||||
* @param {import('./lib/bare-os-abort.js').BareOsAbortOpts} [opts]
|
||||
* @param {import('./lib/security/bare-os-abort.js').BareOsAbortOpts} [opts]
|
||||
*/
|
||||
ctx.execLine = async (line, opts) => {
|
||||
const t = String(line).trim()
|
||||
@@ -6594,7 +6594,7 @@ async function executeKernel(disk, store, swarm, initSource) {
|
||||
|
||||
/**
|
||||
* @param {string} [prompt]
|
||||
* @param {import('./lib/bare-os-abort.js').BareOsAbortOpts & { mask?: boolean }} [opts]
|
||||
* @param {import('./lib/security/bare-os-abort.js').BareOsAbortOpts & { mask?: boolean }} [opts]
|
||||
*/
|
||||
ctx.readLine = async (prompt, opts) => {
|
||||
if (forceSessionEnd) return null
|
||||
|
||||
@@ -12,14 +12,14 @@ import {
|
||||
import {
|
||||
KERNEL_CAPABILITY_SEED_STRICT_ROWS,
|
||||
buildStockKernelCapabilityWords
|
||||
} from './bare-os-capability-registry.js'
|
||||
import { maybeSynthesizePeerSeedCapabilityInfo } from './bare-os-peer-system-seed.js'
|
||||
} from '../security/bare-os-capability-registry.js'
|
||||
import { maybeSynthesizePeerSeedCapabilityInfo } from '../p2p/bare-os-peer-system-seed.js'
|
||||
|
||||
/** Splash lines while block 0 / MBR is in flight (avoids a silent multi‑minute wait). */
|
||||
const MBR_READ_HEARTBEAT_MS = 10_000
|
||||
|
||||
/**
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {{ log: (s: string) => void }} splash
|
||||
*/
|
||||
async function readBlock0WithProgress(disk, splash) {
|
||||
@@ -42,7 +42,7 @@ async function readBlock0WithProgress(disk, splash) {
|
||||
* @param {import('corestore').default} store
|
||||
* @param {import('hyperswarm').default} swarm
|
||||
* @param {typeof Hyperdrive} HyperdriveCtor
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {ReturnType<import('./boot-splash.js').createBootSplash>} splash
|
||||
* @param {string} keyHex
|
||||
* @returns {Promise<Uint8Array>}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Uses global WebAssembly when present (Bare/V8); no Node built-ins.
|
||||
*/
|
||||
import { BARE_OS_POSIX_PROFILE_VERSION } from 'bare-os-protocol/bare-os-posix-profile.js'
|
||||
import { bareOsMonotonicNowMs } from './bare-os-monotonic-time.js'
|
||||
import { bareOsMonotonicNowMs } from '../posix/bare-os-monotonic-time.js'
|
||||
|
||||
const DEFAULT_MAX = 512 * 1024
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import b4a from 'b4a'
|
||||
import fs from '#host-fs'
|
||||
import unixPathResolve from 'unix-path-resolve'
|
||||
import { raceWithAbortAndTimeout } from './bare-os-abort.js'
|
||||
import { raceWithAbortAndTimeout } from '../security/bare-os-abort.js'
|
||||
import {
|
||||
isDelegateKindAllowed,
|
||||
loadBareOsHostDelegates,
|
||||
parseDelegateAllowSet
|
||||
} from './host-delegate-registry.js'
|
||||
import { bareOsDelegateRateAllow } from './delegate-rate-limit.js'
|
||||
} from '../host/host-delegate-registry.js'
|
||||
import { bareOsDelegateRateAllow } from '../tools/delegate-rate-limit.js'
|
||||
import {
|
||||
bareOsDelegateConcurrentExit,
|
||||
bareOsDelegateConcurrentTryEnter
|
||||
} from './bare-os-delegate-concurrent.js'
|
||||
} from '../tools/bare-os-delegate-concurrent.js'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
/** @type {Map<string, number>} */
|
||||
@@ -228,7 +228,7 @@ async function tryRunBinInBareWorker(ctx, argv, source) {
|
||||
reportFallback('bare-module createRequire unavailable')
|
||||
return false
|
||||
}
|
||||
const { runBinOffloaded } = req('./bare-os-bin-offload-worker.cjs')
|
||||
const { runBinOffloaded } = req('../tools/bare-os-bin-offload-worker.cjs')
|
||||
const wasmRaw = env && String(env.BARE_OS_BIN_WORKER_WASM_MS_MAX || '').trim()
|
||||
const wasmN = wasmRaw ? Number.parseInt(wasmRaw, 10) : 0
|
||||
const maxWasmMs =
|
||||
@@ -281,7 +281,7 @@ async function auditDelegateJson(ctx, kind, argv) {
|
||||
return
|
||||
if (env.BARE_OS_AUDIT_JSON !== '1' && env.BARE_OS_AUDIT_JSON !== 'true')
|
||||
return
|
||||
const { appendVarLog, AUDIT_LOG } = await import('./bare-os-var-log.js')
|
||||
const { appendVarLog, AUDIT_LOG } = await import('../vfs/bare-os-var-log.js')
|
||||
const args = argv.slice(0, 24).map((a) => {
|
||||
const s = String(a)
|
||||
return s.length > 160 ? s.slice(0, 160) + '…' : s
|
||||
@@ -385,7 +385,7 @@ export async function runUserScriptFromSource(ctx, src, argv, _label = argv[0])
|
||||
* Run a command: bare `*.js` in cwd (before PATH), path script on any routed drive, then PATH on system.
|
||||
* @param {Record<string, unknown>} ctx
|
||||
* @param {string[]} argv
|
||||
* @param {import('./bare-os-abort.js').BareOsAbortOpts} [runOpts]
|
||||
* @param {import('../security/bare-os-abort.js').BareOsAbortOpts} [runOpts]
|
||||
*/
|
||||
export async function runBinCommand(ctx, argv, runOpts) {
|
||||
const env = ctx?.vfs?.env
|
||||
@@ -393,7 +393,7 @@ export async function runBinCommand(ctx, argv, runOpts) {
|
||||
String(env?.BARE_OS_RUNBIN_DEFAULT_TIMEOUT_MS || ''),
|
||||
10
|
||||
)
|
||||
/** @type {import('./bare-os-abort.js').BareOsAbortOpts | undefined} */
|
||||
/** @type {import('../security/bare-os-abort.js').BareOsAbortOpts | undefined} */
|
||||
let merged =
|
||||
runOpts && typeof runOpts === 'object' ? { ...runOpts } : undefined
|
||||
if (Number.isFinite(defTo) && defTo > 0) {
|
||||
@@ -460,7 +460,7 @@ async function runBinCommandInner(ctx, argv) {
|
||||
(env.BARE_OS_AUDIT === '1' || env.BARE_OS_AUDIT === 'true')
|
||||
if (auditOnly) {
|
||||
await auditDelegateJson(ctx, del.kind, argv)
|
||||
const { appendVarLog, AUDIT_LOG } = await import('./bare-os-var-log.js')
|
||||
const { appendVarLog, AUDIT_LOG } = await import('../vfs/bare-os-var-log.js')
|
||||
void appendVarLog(
|
||||
ctx,
|
||||
AUDIT_LOG,
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
expandArgvAliases,
|
||||
listBareOsShellBuiltins,
|
||||
tokenize
|
||||
} from './shell.js'
|
||||
import { bareOsFnmatch } from './shell-glob.js'
|
||||
} from '../shell/shell.js'
|
||||
import { bareOsFnmatch } from '../shell/shell-glob.js'
|
||||
import {
|
||||
bareLsColorOpenSgrFromMap,
|
||||
bareParseLsColors
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Non-TTY booters keep the lazy bare-readline / stream fallback from index.js.
|
||||
*/
|
||||
|
||||
import { listBareOsShellBuiltins } from './shell.js'
|
||||
import { listBareOsShellBuiltins } from '../shell/shell.js'
|
||||
import { XTERM_CLEAR_SCROLLBACK_AND_VIEWPORT } from './terminal-escapes.js'
|
||||
import {
|
||||
completeLine,
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
bareInitdShutdownActiveUnitsReverse,
|
||||
runKernelShutdownHooks,
|
||||
stopBareInitd
|
||||
} from './bare-initd.js'
|
||||
} from '../initd/bare-initd.js'
|
||||
import { wrapReadLineWithReplHistoryPersist } from './cli-readline.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ import { fileURLToPath } from 'url'
|
||||
import bareModuleManifestEmbedded from './bare-module-manifest.data.mjs'
|
||||
import { pearCtxHostByPackage } from '#pear-ctx-host'
|
||||
import { pearCtxPearOnlyHostByPackage } from './bare-os-ctx-pear-host-pear-only.js'
|
||||
import { bareOsHostBooterWarn } from './bare-os-host-booter-log.js'
|
||||
import { bareOsHostBooterWarn } from '../host/bare-os-host-booter-log.js'
|
||||
import {
|
||||
bareOsStandaloneHostModulesByPackage,
|
||||
bareOsStandaloneNodeBuiltinModules
|
||||
@@ -41,7 +41,7 @@ function bareOsBooterPackageJsonPathForCreateRequire() {
|
||||
const href = String(import.meta.url)
|
||||
if (!href.startsWith('file:')) return null
|
||||
try {
|
||||
return fileURLToPath(new URL('../package.json', import.meta.url))
|
||||
return fileURLToPath(new URL('../../package.json', import.meta.url))
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import {
|
||||
DEFAULT_PIPELINE_MAX_CAPTURE_LINES,
|
||||
DEFAULT_PIPELINE_MAX_STAGES,
|
||||
getBareOsPipelineLimits
|
||||
} from './shell.js'
|
||||
import { bareOsChatMuxEnabled } from './bare-os-chat-service.js'
|
||||
} from '../shell/shell.js'
|
||||
import { bareOsChatMuxEnabled } from '../services/bare-os-chat-service.js'
|
||||
|
||||
/**
|
||||
* Documented pseudo filesystem paths (read-mostly; some accept discard writes).
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
*
|
||||
* Discord WS bootstrap MUST be first so @discordjs/ws binds to WHATWG bare-ws.
|
||||
*/
|
||||
import './bare-os-discord-ws-bootstrap.mjs'
|
||||
import './bare-os-discord-commands-guest.cjs'
|
||||
import '../services/bare-os-discord-ws-bootstrap.mjs'
|
||||
import '../services/bare-os-discord-commands-guest.cjs'
|
||||
import './bare-os-ctx-bare-host-modules.mjs'
|
||||
import { bareDiscordJs as bareOsPackedDiscordJs } from './bare-os-ctx-discord-packed.js'
|
||||
import './bare-os-qvac-pack-anchor.mjs'
|
||||
import '../services/bare-os-qvac-pack-anchor.mjs'
|
||||
// Ensure GPU probe → bare-subprocess edge is in the standalone pack graph.
|
||||
import './bare-os-qvac-gpu-probe.mjs'
|
||||
import '../services/bare-os-qvac-gpu-probe.mjs'
|
||||
|
||||
void bareOsPackedDiscordJs
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Swarm-disk peer RPC bridge: local Hyperdrive path search and whitelisted OS RPC.
|
||||
* Wired onto {@link import('./swarm-disk.js').SwarmDisk} as `disk.os` after initd bring-up.
|
||||
* Wired onto {@link import('../p2p/swarm-disk.js').SwarmDisk} as `disk.os` after initd bring-up.
|
||||
*/
|
||||
|
||||
import b4a from 'b4a'
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
PROTOCOL_NAME,
|
||||
getKernelCapabilityWords
|
||||
} from 'bare-os-protocol'
|
||||
import { listBareServices } from './bare-initd.js'
|
||||
import { BareOsKernelError } from './bare-os-errors.js'
|
||||
import { listBareServices } from '../initd/bare-initd.js'
|
||||
import { BareOsKernelError } from '../security/bare-os-errors.js'
|
||||
import { bareOsCorestoreSnapshotOperatorHint } from './corestore-host-lifecycle.js'
|
||||
|
||||
const MAX_SEARCH_RESULTS = 256
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* Host OTA + --datadir prelude. Statically imported first from index.js so it
|
||||
* runs before main(), and bare-pack embeds it without dynamic import().
|
||||
*/
|
||||
import { name, version, upgrade } from '../../../bin/meta/booter.mjs'
|
||||
import { startPearOta, parseOtaFlags } from '../../../lib/bare-os-ota.mjs'
|
||||
import { applyHostFlagsFromArgv } from '../../../lib/bare-os-host-flags.mjs'
|
||||
import { name, version, upgrade } from '../../../../bin/meta/booter.mjs'
|
||||
import { startPearOta, parseOtaFlags } from '../../../../lib/bare-os-ota.mjs'
|
||||
import { applyHostFlagsFromArgv } from '../../../../lib/bare-os-host-flags.mjs'
|
||||
|
||||
function pathBasename(p) {
|
||||
const s = String(p || '')
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
createBareReadlineQuestion,
|
||||
createStreamLineReader,
|
||||
looksLikeInteractiveStdin
|
||||
} from './cli-readline.js'
|
||||
import { resolveStdio } from './resolve-stdio.js'
|
||||
} from '../cli/cli-readline.js'
|
||||
import { resolveStdio } from '../cli/resolve-stdio.js'
|
||||
import { bareOsHostBooterWarn } from './bare-os-host-booter-log.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
export {
|
||||
BARE_OS_CORESTORE_TREE_CACHE,
|
||||
bareOsCorestoreConstructOpts
|
||||
} from '../../../lib/bare-os-corestore-opts.mjs'
|
||||
} from '../../../../lib/bare-os-corestore-opts.mjs'
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
*/
|
||||
|
||||
import path from '#host-path'
|
||||
import { runCurlCli } from './curl-cli.js'
|
||||
import { runGitCli } from './git-cli.js'
|
||||
import { runSystemctlCli } from './systemctl-cli.js'
|
||||
import { runArchiveCli } from './archive-cli.js'
|
||||
import { runTarCli } from './tar-cli.js'
|
||||
import { runWarcCli } from './warc-cli.js'
|
||||
import { runWgetCli } from './wget-cli.js'
|
||||
import { runCurlCli } from '../tools/curl-cli.js'
|
||||
import { runGitCli } from '../tools/git-cli.js'
|
||||
import { runSystemctlCli } from '../initd/systemctl-cli.js'
|
||||
import { runArchiveCli } from '../tools/archive-cli.js'
|
||||
import { runTarCli } from '../tools/tar-cli.js'
|
||||
import { runWarcCli } from '../tools/warc-cli.js'
|
||||
import { runWgetCli } from '../tools/wget-cli.js'
|
||||
import {
|
||||
runBundlebeeCli,
|
||||
runHrpcCli,
|
||||
@@ -88,7 +88,7 @@ export function loadBareOsHostDelegates() {
|
||||
return matchBasename(cmd, 'openssl')
|
||||
},
|
||||
async run(ctx, argv) {
|
||||
const { runOpensslCli } = await import('./openssl-cli.js')
|
||||
const { runOpensslCli } = await import('../tools/openssl-cli.js')
|
||||
return runOpensslCli(ctx, argv)
|
||||
}
|
||||
},
|
||||
@@ -99,7 +99,7 @@ export function loadBareOsHostDelegates() {
|
||||
return matchBasename(cmd, 'ssh-keygen')
|
||||
},
|
||||
async run(ctx, argv) {
|
||||
const { runSshKeygenCli } = await import('./ssh-keygen-cli.js')
|
||||
const { runSshKeygenCli } = await import('../services/ssh-keygen-cli.js')
|
||||
return runSshKeygenCli(ctx, argv)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,24 +6,24 @@ import {
|
||||
findBareServiceDefinition,
|
||||
startBareService,
|
||||
stopBareService
|
||||
} from './bare-initd.js'
|
||||
import { maybeRegisterBareHolesailInitd } from './bare-holesail.js'
|
||||
import { maybeRegisterBareOsChatInitd } from './bare-os-chat-initd.js'
|
||||
import { maybeRegisterBareOsWwwInitd } from './bare-os-www-initd.js'
|
||||
} from '../initd/bare-initd.js'
|
||||
import { maybeRegisterBareHolesailInitd } from '../p2p/bare-holesail.js'
|
||||
import { maybeRegisterBareOsChatInitd } from '../services/bare-os-chat-initd.js'
|
||||
import { maybeRegisterBareOsWwwInitd } from '../services/bare-os-www-initd.js'
|
||||
import {
|
||||
maybeStartBareOsDiscordAfterIdentity,
|
||||
stopBareOsDiscordInitd
|
||||
} from './bare-os-discord-initd.js'
|
||||
import { bareOpensshGetListenEndpoint } from './bare-openssh.js'
|
||||
import { ensureBareOsSshHolesailTunnel } from './bare-os-ssh-holesail.js'
|
||||
} from '../services/bare-os-discord-initd.js'
|
||||
import { bareOpensshGetListenEndpoint } from '../services/bare-openssh.js'
|
||||
import { ensureBareOsSshHolesailTunnel } from '../services/bare-os-ssh-holesail.js'
|
||||
import {
|
||||
bareOsChatMuxEnabled,
|
||||
ensureDiskBareOsChatTransport
|
||||
} from './bare-os-chat-service.js'
|
||||
} from '../services/bare-os-chat-service.js'
|
||||
import {
|
||||
bareOsMeshdropMuxEnabled,
|
||||
ensureDiskBareOsMeshdropTransport
|
||||
} from './bare-os-meshdrop-service.js'
|
||||
} from '../p2p/bare-os-meshdrop-service.js'
|
||||
|
||||
/** @param {Record<string, string | undefined>} env */
|
||||
export function registerBareUserSessionStackUnits(env) {
|
||||
@@ -48,13 +48,13 @@ export async function startBareUserSessionStack(ctx) {
|
||||
const disk = /** @type {{ bareOsChatService?: unknown }} */ (ctx.disk)
|
||||
if (disk && bareOsChatMuxEnabled(globalThis.process?.env)) {
|
||||
ensureDiskBareOsChatTransport(
|
||||
/** @type {import('./swarm-disk.js').SwarmDisk} */ (disk),
|
||||
/** @type {import('../p2p/swarm-disk.js').SwarmDisk} */ (disk),
|
||||
env
|
||||
)
|
||||
}
|
||||
if (disk && bareOsMeshdropMuxEnabled(globalThis.process?.env)) {
|
||||
ensureDiskBareOsMeshdropTransport(
|
||||
/** @type {import('./swarm-disk.js').SwarmDisk} */ (disk),
|
||||
/** @type {import('../p2p/swarm-disk.js').SwarmDisk} */ (disk),
|
||||
env
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import b4a from 'b4a'
|
||||
import { bareOsAppendVaultRotationCheckpoint } from './bare-os-vault-rotation-audit.js'
|
||||
import { loadBarerc } from './shell.js'
|
||||
import { loadBarerc } from '../shell/shell.js'
|
||||
import {
|
||||
ACCOUNT_PATH,
|
||||
decodeAccount,
|
||||
@@ -20,20 +20,20 @@ import {
|
||||
sealBytes,
|
||||
vaultKeyFromSecret
|
||||
} from './identity-account.js'
|
||||
import { bareOsResetShellIdentityState } from './shell.js'
|
||||
import { bareOsResetShellIdentityState } from '../shell/shell.js'
|
||||
import {
|
||||
logicalAuthorizedKeysPath,
|
||||
parseSshdConfig,
|
||||
SSHD_DEFAULT_AUTHORIZED_KEYS_FILE
|
||||
} from './sshd-config-parse.js'
|
||||
import { ensureBareOsVarLogTree } from './bare-os-var-log.js'
|
||||
} from '../services/sshd-config-parse.js'
|
||||
import { ensureBareOsVarLogTree } from '../vfs/bare-os-var-log.js'
|
||||
import {
|
||||
startBareUserSessionStack,
|
||||
stopBareUserSessionStack
|
||||
} from './bare-user-session-stack.js'
|
||||
import { ensureDiskBareOsChatTransport } from './bare-os-chat-service.js'
|
||||
import { ensureDiskBareOsMeshdropTransport } from './bare-os-meshdrop-service.js'
|
||||
import { ensureBareOsWwwHomeDefaults } from './bare-os-www-initd.js'
|
||||
import { ensureDiskBareOsChatTransport } from '../services/bare-os-chat-service.js'
|
||||
import { ensureDiskBareOsMeshdropTransport } from '../p2p/bare-os-meshdrop-service.js'
|
||||
import { ensureBareOsWwwHomeDefaults } from '../services/bare-os-www-initd.js'
|
||||
|
||||
const LEGACY_ROOT_MIGRATION_STATE = '/.bare-os/migration/legacy-root-v1.json'
|
||||
|
||||
@@ -597,11 +597,11 @@ export async function logoutIdentity(ctx, opts = {}) {
|
||||
try {
|
||||
if (ctx.disk && ctx.vfs?.env) {
|
||||
ensureDiskBareOsChatTransport(
|
||||
/** @type {import('./swarm-disk.js').SwarmDisk} */ (ctx.disk),
|
||||
/** @type {import('../p2p/swarm-disk.js').SwarmDisk} */ (ctx.disk),
|
||||
/** @type {Record<string, string | undefined>} */ (ctx.vfs.env)
|
||||
)
|
||||
ensureDiskBareOsMeshdropTransport(
|
||||
/** @type {import('./swarm-disk.js').SwarmDisk} */ (ctx.disk),
|
||||
/** @type {import('../p2p/swarm-disk.js').SwarmDisk} */ (ctx.disk),
|
||||
/** @type {Record<string, string | undefined>} */ (ctx.vfs.env)
|
||||
)
|
||||
await new Promise((r) => setImmediate(r))
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
BARE_INITD_TIMERS_DIR,
|
||||
parseBareOsTimerFile
|
||||
} from './bare-initd-user.js'
|
||||
import { appendVarLog, CRON_LOG } from './bare-os-var-log.js'
|
||||
import { appendVarLog, CRON_LOG } from '../vfs/bare-os-var-log.js'
|
||||
|
||||
/** @type {ReturnType<typeof setTimeout> | null} */
|
||||
let cronTimeoutId = null
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* In-memory structured initd journal (NDJSON lines) exposed under /run/bare-os/unit-journal/.
|
||||
*/
|
||||
|
||||
import { bareOsKernelMetricInc } from './bare-os-kernel-metrics.js'
|
||||
import { bareOsKernelMetricInc } from '../boot/bare-os-kernel-metrics.js'
|
||||
|
||||
const MAX_LINES_PER_UNIT = 400
|
||||
const MAX_LINE_UTF8 = 4096
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
ensureBareOsVarLogTree,
|
||||
INITD_LOG,
|
||||
KERNEL_CONSOLE_LOG
|
||||
} from './bare-os-var-log.js'
|
||||
} from '../vfs/bare-os-var-log.js'
|
||||
import { appendBareInitdJournal } from './bare-initd-journal.js'
|
||||
import {
|
||||
BARE_INITD_DEFAULT_AFTER,
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
readUnitDropIn,
|
||||
sortServicesForBoot
|
||||
} from './bare-initd-user.js'
|
||||
import { bareOsIpcLogicalToActualFifoName } from './bare-os-ipc-namespace.js'
|
||||
import { bareOsIpcLogicalToActualFifoName } from '../tools/bare-os-ipc-namespace.js'
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
@@ -923,7 +923,7 @@ export async function startBareInitd(ctx) {
|
||||
'RestartMaxAttempts',
|
||||
'OnFailure'
|
||||
],
|
||||
reference: 'packages/bare-os-booter/lib/bare-initd-user.js',
|
||||
reference: 'packages/bare-os-booter/lib/initd/bare-initd-user.js',
|
||||
note: 'systemd-inspired subset parsed from unit drop-ins; backoff is host/runtime specific.'
|
||||
},
|
||||
atMs: Date.now()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import b4a from 'b4a'
|
||||
import { INITD_LOG } from './bare-os-var-log.js'
|
||||
import { INITD_LOG } from '../vfs/bare-os-var-log.js'
|
||||
import {
|
||||
findBareServiceDefinition,
|
||||
getBareServiceRuntime,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
writeInitdMaskedSet
|
||||
} from './bare-initd-user.js'
|
||||
import { getBareInitdJournalNdjson } from './bare-initd-journal.js'
|
||||
import { syncBareOsDiscordInitd } from './bare-os-discord-initd.js'
|
||||
import { syncBareOsDiscordInitd } from '../services/bare-os-discord-initd.js'
|
||||
|
||||
/** Strip trailing `.service` (systemd-style) for bare-initd unit ids. */
|
||||
function normalizeBareInitdUnitName(unit) {
|
||||
|
||||
@@ -15,8 +15,8 @@ import { dirname } from '#host-path'
|
||||
import { randomBytes } from 'bare-crypto'
|
||||
import { bareHolesailEnvTruthy } from './bare-holesail-env.js'
|
||||
import { loadHolesailConstructor } from './bare-holesail-loader.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from './bare-os-var-log.js'
|
||||
import { bindFallbackEnabled, isAddrInUse } from './bare-os-bind-fallback.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from '../vfs/bare-os-var-log.js'
|
||||
import { bindFallbackEnabled, isAddrInUse } from '../posix/bare-os-bind-fallback.js'
|
||||
|
||||
/** Per-user managed state (unlocked shells; resolves under `$HOME`). */
|
||||
export const BARE_HOLESAIL_STATE_USER = '~/.holesail/state.json'
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
* Upstream is AGPL-3.0; the booter imports `holesail` directly (same Pear-staged pattern as
|
||||
* bare-openssh / bare-ssh2) instead of depending on ctx.bare / drive-bundle resolution.
|
||||
*/
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from './bare-os-var-log.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from '../vfs/bare-os-var-log.js'
|
||||
import { bareHolesailEnvTruthy } from './bare-holesail-env.js'
|
||||
import {
|
||||
bareHolesailManagedServiceIsRunning,
|
||||
bareHolesailManagedStartService,
|
||||
bareHolesailManagedStopService
|
||||
} from './bare-holesail-managed.js'
|
||||
import { bindFallbackEnabled, isAddrInUse } from './bare-os-bind-fallback.js'
|
||||
import { bindFallbackEnabled, isAddrInUse } from '../posix/bare-os-bind-fallback.js'
|
||||
import { loadHolesailConstructor } from './bare-holesail-loader.js'
|
||||
import {
|
||||
registerBareInitdDisposer,
|
||||
registerBareService,
|
||||
registerKernelShutdownHook
|
||||
} from './bare-initd.js'
|
||||
} from '../initd/bare-initd.js'
|
||||
|
||||
export { bareHolesailEnvTruthy }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
PROTOCOL_NAME,
|
||||
getKernelCapabilityWords
|
||||
} from 'bare-os-protocol'
|
||||
import { buildStockKernelCapabilityWords } from './bare-os-capability-registry.js'
|
||||
import { buildStockKernelCapabilityWords } from '../security/bare-os-capability-registry.js'
|
||||
|
||||
/**
|
||||
* Whether peer system seeding may run (default **enabled** when unset).
|
||||
|
||||
@@ -11,7 +11,7 @@ import Hyperbee from 'hyperbee'
|
||||
import hcCrypto from 'hypercore-crypto'
|
||||
import idEnc from 'hypercore-id-encoding'
|
||||
import { parseHdmsPairArgv } from './hdms-cli-argv.js'
|
||||
import { bareOsHostBooterWarn } from './bare-os-host-booter-log.js'
|
||||
import { bareOsHostBooterWarn } from '../host/bare-os-host-booter-log.js'
|
||||
import {
|
||||
HDMS_AUTOPASS_SHARE_KEY,
|
||||
HDMS_AUTOPASS_SHARE_RW_KEY,
|
||||
|
||||
@@ -7,12 +7,12 @@ import {
|
||||
PROTOCOL_CHAT_CHANNEL_NAME,
|
||||
PROTOCOL_MESHDROP_CHANNEL_NAME
|
||||
} from 'bare-os-protocol/constants.js'
|
||||
import { bareOsChatMuxEnabled } from './bare-os-chat-service.js'
|
||||
import { bareOsChatMuxEnabled } from '../services/bare-os-chat-service.js'
|
||||
import { bareOsMeshdropMuxEnabled } from './bare-os-meshdrop-service.js'
|
||||
import {
|
||||
bareOsHostBooterInfo,
|
||||
bareOsHostBooterWarn
|
||||
} from './bare-os-host-booter-log.js'
|
||||
} from '../host/bare-os-host-booter-log.js'
|
||||
import { getKernelCapabilityWords } from 'bare-os-protocol'
|
||||
|
||||
/**
|
||||
@@ -167,7 +167,7 @@ export class SwarmDisk {
|
||||
this.protomuxChatChannelRxTotal = 0
|
||||
/** Cumulative meshdrop envelopes received on `bare-os-meshdrop-v1` (when enabled). */
|
||||
this.protomuxMeshdropChannelRxTotal = 0
|
||||
/** @type {ReturnType<import('./bare-os-chat-service.js').createBareOsChatService> | null} */
|
||||
/** @type {ReturnType<import('../services/bare-os-chat-service.js').createBareOsChatService> | null} */
|
||||
this.bareOsChatService = null
|
||||
/** @type {ReturnType<import('./bare-os-meshdrop-service.js').createBareOsMeshdropService> | null} */
|
||||
this.bareOsMeshdropService = null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* ctx.bareOsPathconf / ctx.bareOsGetconfSysconf implementations.
|
||||
*/
|
||||
import { getBareOsPipelineLimits } from './shell-runtime.js'
|
||||
import { getBareOsPipelineLimits } from '../shell/shell-runtime.js'
|
||||
|
||||
/**
|
||||
* @param {{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Factory closes over executeKernel runtime objects; method body uses `this` as ctx.
|
||||
*/
|
||||
import b4a from 'b4a'
|
||||
import { persistBareOsMountsSnapshot } from './bare-os-mounts-persist.js'
|
||||
import { persistBareOsMountsSnapshot } from '../vfs/bare-os-mounts-persist.js'
|
||||
import {
|
||||
bindFallbackEnabled,
|
||||
isAddrInUse,
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
bareOsProcBlindPeerRelayHintsExposed,
|
||||
buildBareOsBlindRelaySwarmRuntime
|
||||
} from './bare-os-proc-blind-peer-relay-gate.js'
|
||||
import { bareOsChatMuxEnabled } from './bare-os-chat-service.js'
|
||||
import { bareOsMeshdropMuxEnabled } from './bare-os-meshdrop-service.js'
|
||||
import { bareOsChatMuxEnabled } from '../services/bare-os-chat-service.js'
|
||||
import { bareOsMeshdropMuxEnabled } from '../p2p/bare-os-meshdrop-service.js'
|
||||
|
||||
/**
|
||||
* @param {{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { bareOsSwarmLifecycleSnapshot } from './bare-os-swarm-lifecycle.js'
|
||||
import { bareOsSwarmLifecycleSnapshot } from '../p2p/bare-os-swarm-lifecycle.js'
|
||||
|
||||
/**
|
||||
* Gate blind-peer / relay operator JSON under `/proc/bare_os` (non-secret sketches only).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
BARE_OS_HRPC_ROUTE_TABLE_SCHEMA_VERSION,
|
||||
BARE_OS_HRPC_STOCK_ROUTES
|
||||
} from './bare-os-hrpc-route-table.js'
|
||||
import { buildKernelProgramProcJson } from './bare-os-kernel-program-proc.js'
|
||||
} from '../tools/bare-os-hrpc-route-table.js'
|
||||
import { buildKernelProgramProcJson } from '../boot/bare-os-kernel-program-proc.js'
|
||||
import {
|
||||
bareOsProcBlindPeerRelayHintsExposed,
|
||||
bareOsProcBlindPeerRelayHintsMinimal
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* (not a separate thread); see developer-guide security chapter.
|
||||
*/
|
||||
|
||||
import { applyGuestEnv, wipeSecret } from './identity-session.js'
|
||||
import { isPersonalRoute } from './vfs-posix-meta.js'
|
||||
import { applyGuestEnv, wipeSecret } from '../identity/identity-session.js'
|
||||
import { isPersonalRoute } from '../vfs/vfs-posix-meta.js'
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
import { readFileSync } from '#host-fs'
|
||||
import { tryRequireFromBooter } from './bare-os-ctx-bare.js'
|
||||
import { bareOsHostBooterWarn } from './bare-os-host-booter-log.js'
|
||||
import { takePackedDiscordJs } from './bare-os-ctx-discord-registry.js'
|
||||
import { tryRequireFromBooter } from '../ctx/bare-os-ctx-bare.js'
|
||||
import { bareOsHostBooterWarn } from '../host/bare-os-host-booter-log.js'
|
||||
import { takePackedDiscordJs } from '../ctx/bare-os-ctx-discord-registry.js'
|
||||
|
||||
/** @type {Record<string, unknown> | undefined} */
|
||||
let discordJsCache
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
S_IFREG,
|
||||
formatLsMtime,
|
||||
formatModeString
|
||||
} from './vfs-posix-meta.js'
|
||||
} from '../vfs/vfs-posix-meta.js'
|
||||
|
||||
/**
|
||||
* @typedef {{ type: string, mode?: number, size?: number, uid?: number, gid?: number, user?: string, group?: string, mtimeMs?: number }} VfsStatRow
|
||||
|
||||
@@ -7,30 +7,30 @@ import {
|
||||
logicalAuthorizedKeysPath,
|
||||
parseSshdConfig
|
||||
} from './sshd-config-parse.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from './bare-os-var-log.js'
|
||||
import { registerBareService } from './bare-initd.js'
|
||||
import { execShellLine, loadBarerc } from './shell.js'
|
||||
import { bareOsKernelMetricInc } from './bare-os-kernel-metrics.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from '../vfs/bare-os-var-log.js'
|
||||
import { registerBareService } from '../initd/bare-initd.js'
|
||||
import { execShellLine, loadBarerc } from '../shell/shell.js'
|
||||
import { bareOsKernelMetricInc } from '../boot/bare-os-kernel-metrics.js'
|
||||
import { attachBareOsSftp } from './bare-openssh-sftp.js'
|
||||
import {
|
||||
createBareReadlineSession,
|
||||
createStreamLineReader,
|
||||
sanitizeInteractiveShellLine
|
||||
} from './cli-readline.js'
|
||||
} from '../cli/cli-readline.js'
|
||||
import {
|
||||
createFishReadLine,
|
||||
disableFishRawMode,
|
||||
releaseFishStdin,
|
||||
resumeFishStdinAfterSubprocess,
|
||||
suspendFishStdinForSubprocess
|
||||
} from './fish-readline.js'
|
||||
} from '../cli/fish-readline.js'
|
||||
import { bareOpensshWritePtyConsoleLine } from './bare-openssh-pty-console.js'
|
||||
import { ensureBareOsSshHolesailTunnel } from './bare-os-ssh-holesail.js'
|
||||
import {
|
||||
bindFallbackEnabled,
|
||||
isAddrInUse,
|
||||
readListeningTcpPort
|
||||
} from './bare-os-bind-fallback.js'
|
||||
} from '../posix/bare-os-bind-fallback.js'
|
||||
|
||||
export { bareOpensshFormatConsoleTextForPty } from './bare-openssh-pty-console.js'
|
||||
|
||||
@@ -517,8 +517,8 @@ function wireSshClient(ctx, client, cfg) {
|
||||
const pwd = String(authCtx.password || '')
|
||||
void (async () => {
|
||||
try {
|
||||
const { decodeAccount } = await import('./identity-account.js')
|
||||
const { unlockIdentity } = await import('./identity-session.js')
|
||||
const { decodeAccount } = await import('../identity/identity-account.js')
|
||||
const { unlockIdentity } = await import('../identity/identity-session.js')
|
||||
const buf = await ctx.personalDrive.get(BARE_ACCOUNT_DRIVE_KEY)
|
||||
if (!buf) return authCtx.reject()
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Initd marker for swarm chat (`bare-os-chat-v1`): transport stays in the booter/swarm-disk;
|
||||
* this unit records that chat is intended to be active when env allows.
|
||||
*/
|
||||
import { registerBareService } from './bare-initd.js'
|
||||
import { registerBareService } from '../initd/bare-initd.js'
|
||||
import { bareOsChatMuxEnabled } from './bare-os-chat-service.js'
|
||||
|
||||
/** @type {boolean} */
|
||||
|
||||
@@ -22,7 +22,7 @@ export function bareOsChatMuxEnabled(env = globalThis.process?.env) {
|
||||
* Swarm Protomux chat transport on `disk` (receive + relay + broadcast). Stock-on when mux env allows.
|
||||
* Independent of the **`bare-os-chat`** initd unit (that unit is only started after identity unlock).
|
||||
*
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {Record<string, string | undefined>} [env]
|
||||
*/
|
||||
export function ensureDiskBareOsChatTransport(disk, env = {}) {
|
||||
@@ -138,7 +138,7 @@ export function createBareOsChatService(opts = {}) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {SwarmPeer} fromPeer
|
||||
* @param {Record<string, unknown>} evt
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ export function createBareOsChatService(opts = {}) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {SwarmPeer} fromPeer
|
||||
* @param {Record<string, unknown>} evt
|
||||
*/
|
||||
@@ -244,7 +244,7 @@ export function createBareOsChatService(opts = {}) {
|
||||
return () => subscribers.delete(fn)
|
||||
},
|
||||
/**
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('protomux').Protomux} mux
|
||||
* @param {any} socket
|
||||
* @param {SwarmPeer} peer
|
||||
@@ -312,7 +312,7 @@ export function createBareOsChatService(opts = {}) {
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @param {import('./swarm-disk.js').SwarmDisk} disk
|
||||
* @param {import('../p2p/swarm-disk.js').SwarmDisk} disk
|
||||
* @param {string} text
|
||||
* @param {{ displayName?: string, senderPk?: Uint8Array }} [meta]
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
startBareService,
|
||||
stopBareService,
|
||||
unregisterBareService
|
||||
} from './bare-initd.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from './bare-os-var-log.js'
|
||||
} from '../initd/bare-initd.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from '../vfs/bare-os-var-log.js'
|
||||
import {
|
||||
normalizeDiscordToken,
|
||||
parseDotEnvText
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* pack graph. Forces WHATWG WebSocket (bare-ws) so IDENTIFY produces READY.
|
||||
* Marker: bare-os-discord-gateway-ws
|
||||
*/
|
||||
import wsAdapter from '../vendor/bare-discord-js/src/adapters/whatwg-ws.cjs'
|
||||
import wsAdapter from '../../vendor/bare-discord-js/src/adapters/whatwg-ws.cjs'
|
||||
|
||||
const install =
|
||||
(wsAdapter && wsAdapter.installBareOsDiscordGatewayWs) ||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Unset allowlist defaults to irc.libera.chat and irc.*.libera.chat.
|
||||
*/
|
||||
|
||||
import { parseHostPatternList } from './bare-os-http-policy.js'
|
||||
import { parseHostPatternList } from '../security/bare-os-http-policy.js'
|
||||
|
||||
export const BARE_OS_IRC_DEFAULT_ALLOW = [
|
||||
'irc.libera.chat',
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
bareOsQvacMaterializeHdmsModelsToHost,
|
||||
bareOsQvacMirrorHostModelsToHdms
|
||||
} from './bare-os-qvac-models-store.mjs'
|
||||
import { bareOsQvacHostModelsDir } from './paths.js'
|
||||
import { bareOsQvacHostModelsDir } from '../host/paths.js'
|
||||
|
||||
/**
|
||||
* @param {unknown} env
|
||||
|
||||
@@ -7,7 +7,7 @@ import fs from '#host-fs'
|
||||
import {
|
||||
bareOsQvacHostModelsDir,
|
||||
bareOsQvacHostConfigPath
|
||||
} from './paths.js'
|
||||
} from '../host/paths.js'
|
||||
|
||||
export const BARE_OS_QVAC_MODELS_HDMS_LABEL = 'models'
|
||||
export const BARE_OS_QVAC_MODELS_GUEST_ROOT = '/mnt/models'
|
||||
|
||||
@@ -18,7 +18,7 @@ import { bareOsQvacPrepareHostCacheConfig } from './bare-os-qvac-models-store.mj
|
||||
import {
|
||||
bareOsQvacHostBackendsRoot,
|
||||
bundledExecCandidates
|
||||
} from './paths.js'
|
||||
} from '../host/paths.js'
|
||||
|
||||
const requireFromBind = createRequire(import.meta.url)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Idempotent managed Holesail entry for the stock bare-openssh listen address (see `bare-openssh.js`).
|
||||
* Same persistence rules as **`bare-os-www-holesail.js`** (`~/.holesail/state.json`).
|
||||
*/
|
||||
import { bareHolesailEnvTruthy } from './bare-holesail-env.js'
|
||||
import { bareHolesailEnvTruthy } from '../p2p/bare-holesail-env.js'
|
||||
import {
|
||||
bareHolesailManagedEnsureServerSeedPersisted,
|
||||
bareHolesailManagedGenerateSeedHex,
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
bareHolesailManagedStartOne,
|
||||
bareHolesailManagedStopOne,
|
||||
bareHolesailManagedWriteState
|
||||
} from './bare-holesail-managed.js'
|
||||
} from '../p2p/bare-holesail-managed.js'
|
||||
|
||||
export const BARE_OS_SSH_HOLESAIL_CONNECTION_ID_PREFIX = 'bare-ssh-'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Idempotent managed Holesail entry for the stock www static server port.
|
||||
*/
|
||||
import { bareHolesailEnvTruthy } from './bare-holesail-env.js'
|
||||
import { bareHolesailEnvTruthy } from '../p2p/bare-holesail-env.js'
|
||||
import {
|
||||
bareHolesailManagedEnsureServerSeedPersisted,
|
||||
bareHolesailManagedGenerateSeedHex,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
bareHolesailManagedStartOne,
|
||||
bareHolesailManagedStopOne,
|
||||
bareHolesailManagedWriteState
|
||||
} from './bare-holesail-managed.js'
|
||||
} from '../p2p/bare-holesail-managed.js'
|
||||
|
||||
export const BARE_OS_WWW_HOLESAIL_CONNECTION_ID_PREFIX = 'bare-www-'
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
findBareServiceDefinition,
|
||||
registerBareService,
|
||||
restartBareService
|
||||
} from './bare-initd.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from './bare-os-var-log.js'
|
||||
} from '../initd/bare-initd.js'
|
||||
import { appendVarLog, BARE_OS_VAR_LOG_DIR } from '../vfs/bare-os-var-log.js'
|
||||
import { ensureBareOsWwwHolesailTunnel } from './bare-os-www-holesail.js'
|
||||
import { listenTcpWithFallback } from './bare-os-bind-fallback.js'
|
||||
import { listenTcpWithFallback } from '../posix/bare-os-bind-fallback.js'
|
||||
|
||||
export const BARE_OS_WWW_LOG = `${BARE_OS_VAR_LOG_DIR}/www.log`
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
import bareCrypto from 'bare-crypto'
|
||||
import b4a from 'b4a'
|
||||
import { PBKDF2_ITERATIONS, sealBytes } from './identity-account.js'
|
||||
import { PBKDF2_ITERATIONS, sealBytes } from '../identity/identity-account.js'
|
||||
|
||||
const { pbkdf2Sync, randomFillSync } = bareCrypto
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { expandWord } from './shell-expand.js'
|
||||
import {
|
||||
applyBareOsThemeFromEnv,
|
||||
bareOsGetThemePreset
|
||||
} from './bare-os-theme-presets.js'
|
||||
} from '../cli/bare-os-theme-presets.js'
|
||||
|
||||
/** Max alias indirections (prevents cycles). */
|
||||
const MAX_ALIAS_DEPTH = 16
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* Shell implementation (tokenizer slice in {@link ./shell-tokenizer.js}; planner/executor here).
|
||||
*/
|
||||
import { runBinCommand, resolveBinInPath } from './kernel-runner.js'
|
||||
import { runBinCommand, resolveBinInPath } from '../boot/kernel-runner.js'
|
||||
import { tokenizeBareShellLineForDiagnostics } from './shell-tokenizer.js'
|
||||
import { tokenizeBareShellLineDetailed } from './shell-tokenizer.js'
|
||||
|
||||
export { tokenizeBareShellLineForDiagnostics }
|
||||
export { tokenizeBareShellLineDetailed }
|
||||
import { bareOsKernelMetricSet } from './bare-os-kernel-metrics.js'
|
||||
import { bareOsKernelMetricSet } from '../boot/bare-os-kernel-metrics.js'
|
||||
import { BARE_OS_SHELL_NOUNSET_ERROR } from './shell-nounset.js'
|
||||
import { bareOsEvalArithmeticExpr } from './shell-arithmetic.js'
|
||||
import {
|
||||
|
||||
@@ -12,11 +12,11 @@ import {
|
||||
normalizeFetchUrl,
|
||||
applyBareOsCurlResolveMap
|
||||
} from './http-fetch-url.js'
|
||||
import { assertFetchUrlHostAllowedByDnsPolicy } from './bare-os-dns-policy.js'
|
||||
import { assertFetchUrlHostAllowedByDnsPolicy } from '../security/bare-os-dns-policy.js'
|
||||
import {
|
||||
ensureBareFetchGlobals,
|
||||
resolveBareOsFetchFn
|
||||
} from './bare-os-ensure-bare-fetch.js'
|
||||
} from '../ctx/bare-os-ensure-bare-fetch.js'
|
||||
|
||||
function basicAuthHeader(user, pass) {
|
||||
const s = user + ':' + pass
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
import path from '#host-path'
|
||||
import * as git from 'isomorphic-git'
|
||||
import isomorphicGitHttpWeb from 'isomorphic-git/http/web'
|
||||
import { createGitFsFromVfs } from './git-fs-adapter.js'
|
||||
import { createGitFsFromVfs } from '../vfs/git-fs-adapter.js'
|
||||
import {
|
||||
ensureBareFetchGlobals,
|
||||
importResolvedOrBare,
|
||||
resolveBareOsFetchFn
|
||||
} from './bare-os-ensure-bare-fetch.js'
|
||||
} from '../ctx/bare-os-ensure-bare-fetch.js'
|
||||
|
||||
/** @type {import('isomorphic-git').HttpClient | null} */
|
||||
let httpNode = null
|
||||
|
||||
@@ -11,11 +11,11 @@ import {
|
||||
normalizeFetchUrl,
|
||||
applyBareOsCurlResolveMap
|
||||
} from './http-fetch-url.js'
|
||||
import { assertFetchUrlHostAllowedByDnsPolicy } from './bare-os-dns-policy.js'
|
||||
import { assertFetchUrlHostAllowedByDnsPolicy } from '../security/bare-os-dns-policy.js'
|
||||
import {
|
||||
ensureBareFetchGlobals,
|
||||
resolveBareOsFetchFn
|
||||
} from './bare-os-ensure-bare-fetch.js'
|
||||
} from '../ctx/bare-os-ensure-bare-fetch.js'
|
||||
|
||||
function usage() {
|
||||
return (
|
||||
|
||||
@@ -9,7 +9,7 @@ import b4a from 'b4a'
|
||||
|
||||
/**
|
||||
* @param {{ writeFile?: Function, mkdir?: Function } | null | undefined} vfs
|
||||
* @param {import('./hdms-manager.js').HdmsController | null | undefined} hdms
|
||||
* @param {import('../p2p/hdms-manager.js').HdmsController | null | undefined} hdms
|
||||
* @param {{ console?: { warn?: (msg: string) => void } }} [opts] Guest session console; omit to stay silent on failure (tests / minimal VFS).
|
||||
*/
|
||||
export async function persistBareOsMountsSnapshot(vfs, hdms, opts = {}) {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
import {
|
||||
BARE_OS_LIFECYCLE_SCHEMA_VERSION,
|
||||
BARE_OS_TELEMETRY_SCHEMA_VERSION
|
||||
} from './bare-os-lifecycle-schema.js'
|
||||
import { bareOsKernelMetricInc } from './bare-os-kernel-metrics.js'
|
||||
} from '../host/bare-os-lifecycle-schema.js'
|
||||
import { bareOsKernelMetricInc } from '../boot/bare-os-kernel-metrics.js'
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} ctx
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* /bin and /lib/bare warm read-cache maps + eviction helpers.
|
||||
*/
|
||||
import { bareOsKernelMetricInc } from './bare-os-kernel-metrics.js'
|
||||
import { bareOsKernelMetricInc } from '../boot/bare-os-kernel-metrics.js'
|
||||
|
||||
const BIN_READ_CACHE_MAX = 64
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import unixPathResolve from 'unix-path-resolve'
|
||||
import b4a from 'b4a'
|
||||
import { raceWithAbortAndTimeout } from './bare-os-abort.js'
|
||||
import { bareOsIpcLogicalToActualFifoName } from './bare-os-ipc-namespace.js'
|
||||
import { listBareInitdJournalUnits } from './bare-initd-journal.js'
|
||||
import { raceWithAbortAndTimeout } from '../security/bare-os-abort.js'
|
||||
import { bareOsIpcLogicalToActualFifoName } from '../tools/bare-os-ipc-namespace.js'
|
||||
import { listBareInitdJournalUnits } from '../initd/bare-initd-journal.js'
|
||||
import { bareOsVfsAclDeniesDriveOp } from './bare-os-vfs-acl-enforce.js'
|
||||
import { bareOsVfsPathCapabilityDeniesDriveRead } from './bare-os-path-capability.js'
|
||||
import { bareOsVfsPathCapabilityDeniesDriveRead } from '../security/bare-os-path-capability.js'
|
||||
import {
|
||||
extractBareOs,
|
||||
identityNames,
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
S_IFLNK,
|
||||
S_IFREG
|
||||
} from './vfs-posix-meta.js'
|
||||
import { bareOsKernelMetricInc } from './bare-os-kernel-metrics.js'
|
||||
import { bareOsKernelMetricInc } from '../boot/bare-os-kernel-metrics.js'
|
||||
import {
|
||||
classifyBareOsVfsPathClass,
|
||||
evaluateBareOsVfsPathPolicy,
|
||||
@@ -95,7 +95,7 @@ const DIR_MARKER = '.bareos_empty'
|
||||
* bootReadyJsonText?: () => string,
|
||||
* buildIdText?: () => string,
|
||||
* secureRandomBytes?: (n: number) => Uint8Array,
|
||||
* bareOsIpc?: ReturnType<import('./bare-os-ipc.js').createBareOsIpc> | null,
|
||||
* bareOsIpc?: ReturnType<import('../tools/bare-os-ipc.js').createBareOsIpc> | null,
|
||||
* procNetDevText?: () => string,
|
||||
* procDiskstatsText?: () => string,
|
||||
* procBareOsQuotasText?: () => string,
|
||||
@@ -2094,7 +2094,7 @@ export function createVfs(
|
||||
|
||||
/**
|
||||
* @param {string} userPath
|
||||
* @param {import('./bare-os-abort.js').BareOsAbortOpts} [abortOpts]
|
||||
* @param {import('../security/bare-os-abort.js').BareOsAbortOpts} [abortOpts]
|
||||
*/
|
||||
async readFile(userPath, abortOpts) {
|
||||
return raceWithAbortAndTimeout(
|
||||
|
||||
@@ -144,12 +144,12 @@
|
||||
"default": "node:url"
|
||||
},
|
||||
"#bare-os-boot-manifest-sig": {
|
||||
"bare": "./lib/bare-os-boot-manifest-sig.bare.js",
|
||||
"default": "./lib/bare-os-boot-manifest-sig.node.js"
|
||||
"bare": "./lib/boot/bare-os-boot-manifest-sig.bare.js",
|
||||
"default": "./lib/boot/bare-os-boot-manifest-sig.node.js"
|
||||
},
|
||||
"#pear-ctx-host": {
|
||||
"bare": "./lib/bare-os-ctx-pear-host.js",
|
||||
"default": "./lib/bare-os-ctx-pear-host.node.js"
|
||||
"bare": "./lib/ctx/bare-os-ctx-pear-host.js",
|
||||
"default": "./lib/ctx/bare-os-ctx-pear-host.node.js"
|
||||
},
|
||||
"#bare-discord-js": {
|
||||
"bare": "./vendor/bare-discord-js/src/index.js",
|
||||
|
||||
@@ -23,13 +23,13 @@ import b4a from 'b4a'
|
||||
import {
|
||||
bindReplDebugStream,
|
||||
unbindReplDebugStream
|
||||
} from '../lib/debug-repl.js'
|
||||
} from '../lib/cli/debug-repl.js'
|
||||
import {
|
||||
createFishReadLine,
|
||||
disableFishRawMode,
|
||||
releaseFishStdin
|
||||
} from '../lib/fish-readline.js'
|
||||
import { XTERM_CLEAR_SCROLLBACK_AND_VIEWPORT } from '../lib/terminal-escapes.js'
|
||||
} from '../lib/cli/fish-readline.js'
|
||||
import { XTERM_CLEAR_SCROLLBACK_AND_VIEWPORT } from '../lib/cli/terminal-escapes.js'
|
||||
|
||||
function mockCtx() {
|
||||
return {
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
bareHolesailManagedNewHolesailOpts,
|
||||
bareHolesailManagedReadState,
|
||||
bareHolesailManagedSeedLooksValid
|
||||
} from '../lib/bare-holesail-managed.js'
|
||||
} from '../lib/p2p/bare-holesail-managed.js'
|
||||
|
||||
/**
|
||||
* @param {typeof import('b4a').default} b4aMod
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* node scripts/ensure-pear-node-modules.mjs packages/bare-os-booter
|
||||
* cd packages/bare-os-booter && pear run --dev scripts/test-pear-ctx-load.mjs
|
||||
*/
|
||||
import { buildPearCtxObjectFromHost } from '../lib/bare-os-ctx-bare.js'
|
||||
import { buildPearCtxObjectFromHost } from '../lib/ctx/bare-os-ctx-bare.js'
|
||||
|
||||
const pearBooter = String(import.meta.url || '').startsWith('pear:')
|
||||
const target = {}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Booter host entry for standalone binaries.
|
||||
* Prefer static graph: pack-imports → index (OTA prelude is static inside index).
|
||||
*/
|
||||
import './lib/bare-os-discord-ws-bootstrap.mjs'
|
||||
import './lib/bare-os-standalone-pack-imports.mjs'
|
||||
import './lib/bare-os-ctx-discord-packed.js'
|
||||
import './lib/services/bare-os-discord-ws-bootstrap.mjs'
|
||||
import './lib/ctx/bare-os-standalone-pack-imports.mjs'
|
||||
import './lib/ctx/bare-os-ctx-discord-packed.js'
|
||||
import './index.js'
|
||||
|
||||
@@ -10,11 +10,11 @@ import {
|
||||
normalizeDiscordToken,
|
||||
parseDotEnvText,
|
||||
applyDiscordHostEnvToShellEnv
|
||||
} from './lib/bare-discord-js-loader.js'
|
||||
} from './lib/services/bare-discord-js-loader.js'
|
||||
import {
|
||||
registerPackedDiscordJs,
|
||||
takePackedDiscordJs
|
||||
} from './lib/bare-os-ctx-discord-registry.js'
|
||||
} from './lib/ctx/bare-os-ctx-discord-registry.js'
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')
|
||||
const examplePath = path.join(root, 'examples/discord-ping-pong/index.js')
|
||||
@@ -287,7 +287,7 @@ test('hanging login fails on gateway 4014 instead of waiting forever', async (t)
|
||||
|
||||
test('standalone pack loads Discord WS bootstrap before discord.js', (t) => {
|
||||
const packImports = fs.readFileSync(
|
||||
path.join(root, 'packages/bare-os-booter/lib/bare-os-standalone-pack-imports.mjs'),
|
||||
path.join(root, 'packages/bare-os-booter/lib/ctx/bare-os-standalone-pack-imports.mjs'),
|
||||
'utf8'
|
||||
)
|
||||
const standalone = fs.readFileSync(
|
||||
@@ -307,7 +307,7 @@ test('standalone pack loads Discord WS bootstrap before discord.js', (t) => {
|
||||
'pack-imports includes the Discord command catalog as CJS'
|
||||
)
|
||||
const initd = fs.readFileSync(
|
||||
path.join(root, 'packages/bare-os-booter/lib/bare-os-discord-initd.js'),
|
||||
path.join(root, 'packages/bare-os-booter/lib/services/bare-os-discord-initd.js'),
|
||||
'utf8'
|
||||
)
|
||||
t.ok(
|
||||
|
||||
@@ -8,12 +8,12 @@ import {
|
||||
readBareOsDiscordServiceEnv,
|
||||
syncBareOsDiscordInitd,
|
||||
stopBareOsDiscordInitd
|
||||
} from './lib/bare-os-discord-initd.js'
|
||||
} from './lib/services/bare-os-discord-initd.js'
|
||||
import {
|
||||
findBareServiceDefinition,
|
||||
listBareServices,
|
||||
unregisterBareService
|
||||
} from './lib/bare-initd.js'
|
||||
} from './lib/initd/bare-initd.js'
|
||||
import { createRequire } from 'node:module'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
@@ -317,7 +317,7 @@ function assertUniqueCustomIds(t, payload, label) {
|
||||
|
||||
test('discord command catalog builds Bare OS slash commands', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const body = cmds.buildSlashCommands({ SlashCommandBuilder: mockSlash() })
|
||||
const names = body.map((c) => c.name).sort()
|
||||
t.ok(names.indexOf('bare') >= 0)
|
||||
@@ -364,7 +364,7 @@ test('discord command catalog builds Bare OS slash commands', async (t) => {
|
||||
|
||||
test('Discord message components never reuse a custom_id', (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const kept = cmds.uniqueComponents([
|
||||
{
|
||||
type: 1,
|
||||
@@ -416,7 +416,7 @@ test('Discord message components never reuse a custom_id', (t) => {
|
||||
|
||||
test('Discord Menu button expands and collapses the nav chrome', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const views = []
|
||||
const ctx = { env: { USER: 'alice' }, vfs: { env: { USER: 'alice' } }, console: {} }
|
||||
await cmds.dispatchInteraction(ctx, {
|
||||
@@ -488,7 +488,7 @@ test('Discord Menu button expands and collapses the nav chrome', async (t) => {
|
||||
|
||||
test('idle timeout deletes stale embeds and falls back to stripping components', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.is(cmds.idleMs, 2 * 60 * 1000)
|
||||
|
||||
const deleted = []
|
||||
@@ -551,7 +551,7 @@ test('idle timeout deletes stale embeds and falls back to stripping components',
|
||||
|
||||
test('embed packer stays inside Discord limits and paginates long text', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.ok(cmds.LIMIT.embedTotal === 6000)
|
||||
t.ok(cmds.LIMIT.desc === 4096)
|
||||
t.ok(cmds.LIMIT.fieldValue === 1024)
|
||||
@@ -655,7 +655,7 @@ test('embed packer stays inside Discord limits and paginates long text', async (
|
||||
|
||||
test('DISCORD_ID_WHITELIST denies users not on the list', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const parsed = cmds.parseIdWhitelist(' 111 ,222, <@333> ')
|
||||
t.is(parsed['111'], 1)
|
||||
t.is(parsed['222'], 1)
|
||||
@@ -882,7 +882,7 @@ test('DISCORD_ID_WHITELIST denies users not on the list', async (t) => {
|
||||
|
||||
test('user-install slash PUT is always global', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.is(
|
||||
cmds.userInstallAuthorizeUrl('123'),
|
||||
'https://discord.com/oauth2/authorize?client_id=123'
|
||||
@@ -919,7 +919,7 @@ test('user-install slash PUT is always global', async (t) => {
|
||||
|
||||
test('Discord commands use unlocked identity, not guest env', (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const pk = Buffer.from('7fcd9053afcd', 'hex')
|
||||
const ctx = {
|
||||
env: { USER: 'guest', HOME: '/home/guest', LOGNAME: 'guest' },
|
||||
@@ -935,7 +935,7 @@ test('Discord commands use unlocked identity, not guest env', (t) => {
|
||||
|
||||
test('slash autocomplete offers units and run shell commands', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const runChoices = []
|
||||
await cmds.dispatchInteraction(
|
||||
{ env: { USER: 'alice' }, vfs: { env: { USER: 'alice' } }, console: {} },
|
||||
@@ -1000,7 +1000,7 @@ test('slash autocomplete offers units and run shell commands', async (t) => {
|
||||
|
||||
test('Discord /run is a persistent non-interactive shell', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const env = { USER: 'alice', HOME: '/home/alice', PWD: '/home/alice', HOSTNAME: 'bare-os' }
|
||||
const ctx = {
|
||||
env,
|
||||
@@ -1111,7 +1111,7 @@ test('Discord /run is a persistent non-interactive shell', async (t) => {
|
||||
|
||||
test('Discord /upload wget-saves an attachment into the /run cwd', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const env = { USER: 'alice', HOME: '/home/alice', PWD: '/home/alice' }
|
||||
const written = {}
|
||||
const lines = []
|
||||
@@ -1273,7 +1273,7 @@ test('Discord /upload wget-saves an attachment into the /run cwd', async (t) =>
|
||||
|
||||
test('Discord /hdms manages extra Hyperdrives', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.alike(
|
||||
cmds.parseHdmsList('notes\twritable\tz32abc\nwww\treadonly\tkey2\tephemeral\n'),
|
||||
[
|
||||
@@ -1459,7 +1459,7 @@ test('Discord /hdms manages extra Hyperdrives', async (t) => {
|
||||
|
||||
test('Discord /holesail manages tunnels and the bare-holesail unit', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.alike(
|
||||
cmds.parseHolesailList(
|
||||
[
|
||||
@@ -1711,7 +1711,7 @@ test('Discord /holesail manages tunnels and the bare-holesail unit', async (t) =
|
||||
|
||||
test('Discord /agent is gated on config and runs the guest agent', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const body = cmds.buildSlashCommands({ SlashCommandBuilder: mockSlash() })
|
||||
const agentCmd = body.find((c) => c.name === 'agent')
|
||||
t.ok(agentCmd, 'slash /agent exists')
|
||||
@@ -2114,7 +2114,7 @@ test('Discord /agent is gated on config and runs the guest agent', async (t) =>
|
||||
|
||||
test('Discord /run captures stdout, raw writes, and writeScreen (no TTY leak)', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const leaked = []
|
||||
const origOut = process.stdout.write
|
||||
const origErr = process.stderr.write
|
||||
@@ -2264,7 +2264,7 @@ test('Discord /run captures stdout, raw writes, and writeScreen (no TTY leak)',
|
||||
|
||||
test('Discord strips ANSI color from every outbound payload', (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const colored = '\u001b[01;32magent\u001b[0m \u001b[01;34mappctl\u001b[0m'
|
||||
t.is(cmds.stripAnsi(colored), 'agent appctl')
|
||||
t.is(cmds.stripAnsi('\u001b]8;;https://x\u0007link\u001b]8;;\u0007'), 'link')
|
||||
@@ -2284,7 +2284,7 @@ test('Discord strips ANSI color from every outbound payload', (t) => {
|
||||
|
||||
test('Discord plugins load JSON and JS from ~/.discord/plugins', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const tree = {
|
||||
'~/.discord': ['plugins'],
|
||||
'~/.discord/plugins': ['hello.json', 'echo.js', 'run.json', 'disabled.txt'],
|
||||
@@ -2408,7 +2408,7 @@ test('Discord plugins load JSON and JS from ~/.discord/plugins', async (t) => {
|
||||
|
||||
test('Discord modal editor writes allowed paths and blocks secrets', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const ctxBase = {
|
||||
env: { USER: 'alice', HOME: '/home/alice' },
|
||||
vfs: { env: { USER: 'alice', HOME: '/home/alice' } }
|
||||
@@ -2497,7 +2497,7 @@ test('Discord modal editor writes allowed paths and blocks secrets', async (t) =
|
||||
|
||||
test('Discord /create picks a path and writes a new file, refusing overwrite', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const written = []
|
||||
const files = { '~/notes.txt': 'old' }
|
||||
const ctx = {
|
||||
@@ -2621,7 +2621,7 @@ test('Discord /create picks a path and writes a new file, refusing overwrite', a
|
||||
|
||||
test('Discord /files browser lists, opens dirs, mkdir and delete', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.is(cmds.joinPath('~', 'a'), '~/a')
|
||||
t.is(cmds.parentPath('~/a/b'), '~/a')
|
||||
t.is(cmds.parentPath('~'), '~')
|
||||
@@ -2748,7 +2748,7 @@ test('Discord /files browser lists, opens dirs, mkdir and delete', async (t) =>
|
||||
|
||||
test('Discord /settings browses groups, toggles live flags, and never writes secrets', async (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.ok(cmds.settingsSpecs.some((s) => s.id === 'theme'))
|
||||
t.ok(cmds.settingsSpecs.some((s) => s.id === 'errexit'))
|
||||
const secretKey = /^(DISCORD_TOKEN|rest_api_key|saslPass|require_confirm_token)$/
|
||||
@@ -2929,7 +2929,7 @@ test('Discord /settings browses groups, toggles live flags, and never writes sec
|
||||
|
||||
test('proc JSON and systemctl text are parsed into embed fields', (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
t.is(cmds.prettyBytes(1536), '1.5 KiB')
|
||||
t.is(cmds.parseMeminfo('MemTotal: 2048 kB\nMemAvailable: 1024 kB\n').MemTotal, 2048 * 1024)
|
||||
const units = cmds.parseSystemctlList(
|
||||
@@ -3024,7 +3024,7 @@ test('proc JSON and systemctl text are parsed into embed fields', (t) => {
|
||||
|
||||
test('process.emitWarning polyfill and reply payload avoid Bare throw', (t) => {
|
||||
const req = createRequire(fileURLToPath(import.meta.url))
|
||||
const cmds = req('./lib/bare-os-discord-commands-guest.cjs')
|
||||
const cmds = req('./lib/services/bare-os-discord-commands-guest.cjs')
|
||||
const stub = {}
|
||||
cmds.installProcessEmitWarning(stub)
|
||||
t.is(typeof stub.emitWarning, 'function')
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* `test` / `test:bare`. Skips under plain Node if accidentally invoked.
|
||||
*/
|
||||
import test from 'brittle'
|
||||
import { ensureGlobalRequireForCtxBareHostImports } from './lib/bare-os-ctx-bare.js'
|
||||
import { loadBareDiscordJs } from './lib/bare-discord-js-loader.js'
|
||||
import { ensureGlobalRequireForCtxBareHostImports } from './lib/ctx/bare-os-ctx-bare.js'
|
||||
import { loadBareDiscordJs } from './lib/services/bare-discord-js-loader.js'
|
||||
|
||||
function bareRuntime() {
|
||||
if (typeof globalThis.Bare !== 'undefined') return true
|
||||
|
||||
@@ -13,13 +13,13 @@ import {
|
||||
bareHolesailManagedSeedLooksValid,
|
||||
bareHolesailManagedStatePath,
|
||||
bareHolesailManagedValidateId
|
||||
} from './lib/bare-holesail-managed.js'
|
||||
} from './lib/p2p/bare-holesail-managed.js'
|
||||
import {
|
||||
holesailCliFormatListRow,
|
||||
holesailCliParseAdd,
|
||||
holesailCliParseEdit,
|
||||
runHolesailCli
|
||||
} from './lib/holesail-cli.js'
|
||||
} from './lib/p2p/holesail-cli.js'
|
||||
|
||||
test('bareHolesailManagedStatePath defaults to ~/.holesail and honors override', (t) => {
|
||||
t.is(
|
||||
|
||||
@@ -2,9 +2,9 @@ import test from 'brittle'
|
||||
import {
|
||||
bareHolesailEnvTruthy,
|
||||
bareHolesailParseConfig
|
||||
} from './lib/bare-holesail.js'
|
||||
import { loadHolesailConstructor } from './lib/bare-holesail-loader.js'
|
||||
import { tryLoadBareCtxKeyFromDriveBundlePath } from './lib/bare-os-ctx-bare.js'
|
||||
} from './lib/p2p/bare-holesail.js'
|
||||
import { loadHolesailConstructor } from './lib/p2p/bare-holesail-loader.js'
|
||||
import { tryLoadBareCtxKeyFromDriveBundlePath } from './lib/ctx/bare-os-ctx-bare.js'
|
||||
|
||||
test('bareHolesailEnvTruthy', (t) => {
|
||||
t.ok(bareHolesailEnvTruthy('1'))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import test from 'brittle'
|
||||
import { bareOpensshFormatConsoleTextForPty } from './lib/bare-openssh-pty-console.js'
|
||||
import { bareOpensshFormatConsoleTextForPty } from './lib/services/bare-openssh-pty-console.js'
|
||||
|
||||
test('bareOpensshFormatConsoleTextForPty converts LF to CRLF', (t) => {
|
||||
t.is(bareOpensshFormatConsoleTextForPty('a\nb'), 'a\r\nb')
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from 'brittle'
|
||||
import {
|
||||
bareOsSftpAllowedLogicalPath,
|
||||
bareOsSftpDeniesWriteOpen
|
||||
} from './lib/bare-openssh-sftp.js'
|
||||
} from './lib/services/bare-openssh-sftp.js'
|
||||
|
||||
const OPEN_MODE = {
|
||||
READ: 0x00000001,
|
||||
@@ -15,7 +15,7 @@ const OPEN_MODE = {
|
||||
const home = '/home/guest'
|
||||
|
||||
test('bareOsSftpAllowedLogicalPath allows /lib and /home', (t) => {
|
||||
t.ok(bareOsSftpAllowedLogicalPath('/lib/bare/bare-module-manifest.json', home))
|
||||
t.ok(bareOsSftpAllowedLogicalPath('./lib/ctx/bare-module-manifest.json', home))
|
||||
t.ok(bareOsSftpAllowedLogicalPath('/bin/sh', home))
|
||||
t.ok(bareOsSftpAllowedLogicalPath('/home/guest/x', home))
|
||||
t.ok(bareOsSftpAllowedLogicalPath('/proc/version', home))
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
listenTcpWithFallback,
|
||||
readListeningTcpPort,
|
||||
BARE_OS_BIND_FALLBACK_ENV
|
||||
} from './lib/bare-os-bind-fallback.js'
|
||||
} from './lib/posix/bare-os-bind-fallback.js'
|
||||
|
||||
test('bindFallbackEnabled', (t) => {
|
||||
t.ok(bindFallbackEnabled({}))
|
||||
|
||||
@@ -7,8 +7,8 @@ import net from 'net'
|
||||
import Protomux from 'protomux'
|
||||
import b4a from 'b4a'
|
||||
import crypto from 'hypercore-crypto'
|
||||
import { SwarmDisk } from './lib/swarm-disk.js'
|
||||
import { createBareOsChatService } from './lib/bare-os-chat-service.js'
|
||||
import { SwarmDisk } from './lib/p2p/swarm-disk.js'
|
||||
import { createBareOsChatService } from './lib/services/bare-os-chat-service.js'
|
||||
|
||||
/** @returns {Promise<{ srvSock: net.Socket, cliSock: net.Socket }>} */
|
||||
function tcpDuplexPair() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import test from 'brittle'
|
||||
import { createBareOsChatService } from './lib/bare-os-chat-service.js'
|
||||
import { createBareOsMeshdropService } from './lib/bare-os-meshdrop-service.js'
|
||||
import { createBareOsChatService } from './lib/services/bare-os-chat-service.js'
|
||||
import { createBareOsMeshdropService } from './lib/p2p/bare-os-meshdrop-service.js'
|
||||
|
||||
test('chat service snapshot exposes protocol id', async (t) => {
|
||||
const svc = createBareOsChatService({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import test from 'brittle'
|
||||
import b4a from 'b4a'
|
||||
import { createBareOsChatService } from './lib/bare-os-chat-service.js'
|
||||
import { createBareOsChatService } from './lib/services/bare-os-chat-service.js'
|
||||
|
||||
test('broadcastLocal senderPk equals Noise socket.publicKey', async (t) => {
|
||||
const wirePk = b4a.alloc(32)
|
||||
|
||||
@@ -5,19 +5,19 @@ import Corestore from 'corestore'
|
||||
import { mkdirSync, rmSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { createBareOsIpc } from './lib/bare-os-ipc.js'
|
||||
import { createVfs } from './lib/vfs/vfs.js'
|
||||
import { createBareOsIpc } from './lib/tools/bare-os-ipc.js'
|
||||
import {
|
||||
bareHolesailManagedStartService,
|
||||
bareHolesailManagedStopService,
|
||||
bareHolesailManagedPersistentSeedLooksValid,
|
||||
bareHolesailManagedReadState,
|
||||
bareHolesailManagedWriteState
|
||||
} from './lib/bare-holesail-managed.js'
|
||||
} from './lib/p2p/bare-holesail-managed.js'
|
||||
import {
|
||||
bareOsSshHolesailConnectionId,
|
||||
ensureBareOsSshHolesailTunnel
|
||||
} from './lib/bare-os-ssh-holesail.js'
|
||||
} from './lib/services/bare-os-ssh-holesail.js'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import Corestore from 'corestore'
|
||||
import { mkdirSync, rmSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { createBareOsIpc } from './lib/bare-os-ipc.js'
|
||||
import { createVfs } from './lib/vfs/vfs.js'
|
||||
import { createBareOsIpc } from './lib/tools/bare-os-ipc.js'
|
||||
import {
|
||||
bareOsWwwInitdEnabled,
|
||||
bareOsWwwResolveStaticPath,
|
||||
@@ -14,19 +14,19 @@ import {
|
||||
ensureBareOsWwwHomeDefaults,
|
||||
maybeRegisterBareOsWwwInitd,
|
||||
maybeRestartBareOsWwwAfterIdentity
|
||||
} from './lib/bare-os-www-initd.js'
|
||||
import { findBareServiceDefinition } from './lib/bare-initd.js'
|
||||
} from './lib/services/bare-os-www-initd.js'
|
||||
import { findBareServiceDefinition } from './lib/initd/bare-initd.js'
|
||||
import {
|
||||
bareHolesailManagedStartService,
|
||||
bareHolesailManagedStopService,
|
||||
bareHolesailManagedPersistentSeedLooksValid,
|
||||
bareHolesailManagedReadState,
|
||||
bareHolesailManagedWriteState
|
||||
} from './lib/bare-holesail-managed.js'
|
||||
} from './lib/p2p/bare-holesail-managed.js'
|
||||
import {
|
||||
bareOsWwwHolesailConnectionId,
|
||||
ensureBareOsWwwHolesailTunnel
|
||||
} from './lib/bare-os-www-holesail.js'
|
||||
} from './lib/services/bare-os-www-holesail.js'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import test from 'brittle'
|
||||
import b4a from 'b4a'
|
||||
import crypto from 'hypercore-crypto'
|
||||
import { buildMbr, parseMbr, topicKey, TOPIC_STRING, BLOCK_SIZE } from 'bare-os-protocol'
|
||||
import { createBareOsDiskOsBridge } from './lib/bare-os-disk-os-bridge.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/bare-os-ctx-api.js'
|
||||
import { createBareOsDiskOsBridge } from './lib/host/bare-os-disk-os-bridge.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/ctx/bare-os-ctx-api.js'
|
||||
|
||||
function hostEnv() {
|
||||
return globalThis.process && globalThis.process.env ? globalThis.process.env : null
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from 'brittle'
|
||||
import {
|
||||
parseBareOsHrpcAllowlistJson,
|
||||
bareOsHrpcAllowlistDeniesRoute
|
||||
} from './lib/bare-os-hrpc-allowlist.js'
|
||||
} from './lib/tools/bare-os-hrpc-allowlist.js'
|
||||
|
||||
test('parseBareOsHrpcAllowlistJson array and object forms', (t) => {
|
||||
const a = parseBareOsHrpcAllowlistJson('["kernel.ping","vfs.readText"]')
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
exportPersonalDriveNamespace,
|
||||
invalidateIdentityCachesAndHistory,
|
||||
importPersonalDriveNamespace
|
||||
} from './lib/identity-session.js'
|
||||
} from './lib/identity/identity-session.js'
|
||||
|
||||
test('exportPersonalDriveNamespace derives uid account prefix for unlocked users', (t) => {
|
||||
const ns = exportPersonalDriveNamespace({
|
||||
|
||||
@@ -17,9 +17,9 @@ import {
|
||||
sealBytes,
|
||||
openBytes,
|
||||
vaultKeyFromSecret
|
||||
} from './lib/identity-account.js'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { migrateLegacyPersonalHomeIfNeeded } from './lib/identity-session.js'
|
||||
} from './lib/identity/identity-account.js'
|
||||
import { createVfs } from './lib/vfs/vfs.js'
|
||||
import { migrateLegacyPersonalHomeIfNeeded } from './lib/identity/identity-session.js'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
bareOsIrcPlaintextAllowed,
|
||||
bareOsIrcIsLiberaHost,
|
||||
BARE_OS_IRC_DEFAULT_ALLOW
|
||||
} from './lib/bare-os-irc-policy.js'
|
||||
} from './lib/services/bare-os-irc-policy.js'
|
||||
|
||||
test('stock allowlist includes Libera names', (t) => {
|
||||
t.ok(BARE_OS_IRC_DEFAULT_ALLOW.indexOf('irc.libera.chat') >= 0)
|
||||
|
||||
@@ -7,16 +7,16 @@ import {
|
||||
BARE_OS_KERNEL_CAPABILITY_WORDS_JSON_KEY,
|
||||
BARE_OS_KERNEL_FEATURES_STOCK_WORD_PRIMARY
|
||||
} from 'bare-os-protocol'
|
||||
import { createBareOsDiskOsBridge } from './lib/bare-os-disk-os-bridge.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/bare-os-ctx-api.js'
|
||||
import { buildStockKernelCapabilityWords } from './lib/bare-os-capability-registry.js'
|
||||
import { createBareOsDiskOsBridge } from './lib/host/bare-os-disk-os-bridge.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from './lib/ctx/bare-os-ctx-api.js'
|
||||
import { buildStockKernelCapabilityWords } from './lib/security/bare-os-capability-registry.js'
|
||||
import {
|
||||
buildPeerSeedSnapshots,
|
||||
computePeerSystemSeedEligibility,
|
||||
maybeSynthesizePeerSeedCapabilityInfo,
|
||||
peerSystemSeedEnvEnabled,
|
||||
peerSystemSeedExplicitAffirmative
|
||||
} from './lib/bare-os-peer-system-seed.js'
|
||||
} from './lib/p2p/bare-os-peer-system-seed.js'
|
||||
|
||||
function mockDisk(overrides = {}) {
|
||||
const words = buildStockKernelCapabilityWords(
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
const booterIndex = join(__dirname, 'index.js')
|
||||
const vfsPath = join(__dirname, 'lib/vfs.js')
|
||||
const vfsPath = join(__dirname, 'lib/vfs/vfs.js')
|
||||
|
||||
test('booter exposes peer details proc producers', async (t) => {
|
||||
const src = await readFile(booterIndex, 'utf8')
|
||||
|
||||
@@ -7,76 +7,76 @@ import {
|
||||
bareOsFlattenSendmsgIovs,
|
||||
bareOsSendmsgAncillaryRejectReason,
|
||||
bareOsResolveCooperativeLockPath
|
||||
} from './lib/bare-os-posix-syscall-helpers.js'
|
||||
import { redactAuditShellLine } from './lib/bare-os-audit-redact.js'
|
||||
} from './lib/posix/bare-os-posix-syscall-helpers.js'
|
||||
import { redactAuditShellLine } from './lib/security/bare-os-audit-redact.js'
|
||||
import {
|
||||
isExecLineBuiltinDenied,
|
||||
shellCommandDeniedByPolicy,
|
||||
shellUnsafeRedirectPath
|
||||
} from './lib/shell-policy.js'
|
||||
} from './lib/shell/shell-policy.js'
|
||||
import {
|
||||
joinLogical,
|
||||
dirnameAbs,
|
||||
pathPrefixes,
|
||||
isHyperdriveRootPath
|
||||
} from './lib/vfs-path.js'
|
||||
import { bareOsProtomuxTuningFromEnv } from './lib/swarm-opts.js'
|
||||
} from './lib/vfs/vfs-path.js'
|
||||
import { bareOsProtomuxTuningFromEnv } from './lib/p2p/swarm-opts.js'
|
||||
import {
|
||||
bareOsDupLogicalFdForScm,
|
||||
prepareBridgeSendmsg,
|
||||
bareOsShutdownSocketBridgeFd
|
||||
} from './lib/bare-os-socket-bridge.js'
|
||||
import { createStockBareOsHrpcRequest } from './lib/bare-os-hrpc-stock-request.js'
|
||||
} from './lib/posix/bare-os-socket-bridge.js'
|
||||
import { createStockBareOsHrpcRequest } from './lib/tools/bare-os-hrpc-stock-request.js'
|
||||
import {
|
||||
splitTopLevelStatements,
|
||||
isValidShellIdentifier,
|
||||
parseShellFunctionDeclaration,
|
||||
casePatternMatches
|
||||
} from './lib/shell-syntax.js'
|
||||
import { createVfsPersonalLayout } from './lib/vfs-personal.js'
|
||||
} from './lib/shell/shell-syntax.js'
|
||||
import { createVfsPersonalLayout } from './lib/vfs/vfs-personal.js'
|
||||
import {
|
||||
listBareOsShellBuiltins,
|
||||
isShellBuiltin,
|
||||
bareOsShellReadSplitFields
|
||||
} from './lib/shell-builtins.js'
|
||||
} from './lib/shell/shell-builtins.js'
|
||||
import {
|
||||
getBareOsPipelineLimits,
|
||||
mergePipelineChildCtx,
|
||||
DEFAULT_PIPELINE_MAX_STAGES
|
||||
} from './lib/shell-runtime.js'
|
||||
import { expandWord, expandShellWordTokens } from './lib/shell-expand.js'
|
||||
} from './lib/shell/shell-runtime.js'
|
||||
import { expandWord, expandShellWordTokens } from './lib/shell/shell-expand.js'
|
||||
import {
|
||||
utf8Encode,
|
||||
createVfsPseudoLinux
|
||||
} from './lib/vfs-pseudo-linux.js'
|
||||
import { createBareOsVirtualSignalDeliverer } from './lib/bare-os-virtual-signal.js'
|
||||
import { createKernelLoaderAuditAppend } from './lib/bare-os-loader-audit.js'
|
||||
import { createBooterBootEmitter } from './lib/bare-os-boot-phases.js'
|
||||
import { createBooterProcHelpers } from './lib/bare-os-booter-proc-helpers.js'
|
||||
import { tokenize } from './lib/shell-token.js'
|
||||
} from './lib/vfs/vfs-pseudo-linux.js'
|
||||
import { createBareOsVirtualSignalDeliverer } from './lib/posix/bare-os-virtual-signal.js'
|
||||
import { createKernelLoaderAuditAppend } from './lib/host/bare-os-loader-audit.js'
|
||||
import { createBooterBootEmitter } from './lib/boot/bare-os-boot-phases.js'
|
||||
import { createBooterProcHelpers } from './lib/proc/bare-os-booter-proc-helpers.js'
|
||||
import { tokenize } from './lib/shell/shell-token.js'
|
||||
import {
|
||||
defaultShellAliases,
|
||||
expandArgvAliases,
|
||||
applyAliasDefinition
|
||||
} from './lib/shell-alias.js'
|
||||
} from './lib/shell/shell-alias.js'
|
||||
import {
|
||||
parsePipeline,
|
||||
splitTokensBySemicolon,
|
||||
splitTokensByAndOr,
|
||||
planShellRedirections,
|
||||
buildShellExecutionGraph
|
||||
} from './lib/shell-parse.js'
|
||||
} from './lib/shell/shell-parse.js'
|
||||
import {
|
||||
assertUnionWriteNotDenied,
|
||||
assertNotBootPolicyDenyVfs
|
||||
} from './lib/vfs-policy.js'
|
||||
import { createVfsWarmReadCache } from './lib/vfs-warm-cache.js'
|
||||
import { createSessionReadMaskedLine } from './lib/cli-readline.js'
|
||||
} from './lib/vfs/vfs-policy.js'
|
||||
import { createVfsWarmReadCache } from './lib/vfs/vfs-warm-cache.js'
|
||||
import { createSessionReadMaskedLine } from './lib/cli/cli-readline.js'
|
||||
import {
|
||||
bareOsPipelineChildCtx,
|
||||
bareOsPipelineRawChunkToText,
|
||||
runWithShellPipelineStageTimeout
|
||||
} from './lib/shell-pipeline.js'
|
||||
} from './lib/shell/shell-pipeline.js'
|
||||
import {
|
||||
assignShellFunctionPositionalEnv,
|
||||
tryReportMisplacedReservedStatementStart,
|
||||
@@ -84,14 +84,14 @@ import {
|
||||
execDoubleBracketLimited,
|
||||
bareOsResetShellIdentityState,
|
||||
consumeInteractiveHeredoc
|
||||
} from './lib/shell-stmt.js'
|
||||
import { createVfsRouteHelpers } from './lib/vfs-route.js'
|
||||
import { createBareOsPosixFdSimMethods } from './lib/bare-os-posix-fd-sim.js'
|
||||
import { createBareOsPathconfMethods } from './lib/bare-os-pathconf.js'
|
||||
import { createBareOsLogicalFdMethods } from './lib/bare-os-logical-fd.js'
|
||||
import { createVfsPseudoFileBytes } from './lib/vfs-pseudo-bytes.js'
|
||||
import { createBareOsLifecycleHookMethods } from './lib/bare-os-lifecycle-hooks.js'
|
||||
import { createBareOsProcessControlMethods } from './lib/bare-os-process-control.js'
|
||||
} from './lib/shell/shell-stmt.js'
|
||||
import { createVfsRouteHelpers } from './lib/vfs/vfs-route.js'
|
||||
import { createBareOsPosixFdSimMethods } from './lib/posix/bare-os-posix-fd-sim.js'
|
||||
import { createBareOsPathconfMethods } from './lib/posix/bare-os-pathconf.js'
|
||||
import { createBareOsLogicalFdMethods } from './lib/posix/bare-os-logical-fd.js'
|
||||
import { createVfsPseudoFileBytes } from './lib/vfs/vfs-pseudo-bytes.js'
|
||||
import { createBareOsLifecycleHookMethods } from './lib/host/bare-os-lifecycle-hooks.js'
|
||||
import { createBareOsProcessControlMethods } from './lib/posix/bare-os-process-control.js'
|
||||
|
||||
test('posix env flags and caps', (t) => {
|
||||
t.ok(wantPosixSocketFdBridge({ BARE_OS_POSIX_SOCKET_FD_BRIDGE: '1' }))
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
bareOsQvacRankGpus,
|
||||
bareOsQvacMainGpuCandidates,
|
||||
bareOsQvacProbeGpus
|
||||
} from './lib/bare-os-qvac-gpu-probe.mjs'
|
||||
} from './lib/services/bare-os-qvac-gpu-probe.mjs'
|
||||
|
||||
const SAMPLE_VULKAN = `
|
||||
GPU0:
|
||||
@@ -113,7 +113,7 @@ test('probe with injected runCommand', async (t) => {
|
||||
|
||||
test('parse system_profiler displays JSON → metal GPU', async (t) => {
|
||||
const { bareOsQvacParseSystemProfilerDisplays, bareOsQvacParseMetalMemory } =
|
||||
await import('./lib/bare-os-qvac-gpu-probe.mjs')
|
||||
await import('./lib/services/bare-os-qvac-gpu-probe.mjs')
|
||||
const gpus = bareOsQvacParseSystemProfilerDisplays(
|
||||
JSON.stringify({
|
||||
SPDisplaysDataType: [
|
||||
@@ -153,7 +153,7 @@ test('software Vulkan devices are detected and ranked last', async (t) => {
|
||||
bareOsQvacScoreVulkanIcdFilename,
|
||||
bareOsQvacDiscoverHardwareVulkanIcds,
|
||||
bareOsQvacApplyHardwareVulkanEnv
|
||||
} = await import('./lib/bare-os-qvac-gpu-probe.mjs')
|
||||
} = await import('./lib/services/bare-os-qvac-gpu-probe.mjs')
|
||||
|
||||
t.ok(
|
||||
bareOsQvacIsSoftwareVulkanDevice({
|
||||
@@ -228,7 +228,7 @@ test('AMD RADV is preferred over unused Mesa ICDs', async (t) => {
|
||||
bareOsQvacPreferredVulkanIcds,
|
||||
bareOsQvacDiscoverHardwareVulkanIcds,
|
||||
bareOsQvacApplyHardwareVulkanEnv
|
||||
} = await import('./lib/bare-os-qvac-gpu-probe.mjs')
|
||||
} = await import('./lib/services/bare-os-qvac-gpu-probe.mjs')
|
||||
|
||||
t.is(bareOsQvacVulkanIcdVendor('radeon_icd.json'), 'amd')
|
||||
t.is(bareOsQvacVulkanIcdVendor('gfxstream_vk_icd.json'), 'virtual')
|
||||
@@ -279,7 +279,7 @@ test('AMD RADV is preferred over unused Mesa ICDs', async (t) => {
|
||||
|
||||
test('nvidia-smi without NVIDIA ICD keeps hardware list and SELECT', async (t) => {
|
||||
const { bareOsQvacApplyHardwareVulkanEnv } = await import(
|
||||
'./lib/bare-os-qvac-gpu-probe.mjs'
|
||||
'./lib/services/bare-os-qvac-gpu-probe.mjs'
|
||||
)
|
||||
/** @type {Record<string, string>} */
|
||||
const procEnv = {}
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
bareOsQvacBuildModelConfig,
|
||||
bareOsQvacPickVulkanPin,
|
||||
createBareOsQvacBridge
|
||||
} from './lib/bare-os-qvac-host.mjs'
|
||||
import { bareOsQvacHostIsDarwin } from './lib/bare-os-qvac-gpu-probe.mjs'
|
||||
} from './lib/services/bare-os-qvac-host.mjs'
|
||||
import { bareOsQvacHostIsDarwin } from './lib/services/bare-os-qvac-gpu-probe.mjs'
|
||||
|
||||
test('BARE_OS_SKIP_QVAC disables bridge', async (t) => {
|
||||
t.ok(bareOsQvacSkipFromEnv({ BARE_OS_SKIP_QVAC: '1' }))
|
||||
@@ -189,7 +189,7 @@ test('backendsDir resolves to real prebuilds (not app.bundle)', async (t) => {
|
||||
const {
|
||||
bareOsQvacNativeHostId,
|
||||
bareOsQvacResolveBackendsDir
|
||||
} = await import('./lib/bare-os-qvac-sdk-bind.mjs')
|
||||
} = await import('./lib/services/bare-os-qvac-sdk-bind.mjs')
|
||||
const host = bareOsQvacNativeHostId()
|
||||
t.ok(/^(darwin|linux|win32)-/.test(host))
|
||||
const dir = bareOsQvacResolveBackendsDir()
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
bareOsQvacListHdmsGgufs,
|
||||
bareOsQvacFindHdmsGguf,
|
||||
BARE_OS_QVAC_MODELS_GUEST_ROOT
|
||||
} from './lib/bare-os-qvac-models-store.mjs'
|
||||
} from './lib/services/bare-os-qvac-models-store.mjs'
|
||||
|
||||
test('guest/host path + hash prefix mapping', async (t) => {
|
||||
t.is(
|
||||
@@ -181,7 +181,7 @@ test('config require shim wraps existing Bare require for host JSON', async (t)
|
||||
const err = new Error(
|
||||
"MODULE_NOT_FOUND: Cannot find module '" +
|
||||
id +
|
||||
"' imported from 'bare:/app.bundle/packages/bare-os-booter/lib/bare-os-ctx-bare.js'"
|
||||
"' imported from 'bare:/app.bundle/packages/bare-os-booter/lib/ctx/bare-os-ctx-bare.js'"
|
||||
)
|
||||
err.code = 'MODULE_NOT_FOUND'
|
||||
throw err
|
||||
|
||||
@@ -933,7 +933,7 @@ test('coreutils gnu-gap batch: paste tac rev md5sum expr tsort numfmt truncate i
|
||||
|
||||
test('verifyPathCapabilityEnvelope rejects invalid envelopes', async (t) => {
|
||||
const { verifyPathCapabilityEnvelope } = await import(
|
||||
'./lib/bare-os-path-capability.js'
|
||||
'./lib/security/bare-os-path-capability.js'
|
||||
)
|
||||
t.ok(!verifyPathCapabilityEnvelope(null).ok)
|
||||
t.ok(!verifyPathCapabilityEnvelope({ schema: 2 }).ok)
|
||||
@@ -986,7 +986,7 @@ test('unit journal exposed under /run/bare-os/unit-journal', async (t) => {
|
||||
appendBareInitdJournal,
|
||||
clearBareInitdJournalForTests,
|
||||
getBareInitdJournalNdjson
|
||||
} = await import('./lib/bare-initd-journal.js')
|
||||
} = await import('./lib/initd/bare-initd-journal.js')
|
||||
clearBareInitdJournalForTests()
|
||||
appendBareInitdJournal('demo', { event: 'unit_test' })
|
||||
const dir = testCorestoreDir('vj')
|
||||
@@ -1176,7 +1176,7 @@ test('bareOsIpc.stats includes ipcBackpressure topChannels', async (t) => {
|
||||
})
|
||||
|
||||
test('bareOsWasmKernelCompile bounds and compile path', async (t) => {
|
||||
const { bareOsWasmKernelCompile } = await import('./lib/bare-os-wasm-kernel.js')
|
||||
const { bareOsWasmKernelCompile } = await import('./lib/boot/bare-os-wasm-kernel.js')
|
||||
const big = new Uint8Array(600 * 1024)
|
||||
const r0 = await bareOsWasmKernelCompile(big, { maxBytes: 1024 })
|
||||
t.absent(r0.ok)
|
||||
@@ -1193,7 +1193,7 @@ test('bareOsWasmKernelCompile bounds and compile path', async (t) => {
|
||||
})
|
||||
|
||||
test('bareOsWasmKernelInstantiate exposes wall clock import with syscall imports', async (t) => {
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/bare-os-wasm-kernel.js')
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/boot/bare-os-wasm-kernel.js')
|
||||
if (typeof WebAssembly === 'undefined' || !WebAssembly.compile) {
|
||||
t.pass('skip: no WebAssembly')
|
||||
return
|
||||
@@ -1215,7 +1215,7 @@ test('bareOsWasmKernelInstantiate exposes wall clock import with syscall imports
|
||||
})
|
||||
|
||||
test('bareOsWasmKernelInstantiate optional bare_os_monotonic_ms import', async (t) => {
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/bare-os-wasm-kernel.js')
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/boot/bare-os-wasm-kernel.js')
|
||||
if (typeof WebAssembly === 'undefined' || !WebAssembly.compile) {
|
||||
t.pass('skip: no WebAssembly')
|
||||
return
|
||||
@@ -1239,7 +1239,7 @@ test('bareOsWasmKernelInstantiate optional bare_os_monotonic_ms import', async (
|
||||
})
|
||||
|
||||
test('bareOsWasmKernelInstantiate optional bare_os_hostname_peek import flag', async (t) => {
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/bare-os-wasm-kernel.js')
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/boot/bare-os-wasm-kernel.js')
|
||||
if (typeof WebAssembly === 'undefined' || !WebAssembly.compile) {
|
||||
t.pass('skip: no WebAssembly')
|
||||
return
|
||||
@@ -1266,7 +1266,7 @@ test('bareOsWasmKernelInstantiate optional bare_os_hostname_peek import flag', a
|
||||
})
|
||||
|
||||
test('bareOsWasmKernelInstantiate optional bare_os_posix_profile_peek import flag', async (t) => {
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/bare-os-wasm-kernel.js')
|
||||
const { bareOsWasmKernelInstantiate } = await import('./lib/boot/bare-os-wasm-kernel.js')
|
||||
if (typeof WebAssembly === 'undefined' || !WebAssembly.compile) {
|
||||
t.pass('skip: no WebAssembly')
|
||||
return
|
||||
@@ -1291,7 +1291,7 @@ test('bareOsWasmKernelInstantiate optional bare_os_posix_profile_peek import fla
|
||||
|
||||
test('Protomux cap channel inbound message size bound is 65536 bytes', async (t) => {
|
||||
const { BARE_OS_PROTOMUX_CAP_CHANNEL_MESSAGE_MAX_BYTES } = await import(
|
||||
'./lib/swarm-disk.js'
|
||||
'./lib/p2p/swarm-disk.js'
|
||||
)
|
||||
t.is(BARE_OS_PROTOMUX_CAP_CHANNEL_MESSAGE_MAX_BYTES, 65536)
|
||||
})
|
||||
@@ -1374,7 +1374,7 @@ test('bareOsBootWarmBinDownloadDiffEnabled recognizes boolean-ish env values', a
|
||||
})
|
||||
|
||||
test('SwarmDisk chat re-pair tolerates duplicate createChannel null returns', async (t) => {
|
||||
const { SwarmDisk } = await import('./lib/swarm-disk.js')
|
||||
const { SwarmDisk } = await import('./lib/p2p/swarm-disk.js')
|
||||
const disk = new SwarmDisk()
|
||||
let unpairCalls = 0
|
||||
let closeCalls = 0
|
||||
@@ -1405,7 +1405,7 @@ test('SwarmDisk chat re-pair tolerates duplicate createChannel null returns', as
|
||||
})
|
||||
|
||||
test('SwarmDisk meshdrop re-pair tolerates duplicate createChannel null returns', async (t) => {
|
||||
const { SwarmDisk } = await import('./lib/swarm-disk.js')
|
||||
const { SwarmDisk } = await import('./lib/p2p/swarm-disk.js')
|
||||
const disk = new SwarmDisk()
|
||||
let unpairCalls = 0
|
||||
let closeCalls = 0
|
||||
@@ -1441,7 +1441,7 @@ test('SwarmDisk read(0) resolves when MBR-capable peer joins after read starts',
|
||||
try {
|
||||
const net = await import('node:net')
|
||||
const Protomux = (await import('protomux')).default
|
||||
const { SwarmDisk } = await import('./lib/swarm-disk.js')
|
||||
const { SwarmDisk } = await import('./lib/p2p/swarm-disk.js')
|
||||
const { setupSeedChannel, buildMbr, BLOCK_SIZE } = await import(
|
||||
'bare-os-protocol'
|
||||
)
|
||||
@@ -1524,7 +1524,7 @@ test('SwarmDisk read(0) resolves when MBR-capable peer joins after read starts',
|
||||
|
||||
test('bareOsAppendVaultRotationCheckpoint appends vault_save row', async (t) => {
|
||||
const { bareOsAppendVaultRotationCheckpoint } = await import(
|
||||
'./lib/bare-os-vault-rotation-audit.js'
|
||||
'./lib/identity/bare-os-vault-rotation-audit.js'
|
||||
)
|
||||
/** @type {{ p: string, buf: Uint8Array }[]} */
|
||||
const puts = []
|
||||
|
||||
@@ -11,10 +11,10 @@ import { fileURLToPath } from 'node:url'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
import { createBareOsIpc } from './lib/bare-os-ipc.js'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { runBinCommand } from './lib/kernel-runner.js'
|
||||
import { execShellLine, expandWord } from './lib/shell.js'
|
||||
import { createBareOsIpc } from './lib/tools/bare-os-ipc.js'
|
||||
import { createVfs } from './lib/vfs/vfs.js'
|
||||
import { runBinCommand } from './lib/boot/kernel-runner.js'
|
||||
import { execShellLine, expandWord } from './lib/shell/shell.js'
|
||||
|
||||
function testCorestoreDir(name) {
|
||||
const dir = path.join(
|
||||
|
||||
@@ -1608,7 +1608,7 @@ function stableStringifyManifest(obj) {
|
||||
|
||||
test('bare-module-manifest.data.mjs matches bare-module-manifest.json', async (t) => {
|
||||
const dir = path.dirname(fileURLToPath(import.meta.url))
|
||||
const jsonPath = path.join(dir, 'lib', 'bare-module-manifest.json')
|
||||
const jsonPath = path.join(dir, 'lib', 'ctx', 'bare-module-manifest.json')
|
||||
const fromJson = JSON.parse(await readFile(jsonPath, 'utf8'))
|
||||
const embedded = bareOsBareModuleManifestEmbeddedRef()
|
||||
t.is(stableStringifyManifest(fromJson), stableStringifyManifest(embedded))
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
bareOsParseSendmsgScmRights,
|
||||
bareOsScmRightsMaxFds,
|
||||
wantPosixSocketScmRights
|
||||
} from './lib/bare-os-socket-scm-rights.js'
|
||||
} from './lib/posix/bare-os-socket-scm-rights.js'
|
||||
|
||||
test('wantPosixSocketScmRights', (t) => {
|
||||
t.absent(wantPosixSocketScmRights({}))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import test from 'brittle'
|
||||
import { attachBareOsTuiSdk, bareOsTuiEnabled } from './lib/bare-os-tui-sdk.js'
|
||||
import { BARE_OS_TUI_SDK_SOURCE } from './lib/bare-os-tui-sdk.data.mjs'
|
||||
import { buildBareOsRuntimeCaps } from './lib/bare-os-runtime-caps.js'
|
||||
import { attachBareOsTuiSdk, bareOsTuiEnabled } from './lib/services/bare-os-tui-sdk.js'
|
||||
import { BARE_OS_TUI_SDK_SOURCE } from './lib/services/bare-os-tui-sdk.data.mjs'
|
||||
import { buildBareOsRuntimeCaps } from './lib/ctx/bare-os-runtime-caps.js'
|
||||
|
||||
function makeStream(isTTY, writes) {
|
||||
const listeners = { data: [], resize: [] }
|
||||
|
||||
@@ -3,7 +3,7 @@ import b4a from 'b4a'
|
||||
import Hyperdrive from 'hyperdrive'
|
||||
import Corestore from 'corestore'
|
||||
import { rmSync } from 'node:fs'
|
||||
import { createVfs } from './lib/vfs.js'
|
||||
import { createVfs } from './lib/vfs/vfs.js'
|
||||
|
||||
function testCorestoreDir(name) {
|
||||
return `/tmp/bare-os-booter-${name}-${Date.now()}-${Math.random().toString(16).slice(2)}`
|
||||
|
||||
@@ -537,7 +537,7 @@ test('blind relay / pairing / geo proc JSON operator-redacted without BARE_OS_PR
|
||||
t.is(c.exposed, false)
|
||||
t.is(c.operatorRedacted, true)
|
||||
const { buildBareOsBlindRelaySwarmRuntime } = await import(
|
||||
'./lib/bare-os-proc-blind-peer-relay-gate.js'
|
||||
'./lib/proc/bare-os-proc-blind-peer-relay-gate.js'
|
||||
)
|
||||
const rt = {
|
||||
swarm: buildBareOsBlindRelaySwarmRuntime(
|
||||
|
||||
@@ -8,19 +8,19 @@ import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { createRequire } from 'node:module'
|
||||
import { PassThrough } from 'node:stream'
|
||||
import { XTERM_CLEAR_SCROLLBACK_AND_VIEWPORT } from '../lib/terminal-escapes.js'
|
||||
import { runKernelFromSource, runBinCommand } from '../lib/kernel-runner.js'
|
||||
import { createGitFsFromVfs } from '../lib/git-fs-adapter.js'
|
||||
import { runGitCli } from '../lib/git-cli.js'
|
||||
import { XTERM_CLEAR_SCROLLBACK_AND_VIEWPORT } from '../lib/cli/terminal-escapes.js'
|
||||
import { runKernelFromSource, runBinCommand } from '../lib/boot/kernel-runner.js'
|
||||
import { createGitFsFromVfs } from '../lib/vfs/git-fs-adapter.js'
|
||||
import { runGitCli } from '../lib/tools/git-cli.js'
|
||||
import {
|
||||
createStreamLineReader,
|
||||
sanitizeInteractiveShellLine
|
||||
} from '../lib/cli-readline.js'
|
||||
} from '../lib/cli/cli-readline.js'
|
||||
import {
|
||||
createVfs,
|
||||
BARE_OS_PROC_FILE_TO_ID_HYPERCORE_PACK_HRPC_LIFECYCLE
|
||||
} from '../lib/vfs.js'
|
||||
import { parseHdmsPairArgv } from '../lib/hdms-cli-argv.js'
|
||||
} from '../lib/vfs/vfs.js'
|
||||
import { parseHdmsPairArgv } from '../lib/p2p/hdms-cli-argv.js'
|
||||
import hcCrypto from 'hypercore-crypto'
|
||||
import idEnc from 'hypercore-id-encoding'
|
||||
import {
|
||||
@@ -29,35 +29,35 @@ import {
|
||||
HDMS_AUTOPASS_SHARE_KEY,
|
||||
HDMS_AUTOPASS_SHARE_RW_KEY,
|
||||
normalizeWriterSecretHex
|
||||
} from '../lib/hdms-share-offer.js'
|
||||
import { buildBareOsHypercorePackHrpcLifecycleProcJson } from '../lib/bare-os-proc-hypercore-pack-hrpc-lifecycle.js'
|
||||
import { buildBareOsPearCorestoreHrpcProcJson } from '../lib/bare-os-proc-pear-corestore-hrpc.js'
|
||||
import { buildBareOsPearInspectLoggerTlsProcJson } from '../lib/bare-os-proc-pear-inspect-logger-tls.js'
|
||||
import { buildBareOsBareRuntimeProtoMuxProcJson } from '../lib/bare-os-proc-bare-runtime-proto-mux.js'
|
||||
import { buildBareOsBootGraphProcJson } from '../lib/bare-os-boot-graph-proc.js'
|
||||
import { pathnameExpandShellWord } from '../lib/shell-glob.js'
|
||||
import { createBareOsIpc } from '../lib/bare-os-ipc.js'
|
||||
import { BareOsSwarmConnectionManager } from '../lib/bare-os-swarm-connection-manager.js'
|
||||
} from '../lib/p2p/hdms-share-offer.js'
|
||||
import { buildBareOsHypercorePackHrpcLifecycleProcJson } from '../lib/proc/bare-os-proc-hypercore-pack-hrpc-lifecycle.js'
|
||||
import { buildBareOsPearCorestoreHrpcProcJson } from '../lib/proc/bare-os-proc-pear-corestore-hrpc.js'
|
||||
import { buildBareOsPearInspectLoggerTlsProcJson } from '../lib/proc/bare-os-proc-pear-inspect-logger-tls.js'
|
||||
import { buildBareOsBareRuntimeProtoMuxProcJson } from '../lib/proc/bare-os-proc-bare-runtime-proto-mux.js'
|
||||
import { buildBareOsBootGraphProcJson } from '../lib/boot/bare-os-boot-graph-proc.js'
|
||||
import { pathnameExpandShellWord } from '../lib/shell/shell-glob.js'
|
||||
import { createBareOsIpc } from '../lib/tools/bare-os-ipc.js'
|
||||
import { BareOsSwarmConnectionManager } from '../lib/p2p/bare-os-swarm-connection-manager.js'
|
||||
import {
|
||||
createBareOsLifecycleStateMachine,
|
||||
runTransactionalLifecycleHooks
|
||||
} from '../lib/bare-os-lifecycle-manager.js'
|
||||
} from '../lib/host/bare-os-lifecycle-manager.js'
|
||||
import {
|
||||
bareOsRegisterCorestoreSuspendResumeHooks,
|
||||
bareOsInstallCorestoreSuspendResumeHooks
|
||||
} from '../lib/corestore-host-lifecycle.js'
|
||||
import { bareOsFindOrphanProcessRows } from '../lib/bare-os-process-table.js'
|
||||
} from '../lib/host/corestore-host-lifecycle.js'
|
||||
import { bareOsFindOrphanProcessRows } from '../lib/proc/bare-os-process-table.js'
|
||||
import {
|
||||
topologicalOrderKernelExtensions,
|
||||
resolveKernelExtensionsFull
|
||||
} from '../lib/kernel-extension-resolver.js'
|
||||
import { createBareOsProtomuxAliasRegistry } from '../lib/bare-os-protomux-alias-registry.js'
|
||||
import { bareOsHttpUrlAllowed } from '../lib/bare-os-http-policy.js'
|
||||
} from '../lib/boot/kernel-extension-resolver.js'
|
||||
import { createBareOsProtomuxAliasRegistry } from '../lib/p2p/bare-os-protomux-alias-registry.js'
|
||||
import { bareOsHttpUrlAllowed } from '../lib/security/bare-os-http-policy.js'
|
||||
import {
|
||||
bareOsParseBareAclText,
|
||||
bareOsAclDeniesSubject
|
||||
} from '../lib/bare-os-vfs-acl-enforce.js'
|
||||
import { raceWithAbortAndTimeout } from '../lib/bare-os-abort.js'
|
||||
} from '../lib/vfs/bare-os-vfs-acl-enforce.js'
|
||||
import { raceWithAbortAndTimeout } from '../lib/security/bare-os-abort.js'
|
||||
import {
|
||||
tokenize,
|
||||
expandWord,
|
||||
@@ -76,13 +76,13 @@ import {
|
||||
syncBareOsExitStatusEnv,
|
||||
getBareOsPipelineLimits,
|
||||
DEFAULT_PIPELINE_MAX_STAGES,
|
||||
} from '../lib/shell.js'
|
||||
import { tokenizeBareShellLineDetailed } from '../lib/shell-tokenizer.js'
|
||||
import { decodeBareOsDollarQuote } from '../lib/shell-lex.js'
|
||||
} from '../lib/shell/shell.js'
|
||||
import { tokenizeBareShellLineDetailed } from '../lib/shell/shell-tokenizer.js'
|
||||
import { decodeBareOsDollarQuote } from '../lib/shell/shell-lex.js'
|
||||
import {
|
||||
applyBareOsThemeFromEnv,
|
||||
bareOsListThemeNames
|
||||
} from '../lib/bare-os-theme-presets.js'
|
||||
} from '../lib/cli/bare-os-theme-presets.js'
|
||||
import {
|
||||
bareParseLsColors,
|
||||
bareSerializeLsColors,
|
||||
@@ -90,8 +90,8 @@ import {
|
||||
bareDefaultDircolorsDatabase,
|
||||
bareParseDircolorsDatabase
|
||||
} from 'bare-os-lscolors'
|
||||
import { BARE_OS_CTX_API_VERSION } from '../lib/bare-os-ctx-api.js'
|
||||
import { buildBareOsRuntimeCaps } from '../lib/bare-os-runtime-caps.js'
|
||||
import { BARE_OS_CTX_API_VERSION } from '../lib/ctx/bare-os-ctx-api.js'
|
||||
import { buildBareOsRuntimeCaps } from '../lib/ctx/bare-os-runtime-caps.js'
|
||||
import {
|
||||
bareOsBareModulesEnabled,
|
||||
bareOsBareModuleManifestEmbeddedRef,
|
||||
@@ -99,8 +99,8 @@ import {
|
||||
buildPearCtxObjectFromHost,
|
||||
loadBareModuleManifest,
|
||||
maybeMergeBareFromDrive
|
||||
} from '../lib/bare-os-ctx-bare.js'
|
||||
import { maybeBareOsBuildBinManifest } from '../lib/bare-os-bin-index.js'
|
||||
} from '../lib/ctx/bare-os-ctx-bare.js'
|
||||
import { maybeBareOsBuildBinManifest } from '../lib/tools/bare-os-bin-index.js'
|
||||
import {
|
||||
createFishReadLine,
|
||||
fuzzyMatch,
|
||||
@@ -113,7 +113,7 @@ import {
|
||||
scrubShellHistoryEntries,
|
||||
SHELL_BUILTINS,
|
||||
resolveShellPromptHookSegment
|
||||
} from '../lib/fish-readline.js'
|
||||
} from '../lib/cli/fish-readline.js'
|
||||
import {
|
||||
parseCompletionContext,
|
||||
rankCompletionItems,
|
||||
@@ -123,14 +123,14 @@ import {
|
||||
longestCommonCompletionPrefix,
|
||||
completeLine,
|
||||
levenshtein
|
||||
} from '../lib/completion-engine.js'
|
||||
} from '../lib/cli/completion-engine.js'
|
||||
import {
|
||||
fieldMatches,
|
||||
dowFieldMatches,
|
||||
parseCronLine,
|
||||
jobMatchesDate
|
||||
} from '../lib/bare-cron.js'
|
||||
import '../lib/bare-openssh.js'
|
||||
} from '../lib/initd/bare-cron.js'
|
||||
import '../lib/services/bare-openssh.js'
|
||||
import {
|
||||
bareInitdReadinessSnapshot,
|
||||
bareInitdShutdownActiveUnitsReverse,
|
||||
@@ -141,60 +141,60 @@ import {
|
||||
startBareInitd,
|
||||
stopBareInitd,
|
||||
getLastBareInitdDagSnapshotJson
|
||||
} from '../lib/bare-initd.js'
|
||||
} from '../lib/initd/bare-initd.js'
|
||||
import {
|
||||
appendVarLog,
|
||||
ensureBareOsVarLogTree,
|
||||
KERNEL_CONSOLE_LOG,
|
||||
BOOT_LOG
|
||||
} from '../lib/bare-os-var-log.js'
|
||||
} from '../lib/vfs/bare-os-var-log.js'
|
||||
import {
|
||||
bareOsKernelMetricsReset,
|
||||
bareOsKernelMetricsSnapshot
|
||||
} from '../lib/bare-os-kernel-metrics.js'
|
||||
import { parseUnitDropInText } from '../lib/bare-initd-user.js'
|
||||
} from '../lib/boot/bare-os-kernel-metrics.js'
|
||||
import { parseUnitDropInText } from '../lib/initd/bare-initd-user.js'
|
||||
import {
|
||||
bareOsHyperswarmOptsFromEnv,
|
||||
bareOsBootJoinPeerHexFromEnv
|
||||
} from '../lib/swarm-opts.js'
|
||||
} from '../lib/p2p/swarm-opts.js'
|
||||
import {
|
||||
bareOsBootInitPrefetchEnabled,
|
||||
bareOsBootWarmBinDownloadDiffEnabled
|
||||
} from '../lib/boot-prefetch.js'
|
||||
import { bareOsProcessTableSnapshot } from '../lib/bare-os-process-table.js'
|
||||
import { buildBareOsSyscallsProcJson } from '../lib/bare-os-syscalls-proc-json.js'
|
||||
} from '../lib/boot/boot-prefetch.js'
|
||||
import { bareOsProcessTableSnapshot } from '../lib/proc/bare-os-process-table.js'
|
||||
import { buildBareOsSyscallsProcJson } from '../lib/posix/bare-os-syscalls-proc-json.js'
|
||||
import {
|
||||
bareOsParseSendmsgScmRights,
|
||||
wantPosixSocketScmRights
|
||||
} from '../lib/bare-os-socket-scm-rights.js'
|
||||
} from '../lib/posix/bare-os-socket-scm-rights.js'
|
||||
import {
|
||||
parseBareOsHrpcAllowlistJson,
|
||||
bareOsHrpcAllowlistDeniesRoute
|
||||
} from '../lib/bare-os-hrpc-allowlist.js'
|
||||
import { buildBareOsProtomuxExtensionsProcJson } from '../lib/bare-os-protomux-extensions-proc.js'
|
||||
import { createBareOsDiskOsBridge } from '../lib/bare-os-disk-os-bridge.js'
|
||||
import { buildBareOsReplicationLiveSketch } from '../lib/bare-os-replication-proc-live.js'
|
||||
} from '../lib/tools/bare-os-hrpc-allowlist.js'
|
||||
import { buildBareOsProtomuxExtensionsProcJson } from '../lib/p2p/bare-os-protomux-extensions-proc.js'
|
||||
import { createBareOsDiskOsBridge } from '../lib/host/bare-os-disk-os-bridge.js'
|
||||
import { buildBareOsReplicationLiveSketch } from '../lib/p2p/bare-os-replication-proc-live.js'
|
||||
import {
|
||||
evaluateBareOsPeerAdmission,
|
||||
bareOsFormatPeerAdmissionAuditEvent,
|
||||
bareOsPeerAdmissionAuditRateAllow
|
||||
} from '../lib/bare-os-peer-admission.js'
|
||||
} from '../lib/p2p/bare-os-peer-admission.js'
|
||||
import {
|
||||
parseDelegateAllowSet,
|
||||
isDelegateKindAllowed
|
||||
} from '../lib/host-delegate-registry.js'
|
||||
} from '../lib/host/host-delegate-registry.js'
|
||||
import {
|
||||
bareOsAuditAppend,
|
||||
bareOsAuditVerifyRows
|
||||
} from '../lib/bare-os-audit-chain.js'
|
||||
import { bareOsDrainFcntlLockWaiters } from '../lib/bare-os-fcntl-cooperative-lock.js'
|
||||
import { buildBareOsReplicationOperatorSurfaceProcJson } from '../lib/bare-os-proc-replication-operator-surface.js'
|
||||
} from '../lib/security/bare-os-audit-chain.js'
|
||||
import { bareOsDrainFcntlLockWaiters } from '../lib/posix/bare-os-fcntl-cooperative-lock.js'
|
||||
import { buildBareOsReplicationOperatorSurfaceProcJson } from '../lib/proc/bare-os-proc-replication-operator-surface.js'
|
||||
import {
|
||||
DEFAULT_CURL_USER_AGENT,
|
||||
DEFAULT_WGET_USER_AGENT
|
||||
} from '../lib/http-fetch-url.js'
|
||||
import { filenameFromContentDisposition } from '../lib/curl-cli.js'
|
||||
import { encodeUstarHeader, runTarCli } from '../lib/tar-cli.js'
|
||||
} from '../lib/tools/http-fetch-url.js'
|
||||
import { filenameFromContentDisposition } from '../lib/tools/curl-cli.js'
|
||||
import { encodeUstarHeader, runTarCli } from '../lib/tools/tar-cli.js'
|
||||
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user