feat(read): target any tab for page info and extraction
- Add --tab option to all extract commands and page info - Thread tab_id through the SDK extract and page namespaces - Route page.info with a tab_id to tabs.status for cross-tab metadata - Accept tab_id in the MCP page_info, extract_text, extract_markdown tools - Forward tabId in the extension page.info and extract.html handlers - Keep the active tab as default when no tab is given - Cover tab-scoped reads in API, CLI, and MCP tests - Bump package and extension version to 0.16.7 - Refresh uv.lock with current dependency versions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "browser-cli",
|
||||
"version": "0.16.6",
|
||||
"version": "0.16.7",
|
||||
"description": "Control your browser from the terminal or Python SDK",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
|
||||
@@ -56,7 +56,7 @@ export class DomCommands extends CommandGroup {
|
||||
"dom.poll": (a: DomPollArgs) => this.domPoll(a),
|
||||
|
||||
// ── Page ─────────────────────────────────────────────────────────────
|
||||
"page.info": () => this.domOp("pageInfo", {}),
|
||||
"page.info": (a: DomArgs) => this.domOp("pageInfo", a),
|
||||
|
||||
// ── Extract ──────────────────────────────────────────────────────────
|
||||
"extract.links": (a: DomArgs) => this.domOp("extractLinks", a),
|
||||
@@ -64,7 +64,7 @@ export class DomCommands extends CommandGroup {
|
||||
"extract.text": (a: DomArgs) => this.domOp("extractText", a),
|
||||
"extract.json": (a: DomArgs) => this.domOp("extractJson", a),
|
||||
"extract.markdown": (a: DomArgs) => this.domOp("extractMarkdown", a),
|
||||
"extract.html": () => fetchTabHtml(undefined),
|
||||
"extract.html": (a: DomArgs = {}) => fetchTabHtml(a.tabId),
|
||||
};
|
||||
|
||||
private async domOp(funcName: string, args: DomArgs = {}) {
|
||||
|
||||
Reference in New Issue
Block a user