Skip to the content.

Phase 0 — engineering log

Status: IN PROGRESS. The console and Experimental DAP debugger integration pass isolated automated tests. The earlier API blocker and its bounded exception are documented in debugger-blocker.md. Interactive sandbox acceptance remains pending; phases are not declared fully accepted yet.

Current authorization: independent processes, isolated tests/builds/IDEs, and network research are allowed without another question. Ask before an action that could affect the user’s working IDE or its settings, plugins, process, or work.

2026-09-23: read-only inventory

Actual Bun plugin descriptor

Read directly from the ZIP entry META-INF/plugin.xml in:

C:/Users/Petro/AppData/Local/Programs/WebStorm/plugins/javascript-bun/lib/javascript-bun.jar

Plugin ID: intellij.javascript.bun, version 262.10968.77.

Declared dependencies:

plugin: NodeJS
module: intellij.javascript.backend
module: intellij.javascript.debugger.backend
module: intellij.javascript.debugger.dap.launcher
module: intellij.javascript.psi.impl
module: intellij.json
module: intellij.platform.dap
module: intellij.platform.webide.impl

These differ from the handout’s simplified dependency list. Our own plugin must declare only the dependencies required by its verified API usage. Dependencies of JetBrains’ own plugin are not permission to use internal APIs.

The descriptor registers a standard Bun configuration type. This makes the standard configuration + Debug executor route the first candidate to inspect. Registration alone does NOT establish a supported third-party launch API.

API candidates found in the installed artifact

All class names below were read from JAR entries or the descriptor. Method signatures, enclosing/package annotations, and accessibility still need audit.

Class / method Source plugin or module ApiStatus Purpose Plugin Verifier
com.intellij.javascript.bun.runConfiguration.run.BunRunConfigurationType.createTemplateConfiguration(Project) intellij.javascript.bun No ApiStatus marker; class is Kotlin internal (compiler confirmed) Find standard configuration factory Not linked: rejected at compilation
com.intellij.javascript.bun.runConfiguration.run.BunRunConfiguration.setFilePath/setWorkingDirectory/setRuntimeParameters intellij.javascript.bun No ApiStatus marker; class is Kotlin internal (compiler confirmed) Configure bootstrap Not linked: rejected at compilation
com.intellij.javascript.bun.runConfiguration.run.BunRunConfigurationOptions intellij.javascript.bun Kotlin internal metadata Configure parameters Not linked
com.intellij.javascript.bun.settings.BunSettingsService and Companion.getConfiguredPath(Project) intellij.javascript.bun Enclosing service is ApiStatus.Internal Locate configured Bun Not linked: forbidden
com.intellij.javascript.bun.settings.BunRuntimeProvider intellij.javascript.bun Kotlin internal metadata Alternative discovery Not linked
com.intellij.javascript.bun.BunDebugAdapterSupportProvider.createDebugAdapterDescriptor(Project) intellij.javascript.bun Package-private JVM class Existing adapter wiring Not linked: inaccessible
com.intellij.javascript.debugger.dap.launcher.LauncherKt.NodeJsBasedDebugAdapter(...) intellij.javascript.debugger.dap.launcher No ApiStatus marker observed Node-hosted adapter handle, not Bun session launch Not linked: insufficient integration path

intellij.javascript.debugger.dap.launcher exists in the installed product layout at plugins/javascript-debugger/lib/modules/intellij.javascript.debugger.dap.launcher.jar. No API in that module has yet been approved for use.

Prepared runtime experiment

spikes/bun-repl/probe.mjs is a disposable feasibility probe, not the production bootstrap. It starts a bounded child process of the same Bun executable and checks:

The worker writes JSON-lines reports to stdout. This is only the test harness: the production control channel must remain separate from arbitrary user output. This experiment does not yet prove command transport, import resolution relative to a user project, debugger integration, or robust binding ownership.

Fixtures live in the plugin development repository. They are never generated in a user’s project. This experiment makes no network requests and opens no IDE. Parent timeout is 15 seconds; a timed-out worker is killed and the probe fails.

Executed with user approval (PowerShell, workspace cwd):

& 'C:\Users\Petro\.bun\bin\bun.exe' '.\spikes\bun-repl\probe.mjs'

2026-09-23: runtime experiment result

Runtime: Bun 1.4.0. Exit code: 0. Worker reported 0 failures.

Check Result
Construct stream-backed node:repl with isolated context PASS
Persist const consoleOwned = 21 across evaluations PASS
reduce, date, and regular-expression expressions PASS
Dynamically import TypeScript, inject twice, evaluate twice(21) === 42 PASS
Remove injected twice while preserving user declaration PASS
Observe lexical binding versus context property PASS: lexical declaration is NOT an own property
await Promise.resolve(42) via evaluator callback PASS

Important binding-policy finding: Object.hasOwn(repl.context, name) alone cannot detect a user const declaration. In this experiment, injecting a context property of the same name leaves the lexical declaration shadowing that property. Production code must detect lexical conflicts and must not falsely report those exports as successfully exposed. This probe intentionally performs that collision only in the disposable worker; it is not a proposed production binding algorithm.

The successful evaluator probe supports continuing with node:repl. It does not yet establish robust request transport, promise/error handling in all cases, source-map breakpoint behavior, or the selected debugger launch route.

Prepared offline API inspection

Located an existing bytecode viewer without launching it:

C:/Users/Petro/.gradle/jdks/eclipse_adoptium-17-amd64-windows.2/bin/javap.exe

scripts/inspect-bun-api.ps1 is prepared to run this viewer against eight exact classes in the installed Bun JAR, saving full signatures and annotation output under build/phase-0/api/. It does not launch or attach to WebStorm, execute IDE classes, build the plugin, or access the network. Compatibility of this existing JDK 17 viewer with the installed class files is still untested; a reader failure will not be interpreted as an API finding. There are no package-info.class or module-info.class entries in this Bun JAR.

Executed after the user authorized safe independent launches:

.\scripts\inspect-bun-api.ps1 -JavapPath 'C:\Users\Petro\.gradle\jdks\eclipse_adoptium-17-amd64-windows.2\bin\javap.exe' -WebStormPath 'C:\Users\Petro\AppData\Local\Programs\WebStorm'

Next steps, in order

  1. DONE: run the approved REPL probe and record exact Bun version/results.
  2. DONE: inspect installed class signatures and annotations with an offline bytecode tool. Never load IDE classes to reach private state via reflection.
  3. DONE: build the plugin skeleton with Gradle 9.3.1, Kotlin 2.4.0, IntelliJ Platform Gradle Plugin 2.19.0, and the installed Java 25 runtime.
  4. Complete platform integration tests and strict verification. Test IDE must use separate config/system/plugin directories and a dedicated fixture project.
  5. Prove debugger launch, session association, and selected-frame evaluation via stable public APIs. If no route exists, record the precise blocker and proceed with Phase 1 console only.

Phase 0 is not complete until its runtime and plugin acceptance checks, Plugin Verifier, and unstable/internal API inspections have actually passed.

Implementation and validation notes

Final automated run (2026-09-23)

UI regression fix: 0.1.1-dev (2026-09-23)

The first interactive report showed a proportional input font, plain submitted commands, and nonfunctional Up history. The field inherited its Swing font, and its key listener competed with the IDE editor action system.

Edited history and chained-call highlighting: 0.1.2-dev (2026-09-23)

Console output, startup, completion and controls: 0.1.3-dev (2026-09-23)

Static imports and independent startup diagnosis: 0.1.4-dev (2026-09-24)

Runtime settings: 0.1.5-dev (2026-09-24)

Native tool-window menu: 0.1.6-dev (2026-09-24)

Completion with changed context files: 0.1.10-dev (2026-09-26)

Refresh without resetting console state: 0.1.11-dev (2026-09-26)

Console input keys: 0.1.12-dev (2026-09-26)

Multiline scrolling and edited declarations: 0.1.13-dev (2026-09-26)

Following editor, qualified files, and resizable input: 0.1.14-dev (2026-09-26)

Console redeclarations: 0.1.15-dev (2026-09-26)

Documentation consulted

Debugger API follow-up (2026-09-26)

Experimental Bun debugger integration (2026-09-27)

Debugger milestone validation: 0.1.16-dev (2026-09-27)

UI and late-breakpoint validation: 0.1.17-dev (2026-09-27)

Background debugger and reload synchronization: 0.1.18-dev (2026-09-27)

Independent console lifetime: 0.1.19-dev (2026-09-28)

Optional debugger mode: 0.1.20-dev (2026-09-28)