@youdie006/prodex 0.40.23 → 0.40.24

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.
@@ -5105,6 +5105,18 @@ export function insertComposerTextInPageExpression(text) {
5105
5105
  export function composerFileInputSelector() {
5106
5106
  return 'input[type="file"]:not([accept*="image"])';
5107
5107
  }
5108
+ /**
5109
+ * Lookup order for the attachment input. A conversation page also renders a
5110
+ * second form without the prompt editor, earlier in the document and with its
5111
+ * own file inputs (measured 2026-10-02); files set there never reach the
5112
+ * composer. The editor's own form is tried first, the bare selector last.
5113
+ */
5114
+ export function composerFileInputSelectors() {
5115
+ return [
5116
+ `form:has(#prompt-textarea,[contenteditable="true"]) ${composerFileInputSelector()}`,
5117
+ composerFileInputSelector()
5118
+ ];
5119
+ }
5108
5120
  /**
5109
5121
  * Which of the expected attachments the composer shows, and whether one is
5110
5122
  * still uploading.
@@ -5197,8 +5209,13 @@ export async function attachFilesToComposer(cdp, absolutePaths, options = {}) {
5197
5209
  const rootNodeId = document.result?.root?.nodeId;
5198
5210
  if (rootNodeId === undefined)
5199
5211
  throw new Error("Could not read the ChatGPT page DOM to attach files.");
5200
- const input = await cdp.send("DOM.querySelector", { nodeId: rootNodeId, selector: composerFileInputSelector() });
5201
- const inputNodeId = input.result?.nodeId;
5212
+ let inputNodeId;
5213
+ for (const selector of composerFileInputSelectors()) {
5214
+ const input = await cdp.send("DOM.querySelector", { nodeId: rootNodeId, selector });
5215
+ inputNodeId = input.result?.nodeId || undefined;
5216
+ if (inputNodeId)
5217
+ break;
5218
+ }
5202
5219
  if (!inputNodeId) {
5203
5220
  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
5221
  }
package/docs/releasing.md CHANGED
@@ -16,6 +16,29 @@ 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.23 Release Record
20
+
21
+ Release commit `1c905e3` on `main` (cut after PR #13, merge `92c26ce`); tag `v0.40.23`.
22
+
23
+ **Publishing**
24
+ - `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).
25
+ - 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").
26
+ - `npm run release:verify` passed on the release commit after a build.
27
+
28
+ **What it fixes**
29
+ - `--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".
30
+
31
+ **Installation on 2026-10-01**
32
+ - Global npm, each verified with `prodex --version` = 0.40.23.
33
+ - 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.
34
+ - M4: not reachable (hostname does not resolve); not updated.
35
+ - The browser container is unchanged by this release. It runs its own branch build with its own new-chat wait.
36
+
37
+ **Live check after install**
38
+ - Run from WSL through the installed 0.40.23 against the shared browser.
39
+ - The same file attached twice with `--new-chat`: both answered. The installed 0.40.22 had failed this three times.
40
+ - A plain new chat answered.
41
+
19
42
  ## 0.40.22 Release Record
20
43
 
21
44
  Release commit `a5f9596` on `main` (cut after PR #12, merge `563f381`); tag `v0.40.22`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youdie006/prodex",
3
- "version": "0.40.23",
3
+ "version": "0.40.24",
4
4
  "description": "Local receipt bus for coordinating Codex execution with ChatGPT Pro/Projects consultation.",
5
5
  "author": "youdie006",
6
6
  "license": "MIT",