@wlv-zedd/dsh-chatgpt-web 1.0.0 → 1.0.2

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 (81) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +140 -140
  3. package/cordis.patch.yml +4 -4
  4. package/lib/cli.js +13269 -11860
  5. package/lib/plugin.js +3 -50
  6. package/package.json +89 -88
  7. package/src/adapters/base.ts +16 -16
  8. package/src/adapters/chatgpt-web/adapter-error.ts +59 -59
  9. package/src/adapters/chatgpt-web/browser-helper-main.ts +513 -513
  10. package/src/adapters/chatgpt-web/browser-helper-prompt-selection.ts +27 -27
  11. package/src/adapters/chatgpt-web/browser-worker.ts +4944 -4944
  12. package/src/adapters/chatgpt-web/codex-rollout-environment.ts +628 -628
  13. package/src/adapters/chatgpt-web/compaction-handoff.ts +533 -533
  14. package/src/adapters/chatgpt-web/compaction-transaction.ts +142 -142
  15. package/src/adapters/chatgpt-web/concurrency.ts +6 -6
  16. package/src/adapters/chatgpt-web/conversation-key.ts +58 -58
  17. package/src/adapters/chatgpt-web/environment.ts +669 -669
  18. package/src/adapters/chatgpt-web/index.ts +1544 -1544
  19. package/src/adapters/chatgpt-web/input-tokens.ts +74 -74
  20. package/src/adapters/chatgpt-web/launcher-helper-client.ts +695 -695
  21. package/src/adapters/chatgpt-web/markdown.ts +418 -418
  22. package/src/adapters/chatgpt-web/mcp-main.ts +25 -25
  23. package/src/adapters/chatgpt-web/mcp-server.ts +933 -933
  24. package/src/adapters/chatgpt-web/model.ts +70 -70
  25. package/src/adapters/chatgpt-web/native-compaction-control.ts +74 -74
  26. package/src/adapters/chatgpt-web/output-validation.ts +62 -62
  27. package/src/adapters/chatgpt-web/process-line-writer.ts +46 -46
  28. package/src/adapters/chatgpt-web/prompt.ts +702 -702
  29. package/src/adapters/chatgpt-web/retry-policy.ts +73 -73
  30. package/src/adapters/chatgpt-web/rolling-checkpoint.ts +384 -384
  31. package/src/adapters/chatgpt-web/thread-environment.ts +238 -238
  32. package/src/adapters/chatgpt-web/tool-stream-parser.ts +1 -1
  33. package/src/adapters/chatgpt-web/turn-broker.ts +1481 -1481
  34. package/src/adapters/chatgpt-web/turn-execution.ts +816 -816
  35. package/src/adapters/chatgpt-web/turn-progress.ts +292 -292
  36. package/src/adapters/chatgpt-web/usage.ts +121 -121
  37. package/src/adapters/image.ts +9 -9
  38. package/src/bridge.ts +1083 -1083
  39. package/src/browser-login.ts +521 -521
  40. package/src/chatgpt-session.ts +240 -240
  41. package/src/chatgpt-web-models.ts +400 -400
  42. package/src/cli.ts +568 -568
  43. package/src/codex-integration-document.ts +824 -824
  44. package/src/codex-integration-journal.ts +212 -212
  45. package/src/codex-integration-route.ts +515 -515
  46. package/src/codex-integration-shared.ts +332 -332
  47. package/src/codex-integration.ts +529 -529
  48. package/src/codex-interrupt-hook.ts +158 -158
  49. package/src/config.ts +616 -616
  50. package/src/dev-chat/cli.ts +432 -432
  51. package/src/dev-chat/constants.ts +3 -3
  52. package/src/dev-chat/driver.ts +655 -655
  53. package/src/dev-chat/profile.ts +223 -223
  54. package/src/dev-chat/session.ts +287 -287
  55. package/src/dev-chat/transport.ts +54 -54
  56. package/src/doctor.ts +237 -237
  57. package/src/event-queue.ts +45 -45
  58. package/src/http-body.ts +30 -30
  59. package/src/launcher-browser-host.ts +695 -695
  60. package/src/lib/errors.ts +281 -281
  61. package/src/lib/token-estimate.ts +42 -42
  62. package/src/login-helper.cjs +1 -1
  63. package/src/model-catalog.ts +197 -197
  64. package/src/native-passthrough.ts +261 -261
  65. package/src/plugin.ts +191 -191
  66. package/src/process.ts +45 -45
  67. package/src/responses/compaction.ts +199 -199
  68. package/src/responses/parser.ts +633 -633
  69. package/src/responses/reasoning-envelope.ts +49 -49
  70. package/src/responses/schema.ts +172 -172
  71. package/src/responses/state.ts +230 -230
  72. package/src/server.ts +1111 -1111
  73. package/src/service.ts +315 -315
  74. package/src/setup.ts +671 -671
  75. package/src/stall-timeout.ts +23 -23
  76. package/src/tunnel-service.ts +160 -160
  77. package/src/tunnel.ts +417 -417
  78. package/src/turndown-plugin-gfm.d.ts +5 -5
  79. package/src/types.ts +307 -307
  80. package/src/usage/totals.ts +12 -12
  81. package/src/version.ts +1 -1
package/lib/plugin.js CHANGED
@@ -1,50 +1,3 @@
1
- import { createRequire } from "node:module";
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
- var __returnValue = (v) => v;
34
- function __exportSetter(name, newValue) {
35
- this[name] = __returnValue.bind(null, newValue);
36
- }
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, {
40
- get: all[name],
41
- enumerable: true,
42
- configurable: true,
43
- set: __exportSetter.bind(all, name)
44
- });
45
- };
46
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
47
-
48
1
  // src/plugin.ts
49
2
  import { spawn } from "node:child_process";
50
3
  import { existsSync } from "node:fs";
@@ -188,8 +141,8 @@ var plugin_default = {
188
141
  apply
189
142
  };
190
143
  export {
191
- name,
192
- inject,
144
+ apply,
193
145
  plugin_default as default,
194
- apply
146
+ inject,
147
+ name
195
148
  };
package/package.json CHANGED
@@ -1,88 +1,89 @@
1
- {
2
- "name": "@wlv-zedd/dsh-chatgpt-web",
3
- "version": "1.0.0",
4
- "description": "DeepSeek Harness Cordis plugin for free ChatGPT Web (GPT 5.6 Luna) pure chat and zero API fees.",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/WLV-ZEDD/dsh-chatgpt-web.git"
8
- },
9
- "homepage": "https://github.com/WLV-ZEDD/dsh-chatgpt-web#readme",
10
- "bugs": {
11
- "url": "https://github.com/WLV-ZEDD/dsh-chatgpt-web/issues"
12
- },
13
- "author": "WLV-ZEDD",
14
- "type": "module",
15
- "main": "./lib/plugin.js",
16
- "bin": {
17
- "dsh-chatgpt-web": "./lib/cli.js"
18
- },
19
- "exports": {
20
- ".": "./lib/plugin.js",
21
- "./cordis.patch.yml": "./cordis.patch.yml",
22
- "./package.json": "./package.json"
23
- },
24
- "files": [
25
- "lib",
26
- "src",
27
- "assets",
28
- "cordis.patch.yml",
29
- "screenshots.json",
30
- "README.md",
31
- "LICENSE"
32
- ],
33
- "publishConfig": {
34
- "access": "public"
35
- },
36
- "dsh": {
37
- "bundle": {
38
- "patch": "./cordis.patch.yml"
39
- }
40
- },
41
- "scripts": {
42
- "build": "bun build src/cli.ts src/plugin.ts --outdir lib --target node --format esm",
43
- "start": "node lib/cli.js serve",
44
- "setup": "node lib/cli.js setup",
45
- "login": "node lib/cli.js login",
46
- "doctor": "node lib/cli.js doctor",
47
- "typecheck": "tsc --noEmit"
48
- },
49
- "dependencies": {
50
- "@modelcontextprotocol/sdk": "^1.30.0",
51
- "ajv": "8.20.0",
52
- "ajv-formats": "3.0.1",
53
- "chromium-bidi": "12.1.0",
54
- "fflate": "^0.8.2",
55
- "playwright-core": "^1.62.0",
56
- "tiktoken": "1.0.22",
57
- "turndown": "7.2.0",
58
- "turndown-plugin-gfm": "1.0.2",
59
- "zod": "4.4.3"
60
- },
61
- "devDependencies": {
62
- "@types/bun": "1.4.0",
63
- "@types/turndown": "5.0.5",
64
- "typescript": "5.9.3"
65
- },
66
- "peerDependencies": {
67
- "@deepseek-ai/cordis": "^3.0.0"
68
- },
69
- "peerDependenciesMeta": {
70
- "@deepseek-ai/cordis": {
71
- "optional": true
72
- }
73
- },
74
- "engines": {
75
- "bun": ">=1.3.0",
76
- "node": ">=22.19.0"
77
- },
78
- "keywords": [
79
- "deepseek-harness",
80
- "dsh-plugin",
81
- "chatgpt",
82
- "chatgpt-web",
83
- "playwright",
84
- "responses-api",
85
- "free-ai"
86
- ],
87
- "license": "MIT"
88
- }
1
+ {
2
+ "name": "@wlv-zedd/dsh-chatgpt-web",
3
+ "version": "1.0.2",
4
+ "description": "DeepSeek Harness Cordis plugin for free ChatGPT Web (GPT 5.6 Luna) pure chat and zero API fees.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/WLV-ZEDD/dsh-chatgpt-web.git"
8
+ },
9
+ "homepage": "https://github.com/WLV-ZEDD/dsh-chatgpt-web#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/WLV-ZEDD/dsh-chatgpt-web/issues"
12
+ },
13
+ "author": "WLV-ZEDD",
14
+ "type": "module",
15
+ "main": "./lib/plugin.js",
16
+ "bin": {
17
+ "dsh-chatgpt-web": "./lib/cli.js"
18
+ },
19
+ "exports": {
20
+ ".": "./lib/plugin.js",
21
+ "./cordis.patch.yml": "./cordis.patch.yml",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "files": [
25
+ "lib",
26
+ "src",
27
+ "assets",
28
+ "cordis.patch.yml",
29
+ "screenshots.json",
30
+ "README.md",
31
+ "LICENSE"
32
+ ],
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "dsh": {
37
+ "bundle": {
38
+ "patch": "./cordis.patch.yml"
39
+ }
40
+ },
41
+ "scripts": {
42
+ "build": "bun build src/cli.ts src/plugin.ts --outdir lib --target node --format esm",
43
+ "start": "node lib/cli.js serve",
44
+ "setup": "node lib/cli.js setup",
45
+ "login": "node lib/cli.js login",
46
+ "doctor": "node lib/cli.js doctor",
47
+ "typecheck": "tsc --noEmit"
48
+ },
49
+ "dependencies": {
50
+ "@modelcontextprotocol/sdk": "^1.30.0",
51
+ "ajv": "8.20.0",
52
+ "ajv-formats": "3.0.1",
53
+ "chromium-bidi": "12.1.0",
54
+ "fflate": "^0.8.2",
55
+ "playwright-core": "^1.62.0",
56
+ "tiktoken": "1.0.22",
57
+ "turndown": "7.2.0",
58
+ "turndown-plugin-gfm": "1.0.2",
59
+ "zod": "4.4.3"
60
+ },
61
+ "devDependencies": {
62
+ "@types/bun": "1.4.0",
63
+ "@types/turndown": "5.0.5",
64
+ "typescript": "5.9.3"
65
+ },
66
+ "peerDependencies": {
67
+ "@deepseek-ai/cordis": "^3.0.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "@deepseek-ai/cordis": {
71
+ "optional": true
72
+ }
73
+ },
74
+ "engines": {
75
+ "bun": ">=1.3.0",
76
+ "node": ">=22.19.0",
77
+ "dsh": ">=0.2.0"
78
+ },
79
+ "keywords": [
80
+ "deepseek-harness",
81
+ "dsh-plugin",
82
+ "chatgpt",
83
+ "chatgpt-web",
84
+ "playwright",
85
+ "responses-api",
86
+ "free-ai"
87
+ ],
88
+ "license": "MIT"
89
+ }
@@ -1,16 +1,16 @@
1
- import type { AdapterEvent, CodexParsedRequest } from "../types";
2
-
3
- /** Metadata about the caller's incoming request, for auth-forwarding adapters. */
4
- export interface IncomingMeta {
5
- headers: Headers;
6
- abortSignal?: AbortSignal;
7
- }
8
-
9
- export interface ProviderAdapter {
10
- name: string;
11
- runTurn(
12
- parsed: CodexParsedRequest,
13
- incoming: IncomingMeta,
14
- emit: (event: AdapterEvent) => void,
15
- ): Promise<void>;
16
- }
1
+ import type { AdapterEvent, CodexParsedRequest } from "../types";
2
+
3
+ /** Metadata about the caller's incoming request, for auth-forwarding adapters. */
4
+ export interface IncomingMeta {
5
+ headers: Headers;
6
+ abortSignal?: AbortSignal;
7
+ }
8
+
9
+ export interface ProviderAdapter {
10
+ name: string;
11
+ runTurn(
12
+ parsed: CodexParsedRequest,
13
+ incoming: IncomingMeta,
14
+ emit: (event: AdapterEvent) => void,
15
+ ): Promise<void>;
16
+ }
@@ -1,59 +1,59 @@
1
- export interface ChatGptWebAdapterErrorOptions {
2
- status: number;
3
- errorType: string;
4
- code: string;
5
- retryable: boolean;
6
- cause?: unknown;
7
- }
8
-
9
- export class ChatGptWebAdapterError extends Error {
10
- readonly status: number;
11
- readonly errorType: string;
12
- readonly code: string;
13
- readonly retryable: boolean;
14
-
15
- constructor(message: string, options: ChatGptWebAdapterErrorOptions) {
16
- super(message, options.cause === undefined ? undefined : { cause: options.cause });
17
- this.name = "ChatGptWebAdapterError";
18
- this.status = options.status;
19
- this.errorType = options.errorType;
20
- this.code = options.code;
21
- this.retryable = options.retryable;
22
- }
23
- }
24
-
25
- export function chatGptBrowserTabClosedError(): ChatGptWebAdapterError {
26
- return new ChatGptWebAdapterError(
27
- "The ChatGPT browser tab was closed, so the Codex turn was cancelled.",
28
- {
29
- status: 499,
30
- errorType: "client_closed_request",
31
- code: "client_cancelled",
32
- retryable: false,
33
- },
34
- );
35
- }
36
-
37
- export function chatGptStoppedThinkingError(): ChatGptWebAdapterError {
38
- return new ChatGptWebAdapterError(
39
- "ChatGPT remained in 'Stopped thinking' for 5 seconds, so the Codex turn was cancelled.",
40
- {
41
- status: 499,
42
- errorType: "client_closed_request",
43
- code: "client_cancelled",
44
- retryable: false,
45
- },
46
- );
47
- }
48
-
49
- export function chatGptRetainedConversationUnavailableError(): ChatGptWebAdapterError {
50
- return new ChatGptWebAdapterError(
51
- "The retained ChatGPT conversation is no longer available.",
52
- {
53
- status: 409,
54
- errorType: "invalid_request_error",
55
- code: "compaction_source_unavailable",
56
- retryable: false,
57
- },
58
- );
59
- }
1
+ export interface ChatGptWebAdapterErrorOptions {
2
+ status: number;
3
+ errorType: string;
4
+ code: string;
5
+ retryable: boolean;
6
+ cause?: unknown;
7
+ }
8
+
9
+ export class ChatGptWebAdapterError extends Error {
10
+ readonly status: number;
11
+ readonly errorType: string;
12
+ readonly code: string;
13
+ readonly retryable: boolean;
14
+
15
+ constructor(message: string, options: ChatGptWebAdapterErrorOptions) {
16
+ super(message, options.cause === undefined ? undefined : { cause: options.cause });
17
+ this.name = "ChatGptWebAdapterError";
18
+ this.status = options.status;
19
+ this.errorType = options.errorType;
20
+ this.code = options.code;
21
+ this.retryable = options.retryable;
22
+ }
23
+ }
24
+
25
+ export function chatGptBrowserTabClosedError(): ChatGptWebAdapterError {
26
+ return new ChatGptWebAdapterError(
27
+ "The ChatGPT browser tab was closed, so the Codex turn was cancelled.",
28
+ {
29
+ status: 499,
30
+ errorType: "client_closed_request",
31
+ code: "client_cancelled",
32
+ retryable: false,
33
+ },
34
+ );
35
+ }
36
+
37
+ export function chatGptStoppedThinkingError(): ChatGptWebAdapterError {
38
+ return new ChatGptWebAdapterError(
39
+ "ChatGPT remained in 'Stopped thinking' for 5 seconds, so the Codex turn was cancelled.",
40
+ {
41
+ status: 499,
42
+ errorType: "client_closed_request",
43
+ code: "client_cancelled",
44
+ retryable: false,
45
+ },
46
+ );
47
+ }
48
+
49
+ export function chatGptRetainedConversationUnavailableError(): ChatGptWebAdapterError {
50
+ return new ChatGptWebAdapterError(
51
+ "The retained ChatGPT conversation is no longer available.",
52
+ {
53
+ status: 409,
54
+ errorType: "invalid_request_error",
55
+ code: "compaction_source_unavailable",
56
+ retryable: false,
57
+ },
58
+ );
59
+ }