feat: add preview tool — navigate + screenshot in one call with optional POST

New MCP tool `preview` combines goto + screenshot with viewport control.
Optionally POSTs result to any HTTP endpoint (e.g. HUD/visor) via previewUrl.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 12:44:52 +02:00
parent 7171fbfc76
commit a80224df36
16 changed files with 332 additions and 272 deletions
+7
View File
@@ -118,6 +118,13 @@ export declare class ClaudeBrowser {
private handleDialogCommand;
private handleCookiesCommand;
private handleStorageCommand;
private handlePreviewCommand;
/**
* POST a screenshot to a preview endpoint.
* Payload: { source: "file:///path", title, caption }
* Silent failure — returns false if endpoint is unreachable.
*/
private postPreview;
private handleImportCommand;
executeCommand(cmd: BrowserCommand): Promise<CommandResponse>;
}