Commit ba18894
committed
fix(execution): resolve adapter entrypoint symlink for module-mode detection
Agent ACP adapters are launched via an extensionless /opt/agentos/bin/<cmd>
symlink into the packed package's node_modules/<name>/<entry>. host_entrypoint_uses_module_mode
matched on the (missing) extension and fell through to CommonJS, so ESM adapters
crashed at startup with 'Cannot use import statement outside a module'. Canonicalize
the entrypoint before the extension + nearest-package.json check so it resolves to
the real file (whose package.json keeps "type":"module") and runs in ESM mode.1 parent 5367209 commit ba18894
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2628 | 2628 | | |
2629 | 2629 | | |
2630 | 2630 | | |
2631 | | - | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
2632 | 2638 | | |
2633 | | - | |
| 2639 | + | |
2634 | 2640 | | |
2635 | 2641 | | |
2636 | 2642 | | |
| |||
0 commit comments