@youdie006/prodex 0.16.22 → 0.16.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.
- package/dist/chatgpt-browser.js +9 -0
- package/dist/cli-help.js +2 -2
- package/dist/cli-pro.js +17 -1
- package/package.json +1 -1
package/dist/chatgpt-browser.js
CHANGED
|
@@ -1362,6 +1362,15 @@ export async function sendChatGptPrompt(options) {
|
|
|
1362
1362
|
beforeSubmit = await evaluateOnPage(page, answerExpression());
|
|
1363
1363
|
dbgSend(`baseline url=${beforeSubmit.url} user=${beforeSubmit.userMessageCount} assistant=${beforeSubmit.assistantMessageCount}`);
|
|
1364
1364
|
await insertComposerTextViaCdp(cdp, options.prompt);
|
|
1365
|
+
// The send button renders asynchronously after the prompt lands. Poll for it
|
|
1366
|
+
// BEFORE submitting so (a) submitButtonFound reflects whether the control
|
|
1367
|
+
// actually EXISTS - otherwise a successful Enter-key submit skips the fallback
|
|
1368
|
+
// loop below, leaves submitButtonFound false, and a slow/undetected answer
|
|
1369
|
+
// gets mislabeled "ChatGPT web UI may have changed, update prodex" (measured
|
|
1370
|
+
// live: submitExpression finds data-testid="send-button" fine, yet the
|
|
1371
|
+
// timeout error blamed a UI change) - and (b) we never press Enter before the
|
|
1372
|
+
// composer is submit-ready.
|
|
1373
|
+
submitButtonFound = await waitForExpressionTrue(cdp, `(${submitExpression()}).ok === true`, 3_000);
|
|
1365
1374
|
// Submit. Prefer the Enter key: it goes to the focused composer and does
|
|
1366
1375
|
// not depend on coordinates, whereas the send button moves ~100px as the
|
|
1367
1376
|
// composer grows after the prompt lands, so a click at captured coordinates
|
package/dist/cli-help.js
CHANGED
|
@@ -27,7 +27,7 @@ Ask / consult commands:
|
|
|
27
27
|
prodex pro browser projects [--source-cli /absolute/path/to/dist/cli.js] [--port 9333] [--timeout-ms 15000] # read-only list of sidebar project names (for --project)
|
|
28
28
|
prodex pro browser ask [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo] [--port 9333] [--timeout-ms 90000] [--busy-wait-ms 600000] [--target-url url --confirm-target] [--new-chat] [--stdin] [--json] [--auto-login|--no-auto-login] [--file path] [--model Pro] [--pro-mode 기본|확장] [--effort 즉시|중간|높음|"매우 높음"] [--project "name" | --project-new "name"] "prompt" # explicit visible-browser send
|
|
29
29
|
prodex pro latest [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
30
|
-
prodex pro list [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
30
|
+
prodex pro list [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo] [--json]
|
|
31
31
|
prodex pro show <task-id|latest> [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
32
32
|
|
|
33
33
|
Bridge ledger (durable tasks/results/receipts/sessions under .bridge/):
|
|
@@ -167,7 +167,7 @@ Commands:
|
|
|
167
167
|
prodex pro browser models [--source-cli /absolute/path/to/dist/cli.js]
|
|
168
168
|
prodex pro browser ask [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo] [--target-url url --confirm-target] [--new-chat] [--stdin] [--json] [--auto-login|--no-auto-login] [--file path] [--model Pro] [--pro-mode 기본|확장] [--effort 즉시|중간|높음|"매우 높음"] [--project "name" | --project-new "name"] "prompt"
|
|
169
169
|
prodex pro latest [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
170
|
-
prodex pro list [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
170
|
+
prodex pro list [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo] [--json]
|
|
171
171
|
prodex pro show <task-id|latest> [--source-cli /absolute/path/to/dist/cli.js] [--cwd /absolute/path/to/repo]
|
|
172
172
|
|
|
173
173
|
Use \`prodex pro ask\` for dry-run/manual previews.
|
package/dist/cli-pro.js
CHANGED
|
@@ -374,12 +374,28 @@ export async function runProCommand(rest, io, runCliFn) {
|
|
|
374
374
|
if (subcommand === "list") {
|
|
375
375
|
if (printHelpIfRequested(proArgs, "pro list", io.stdout, printProHelp, { valueFlags: ["--cwd", "--source-cli"] }))
|
|
376
376
|
return 0;
|
|
377
|
-
assertOnlyOptions(proArgs, "pro list", ["--cwd", "--source-cli"]);
|
|
377
|
+
assertOnlyOptions(proArgs, "pro list", ["--cwd", "--source-cli"], ["--json"]);
|
|
378
378
|
const targetCwd = resolveCwdFlag(io.cwd, proArgs);
|
|
379
379
|
const targetStore = new BridgeStore(targetCwd);
|
|
380
380
|
const sourceCli = resolveOptionalFileFlag(io.cwd, proArgs, "--source-cli");
|
|
381
381
|
const answerOptions = { cwd: readFlag(proArgs, "--cwd") ? targetCwd : undefined };
|
|
382
382
|
const consults = await listConsultListEntries(targetStore);
|
|
383
|
+
if (proArgs.includes("--json")) {
|
|
384
|
+
// Structured mirror of the human tab output, for agents (empty = valid []).
|
|
385
|
+
const items = consults.map((entry) => entry.kind === "untrusted"
|
|
386
|
+
? {
|
|
387
|
+
task_id: entry.task.id,
|
|
388
|
+
status: "untrusted",
|
|
389
|
+
summary: sourceAwareResultMessage(errorMessage(entry.error), sourceCli, answerOptions)
|
|
390
|
+
}
|
|
391
|
+
: {
|
|
392
|
+
task_id: entry.consult.task.id,
|
|
393
|
+
status: entry.consult.result.status,
|
|
394
|
+
summary: formatProListSummary(entry.consult, sourceCli, answerOptions)
|
|
395
|
+
});
|
|
396
|
+
io.stdout(JSON.stringify(items, null, 2));
|
|
397
|
+
return 0;
|
|
398
|
+
}
|
|
383
399
|
if (consults.length === 0) {
|
|
384
400
|
io.stdout("No GPT Pro consults yet. Run `prodex ask \"...\"` to create one.");
|
|
385
401
|
return 0;
|