summaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-08-03 21:18:02 +0100
committerIgor Soarez <igor@soarez.org>2026-08-03 21:18:02 +0100
commit495de0d5283dd3e4a6ef715b596c4a2892e95915 (patch)
treeaae2ec78d59cb96d8e90c56ab7626a6886d30be2 /package.json
Web search for pi through an existing Chrome over CDP
Attaches to a browser that is already running — never launches one — using the same endpoint configuration as pi-browser-harness, so a single /browser-target choice governs both packages. One tool, castle_cdp_search, deliberately not named web_search so it coexists with pi-web-access rather than shadowing it. Notes from validating against castle's Chrome: - tbs=qdr:*, the parameter Google's own Tools menu writes, renders an empty page on this profile; the older as_qdr=* works. Any date filter combined with udm=14 is also empty, so recency drops udm. - Target.createTarget must not be raced against the abort signal: raceAbort abandons the promise but cannot cancel the command, and the command's side effect is a tab nothing is left holding. - A search cancelled while queued has to be removed from the semaphore queue, or the slot handed to it later is never counted back. - A decaying rate-limit block stops serving /sorry/ and returns an empty results page instead, indistinguishable from a genuine zero-hit search.
Diffstat (limited to 'package.json')
-rw-r--r--package.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..3e31124
--- /dev/null
+++ b/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "pi-castle-cdp-search",
+ "version": "0.1.0",
+ "private": true,
+ "description": "Web search for pi through an already-running Chrome on the wire network, driven over CDP",
+ "keywords": [
+ "pi-package",
+ "pi-extension",
+ "search",
+ "cdp",
+ "chrome"
+ ],
+ "license": "MIT",
+ "type": "module",
+ "engines": {
+ "node": ">=22.0.0"
+ },
+ "files": [
+ "src/",
+ "tsconfig.json",
+ "README.md"
+ ],
+ "pi": {
+ "extensions": [
+ "./src/index.ts"
+ ]
+ },
+ "scripts": {
+ "typecheck": "tsc --noEmit",
+ "test": "node --experimental-strip-types --test test/*.test.ts"
+ },
+ "devDependencies": {
+ "@earendil-works/pi-ai": "*",
+ "@earendil-works/pi-coding-agent": "*",
+ "typebox": "*",
+ "typescript": "^5.0.0"
+ }
+}