@youdie006/prodex 0.40.23 → 0.40.25
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.
- package/dist/chatgpt-browser.js +23 -2
- package/docs/releasing.md +49 -0
- package/package.json +1 -1
package/dist/chatgpt-browser.js
CHANGED
|
@@ -1942,6 +1942,10 @@ export function chatGptThreadReadyExpression(conversationId) {
|
|
|
1942
1942
|
const current = new URL(location.href);
|
|
1943
1943
|
const match = /\\/c\\/([0-9a-f-]{16,})\\/?$/i.exec(current.pathname);
|
|
1944
1944
|
if (current.origin !== "https://chatgpt.com" || match?.[1].toLowerCase() !== ${JSON.stringify(conversationId.toLowerCase())}) return false;
|
|
1945
|
+
// A thread document that is still loading already has its URL and the
|
|
1946
|
+
// server-rendered editor, but no file inputs or messages yet (measured:
|
|
1947
|
+
// 0.6 s after navigating, complete at 6.7 s).
|
|
1948
|
+
if (document.readyState !== "complete") return false;
|
|
1945
1949
|
return Boolean(findChatGptComposerCandidate());
|
|
1946
1950
|
})()`;
|
|
1947
1951
|
}
|
|
@@ -5105,6 +5109,18 @@ export function insertComposerTextInPageExpression(text) {
|
|
|
5105
5109
|
export function composerFileInputSelector() {
|
|
5106
5110
|
return 'input[type="file"]:not([accept*="image"])';
|
|
5107
5111
|
}
|
|
5112
|
+
/**
|
|
5113
|
+
* Lookup order for the attachment input. A conversation page also renders a
|
|
5114
|
+
* second form without the prompt editor, earlier in the document and with its
|
|
5115
|
+
* own file inputs (measured 2026-10-02); files set there never reach the
|
|
5116
|
+
* composer. The editor's own form is tried first, the bare selector last.
|
|
5117
|
+
*/
|
|
5118
|
+
export function composerFileInputSelectors() {
|
|
5119
|
+
return [
|
|
5120
|
+
`form:has(#prompt-textarea,[contenteditable="true"]) ${composerFileInputSelector()}`,
|
|
5121
|
+
composerFileInputSelector()
|
|
5122
|
+
];
|
|
5123
|
+
}
|
|
5108
5124
|
/**
|
|
5109
5125
|
* Which of the expected attachments the composer shows, and whether one is
|
|
5110
5126
|
* still uploading.
|
|
@@ -5197,8 +5213,13 @@ export async function attachFilesToComposer(cdp, absolutePaths, options = {}) {
|
|
|
5197
5213
|
const rootNodeId = document.result?.root?.nodeId;
|
|
5198
5214
|
if (rootNodeId === undefined)
|
|
5199
5215
|
throw new Error("Could not read the ChatGPT page DOM to attach files.");
|
|
5200
|
-
|
|
5201
|
-
const
|
|
5216
|
+
let inputNodeId;
|
|
5217
|
+
for (const selector of composerFileInputSelectors()) {
|
|
5218
|
+
const input = await cdp.send("DOM.querySelector", { nodeId: rootNodeId, selector });
|
|
5219
|
+
inputNodeId = input.result?.nodeId || undefined;
|
|
5220
|
+
if (inputNodeId)
|
|
5221
|
+
break;
|
|
5222
|
+
}
|
|
5202
5223
|
if (!inputNodeId) {
|
|
5203
5224
|
throw new Error("The ChatGPT composer has no file input to attach to. Open a normal chat (not a shared or read-only view) and retry.");
|
|
5204
5225
|
}
|
package/docs/releasing.md
CHANGED
|
@@ -16,6 +16,55 @@ Release target: `v0.40.13` on `main`. The GitHub Release records the resolved co
|
|
|
16
16
|
|
|
17
17
|
The release adds a guarded, opt-in transition and more accurate blocker reporting. It does not claim that headless Pro consultation is verified on either deployment target or that authentication can be retained indefinitely.
|
|
18
18
|
|
|
19
|
+
## 0.40.24 Release Record
|
|
20
|
+
|
|
21
|
+
Release commit `e927eee` on `main` (cut after PR #14, merge `393f720`); tag `v0.40.24`.
|
|
22
|
+
|
|
23
|
+
**Publishing**
|
|
24
|
+
- `publish.yml` run 36975443077 passed all six platforms on the first attempt, then npm publish with SLSA v1 provenance and the GitHub Release (2026-10-02 07:10 UTC).
|
|
25
|
+
- `npm run release:verify` passed on the release commit after a build.
|
|
26
|
+
|
|
27
|
+
**What it fixes**
|
|
28
|
+
- Attachments into an existing conversation used a second form on the page that has no prompt editor.
|
|
29
|
+
|
|
30
|
+
**Installation on 2026-10-02**
|
|
31
|
+
- Global npm, each verified with `prodex --version` = 0.40.24.
|
|
32
|
+
- WSL, M3, Mac mini: installed. Running services were not restarted: 5 stdio MCP servers on WSL and 7 on M3 keep older code until their clients reconnect. The Mac mini had none running.
|
|
33
|
+
- M4: not reachable (hostname does not resolve); not updated.
|
|
34
|
+
|
|
35
|
+
**Live check after install (installed 0.40.24, shared WSL browser)**
|
|
36
|
+
- `--new-chat --attach` answered.
|
|
37
|
+
- `--continue --attach` failed with "composer has no file input" when the tab started on another conversation. When the tab was already on the target thread it had passed.
|
|
38
|
+
- Cause: the conversation page was used before it finished loading. Fixed in the next change.
|
|
39
|
+
|
|
40
|
+
**Browser container, same day**
|
|
41
|
+
- Image `sha256:2a2091354d90`, rebuilt from `b5eac7d` with the earlier uncommitted patches plus two more: the composer-form file input lookup and the loaded-document requirement for thread readiness.
|
|
42
|
+
- Full suite 1989 passed on the patched tree. The swap was gated on the send lock being free.
|
|
43
|
+
- Verified in the container: `--continue --attach` from another thread answered, and so did `--new-chat --attach`.
|
|
44
|
+
|
|
45
|
+
## 0.40.23 Release Record
|
|
46
|
+
|
|
47
|
+
Release commit `1c905e3` on `main` (cut after PR #13, merge `92c26ce`); tag `v0.40.23`.
|
|
48
|
+
|
|
49
|
+
**Publishing**
|
|
50
|
+
- `publish.yml` run 36824322576 passed all six platforms on the first attempt, then npm publish with SLSA v1 provenance and the GitHub Release (2026-10-01 06:43 UTC).
|
|
51
|
+
- PR #13's own CI had needed one rerun on Windows for an unrelated 30 s timeout in `tests/cli.test.ts` ("uses an explicit --cwd target for local HTTP MCP start").
|
|
52
|
+
- `npm run release:verify` passed on the release commit after a build.
|
|
53
|
+
|
|
54
|
+
**What it fixes**
|
|
55
|
+
- `--new-chat` sends from a tab already on a new chat now wait for the new page, so attachments no longer fail with "composer has no file input".
|
|
56
|
+
|
|
57
|
+
**Installation on 2026-10-01**
|
|
58
|
+
- Global npm, each verified with `prodex --version` = 0.40.23.
|
|
59
|
+
- WSL, M3, Mac mini: installed. Running services were not restarted: 9 stdio MCP servers on WSL and 7 on M3 keep older code until their clients reconnect. The Mac mini had none running.
|
|
60
|
+
- M4: not reachable (hostname does not resolve); not updated.
|
|
61
|
+
- The browser container is unchanged by this release. It runs its own branch build with its own new-chat wait.
|
|
62
|
+
|
|
63
|
+
**Live check after install**
|
|
64
|
+
- Run from WSL through the installed 0.40.23 against the shared browser.
|
|
65
|
+
- The same file attached twice with `--new-chat`: both answered. The installed 0.40.22 had failed this three times.
|
|
66
|
+
- A plain new chat answered.
|
|
67
|
+
|
|
19
68
|
## 0.40.22 Release Record
|
|
20
69
|
|
|
21
70
|
Release commit `a5f9596` on `main` (cut after PR #12, merge `563f381`); tag `v0.40.22`.
|