From ea11182a0e8cb62d208b5b53a60c98c8bdef9e9a Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 21:17:13 +0530 Subject: feat!: remove the deep-research feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The harness ships browser tools; orchestrating a multi-agent research workflow on top of them is the agent's job, not this extension's. Drops the skill, the /deep-research command, and the web-search-researcher subagent config. browser_web_search and browser_read_page are untouched — the two tests that covered their pure parsers move to test/domains/, where the test glob still picks them up. Co-Authored-By: Claude Opus 5 (1M context) --- test/deep-research/serp-parser-test.ts | 60 ---------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 test/deep-research/serp-parser-test.ts (limited to 'test/deep-research/serp-parser-test.ts') diff --git a/test/deep-research/serp-parser-test.ts b/test/deep-research/serp-parser-test.ts deleted file mode 100644 index 433c650..0000000 --- a/test/deep-research/serp-parser-test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { test, describe } from "node:test"; -import assert from "node:assert/strict"; -import { readFileSync } from "node:fs"; -import { join } from "node:path"; -import { classifySerp, parseGoogleSerp, type SerpExtraction } from "../../src/domains/search/google-serp"; - -const fixture = (name: string): SerpExtraction => - JSON.parse(readFileSync(join(import.meta.dirname, "fixtures", name), "utf8")) as SerpExtraction; - -const ok = fixture("google-serp-ok.json"); -const captcha = fixture("google-serp-captcha.json"); -const empty = fixture("google-serp-empty.json"); - -describe("pure Google SERP parser", () => { - test("S1: /url?q= redirect is unwrapped to the real target", () => { - const results = parseGoogleSerp(ok.anchors, 10); - const urls = results.map((r) => r.url); - assert.ok(urls.includes("https://real.example/x")); - }); - - test("S1: google-internal anchors are dropped", () => { - const results = parseGoogleSerp(ok.anchors, 10); - const urls = results.map((r) => r.url); - assert.ok(!urls.some((u) => u.includes("google.com"))); - }); - - test("S1: javascript: anchors are dropped", () => { - const results = parseGoogleSerp(ok.anchors, 10); - const urls = results.map((r) => r.url); - assert.ok(!urls.some((u) => u.startsWith("javascript:"))); - }); - - test("S2: trailing-slash duplicate collapses to one result", () => { - const results = parseGoogleSerp(ok.anchors, 10); - const realExampleCount = results.filter((r) => r.url.startsWith("https://real.example/x")).length; - assert.equal(realExampleCount, 1); - }); - - test("S2: rank runs 1..n in input order", () => { - const results = parseGoogleSerp(ok.anchors, 10); - assert.ok(results.every((r, i) => r.rank === i + 1)); - }); - - test("S2: limit truncates and ranks stay 1..limit", () => { - const capped = parseGoogleSerp(ok.anchors, 2); - assert.ok(capped.length === 2 && capped[capped.length - 1]?.rank === 2); - }); - - test("S3: populated SERP classifies as ok", () => { - assert.equal(classifySerp(ok.pageText, parseGoogleSerp(ok.anchors, 10).length), "ok"); - }); - - test("S3: captcha page classifies as captcha", () => { - assert.equal(classifySerp(captcha.pageText, 0), "captcha"); - }); - - test("S3: empty results classify as no_results", () => { - assert.equal(classifySerp(empty.pageText, 0), "no_results"); - }); -}); -- cgit v1.2.3