Lines 1-21javascript
1import { spawn } from "node:child_process";
2import { randomUUID } from "node:crypto";
3import { constants as fsConstants } from "node:fs";
4import { lstat, mkdir, open, readFile, realpath, rename, rm, writeFile } from "node:fs/promises";
5import { basename, dirname, join, resolve } from "node:path";
6import process from "node:process";
7import { listRecordedRuns, listTraceSources } from "@mono-agent/observability";
8import { describeSensitiveDataExportWarning, phoenixAppBaseUrl, resolveAppTraceRegistryDir, resolveAppTraceStaleAfterMs, } from "./app-config.js";
9import { formatChannelFactValue } from "./channel-fact-format.js";
10import { bootout, bootstrap, buildPlistXml, defaultPathEnv, deriveLaunchdLabel, isLoaded, launchdServiceInfo, launchdPathsFor, makeLaunchctlRunner, } from "./launchd.js";
11import { selectBackgroundOperationalEnvironment } from "./background-environment.js";
MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/background.jsView on unpkg · L1 12import { ensureManagedBackgroundRuntime, MANAGED_BACKGROUND_WORKER_ENV, } from "./background-runtime.js";
13import { backgroundSnapshotFromMetadata, captureBackgroundSnapshot, encodeBackgroundSnapshot, sameBackgroundSnapshot, } from "./background-snapshot.js";
14import { resolveConfiguredManagedRuntimePackages } from "./managed-runtime-packages.js";
15import { currentProcessIncarnation, isSameProcessIncarnation as matchesProcessIncarnation, processIncarnationFromJson, } from "./process-incarnation.js";
16import { buildRunsHealthDisplay, RUNS_HEALTH_MAX_RUNS } from "./runs-health.js";
17import * as ui from "./ui.js";
18export { acquireBackgroundWorkerLease, backgroundWorkerLeasePath, } from "./background-worker-lease.js";
19/** Exact non-secret environment materialised into a managed LaunchAgent. */
20export function managedBackgroundEnvironment(env) {