From c79eea7ee088a4dace6a5851eff5b5763b8ad029 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Thu, 30 Apr 2026 13:50:37 -0400 Subject: [PATCH] fix(index): drop ESM re-export of parseStdoutLine from CJS ui-parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dist/ui-parser.js is bundled as CJS (480f7cf, so the sandboxed UI worker can load it via new Function), but src/index.ts re-exported a named binding from it as ESM: export { parseStdoutLine } from "./ui-parser.js"; Since the package is "type": "module", Node's ESM loader resolves the import as ESM and can't find named exports on a CJS module bundle — linking fails at adapter-load time: SyntaxError: The requested module './ui-parser.js' does not provide an export named 'parseStdoutLine' The adapter then gets dropped on every Paperclip pod restart with only claude_k8s surviving. Nothing in the runtime imports parseStdoutLine from the package root — the plugin-loader serves ui-parser.js to the UI worker by reading it as a string (server/src/adapters/plugin-loader.ts), and tests import the TS source directly. Removing the re-export. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7060dbc..fb640fc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,4 +64,3 @@ Notes: `; export { createServerAdapter } from "./server/index.js"; -export { parseStdoutLine } from "./ui-parser.js";