bun:bundle Runtime Shim

Description

Runtime replacement for Bun's build-time bun:bundle module that exposes a feature(name) function. In original Bun builds, feature('X') is replaced with a boolean constant at bundle time and dead-code-eliminated; without the bundler the import resolves to nothing. The shim (at src/shims/bun-bundle.ts) reads feature flags from environment variables with sensible defaults, enabling dev builds via esbuild to keep the same source code. Enumerates 11 flags: PROACTIVE, KAIROS, BRIDGE_MODE, DAEMON, VOICE_MODE, AGENT_TRIGGERS, MONITOR_TOOL, COORDINATOR_MODE, ABLATION_BASELINE (always off external), DUMP_SYSTEM_PROMPT, BG_SESSIONS.

Key claims

Relations

Sources

src-20260420-33991f80c88d