autokap 1.3.30 → 1.3.31

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.
@@ -497,7 +497,15 @@ export class WebPlaywrightLocal {
497
497
  const ffmpegResult = await this.recording.ffmpegRecorder.stop();
498
498
  logger.info(`[capture] Clip ffmpeg+nvenc capture: ${(ffmpegResult.durationMs / 1000).toFixed(2)}s wall, ` +
499
499
  `trim ${Math.round(ffmpegResult.trimStartMs)}ms, output ${ffmpegResult.outputPath}`);
500
- await this.browser.closeContext();
500
+ // Persistent context (cloud) — DO NOT closeContext here. Closing the
501
+ // persistent context tears down the underlying browser process, which
502
+ // breaks the END_CLIP opcode handler's `adapter.getCurrentUrl()` call
503
+ // that runs immediately after this returns (and any subsequent
504
+ // NAVIGATE/CLICK/BEGIN_CLIP opcodes in the same preset). The CDP
505
+ // screencast path (non-ffmpeg branch below) closes context here to
506
+ // release the loop's CDP session — that's not needed for x11grab,
507
+ // ffmpeg has already finalized the MP4. Browser cleanup happens in
508
+ // Browser.close() at end of session.
501
509
  this.recording.finalized = true;
502
510
  this.recording.ffmpegResult = ffmpegResult;
503
511
  this.recording.sourcePath = ffmpegResult.outputPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autokap",
3
- "version": "1.3.30",
3
+ "version": "1.3.31",
4
4
  "description": "AI-powered CLI tool for capturing clean screenshots of websites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",