feat(browser): complete camofox BrowserProvider with tabs, interaction, download capture and control lease

Contracts for browser API and browser.* agent capabilities; adapter implements
close/list/restore sessions, tabs + reconcile, history, click/type/select/scroll/press,
extract, waitForDownload (staged via DownloadSink, sha256), stale-ref guard and
automation/human actor check. testkit mock camofox gains an interactive site
(login redirect, captcha, click-driven page changes, downloads, PNG screenshots).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 20:17:46 +08:00
1 parent 62290d4477
commit c17d4b90bd
12 files changed
+1832 -101

No files matched your search

+15
View File
@@ -42,5 +42,20 @@ export function createNoneBrowserProvider(): BrowserProvider {
waitForDownload: unavailable,
acquireControl: unavailable,
releaseControl: unavailable,
openTab: unavailable,
closeTab: unavailable,
history: unavailable,
select: unavailable,
scroll: unavailable,
press: unavailable,
setController() {
throw new BrowserError("unavailable", "未配置浏览器服务");
},
restoreSession() {
throw new BrowserError("unavailable", "未配置浏览器服务");
},
reconcileTabs: unavailable,
sessionInfo: () => null,
drain: async () => {},
};
}