foxfetch 0.1.4__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: foxfetch
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed.
5
5
  Project-URL: Homepage, https://github.com/zhuchongba-01/foxfetch
6
6
  Project-URL: Repository, https://github.com/zhuchongba-01/foxfetch
@@ -58,84 +58,68 @@ Description-Content-Type: text/markdown
58
58
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
59
59
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
60
60
 
61
- `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch uses a real Firefox engine
62
- (SpiderMonkey + Necko, no window, no renderer) to run the site's own JavaScript, pass the bot
63
- check, and read what only a browser can see. When a screenshot is needed, it hands the identity
64
- it earned to Chromium.
61
+ Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
62
+ when a screenshot is needed.
65
63
 
66
- ---
67
-
68
- ## Install in 30 seconds
69
-
70
- **1. Install the service** (once per machine — **every host needs this, DSH included**):
64
+ ## Install
71
65
 
72
66
  ```bash
73
67
  pip install foxfetch
74
68
  ```
75
69
 
76
- **2. Check it** — should print `"ok": true`:
70
+ That is the service, and every host needs it. Then one of these two:
77
71
 
78
- ```bash
79
- python -m foxfetch doctor
80
- ```
72
+ | You use | Run this next |
73
+ |---|---|
74
+ | **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
75
+ | **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
81
76
 
82
- **3. Connect your agent** — this step differs per host, because the hosts live on different
83
- platforms:
77
+ ### DSH, both commands together
84
78
 
85
- ```
86
- the service (one, shared)
87
- python -m foxfetch serve ← pip install foxfetch
88
- ▲
89
- ┌───────────────┴────────────────┐
90
- │ │
91
- MCP clients (Pi, Claude Code, DeepSeek Harness
92
- Codex, anything else) (native plugin API)
93
- → a config entry pointing → an npm plugin that forwards
94
- at the command above to the command above
95
- │ │
96
- Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
97
- -- python -m foxfetch pnpm add dsh-foxfetch
98
- serve (+ add to dsh.profile.bundles)
79
+ ```powershell
80
+ pip install foxfetch
81
+ cd "$env:USERPROFILE\.dsh\profiles\desktop"
82
+ pnpm add dsh-foxfetch
99
83
  ```
100
84
 
101
- | Your agent | Platform | What you install for it |
102
- |---|---|---|
103
- | **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
104
- | **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
105
- | **Codex** | MCP | a `[mcp_servers.foxfetch]` table in `~/.codex/config.toml` → [steps](#codex) |
106
- | **DeepSeek Harness** | **npm plugin** | **two things**: the service from step 1 **plus** `pnpm add dsh-foxfetch` → [steps](#deepseek-harness) |
107
- | **Other MCP client** | MCP | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
85
+ Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
86
+ DSH. Exact file content: [DSH steps](#deepseek-harness).
108
87
 
109
- Read the table as: *step 1 is always required, step 3 adds whatever that host needs on top.*
88
+ ### Everyone else, one config entry
110
89
 
111
- - DSH: **two** installs — `pip install foxfetch` (the service) **and** `pnpm add dsh-foxfetch`
112
- (the plugin). The plugin cannot work without the service; it fails with
113
- `cannot start the Python service` if you skip step 1.
114
- - Everyone else: **one** install — `pip install foxfetch`. Their "install" is just a config
115
- entry pointing at `python -m foxfetch serve`, no package to add.
90
+ ```bash
91
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
92
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
93
+ ```
116
94
 
117
- **DSH only — the two commands together, in order:**
95
+ Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
96
+ `command: python`, `args: ["-m", "foxfetch", "serve"]`.
118
97
 
119
- ```powershell
120
- pip install foxfetch # 1. the service
121
- cd "$env:USERPROFILE\.dsh\profiles\desktop"
122
- pnpm add dsh-foxfetch # 2. the plugin
123
- # then add "dsh-foxfetch" to dsh.profile.bundles and restart DSH ([details](#deepseek-harness))
98
+ ## Verify
99
+
100
+ ```bash
101
+ python -m foxfetch doctor # expect "ok": true
124
102
  ```
125
103
 
126
- **4. Prove it works** — ask your agent:
104
+ Then ask your agent:
127
105
 
128
106
  ```
129
107
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
130
108
  ```
131
109
 
132
- You must see `Firefox/160.0` in the answer. If you see `Python-urllib` or `HeadlessChrome`, the
133
- agent is not talking to the engine — nothing else will work until you fix it.
110
+ It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
111
+ not reaching the engine — nothing else will work until that is fixed.
134
112
 
135
- > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
136
- > you would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
113
+ > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
114
+ > would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
137
115
 
138
- ---
116
+ ## Why this exists
117
+
118
+ `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
119
+ a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
120
+ the JS environment are those of a real browser — and it keeps that world alive between calls.
121
+ When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
122
+ finish the job.
139
123
 
140
124
  ## Detailed install
141
125
 
@@ -9,84 +9,68 @@
9
9
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
10
10
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
11
11
 
12
- `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch uses a real Firefox engine
13
- (SpiderMonkey + Necko, no window, no renderer) to run the site's own JavaScript, pass the bot
14
- check, and read what only a browser can see. When a screenshot is needed, it hands the identity
15
- it earned to Chromium.
12
+ Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
13
+ when a screenshot is needed.
16
14
 
17
- ---
18
-
19
- ## Install in 30 seconds
20
-
21
- **1. Install the service** (once per machine — **every host needs this, DSH included**):
15
+ ## Install
22
16
 
23
17
  ```bash
24
18
  pip install foxfetch
25
19
  ```
26
20
 
27
- **2. Check it** — should print `"ok": true`:
21
+ That is the service, and every host needs it. Then one of these two:
28
22
 
29
- ```bash
30
- python -m foxfetch doctor
31
- ```
23
+ | You use | Run this next |
24
+ |---|---|
25
+ | **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
26
+ | **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
32
27
 
33
- **3. Connect your agent** — this step differs per host, because the hosts live on different
34
- platforms:
28
+ ### DSH, both commands together
35
29
 
36
- ```
37
- the service (one, shared)
38
- python -m foxfetch serve ← pip install foxfetch
39
- ▲
40
- ┌───────────────┴────────────────┐
41
- │ │
42
- MCP clients (Pi, Claude Code, DeepSeek Harness
43
- Codex, anything else) (native plugin API)
44
- → a config entry pointing → an npm plugin that forwards
45
- at the command above to the command above
46
- │ │
47
- Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
48
- -- python -m foxfetch pnpm add dsh-foxfetch
49
- serve (+ add to dsh.profile.bundles)
30
+ ```powershell
31
+ pip install foxfetch
32
+ cd "$env:USERPROFILE\.dsh\profiles\desktop"
33
+ pnpm add dsh-foxfetch
50
34
  ```
51
35
 
52
- | Your agent | Platform | What you install for it |
53
- |---|---|---|
54
- | **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
55
- | **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
56
- | **Codex** | MCP | a `[mcp_servers.foxfetch]` table in `~/.codex/config.toml` → [steps](#codex) |
57
- | **DeepSeek Harness** | **npm plugin** | **two things**: the service from step 1 **plus** `pnpm add dsh-foxfetch` → [steps](#deepseek-harness) |
58
- | **Other MCP client** | MCP | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
36
+ Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
37
+ DSH. Exact file content: [DSH steps](#deepseek-harness).
59
38
 
60
- Read the table as: *step 1 is always required, step 3 adds whatever that host needs on top.*
39
+ ### Everyone else, one config entry
61
40
 
62
- - DSH: **two** installs — `pip install foxfetch` (the service) **and** `pnpm add dsh-foxfetch`
63
- (the plugin). The plugin cannot work without the service; it fails with
64
- `cannot start the Python service` if you skip step 1.
65
- - Everyone else: **one** install — `pip install foxfetch`. Their "install" is just a config
66
- entry pointing at `python -m foxfetch serve`, no package to add.
41
+ ```bash
42
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
43
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
44
+ ```
67
45
 
68
- **DSH only — the two commands together, in order:**
46
+ Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
47
+ `command: python`, `args: ["-m", "foxfetch", "serve"]`.
69
48
 
70
- ```powershell
71
- pip install foxfetch # 1. the service
72
- cd "$env:USERPROFILE\.dsh\profiles\desktop"
73
- pnpm add dsh-foxfetch # 2. the plugin
74
- # then add "dsh-foxfetch" to dsh.profile.bundles and restart DSH ([details](#deepseek-harness))
49
+ ## Verify
50
+
51
+ ```bash
52
+ python -m foxfetch doctor # expect "ok": true
75
53
  ```
76
54
 
77
- **4. Prove it works** — ask your agent:
55
+ Then ask your agent:
78
56
 
79
57
  ```
80
58
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
81
59
  ```
82
60
 
83
- You must see `Firefox/160.0` in the answer. If you see `Python-urllib` or `HeadlessChrome`, the
84
- agent is not talking to the engine — nothing else will work until you fix it.
61
+ It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
62
+ not reaching the engine — nothing else will work until that is fixed.
85
63
 
86
- > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
87
- > you would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
64
+ > **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
65
+ > would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
88
66
 
89
- ---
67
+ ## Why this exists
68
+
69
+ `curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
70
+ a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
71
+ the JS environment are those of a real browser — and it keeps that world alive between calls.
72
+ When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
73
+ finish the job.
90
74
 
91
75
  ## Detailed install
92
76
 
@@ -9,81 +9,66 @@
9
9
  [![npm plugin](https://img.shields.io/npm/v/dsh-foxfetch?logo=npm&label=dsh-foxfetch)](https://www.npmjs.com/package/dsh-foxfetch)
10
10
  [![License](https://img.shields.io/pypi/l/foxfetch)](LICENSE)
11
11
 
12
- `curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 用**真的 Firefox 引擎**(SpiderMonkey
13
- + Necko,无窗口、不渲染)执行站点自己的 JavaScript,过掉风控,读出只有浏览器才能看到的东西。
14
- 需要截图时,把它挣到的身份交给 Chromium。
12
+ 在真 Firefox 引擎里跑页面,用来过风控;需要截图时把身份交给 Chromium。
15
13
 
16
- ---
17
-
18
- ## 30 秒装好
19
-
20
- **第 1 步:装服务**(每台机器装一次 —— **所有宿主都要,DSH 也不例外**)
14
+ ## 安装
21
15
 
22
16
  ```bash
23
17
  pip install foxfetch
24
18
  ```
25
19
 
26
- **第 2 步:自检** —— 应该打印 `"ok": true`
20
+ 这是服务本体,**所有宿主都要装**。然后按你用的软件二选一:
27
21
 
28
- ```bash
29
- python -m foxfetch doctor
30
- ```
22
+ | 你用 | 接着执行 |
23
+ |---|---|
24
+ | **DeepSeek Harness**(DSH) | 在 `~/.dsh/profiles/desktop` 里 `pnpm add dsh-foxfetch`,再把它加进 `dsh.profile.bundles`,重启 → [步骤](#deepseek-harness) |
25
+ | **Pi / Claude Code / Codex / 其它 MCP 客户端** | 不用装包,只要写一段配置 → [步骤](#pi) |
31
26
 
32
- **第 3 步:接你的 agent** —— 这一步**各家不一样**,因为它们不在同一个平台上:
27
+ ### DSH:两条命令连起来
33
28
 
34
- ```
35
- 服务(只有一份,大家共用)
36
- python -m foxfetch serve ← pip install foxfetch
37
- ▲
38
- ┌───────────────┴────────────────┐
39
- │ │
40
- MCP 客户端(Pi、Claude Code、 DeepSeek Harness
41
- Codex、其它) (有原生插件机制)
42
- → 写一段配置指向上面那条命令 → 装一个 npm 插件,插件再转发给上面
43
- │ │
44
- Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
45
- -- python -m foxfetch pnpm add dsh-foxfetch
46
- serve (再登记到 dsh.profile.bundles)
29
+ ```powershell
30
+ pip install foxfetch
31
+ cd "$env:USERPROFILE\.dsh\profiles\desktop"
32
+ pnpm add dsh-foxfetch
47
33
  ```
48
34
 
49
- | 你的 agent | 平台 | 你要给它装什么 |
50
- |---|---|---|
51
- | **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
52
- | **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
53
- | **Codex** | MCP | 在 `~/.codex/config.toml` 加一个 `[mcp_servers.foxfetch]` 表 → [步骤](#codex) |
54
- | **DeepSeek Harness** | **npm 插件** | **装两样**:第 1 步的服务 **加上** `pnpm add dsh-foxfetch` → [步骤](#deepseek-harness) |
55
- | **其它 MCP 客户端** | MCP | `command: python`,`args: ["-m", "foxfetch", "serve"]` |
35
+ 然后把 `"dsh-foxfetch"` 加进这个目录下 `package.json` 的 `dsh.profile.bundles`,重启 DSH。
36
+ 完整文件内容见 [DSH 步骤](#deepseek-harness)。
56
37
 
57
- 这张表要这样读:**第 1 步永远要做,第 3 步只是在该宿主上再补它需要的东西。**
38
+ ### 其它软件:只写一段配置
58
39
 
59
- - **DSH:装两次。** `pip install foxfetch`(服务)**和** `pnpm add dsh-foxfetch`(插件)。
60
- 插件只是个转发壳,没有服务就起不来 —— 跳过第 1 步会直接报
61
- `cannot start the Python service`。
62
- - **其它宿主:装一次。** 只要 `pip install foxfetch`。它们的"安装"其实就是写一段配置
63
- 指向 `python -m foxfetch serve`,**不需要额外装包**。
40
+ ```bash
41
+ pi mcp add foxfetch -- python -m foxfetch serve # Pi
42
+ claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
43
+ ```
64
44
 
65
- **只有 DSH 的话,两条命令连起来就是全流程:**
45
+ Codex 是在 `~/.codex/config.toml` 里加表([步骤](#codex));其它 MCP 客户端用
46
+ `command: python`、`args: ["-m", "foxfetch", "serve"]`。
66
47
 
67
- ```powershell
68
- pip install foxfetch # 1. 服务
69
- cd "$env:USERPROFILE\.dsh\profiles\desktop"
70
- pnpm add dsh-foxfetch # 2. 插件
71
- # 然后把 "dsh-foxfetch" 加进 dsh.profile.bundles,重启 DSH([详细步骤](#deepseek-harness))
48
+ ## 验证
49
+
50
+ ```bash
51
+ python -m foxfetch doctor # 应输出 "ok": true
72
52
  ```
73
53
 
74
- **第 4 步:验证真的通了** —— 让你的 agent 调用
54
+ 然后让你的 agent 调用:
75
55
 
76
56
  ```
77
57
  foxfetch_run(js="navigator.userAgent", url="https://example.com")
78
58
  ```
79
59
 
80
- 答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent
81
- 根本没连上引擎 —— 先把这个问题解决,否则后面全是假的。
60
+ 答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent 没连上
61
+ 引擎 —— 这个问题不解决,后面全是假的。
82
62
 
83
- > **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件:
84
- > 那样会出现两套同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`),模型得靠猜。
63
+ > **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件,否则会出现两套
64
+ > 同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`)。
85
65
 
86
- ---
66
+ ## 为什么需要它
67
+
68
+ `curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 在**真 Firefox 引擎**(SpiderMonkey +
69
+ Necko,无窗口、不渲染)里执行站点自己的 JavaScript,所以 TLS 握手和 JS 环境都是真浏览器的,
70
+ 而且这个环境在调用之间保持存活。需要截图或点击时,`handoff` 把挣到的身份导出来,交给 Chromium
71
+ 完成剩下的活。
87
72
 
88
73
  ## 详细安装
89
74
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "foxfetch"
7
- version = "0.1.4"
7
+ version = "0.1.6"
8
8
  description = "Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,5 +1,5 @@
1
1
  """foxfetch: read pages through a real Firefox engine when plain HTTP is not enough."""
2
2
 
3
- __version__ = "0.1.4"
3
+ __version__ = "0.1.6"
4
4
 
5
5
  __all__ = ["__version__"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes