@caiqy/browser-skill-dsh-plugin 0.0.0-stage → 0.3.3-dsh.2

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.
@@ -0,0 +1,76 @@
1
+ # Video recording
2
+
3
+ When the user asks to record a task, control recording yourself through
4
+ `bsk_inspect` with `action: "video"`. The user does not need to race to the
5
+ extension's Start button. Record only when requested. Video is separate from
6
+ semantic interaction recording, which remains unsupported by these tools.
7
+
8
+ 1. Start a session without an initial URL. For an existing page, borrow its tab
9
+ first using the normal authorization flow. Retain the session and tab IDs.
10
+ 2. Start recording and wait for `recording.state: "recording"` before navigating
11
+ or performing task operations. A start error must be reported before proceeding
12
+ without video; never imply that capture is active after an error.
13
+ 3. Execute the task on that fixed tab. Navigation/reload remain recorded; switching
14
+ tabs does not move capture. Start is nonblocking after the first encoded frame.
15
+ 4. Before stopping, wait for navigation to settle and the expected final page
16
+ state (such as its result element), then observe to confirm the outcome. An
17
+ action returning does not guarantee that asynchronous page updates have finished.
18
+ Stopping during unresolved navigation produces a partial result even if the
19
+ task action succeeded. If the page fails to settle, stop and report incomplete
20
+ capture rather than waiting indefinitely.
21
+ 5. Stop recording before stopping the session, on success or failure. Inspect
22
+ `state`, `completeness`, `stop_reason` and `error`, then report the result.
23
+
24
+ ```text
25
+ bsk_session({ action: "start" })
26
+ bsk_inspect({ action: "video", videoAction: "start", session: "<sessionId>", durationMs: 60000, quality: "standard" })
27
+ // Retain recording.recording_id. Navigate and perform the task only after start succeeds.
28
+ bsk_inspect({ action: "video", videoAction: "status", recordingId: "<recording_id>" })
29
+ // Wait for navigation and the expected final page state before stopping.
30
+ bsk_inspect({ action: "video", videoAction: "stop", recordingId: "<recording_id>" })
31
+ bsk_session({ action: "stop", session: "<sessionId>" })
32
+ ```
33
+
34
+ The result is a silent H.264 MP4. Default limit: 60 seconds; range: 1 second to
35
+ 10 minutes. `standard` targets 1280 pixels / 15 fps; `clear` targets 1920 / 30 fps.
36
+ Choose a limit appropriate to the requested task. A duration/size limit stops the
37
+ video, not the task: do not call a capped video a recording of the entire task.
38
+ One video can record per browser. A start error includes a stable `requestId` for
39
+ retrying the same session/options if the reply was lost. A recovered recording
40
+ that has already stopped is not an active recording; inspect it before continuing.
41
+
42
+ ## Preview and explicit export
43
+
44
+ Tell the user to open Features → Video recording → Recent recordings in the
45
+ extension to preview, seek, and Save MP4 as. Stopping video leaves the task running;
46
+ closing the popup does not stop recording. No save-location question is needed to
47
+ start recording or keep its result for preview.
48
+
49
+ Export through the tool only when the user specifies a destination; ask if needed:
50
+
51
+ ```text
52
+ bsk_inspect({ action: "video", videoAction: "save", recordingId: "<recording_id>", output: "<explicit-path.mp4>" })
53
+ ```
54
+
55
+ Tool export writes on the harness host, which may be remote. The extension's Save
56
+ As writes on the browser computer. Replacing an existing file requires explicit
57
+ permission and `overwrite: true`. A partial stop/save is a tool error containing
58
+ the recording metadata and any saved path. Use status to inspect it; a file's
59
+ existence does not make the recording complete. Unsupported capture/encoding fails
60
+ explicitly; do not silently switch to another browser or recording method.
61
+
62
+ Status, stop and list remain available during navigation or human help. After
63
+ session teardown, use the recording ID to inspect or save the preserved video:
64
+ artifact access is independent of the live task. `videoAction: "list"` lists only
65
+ recordings started by this plugin instance; optional `session` filters that list.
66
+ `videoAction: "discard"` with `recordingId` deletes a stopped browser copy only when
67
+ requested. Never delete unsaved evidence merely to start another capture.
68
+
69
+ Browser copies last 24 hours, including after task teardown. Closing the tab,
70
+ disconnects or ending the session before stopping video may preserve a partial
71
+ result. Network error pages or PDF viewers may also end as partial if clean
72
+ capture cannot resume. Unresolved navigation has a 60-second fallback; the selected
73
+ duration limit can stop it sooner. A crash may lose the last incomplete fragment.
74
+ After a plugin reload, or for recordings started manually, use the extension
75
+ library to preview and save.
76
+ Interactive confirmation/help UI is replaced by a neutral waiting screen in video.