claude-browser-bridge 4.1.1 → 5.0.0
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.
- package/index.js +47 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1023,10 +1023,45 @@ const TOOLS = [
|
|
|
1023
1023
|
},
|
|
1024
1024
|
},
|
|
1025
1025
|
},
|
|
1026
|
+
// =================== VIDEO UNDERSTANDING TOOLS ===================
|
|
1027
|
+
{
|
|
1028
|
+
name: "video_get_captions",
|
|
1029
|
+
description: "Extract ALL captions/subtitles from the current YouTube video in one call — returns every line with start/end timestamps. Faster than watching the video. Use on any YouTube tab to get what the instructor is saying.",
|
|
1030
|
+
inputSchema: { type: "object", properties: { ...TAB_ID } },
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
name: "video_control",
|
|
1034
|
+
description: "Control video playback: play, pause, seek to a timestamp, change speed, or get current status. Use action='seek' with value=seconds to jump to a specific point. action='speed' with value=2 for 2x playback.",
|
|
1035
|
+
inputSchema: {
|
|
1036
|
+
type: "object",
|
|
1037
|
+
properties: {
|
|
1038
|
+
action: { type: "string", enum: ["play", "pause", "seek", "status", "speed"], description: "What to do with the video" },
|
|
1039
|
+
value: { type: "number", description: "Seek target in seconds, or playback speed multiplier" },
|
|
1040
|
+
...TAB_ID,
|
|
1041
|
+
},
|
|
1042
|
+
required: ["action"],
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
name: "video_capture_frame",
|
|
1047
|
+
description: "Pause the video at a specific timestamp and screenshot what's on screen — lets Claude 'see' code, slides, diagrams shown in the video. Also returns the caption at that moment. Pass timestamp in seconds.",
|
|
1048
|
+
inputSchema: {
|
|
1049
|
+
type: "object",
|
|
1050
|
+
properties: {
|
|
1051
|
+
timestamp: { type: "number", description: "Time in seconds to capture the frame at (e.g. 120 for 2:00)" },
|
|
1052
|
+
...TAB_ID,
|
|
1053
|
+
},
|
|
1054
|
+
},
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: "video_get_chapters",
|
|
1058
|
+
description: "Extract chapter markers from a YouTube video (from the description or progress bar). Returns chapter titles with timestamps — use to navigate a tutorial by topic.",
|
|
1059
|
+
inputSchema: { type: "object", properties: { ...TAB_ID } },
|
|
1060
|
+
},
|
|
1026
1061
|
];
|
|
1027
1062
|
|
|
1028
1063
|
const server = new Server(
|
|
1029
|
-
{ name: "browser-bridge", version: "
|
|
1064
|
+
{ name: "browser-bridge", version: "5.0.0" },
|
|
1030
1065
|
{ capabilities: { tools: {} } }
|
|
1031
1066
|
);
|
|
1032
1067
|
|
|
@@ -1071,6 +1106,17 @@ function formatResult(name, result) {
|
|
|
1071
1106
|
],
|
|
1072
1107
|
};
|
|
1073
1108
|
}
|
|
1109
|
+
// Video frame capture: return the screenshot as an image
|
|
1110
|
+
if (name === "video_capture_frame" && result?.dataUrl) {
|
|
1111
|
+
const base64 = result.dataUrl.replace(/^data:image\/png;base64,/, "");
|
|
1112
|
+
const { dataUrl, ...rest } = result;
|
|
1113
|
+
return {
|
|
1114
|
+
content: [
|
|
1115
|
+
{ type: "image", data: base64, mimeType: "image/png" },
|
|
1116
|
+
{ type: "text", text: JSON.stringify(rest, null, 2) },
|
|
1117
|
+
],
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1074
1120
|
// Observe mode: if the response includes an auto-captured screenshot, return it as an image
|
|
1075
1121
|
if (result?.__screenshot) {
|
|
1076
1122
|
const base64 = result.__screenshot.replace(/^data:image\/png;base64,/, "");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-browser-bridge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Connect your live Chrome tabs to Claude Code — 65 tools for debugging, performance, accessibility, visual inspection, and browser automation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|