Dashboard › opencode-lore › Distillation
a902fb18-399c-4b16-a3a1-b2e01421bfd8["lore_tm_v1_Qt0LFC1Zp5jG2thXb-OUf5YcCvnRInAEdcfEdopGJ0g","lore_tm_v1_aAR-agBjMDT6wLkr8hyTdeFoXyxD42hhPw0IfU6Ji_k"]
Date: Sep 16, 2026
node_modules and never select an arbitrary package.resolveNativeOrtBindingPath() never to throw; an unresolvable package is the expected dist-only case and must return null.clampFreeToContainerLimit() to be monotonic: it may only reduce memory use and must never raise the supplied free-memory figure.ORT_NATIVE_TARGETS as exactly linux-x64, linux-arm64, darwin-arm64, win32-x64, and win32-arm64; supportsNativeOrtTarget(runtime: NativeOrtRuntime) checks the result of ortPlatformTarget(runtime.platform, runtime.arch) against that frozen list.declare const LORE_ORT_NODE_VERSION: string | undefined, PackageManifest, and exported NativeOrtRuntime with platform: string, arch: string, and optional glibcVersionRuntime?: string; PackageManifest can contain name, version, os, cpu, loreOrtNodeVersion, dependencies, devDependencies, and optionalDependencies.resolveNativeOrtBindingPath() returns null without throwing, plus malformed-binding diagnostics using onnxruntime_binding.node: file too short.packages/core/src/cgroup-memory.ts was shown as a new 205-line implementation for Linux cgroup memory discovery and headroom calculation.packages/core/src/cgroup-memory.ts defines CgroupMembership and CgroupMemoryFiles for cgroup versions 1 | 2, and uses ReadTextFile = (path: string) => string with a default readFileSync(path, "utf8") implementation.decodeProcPath() in packages/core/src/cgroup-memory.ts decodes procfs octal escapes matching /\\([0-7]{3})/g, rejects paths that are non-absolute, contain NUL, or include a .. segment, and normalizes valid paths with posix.normalize().parseCgroupMemberships() parses /proc/self/cgroup, recognizes unified cgroup v2 via hierarchy 0 with empty controllers, recognizes cgroup v1 when controllers include memory, and orders results as [v1Memory, v2] so hybrid hosts prefer the explicit v1 memory controller.resolveLinuxCgroupMemoryFiles(cgroupContent, mountInfoContent) parses mountinfo around " - ", matches cgroup2 for v2 or cgroup with the memory super-option for v1, decodes mount root and mount point, and builds the cgroup directory with posix.join(mountPoint, relativeCgroupPath(root, membership.path)).memoryFiles() deliberately rereads /proc/self/cgroup and /proc/self/mountinfo on every call because process membership can change; this prevents admission based on a stale cgroup directory or cached discovery miss.readBytes() accepts only decimal digits and returns a value only when it is a safe integer. readLimit() treats "max" and decimal values above Number.MAX_SAFE_INTEGER as Number.POSITIVE_INFINITY, otherwise returning the numeric byte limit.readLinuxCgroupMemoryHeadroomBytes() reads memory.current with memory.high and memory.max for cgroup v2, or memory.usage_in_bytes with memory.limit_in_bytes for cgroup v1; it walks from the process cgroup directory through parent boundaries to the mount point and computes the minimum finite Math.max(0, limit - usage) headroom.readLinuxCgroupMemoryHeadroomBytes() fails closed with undefined on discovery errors, malformed usage or limits, unreadable required descendant boundaries, invalid parent traversal, or other exceptions. It permits the cgroup v2 root to omit memory files only when directory === files.mountPoint and files.root === "/".[0, 256 * MB, 4 * GB, 12 * GB, 128 * GB] and available-memory values [0, 32 * MB, 2 * GB, 64 * GB], asserting clampFreeToContainerLimit(6 * GB, limit, available) <= 6 * GB.