channel-worker 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -586,7 +586,21 @@ class CommandPoller {
586
586
 
587
587
  ws.on('open', async () => {
588
588
  try {
589
- // Use Input.insertText — types text as if user typed it
589
+ await send('DOM.enable');
590
+ // Focus the contenteditable editor via CDP
591
+ await send('Runtime.evaluate', {
592
+ expression: `
593
+ const editors = document.querySelectorAll('[contenteditable="true"], [role="textbox"]');
594
+ let focused = false;
595
+ for (const e of editors) {
596
+ if (e.offsetHeight >= 15) { e.focus(); e.click(); focused = true; break; }
597
+ }
598
+ focused ? 'focused' : 'no_editor'
599
+ `,
600
+ });
601
+ // Small delay for focus to take effect
602
+ await new Promise(r => setTimeout(r, 300));
603
+ // Type text
590
604
  await send('Input.insertText', { text });
591
605
  ws.close();
592
606
  resolve({ success: true, length: text.length });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {