@youdie006/prodex 0.40.2 → 0.40.4
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/blocker-report.js +7 -1
- package/dist/browser-send-lock.js +21 -1
- package/dist/chatgpt-browser.js +351 -51
- package/dist/cli-args.js +5 -0
- package/dist/cli-help.js +9 -4
- package/dist/cli-pro.js +165 -33
- package/dist/config.js +45 -6
- package/dist/continue-thread.js +133 -0
- package/dist/mcp.js +12 -2
- package/package.json +1 -1
package/dist/blocker-report.js
CHANGED
|
@@ -53,8 +53,14 @@ export function buildBlockerReport(input) {
|
|
|
53
53
|
const existing = groups.get(key);
|
|
54
54
|
if (existing) {
|
|
55
55
|
existing.count += 1;
|
|
56
|
-
|
|
56
|
+
// The example belongs to the record the row dates itself by. Keeping the
|
|
57
|
+
// first one seen printed a cause's oldest wording next to its newest
|
|
58
|
+
// timestamp: a group holding both `has no "Pro" step` and a pre-fix
|
|
59
|
+
// `has no "<a model>" step` showed the fixed one as what is failing now.
|
|
60
|
+
if (at > existing.lastSeen) {
|
|
57
61
|
existing.lastSeen = at;
|
|
62
|
+
existing.example = consult.blocker.message;
|
|
63
|
+
}
|
|
58
64
|
existing.repos.set(consult.repo, (existing.repos.get(consult.repo) ?? 0) + 1);
|
|
59
65
|
}
|
|
60
66
|
else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { link, mkdir, open, readFile, rm } from "node:fs/promises";
|
|
1
|
+
import { link, mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
// One visible-browser send at a time per machine: the dedicated Chrome is a
|
|
@@ -91,6 +91,15 @@ async function tryAcquire(file) {
|
|
|
91
91
|
await rm(temp, { force: true }).catch(() => undefined);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
+
async function lockFileExists(file) {
|
|
95
|
+
try {
|
|
96
|
+
await stat(file);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
94
103
|
/**
|
|
95
104
|
* Serialize visible-browser sends across processes. Waits up to waitMs for a
|
|
96
105
|
* live holder to finish (0 = fail fast); a lock whose holder process is dead
|
|
@@ -112,6 +121,17 @@ export async function withBrowserSendLock(waitMs, onWait, fn) {
|
|
|
112
121
|
if (current?.pid === holder?.pid) {
|
|
113
122
|
await rm(file, { force: true }).catch(() => undefined);
|
|
114
123
|
}
|
|
124
|
+
// A reap that did not actually remove the file - another user's lock in a
|
|
125
|
+
// shared directory, or a directory sitting in its place - used to retry
|
|
126
|
+
// immediately, skipping both the sleep and the deadline: a hot loop that
|
|
127
|
+
// never returned and never timed out. Waiting here costs a reap that
|
|
128
|
+
// raced nothing; not waiting costs the process.
|
|
129
|
+
if (await lockFileExists(file)) {
|
|
130
|
+
if (Date.now() >= deadline) {
|
|
131
|
+
throw new Error(`A prodex browser send lock at ${file} is held by nothing and could not be removed, so no send can start. Delete that file and retry.`);
|
|
132
|
+
}
|
|
133
|
+
await new Promise((resolve) => setTimeout(resolve, 2_000));
|
|
134
|
+
}
|
|
115
135
|
continue;
|
|
116
136
|
}
|
|
117
137
|
if (Date.now() >= deadline) {
|