fix(coding-agent): use lazy-loaded photon wrapper for Node.js compatibility

Previous commit broke Node.js/tsx by using the ESM entry point which
doesn't work with Node. This creates a wrapper module that:
- Uses require() for lazy loading (works in both Node and Bun)
- Gracefully handles load failures (returns original image)
- Works in Node.js, tsx, and Bun compiled binaries
This commit is contained in:
Mario Zechner 2026-01-16 21:18:13 +01:00
parent 5aa0689828
commit 75628e0cfd
5 changed files with 86 additions and 16 deletions

View file

@ -5,5 +5,5 @@
"rootDir": "./src"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist", "**/*.d.ts", "src/**/*.d.ts"]
}