@youdie006/prodex 0.16.24 → 0.16.26
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/README.md +1 -1
- package/dist/chatgpt-browser.js +34 -0
- package/dist/cli-help.js +2 -2
- package/dist/cli-pro.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -240,7 +240,7 @@ prodex pro browser models
|
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
- `--model` picks the composer model by its exact menu label. `Pro` is verified end-to-end. Models whose menu entry opens a submenu of variants (for example GPT-5.5) are rejected with a clear error instead of silently keeping the previous model; direct variant selection is planned.
|
|
243
|
-
- `--pro-mode 기본|확장` selects the Pro sub-mode where the ChatGPT picker exposes one: sub-modes belong to the GPT-5.5 generation ("Pro Standard/Extended use GPT-5.5 Pro" per OpenAI docs), so with the GPT-5.6 generation selected the picker shows a single Pro and this flag fails with guidance. Any effective Pro selection (`--model Pro` or a sub-mode) raises the default `--timeout-ms` to
|
|
243
|
+
- `--pro-mode 기본|확장` selects the Pro sub-mode where the ChatGPT picker exposes one: sub-modes belong to the GPT-5.5 generation ("Pro Standard/Extended use GPT-5.5 Pro" per OpenAI docs), so with the GPT-5.6 generation selected the picker shows a single Pro and this flag fails with guidance. Any effective Pro selection (`--model Pro` or a sub-mode) raises the default `--timeout-ms` to 1200000 - Pro reasoning routinely runs for many minutes (an explicit `--timeout-ms` always wins).
|
|
244
244
|
- `--effort 즉시|중간|높음|"매우 높음"` sets the reasoning effort. English aliases `instant`/`medium`/`high`/`max` are accepted. The effort options and Pro share one radio group in ChatGPT, so picking an effort switches the composer to the standard reasoning model and deselects Pro; for the same reason `--pro-mode` and `--effort` cannot be combined.
|
|
245
245
|
- `--project "name"` enters an existing sidebar project before sending. `--project-new "name"` creates a new project (sidebar 새 프로젝트 popover, committed with Enter) and sends inside it. Neither can be combined with `--target-url` (the project step would navigate away from the confirmed tab), and `--project-new` never comes from saved defaults — creating a project is always an explicit per-ask choice.
|
|
246
246
|
|
package/dist/chatgpt-browser.js
CHANGED
|
@@ -1244,6 +1244,20 @@ async function selectProject(cdp, options) {
|
|
|
1244
1244
|
throw new Error(`Clicking project "${options.project}" did not navigate the visible tab. If the tab is already inside this project, omit --project and retry.`);
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
|
+
if (navigated) {
|
|
1248
|
+
// A sidebar SPA navigation moves the URL to the target project while the
|
|
1249
|
+
// composer can stay bound to the PREVIOUS project's conversation target, so
|
|
1250
|
+
// the send silently creates the thread in the OLD project (reproduced live
|
|
1251
|
+
// via PRODEX_DEBUG_SEND: baseline URL on the requested project, yet the
|
|
1252
|
+
// prompt posted into the project the tab came from). A hard reload of the
|
|
1253
|
+
// project home rebinds the composer to THIS project before we send.
|
|
1254
|
+
const projectHome = await cdp.evaluate("location.href");
|
|
1255
|
+
await cdp.evaluate("location.reload()");
|
|
1256
|
+
const rebound = await waitForExpressionTrue(cdp, `location.href === ${JSON.stringify(projectHome)} && Boolean(document.querySelector('#prompt-textarea,[contenteditable="true"],textarea'))`, PROJECT_NAVIGATION_TIMEOUT_MS);
|
|
1257
|
+
if (!rebound) {
|
|
1258
|
+
throw new Error(`ChatGPT composer did not rebind after entering project "${options.project}"`);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1247
1261
|
const composerReady = await waitForExpressionTrue(cdp, `Boolean(document.querySelector('#prompt-textarea,[contenteditable="true"],textarea'))`, PROJECT_NAVIGATION_TIMEOUT_MS);
|
|
1248
1262
|
if (!composerReady) {
|
|
1249
1263
|
throw new Error(`ChatGPT composer did not appear after entering project "${options.project}"`);
|
|
@@ -1427,6 +1441,26 @@ export async function sendChatGptPrompt(options) {
|
|
|
1427
1441
|
emitProgress("waiting", "prompt posting");
|
|
1428
1442
|
}
|
|
1429
1443
|
if (!accepted) {
|
|
1444
|
+
// The session can expire mid-send (logged out during a long Pro wait), which
|
|
1445
|
+
// otherwise surfaces as a cryptic "raise --timeout-ms" failure. Re-check the
|
|
1446
|
+
// login state first and, if the session is gone, say so clearly so the user
|
|
1447
|
+
// re-logs in instead of chasing a timeout.
|
|
1448
|
+
try {
|
|
1449
|
+
const status = await evaluateOnPage(page, statusExpression());
|
|
1450
|
+
if (!inferChatGptPageLoggedInLikely(status)) {
|
|
1451
|
+
throw new ChatGptBrowserBlockerError({
|
|
1452
|
+
code: "session_expired",
|
|
1453
|
+
message: "The ChatGPT session is no longer logged in - it likely expired during the send.",
|
|
1454
|
+
retryable: true,
|
|
1455
|
+
next_step: "Run `prodex pro browser login`, log in, then retry."
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
catch (error) {
|
|
1460
|
+
if (error instanceof ChatGptBrowserBlockerError)
|
|
1461
|
+
throw error;
|
|
1462
|
+
// best effort: a CDP eval failure here falls through to the generic timeout
|
|
1463
|
+
}
|
|
1430
1464
|
// A successful submit clears the composer, so text still sitting there means
|
|
1431
1465
|
// the send control did not register the prompt — the UI-changed signature.
|
|
1432
1466
|
let composerStillHasText = false;
|
package/dist/cli-help.js
CHANGED
|
@@ -174,7 +174,7 @@ Use \`prodex pro ask\` for dry-run/manual previews.
|
|
|
174
174
|
Use \`prodex pro browser ask\` only when you want an explicit visible-browser send.
|
|
175
175
|
Model/project selection (visible-browser send):
|
|
176
176
|
--model "label" Pick the composer model by its exact menu label (verified: Pro). Submenu models (e.g. the GPT-5.6 Sol variants) are rejected for now.
|
|
177
|
-
--pro-mode 기본 | 확장 Pro sub-mode (only when the model is Pro); a Pro selection raises the default timeout to
|
|
177
|
+
--pro-mode 기본 | 확장 Pro sub-mode (only when the model is Pro); a Pro selection raises the default timeout to 1200000 ms
|
|
178
178
|
--effort 즉시|중간|높음|매우 높음 Reasoning effort (aliases: instant/medium/high/max); picking one deselects Pro
|
|
179
179
|
--project "name" Enter an existing sidebar project first (cannot combine with --target-url)
|
|
180
180
|
Labels are matched in both the Korean and English (US) UI; run \`prodex pro browser models\` to list what your account shows.
|
|
@@ -268,7 +268,7 @@ Commands:
|
|
|
268
268
|
Visible-browser sends require a manual browser session and stop on login, captcha, Cloudflare, permission, rate-limit, or usage-limit blockers.
|
|
269
269
|
Model/project selection (ask):
|
|
270
270
|
--model Composer model to pick by its exact menu label (verified: Pro). Models whose menu entry opens a submenu of variants are rejected with a clear error for now.
|
|
271
|
-
--pro-mode Pro sub-mode: 기본 (standard) or 확장 (extended), used when the model is Pro. A Pro selection raises the default --timeout-ms to
|
|
271
|
+
--pro-mode Pro sub-mode: 기본 (standard) or 확장 (extended), used when the model is Pro. A Pro selection raises the default --timeout-ms to 1200000.
|
|
272
272
|
--effort Reasoning effort: 즉시 / 중간 / 높음 / 매우 높음 (aliases: instant/medium/high/max). Picking an effort switches the composer to the standard reasoning model, deselecting Pro.
|
|
273
273
|
--project Enter an existing sidebar project before sending. Cannot be combined with --target-url.
|
|
274
274
|
--pro-mode and --effort cannot be combined. Labels are matched in both the Korean and English (US) ChatGPT UI (e.g. 높음/High, Pro 확장/Pro Extended).
|
package/dist/cli-pro.js
CHANGED
|
@@ -628,7 +628,9 @@ export async function runAskProCommand(rest, io) {
|
|
|
628
628
|
// --pro-mode, so --model Pro sends fell back to 90s and chronically timed
|
|
629
629
|
// out. Any effective Pro selection now defaults to 15 minutes.
|
|
630
630
|
const effectiveProSelection = selectionProMode !== undefined || (selectionModel !== undefined && /pro/i.test(selectionModel));
|
|
631
|
-
|
|
631
|
+
// Pro reasoning routinely runs 6-20 minutes; 15 min was still cutting long
|
|
632
|
+
// answers off (field report), so a Pro selection defaults to 20 minutes.
|
|
633
|
+
const defaultBrowserTimeoutMs = effectiveProSelection ? 1_200_000 : 90_000;
|
|
632
634
|
const browserTimeoutMs = hasSendMode
|
|
633
635
|
? (readPositiveIntegerFlag(parsedAskPro.optionArgs, "--timeout-ms") ?? defaultBrowserTimeoutMs)
|
|
634
636
|
: undefined;
|