@wlv-zedd/dsh-chatgpt-web 1.0.1 → 1.0.3

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.
Files changed (82) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +147 -140
  3. package/README.zh-CN.md +147 -0
  4. package/cordis.patch.yml +4 -4
  5. package/lib/cli.js +13321 -11865
  6. package/lib/plugin.js +3 -50
  7. package/package.json +89 -89
  8. package/src/adapters/base.ts +16 -16
  9. package/src/adapters/chatgpt-web/adapter-error.ts +59 -59
  10. package/src/adapters/chatgpt-web/browser-helper-main.ts +513 -513
  11. package/src/adapters/chatgpt-web/browser-helper-prompt-selection.ts +27 -27
  12. package/src/adapters/chatgpt-web/browser-worker.ts +4953 -4944
  13. package/src/adapters/chatgpt-web/codex-rollout-environment.ts +628 -628
  14. package/src/adapters/chatgpt-web/compaction-handoff.ts +533 -533
  15. package/src/adapters/chatgpt-web/compaction-transaction.ts +142 -142
  16. package/src/adapters/chatgpt-web/concurrency.ts +6 -6
  17. package/src/adapters/chatgpt-web/conversation-key.ts +58 -58
  18. package/src/adapters/chatgpt-web/environment.ts +669 -669
  19. package/src/adapters/chatgpt-web/index.ts +1544 -1544
  20. package/src/adapters/chatgpt-web/input-tokens.ts +74 -74
  21. package/src/adapters/chatgpt-web/launcher-helper-client.ts +695 -695
  22. package/src/adapters/chatgpt-web/markdown.ts +460 -418
  23. package/src/adapters/chatgpt-web/mcp-main.ts +25 -25
  24. package/src/adapters/chatgpt-web/mcp-server.ts +933 -933
  25. package/src/adapters/chatgpt-web/model.ts +70 -70
  26. package/src/adapters/chatgpt-web/native-compaction-control.ts +74 -74
  27. package/src/adapters/chatgpt-web/output-validation.ts +62 -62
  28. package/src/adapters/chatgpt-web/process-line-writer.ts +46 -46
  29. package/src/adapters/chatgpt-web/prompt.ts +702 -702
  30. package/src/adapters/chatgpt-web/retry-policy.ts +73 -73
  31. package/src/adapters/chatgpt-web/rolling-checkpoint.ts +384 -384
  32. package/src/adapters/chatgpt-web/thread-environment.ts +238 -238
  33. package/src/adapters/chatgpt-web/tool-stream-parser.ts +1 -1
  34. package/src/adapters/chatgpt-web/turn-broker.ts +1481 -1481
  35. package/src/adapters/chatgpt-web/turn-execution.ts +816 -816
  36. package/src/adapters/chatgpt-web/turn-progress.ts +292 -292
  37. package/src/adapters/chatgpt-web/usage.ts +121 -121
  38. package/src/adapters/image.ts +9 -9
  39. package/src/bridge.ts +1083 -1083
  40. package/src/browser-login.ts +521 -521
  41. package/src/chatgpt-session.ts +240 -240
  42. package/src/chatgpt-web-models.ts +400 -400
  43. package/src/cli.ts +568 -568
  44. package/src/codex-integration-document.ts +824 -824
  45. package/src/codex-integration-journal.ts +212 -212
  46. package/src/codex-integration-route.ts +515 -515
  47. package/src/codex-integration-shared.ts +332 -332
  48. package/src/codex-integration.ts +529 -529
  49. package/src/codex-interrupt-hook.ts +158 -158
  50. package/src/config.ts +616 -616
  51. package/src/dev-chat/cli.ts +432 -432
  52. package/src/dev-chat/constants.ts +3 -3
  53. package/src/dev-chat/driver.ts +655 -655
  54. package/src/dev-chat/profile.ts +223 -223
  55. package/src/dev-chat/session.ts +287 -287
  56. package/src/dev-chat/transport.ts +54 -54
  57. package/src/doctor.ts +237 -237
  58. package/src/event-queue.ts +45 -45
  59. package/src/http-body.ts +30 -30
  60. package/src/launcher-browser-host.ts +695 -695
  61. package/src/lib/errors.ts +281 -281
  62. package/src/lib/token-estimate.ts +42 -42
  63. package/src/login-helper.cjs +1 -1
  64. package/src/model-catalog.ts +197 -197
  65. package/src/native-passthrough.ts +261 -261
  66. package/src/plugin.ts +191 -191
  67. package/src/process.ts +45 -45
  68. package/src/responses/compaction.ts +199 -199
  69. package/src/responses/parser.ts +633 -633
  70. package/src/responses/reasoning-envelope.ts +49 -49
  71. package/src/responses/schema.ts +172 -172
  72. package/src/responses/state.ts +230 -230
  73. package/src/server.ts +1111 -1111
  74. package/src/service.ts +315 -315
  75. package/src/setup.ts +671 -671
  76. package/src/stall-timeout.ts +23 -23
  77. package/src/tunnel-service.ts +160 -160
  78. package/src/tunnel.ts +417 -417
  79. package/src/turndown-plugin-gfm.d.ts +5 -5
  80. package/src/types.ts +307 -307
  81. package/src/usage/totals.ts +12 -12
  82. package/src/version.ts +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 WLV-ZEDD & Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WLV-ZEDD & Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,140 +1,147 @@
1
- # dsh-chatgpt-web
2
-
3
- [English](https://github.com/WLV-ZEDD/dsh-chatgpt-web#readme) | [中文](https://github.com/WLV-ZEDD/dsh-chatgpt-web/blob/main/docs/README.zh-CN.md)
4
-
5
- [![npm version](https://img.shields.io/npm/v/@wlv-zedd/dsh-chatgpt-web.svg?style=flat&color=3b82f6)](https://www.npmjs.com/package/@wlv-zedd/dsh-chatgpt-web)
6
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WLV-ZEDD/dsh-chatgpt-web/blob/main/LICENSE)
7
- [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-Cordis%20Plugin-0078d4)](https://github.com/deepseek-ai/deepseek-harness)
8
- [![Mode](https://img.shields.io/badge/Mode-Pure%20Chat%20%26%20Markdown-success)](https://github.com/WLV-ZEDD/dsh-chatgpt-web)
9
-
10
- > **Zero-cost conversational AI model provider for DeepSeek Harness powered by free ChatGPT Web (GPT 5.6 Luna).**
11
-
12
- ![dsh-chatgpt-web Interactive Demo](https://raw.githubusercontent.com/WLV-ZEDD/dsh-chatgpt-web/main/assets/demo.gif?v=1.0.0)
13
-
14
- ---
15
-
16
- ## Overview
17
-
18
- **dsh-chatgpt-web** turns your local browser session of ChatGPT into a seamless, **$0.00 API-free conversational model provider** directly inside DeepSeek Harness (DSH).
19
-
20
- It connects via headless or visible Chrome browser automation to `chatgpt.com`, streaming real-time Markdown responses, code solutions, explanations, and reasoning back to your DSH chats without consuming API credits.
21
-
22
- ### Why Pure Chat?
23
- Small conversational web models (like GPT 5.6 Luna) excel at explanations, dialogue, Q&A, brainstorming, code snippet generation, and side-assistant tasks. By running in **Pure Chat Mode**, the bridge eliminates prompt overhead, tool hallucinations, and syntax errors of autonomous multi-tool execution loops, providing a fast, rock-solid, zero-cost LLM provider.
24
-
25
- ### Key Features
26
- - **100% Free ($0.00 Cost):** Uses your existing free ChatGPT Web session. No OpenAI API keys or credit cards needed.
27
- - **Cordis Plugin-First Lifecycle:** Seamlessly managed by DSH via `ctx.effect`. DeepSeek Harness starts the background sidecar automatically on launch and shuts it down on exit.
28
- - **Dynamic Model Auto-Detection:** Automatically detects your ChatGPT tier:
29
- - **Free Accounts:** Defaults to `chatgpt-web/luna` (`gpt-5-6-luna`).
30
- - **Plus / Team Accounts:** Automatically detects and exposes available paid models (such as `gpt-4o`, `o1`).
31
- - **Full Streaming Markdown & Code Blocks:** Delivers tokens in real time directly to the DSH Web UI or CLI.
32
-
33
- ---
34
-
35
- ## Quick Start
36
-
37
- ### 1. Installation
38
-
39
- Install `@wlv-zedd/dsh-chatgpt-web` in your DeepSeek Harness environment or profile:
40
-
41
- ```bash
42
- pnpm add @wlv-zedd/dsh-chatgpt-web
43
- ```
44
-
45
- ### 2. One-Time Browser Sign-In
46
-
47
- Authenticate your ChatGPT account once:
48
-
49
- ```bash
50
- npx @wlv-zedd/dsh-chatgpt-web login
51
- ```
52
-
53
- A dedicated Chrome window will open. Log into your OpenAI / ChatGPT account. Once the ChatGPT composer is visible, the browser session is safely and securely saved locally to `~/.dsh/storages/chatgpt-free/`.
54
-
55
- ### 3. Enable in DeepSeek Harness
56
-
57
- Add the provider to your `~/.dsh/settings.yaml`:
58
-
59
- ```yaml
60
- providers:
61
- chatgpt-web:
62
- displayName: "ChatGPT Web (Free)"
63
- api: openai-responses
64
- baseURL: http://127.0.0.1:17841/v1
65
- headers:
66
- Authorization: "Bearer chatgpt-web-free"
67
- streamIdleTimeoutMs: 300000
68
- models:
69
- - id: chatgpt-web/luna
70
- name: "ChatGPT Web — Luna (Free)"
71
- contextWindow: 1050000
72
- maxTokens: 32768
73
- input:
74
- - text
75
- - image
76
-
77
- agent-default-model:
78
- provider: chatgpt-web
79
- model: chatgpt-web/luna
80
- ```
81
-
82
- And add the sidecar plugin to your profile's `cordis.patch.yml` (or `cordis.yml`):
83
-
84
- ```yaml
85
- - insert:
86
- - id: dsh-chatgpt-web
87
- name: '@wlv-zedd/dsh-chatgpt-web'
88
- ```
89
-
90
- Now start DeepSeek Harness:
91
-
92
- ```bash
93
- pnpm dsh web
94
- ```
95
-
96
- DSH will automatically start the background sidecar process, connect to your authenticated ChatGPT session, and accept prompts!
97
-
98
- ---
99
-
100
- ## Diagnostics & Health Check
101
-
102
- Verify your setup at any time with the built-in diagnostic doctor:
103
-
104
- ```bash
105
- npx @wlv-zedd/dsh-chatgpt-web doctor
106
- ```
107
-
108
- Example healthy output:
109
- ```text
110
- ✓ Configuration is valid (~/.dsh/storages/chatgpt-free/config.json)
111
- ✓ Chrome executable found: C:\Program Files\Google\Chrome\Application\chrome.exe
112
- ✓ ChatGPT login state has authenticated browser evidence
113
- ✓ Responses proxy is healthy on 127.0.0.1:17841
114
- Doctor result: ready
115
- ```
116
-
117
- ---
118
-
119
- ## Notes & Limitations
120
-
121
- 1. **Unofficial Bridge:** Operates via local Playwright browser automation on `chatgpt.com`. Not affiliated with or endorsed by OpenAI.
122
- 2. **Single-Session Concurrency:** Runs within a single browser tab. Sequential queries and normal DSH agent chats work seamlessly; avoid launching parallel multi-subagent swarms against the same tab simultaneously.
123
- 3. **Pure Chat Only:** This provider generates pure conversational responses, explanations, reasoning, and code blocks. It does not execute local filesystem, terminal, or autonomous tool loops.
124
- 4. **Standard Free Tier Rate Limits:** Subject to standard OpenAI free-tier hourly usage limits.
125
-
126
- ---
127
-
128
- ## Support & Community Perks
129
-
130
- [![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-0070ba?style=flat&logo=paypal&logoColor=white)](https://paypal.me/wlvzedd) If you find this plugin helpful, consider sponsoring.
131
-
132
- [![Free AI Credits on AgentRouter](https://img.shields.io/badge/Free%20AI%20Credits-%24200-ff6b35?style=flat&logoColor=white)](https://agentrouter.org/register?aff=bIJf) Claim up to **$200 free API credits** on AgentRouter via GitHub.
133
-
134
- [![Free AI Credits on Vyce AI](https://img.shields.io/badge/Free%20AI%20Credits-%2450-7c3aed?style=flat&logoColor=white)](https://vyceai.com/signup?ref=VYCE_BL6YAG) Claim **$50 free API credits** on Vyce AI for fast LLM inference.
135
-
136
- ---
137
-
138
- ## License
139
-
140
- MIT License © 2026 [WLV-ZEDD](https://github.com/WLV-ZEDD). DeepSeek Harness is an open-source project by DeepSeek AI.
1
+ # dsh-chatgpt-web
2
+
3
+ [English](https://github.com/WLV-ZEDD/dsh-chatgpt-web#readme) | [中文](./README.zh-CN.md)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@wlv-zedd/dsh-chatgpt-web.svg?style=flat&color=3b82f6)](https://www.npmjs.com/package/@wlv-zedd/dsh-chatgpt-web)
6
+ [![dsh-market](https://img.shields.io/badge/dsh--market-available-c0392b?style=flat)](https://dshmarket.com/p/WLV-ZEDD/dsh-chatgpt-web/)
7
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WLV-ZEDD/dsh-chatgpt-web/blob/main/LICENSE)
8
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-Cordis%20Plugin-0078d4)](https://github.com/deepseek-ai/deepseek-harness)
9
+ [![Mode](https://img.shields.io/badge/Mode-Pure%20Chat%20%26%20Markdown-success)](https://github.com/WLV-ZEDD/dsh-chatgpt-web)
10
+
11
+ > **Zero-cost conversational AI model provider for DeepSeek Harness powered by free ChatGPT Web (GPT 5.6 Luna).**
12
+
13
+ <p align="center">
14
+ <img src="https://raw.githubusercontent.com/WLV-ZEDD/dsh-chatgpt-web/main/assets/promo-dshmarket-official.png?v=1.0.2" alt="dsh-chatgpt-web on DSH Market" width="100%">
15
+ </p>
16
+
17
+ <p align="center">
18
+ <img src="https://raw.githubusercontent.com/WLV-ZEDD/dsh-chatgpt-web/main/assets/demo.gif?v=1.0.0" alt="dsh-chatgpt-web Interactive Demo" width="100%">
19
+ </p>
20
+
21
+ ---
22
+
23
+ ## Overview
24
+
25
+ **dsh-chatgpt-web** turns your local browser session of ChatGPT into a seamless, **$0.00 API-free conversational model provider** directly inside DeepSeek Harness (DSH).
26
+
27
+ It connects via headless or visible Chrome browser automation to `chatgpt.com`, streaming real-time Markdown responses, code solutions, explanations, and reasoning back to your DSH chats without consuming API credits.
28
+
29
+ ### Why Pure Chat?
30
+ Small conversational web models (like GPT 5.6 Luna) excel at explanations, dialogue, Q&A, brainstorming, code snippet generation, and side-assistant tasks. By running in **Pure Chat Mode**, the bridge eliminates prompt overhead, tool hallucinations, and syntax errors of autonomous multi-tool execution loops, providing a fast, rock-solid, zero-cost LLM provider.
31
+
32
+ ### Key Features
33
+ - **100% Free ($0.00 Cost):** Uses your existing free ChatGPT Web session. No OpenAI API keys or credit cards needed.
34
+ - **Cordis Plugin-First Lifecycle:** Seamlessly managed by DSH via `ctx.effect`. DeepSeek Harness starts the background sidecar automatically on launch and shuts it down on exit.
35
+ - **Dynamic Model Auto-Detection:** Automatically detects your ChatGPT tier:
36
+ - **Free Accounts:** Defaults to `chatgpt-web/luna` (`gpt-5-6-luna`).
37
+ - **Plus / Team Accounts:** Automatically detects and exposes available paid models (such as `gpt-4o`, `o1`).
38
+ - **Full Streaming Markdown & Code Blocks:** Delivers tokens in real time directly to the DSH Web UI or CLI.
39
+
40
+ ---
41
+
42
+ ## Quick Start
43
+
44
+ ### 1. Installation
45
+
46
+ Install `@wlv-zedd/dsh-chatgpt-web` in your DeepSeek Harness environment or profile:
47
+
48
+ ```bash
49
+ pnpm add @wlv-zedd/dsh-chatgpt-web
50
+ ```
51
+
52
+ ### 2. One-Time Browser Sign-In
53
+
54
+ Authenticate your ChatGPT account once:
55
+
56
+ ```bash
57
+ npx @wlv-zedd/dsh-chatgpt-web login
58
+ ```
59
+
60
+ A dedicated Chrome window will open. Log into your OpenAI / ChatGPT account. Once the ChatGPT composer is visible, the browser session is safely and securely saved locally to `~/.dsh/storages/chatgpt-web/`.
61
+
62
+ ### 3. Enable in DeepSeek Harness
63
+
64
+ Add the provider to your `~/.dsh/settings.yaml`:
65
+
66
+ ```yaml
67
+ providers:
68
+ chatgpt-web:
69
+ displayName: "ChatGPT Web (Free)"
70
+ api: openai-responses
71
+ baseURL: http://127.0.0.1:17841/v1
72
+ headers:
73
+ Authorization: "Bearer chatgpt-web-free"
74
+ streamIdleTimeoutMs: 300000
75
+ models:
76
+ - id: chatgpt-web/luna
77
+ name: "ChatGPT Web — Luna (Free)"
78
+ contextWindow: 1050000
79
+ maxTokens: 32768
80
+ input:
81
+ - text
82
+ - image
83
+
84
+ agent-default-model:
85
+ provider: chatgpt-web
86
+ model: chatgpt-web/luna
87
+ ```
88
+
89
+ And add the sidecar plugin to your profile's `cordis.patch.yml` (or `cordis.yml`):
90
+
91
+ ```yaml
92
+ - insert:
93
+ - id: dsh-chatgpt-web
94
+ name: '@wlv-zedd/dsh-chatgpt-web'
95
+ ```
96
+
97
+ Now start DeepSeek Harness:
98
+
99
+ ```bash
100
+ pnpm dsh web
101
+ ```
102
+
103
+ DSH will automatically start the background sidecar process, connect to your authenticated ChatGPT session, and accept prompts!
104
+
105
+ ---
106
+
107
+ ## Diagnostics & Health Check
108
+
109
+ Verify your setup at any time with the built-in diagnostic doctor:
110
+
111
+ ```bash
112
+ npx @wlv-zedd/dsh-chatgpt-web doctor
113
+ ```
114
+
115
+ Example healthy output:
116
+ ```text
117
+ ✓ Configuration is valid (~/.dsh/storages/chatgpt-web/config.json)
118
+ ✓ Chrome executable found: C:\Program Files\Google\Chrome\Application\chrome.exe
119
+ ✓ ChatGPT login state has authenticated browser evidence
120
+ ✓ Responses proxy is healthy on 127.0.0.1:17841
121
+ Doctor result: ready
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Notes & Limitations
127
+
128
+ 1. **Unofficial Bridge:** Operates via local Playwright browser automation on `chatgpt.com`. Not affiliated with or endorsed by OpenAI.
129
+ 2. **Single-Session Concurrency:** Runs within a single browser tab. Sequential queries and normal DSH agent chats work seamlessly; avoid launching parallel multi-subagent swarms against the same tab simultaneously.
130
+ 3. **Pure Chat Only:** This provider generates pure conversational responses, explanations, reasoning, and code blocks. It does not execute local filesystem, terminal, or autonomous tool loops.
131
+ 4. **Standard Free Tier Rate Limits:** Subject to standard OpenAI free-tier hourly usage limits.
132
+
133
+ ---
134
+
135
+ ## Support & Community Perks
136
+
137
+ [![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-0070ba?style=flat&logo=paypal&logoColor=white)](https://paypal.me/wlvzedd) If you find this plugin helpful, consider sponsoring.
138
+
139
+ [![Free AI Credits on AgentRouter](https://img.shields.io/badge/Free%20AI%20Credits-%24200-ff6b35?style=flat&logoColor=white)](https://agentrouter.org/register?aff=bIJf) Claim up to **$200 free API credits** on AgentRouter via GitHub.
140
+
141
+ [![Free AI Credits on Vyce AI](https://img.shields.io/badge/Free%20AI%20Credits-%2450-7c3aed?style=flat&logoColor=white)](https://vyceai.com/signup?ref=VYCE_BL6YAG) Claim **$50 free API credits** on Vyce AI for fast LLM inference.
142
+
143
+ ---
144
+
145
+ ## License
146
+
147
+ MIT License © 2026 [WLV-ZEDD](https://github.com/WLV-ZEDD). DeepSeek Harness is an open-source project by DeepSeek AI.
@@ -0,0 +1,147 @@
1
+ # dsh-chatgpt-web
2
+
3
+ [English](./README.md) | [中文](./README.zh-CN.md)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@wlv-zedd/dsh-chatgpt-web.svg?style=flat&color=3b82f6)](https://www.npmjs.com/package/@wlv-zedd/dsh-chatgpt-web)
6
+ [![dsh-market](https://img.shields.io/badge/dsh--market-available-c0392b?style=flat)](https://dshmarket.com/p/WLV-ZEDD/dsh-chatgpt-web/)
7
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WLV-ZEDD/dsh-chatgpt-web/blob/main/LICENSE)
8
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-Cordis%20Plugin-0078d4)](https://github.com/deepseek-ai/deepseek-harness)
9
+ [![Mode](https://img.shields.io/badge/Mode-Pure%20Chat%20%26%20Markdown-success)](https://github.com/WLV-ZEDD/dsh-chatgpt-web)
10
+
11
+ > **基于免费 ChatGPT Web(GPT 5.6 Luna)驱动的 DeepSeek Harness 零成本对话 AI 模型提供者。**
12
+
13
+ <p align="center">
14
+ <img src="https://raw.githubusercontent.com/WLV-ZEDD/dsh-chatgpt-web/main/assets/promo-dshmarket-official.png?v=1.0.2" alt="dsh-chatgpt-web DSH Market 官方海报" width="100%">
15
+ </p>
16
+
17
+ <p align="center">
18
+ <img src="https://raw.githubusercontent.com/WLV-ZEDD/dsh-chatgpt-web/main/assets/demo.gif?v=1.0.0" alt="dsh-chatgpt-web 交互演示" width="100%">
19
+ </p>
20
+
21
+ ---
22
+
23
+ ## 概述
24
+
25
+ **dsh-chatgpt-web** 将你本地的 ChatGPT 浏览器会话转变为 DeepSeek Harness (DSH) 内部无缝运行的 **$0.00 免 API 费用的对话模型提供者**。
26
+
27
+ 它通过无头(Headless)或可视 Chrome 浏览器自动化连接至 `chatgpt.com`,将实时的 Markdown 回答、代码方案、解释以及推理过程直接流式传输回 DSH 对话中,无需消耗任何 API 额度。
28
+
29
+ ### 为什么选择纯对话模式(Pure Chat)?
30
+ 轻量级对话网页模型(如 GPT 5.6 Luna)非常擅长解释、对话、问答、头脑风暴、代码片段生成以及侧边助手任务。通过运行在 **纯对话模式** 下,该桥接器消除了提示词开销、工具幻觉以及自主多工具循环中的语法错误,提供快速、稳定且零成本的 LLM 提供者。
31
+
32
+ ### 核心功能
33
+ - **100% 完全免费($0.00 成本):** 使用你现有的免费 ChatGPT 网页会话,无需 OpenAI API Key 或信用卡。
34
+ - **Cordis 插件优先生命周期:** 由 DSH 通过 `ctx.effect` 无缝管理。DeepSeek Harness 在启动时自动拉起后台 Sidecar 进程,并在退出时安全关闭。
35
+ - **动态模型自动检测:** 自动检测你的 ChatGPT 账户等级:
36
+ - **免费账户:** 默认为 `chatgpt-web/luna` (`gpt-5-6-luna`)。
37
+ - **Plus / Team 账户:** 自动检测并暴露可用的付费模型(如 `gpt-4o`, `o1`)。
38
+ - **完整流式 Markdown 与代码块:** 实时向 DSH Web UI 或 CLI 投递生成的内容。
39
+
40
+ ---
41
+
42
+ ## 快速上手
43
+
44
+ ### 1. 安装插件
45
+
46
+ 在你的 DeepSeek Harness 环境或配置文件中安装 `@wlv-zedd/dsh-chatgpt-web`:
47
+
48
+ ```bash
49
+ pnpm add @wlv-zedd/dsh-chatgpt-web
50
+ ```
51
+
52
+ ### 2. 一次性浏览器登录
53
+
54
+ 进行一次性的 ChatGPT 账号登录验证:
55
+
56
+ ```bash
57
+ npx @wlv-zedd/dsh-chatgpt-web login
58
+ ```
59
+
60
+ 系统将打开专用的 Chrome 窗口。登录你的 OpenAI / ChatGPT 账号。一旦看到 ChatGPT 输入框,浏览器会话凭证将安全保存在本地的 `~/.dsh/storages/chatgpt-web/` 目录中。
61
+
62
+ ### 3. 在 DeepSeek Harness 中启用
63
+
64
+ 将提供者配置添加到你的 `~/.dsh/settings.yaml` 中:
65
+
66
+ ```yaml
67
+ providers:
68
+ chatgpt-web:
69
+ displayName: "ChatGPT Web (Free)"
70
+ api: openai-responses
71
+ baseURL: http://127.0.0.1:17841/v1
72
+ headers:
73
+ Authorization: "Bearer chatgpt-web-free"
74
+ streamIdleTimeoutMs: 300000
75
+ models:
76
+ - id: chatgpt-web/luna
77
+ name: "ChatGPT Web — Luna (Free)"
78
+ contextWindow: 1050000
79
+ maxTokens: 32768
80
+ input:
81
+ - text
82
+ - image
83
+
84
+ agent-default-model:
85
+ provider: chatgpt-web
86
+ model: chatgpt-web/luna
87
+ ```
88
+
89
+ 并在 profile 的 `cordis.patch.yml`(或 `cordis.yml`)中添加 Sidecar 插件:
90
+
91
+ ```yaml
92
+ - insert:
93
+ - id: dsh-chatgpt-web
94
+ name: '@wlv-zedd/dsh-chatgpt-web'
95
+ ```
96
+
97
+ 现在启动 DeepSeek Harness:
98
+
99
+ ```bash
100
+ pnpm dsh web
101
+ ```
102
+
103
+ DSH 将自动启动后台 Sidecar 进程,连接已登录的 ChatGPT 会话并开始处理提问!
104
+
105
+ ---
106
+
107
+ ## 诊断与健康检查
108
+
109
+ 随时使用内置的诊断工具检查环境配置:
110
+
111
+ ```bash
112
+ npx @wlv-zedd/dsh-chatgpt-web doctor
113
+ ```
114
+
115
+ 正常输出示例:
116
+ ```text
117
+ ✓ Configuration is valid (~/.dsh/storages/chatgpt-web/config.json)
118
+ ✓ Chrome executable found: C:\Program Files\Google\Chrome\Application\chrome.exe
119
+ ✓ ChatGPT login state has authenticated browser evidence
120
+ ✓ Responses proxy is healthy on 127.0.0.1:17841
121
+ Doctor result: ready
122
+ ```
123
+
124
+ ---
125
+
126
+ ## 注意事项与使用限制
127
+
128
+ 1. **非官方桥接:** 通过本地 Playwright 自动化驱动 `chatgpt.com` 网页。与 OpenAI 官方无隶属或背书关系。
129
+ 2. **单会话并发:** 运行在单个浏览器标签页中。顺序查询和正常的 DSH 智能体对话完全顺畅;请避免同时对同一标签页发起多个高并发子智能体任务。
130
+ 3. **纯对话支持:** 该提供者专注于纯对话回复、解释、推理以及代码块生成。不支持执行本地文件系统、终端命令或自主工具循环。
131
+ 4. **免费额度频率限制:** 遵循 OpenAI 官方网页免费版的小时级调用频次限制。
132
+
133
+ ---
134
+
135
+ ## 支持与社区福利
136
+
137
+ [![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-0070ba?style=flat&logo=paypal&logoColor=white)](https://paypal.me/wlvzedd) 如果你觉得本插件对你有帮助,欢迎赞助支持。
138
+
139
+ [![Free AI Credits on AgentRouter](https://img.shields.io/badge/Free%20AI%20Credits-%24200-ff6b35?style=flat&logoColor=white)](https://agentrouter.org/register?aff=bIJf) GitHub 注册 AgentRouter 即可领取最高 **$200 免费额度**。
140
+
141
+ [![Free AI Credits on Vyce AI](https://img.shields.io/badge/Free%20AI%20Credits-%2450-7c3aed?style=flat&logoColor=white)](https://vyceai.com/signup?ref=VYCE_BL6YAG) 注册 Vyce AI 即可领取 **$50 免费额度**。
142
+
143
+ ---
144
+
145
+ ## 开源协议
146
+
147
+ MIT License © 2026 [WLV-ZEDD](https://github.com/WLV-ZEDD)。DeepSeek Harness 是 DeepSeek AI 的开源项目。
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-chatgpt-web bundle patch: inserts the sidecar plugin into a profile layer stack.
2
- - insert:
3
- - id: dsh-chatgpt-web
4
- name: '@wlv-zedd/dsh-chatgpt-web'
1
+ # dsh-chatgpt-web bundle patch: inserts the sidecar plugin into a profile layer stack.
2
+ - insert:
3
+ - id: dsh-chatgpt-web
4
+ name: '@wlv-zedd/dsh-chatgpt-web'