pullfrog 0.1.87 → 0.1.89
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/cli.mjs +40 -8
- package/dist/index.js +38 -6
- package/dist/internal.js +1 -1
- package/dist/utils/isTransientNetworkError.d.ts +2 -1
- package/dist/utils/runErrorRenderer.d.ts +5 -2
- package/dist/yes/index.d.ts +2 -1
- package/dist/yes.js +2 -3
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -107103,7 +107103,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
|
|
|
107103
107103
|
// package.json
|
|
107104
107104
|
var package_default = {
|
|
107105
107105
|
name: "pullfrog",
|
|
107106
|
-
version: "0.1.
|
|
107106
|
+
version: "0.1.89",
|
|
107107
107107
|
cliContractVersion: "1",
|
|
107108
107108
|
type: "module",
|
|
107109
107109
|
bin: {
|
|
@@ -111130,6 +111130,11 @@ import { spawnSync as spawnSync2 } from "node:child_process";
|
|
|
111130
111130
|
import { chmodSync, createWriteStream, existsSync as existsSync3, mkdirSync } from "node:fs";
|
|
111131
111131
|
import { join as join2 } from "node:path";
|
|
111132
111132
|
import { pipeline } from "node:stream/promises";
|
|
111133
|
+
function resolveNpm() {
|
|
111134
|
+
const npmCli = process.env.npm_execpath;
|
|
111135
|
+
if (npmCli?.endsWith("npm-cli.js")) return { command: process.execPath, args: [npmCli] };
|
|
111136
|
+
return { command: "npm", args: [] };
|
|
111137
|
+
}
|
|
111133
111138
|
async function installFromNpmTarball(params) {
|
|
111134
111139
|
const tempDir = process.env.PULLFROG_TEMP_DIR;
|
|
111135
111140
|
if (!tempDir) throw new Error("PULLFROG_TEMP_DIR is not set");
|
|
@@ -111192,7 +111197,8 @@ async function installFromNpmTarball(params) {
|
|
|
111192
111197
|
}
|
|
111193
111198
|
if (params.installDependencies) {
|
|
111194
111199
|
log2.debug(`\xBB installing dependencies for ${params.packageName}...`);
|
|
111195
|
-
const
|
|
111200
|
+
const npm2 = resolveNpm();
|
|
111201
|
+
const installResult = spawnSync2(npm2.command, [...npm2.args, "install", "--production"], {
|
|
111196
111202
|
cwd: extractedDir,
|
|
111197
111203
|
stdio: "pipe",
|
|
111198
111204
|
encoding: "utf-8",
|
|
@@ -186308,9 +186314,8 @@ function jitter(delayMs) {
|
|
|
186308
186314
|
var DEFAULT_RETRY_AFTER_CAP_MS = 2e4;
|
|
186309
186315
|
function getErrorResponseHeaders(error49) {
|
|
186310
186316
|
if (error49 === null || typeof error49 !== "object") return void 0;
|
|
186311
|
-
const
|
|
186312
|
-
|
|
186313
|
-
const headers = response.headers;
|
|
186317
|
+
const source = error49;
|
|
186318
|
+
const headers = source.response?.headers ?? source.headers;
|
|
186314
186319
|
if (headers === null || typeof headers !== "object") return void 0;
|
|
186315
186320
|
return headers;
|
|
186316
186321
|
}
|
|
@@ -192410,7 +192415,7 @@ async function countOutstandingPullfrogThreads(ctx, pullNumber) {
|
|
|
192410
192415
|
// utils/isTransientNetworkError.ts
|
|
192411
192416
|
function isTransientNetworkError(error49, extraPatterns = []) {
|
|
192412
192417
|
if (!(error49 instanceof Error)) return false;
|
|
192413
|
-
if (error49.name === "AbortError") return true;
|
|
192418
|
+
if (error49.name === "AbortError" || error49.name === "TimeoutError") return true;
|
|
192414
192419
|
const patterns = ["fetch failed", "ECONNRESET", "ETIMEDOUT", ...extraPatterns];
|
|
192415
192420
|
return patterns.some((p) => error49.message.includes(p));
|
|
192416
192421
|
}
|
|
@@ -200099,6 +200104,23 @@ ${input.raw}
|
|
|
200099
200104
|
\`\`\``
|
|
200100
200105
|
].join("\n");
|
|
200101
200106
|
}
|
|
200107
|
+
function isRunTimeoutError(message) {
|
|
200108
|
+
return message.startsWith("agent run timed out after");
|
|
200109
|
+
}
|
|
200110
|
+
function formatRunTimeoutSummary(input) {
|
|
200111
|
+
const settingsUrl = `${getApiUrl()}/console/${input.owner}/${input.name}`;
|
|
200112
|
+
return [
|
|
200113
|
+
"**This run hit its time limit while still working, so it stopped before finishing.**",
|
|
200114
|
+
"",
|
|
200115
|
+
"Give runs longer with `--timeout=2h` (or `--notimeout`) in this repo's instructions \u2014 or raise the workflow's `timeout` input if it sets one, since that input wins. A smaller PR or a lower effort also finishes sooner.",
|
|
200116
|
+
"",
|
|
200117
|
+
`[Repo settings \u2192](${settingsUrl}) \xB7 [Flags \u2192](https://docs.pullfrog.com/flags)`,
|
|
200118
|
+
"",
|
|
200119
|
+
`\`\`\`
|
|
200120
|
+
${input.raw}
|
|
200121
|
+
\`\`\``
|
|
200122
|
+
].join("\n");
|
|
200123
|
+
}
|
|
200102
200124
|
function formatContextOverflowSummary(input) {
|
|
200103
200125
|
const settingsUrl = `${getApiUrl()}/console/${input.owner}/${input.name}`;
|
|
200104
200126
|
return [
|
|
@@ -200348,6 +200370,16 @@ ${body}`, comment: body };
|
|
|
200348
200370
|
});
|
|
200349
200371
|
return { summary: `### \u274C Pullfrog failed
|
|
200350
200372
|
|
|
200373
|
+
${body}`, comment: body };
|
|
200374
|
+
}
|
|
200375
|
+
if (isRunTimeoutError(input.errorMessage)) {
|
|
200376
|
+
const body = formatRunTimeoutSummary({
|
|
200377
|
+
owner: input.repo.owner,
|
|
200378
|
+
name: input.repo.name,
|
|
200379
|
+
raw: input.errorMessage
|
|
200380
|
+
});
|
|
200381
|
+
return { summary: `### \u274C Pullfrog failed
|
|
200382
|
+
|
|
200351
200383
|
${body}`, comment: body };
|
|
200352
200384
|
}
|
|
200353
200385
|
if (isTransientUpstreamError(input.errorMessage)) {
|
|
@@ -202193,7 +202225,7 @@ function resolveTarget2(repo) {
|
|
|
202193
202225
|
return { owner: match3[1], repo: match3[2] };
|
|
202194
202226
|
}
|
|
202195
202227
|
function cliVersion() {
|
|
202196
|
-
const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.
|
|
202228
|
+
const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.89");
|
|
202197
202229
|
if (!parts) return "0.0.0";
|
|
202198
202230
|
return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
|
|
202199
202231
|
}
|
|
@@ -202360,7 +202392,7 @@ async function runCli8(input) {
|
|
|
202360
202392
|
}
|
|
202361
202393
|
|
|
202362
202394
|
// cli.ts
|
|
202363
|
-
var VERSION10 = "0.1.
|
|
202395
|
+
var VERSION10 = "0.1.89";
|
|
202364
202396
|
var bin = basename2(process.argv[1] || "");
|
|
202365
202397
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
202366
202398
|
var rawArgs = process.argv.slice(2);
|
package/dist/index.js
CHANGED
|
@@ -105416,6 +105416,11 @@ import { spawnSync } from "node:child_process";
|
|
|
105416
105416
|
import { chmodSync, createWriteStream, existsSync as existsSync2, mkdirSync } from "node:fs";
|
|
105417
105417
|
import { join } from "node:path";
|
|
105418
105418
|
import { pipeline } from "node:stream/promises";
|
|
105419
|
+
function resolveNpm() {
|
|
105420
|
+
const npmCli = process.env.npm_execpath;
|
|
105421
|
+
if (npmCli?.endsWith("npm-cli.js")) return { command: process.execPath, args: [npmCli] };
|
|
105422
|
+
return { command: "npm", args: [] };
|
|
105423
|
+
}
|
|
105419
105424
|
async function installFromNpmTarball(params) {
|
|
105420
105425
|
const tempDir = process.env.PULLFROG_TEMP_DIR;
|
|
105421
105426
|
if (!tempDir) throw new Error("PULLFROG_TEMP_DIR is not set");
|
|
@@ -105478,7 +105483,8 @@ async function installFromNpmTarball(params) {
|
|
|
105478
105483
|
}
|
|
105479
105484
|
if (params.installDependencies) {
|
|
105480
105485
|
log.debug(`\xBB installing dependencies for ${params.packageName}...`);
|
|
105481
|
-
const
|
|
105486
|
+
const npm2 = resolveNpm();
|
|
105487
|
+
const installResult = spawnSync(npm2.command, [...npm2.args, "install", "--production"], {
|
|
105482
105488
|
cwd: extractedDir,
|
|
105483
105489
|
stdio: "pipe",
|
|
105484
105490
|
encoding: "utf-8",
|
|
@@ -105723,7 +105729,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
105723
105729
|
// package.json
|
|
105724
105730
|
var package_default = {
|
|
105725
105731
|
name: "pullfrog",
|
|
105726
|
-
version: "0.1.
|
|
105732
|
+
version: "0.1.89",
|
|
105727
105733
|
cliContractVersion: "1",
|
|
105728
105734
|
type: "module",
|
|
105729
105735
|
bin: {
|
|
@@ -182801,9 +182807,8 @@ function jitter(delayMs) {
|
|
|
182801
182807
|
var DEFAULT_RETRY_AFTER_CAP_MS = 2e4;
|
|
182802
182808
|
function getErrorResponseHeaders(error49) {
|
|
182803
182809
|
if (error49 === null || typeof error49 !== "object") return void 0;
|
|
182804
|
-
const
|
|
182805
|
-
|
|
182806
|
-
const headers = response.headers;
|
|
182810
|
+
const source = error49;
|
|
182811
|
+
const headers = source.response?.headers ?? source.headers;
|
|
182807
182812
|
if (headers === null || typeof headers !== "object") return void 0;
|
|
182808
182813
|
return headers;
|
|
182809
182814
|
}
|
|
@@ -188903,7 +188908,7 @@ async function countOutstandingPullfrogThreads(ctx, pullNumber) {
|
|
|
188903
188908
|
// utils/isTransientNetworkError.ts
|
|
188904
188909
|
function isTransientNetworkError(error49, extraPatterns = []) {
|
|
188905
188910
|
if (!(error49 instanceof Error)) return false;
|
|
188906
|
-
if (error49.name === "AbortError") return true;
|
|
188911
|
+
if (error49.name === "AbortError" || error49.name === "TimeoutError") return true;
|
|
188907
188912
|
const patterns = ["fetch failed", "ECONNRESET", "ETIMEDOUT", ...extraPatterns];
|
|
188908
188913
|
return patterns.some((p) => error49.message.includes(p));
|
|
188909
188914
|
}
|
|
@@ -196592,6 +196597,23 @@ ${input.raw}
|
|
|
196592
196597
|
\`\`\``
|
|
196593
196598
|
].join("\n");
|
|
196594
196599
|
}
|
|
196600
|
+
function isRunTimeoutError(message) {
|
|
196601
|
+
return message.startsWith("agent run timed out after");
|
|
196602
|
+
}
|
|
196603
|
+
function formatRunTimeoutSummary(input) {
|
|
196604
|
+
const settingsUrl = `${getApiUrl()}/console/${input.owner}/${input.name}`;
|
|
196605
|
+
return [
|
|
196606
|
+
"**This run hit its time limit while still working, so it stopped before finishing.**",
|
|
196607
|
+
"",
|
|
196608
|
+
"Give runs longer with `--timeout=2h` (or `--notimeout`) in this repo's instructions \u2014 or raise the workflow's `timeout` input if it sets one, since that input wins. A smaller PR or a lower effort also finishes sooner.",
|
|
196609
|
+
"",
|
|
196610
|
+
`[Repo settings \u2192](${settingsUrl}) \xB7 [Flags \u2192](https://docs.pullfrog.com/flags)`,
|
|
196611
|
+
"",
|
|
196612
|
+
`\`\`\`
|
|
196613
|
+
${input.raw}
|
|
196614
|
+
\`\`\``
|
|
196615
|
+
].join("\n");
|
|
196616
|
+
}
|
|
196595
196617
|
function formatContextOverflowSummary(input) {
|
|
196596
196618
|
const settingsUrl = `${getApiUrl()}/console/${input.owner}/${input.name}`;
|
|
196597
196619
|
return [
|
|
@@ -196841,6 +196863,16 @@ ${body}`, comment: body };
|
|
|
196841
196863
|
});
|
|
196842
196864
|
return { summary: `### \u274C Pullfrog failed
|
|
196843
196865
|
|
|
196866
|
+
${body}`, comment: body };
|
|
196867
|
+
}
|
|
196868
|
+
if (isRunTimeoutError(input.errorMessage)) {
|
|
196869
|
+
const body = formatRunTimeoutSummary({
|
|
196870
|
+
owner: input.repo.owner,
|
|
196871
|
+
name: input.repo.name,
|
|
196872
|
+
raw: input.errorMessage
|
|
196873
|
+
});
|
|
196874
|
+
return { summary: `### \u274C Pullfrog failed
|
|
196875
|
+
|
|
196844
196876
|
${body}`, comment: body };
|
|
196845
196877
|
}
|
|
196846
196878
|
if (isTransientUpstreamError(input.errorMessage)) {
|
package/dist/internal.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* on explicit HTTP status / validation errors that carry their own message).
|
|
4
4
|
*
|
|
5
5
|
* Matches errors from `fetch` (`fetch failed`), TCP-level interruption
|
|
6
|
-
* (`ECONNRESET`, `ETIMEDOUT`), and `AbortSignal.timeout`
|
|
6
|
+
* (`ECONNRESET`, `ETIMEDOUT`), and aborts — `AbortSignal.timeout` rejects with
|
|
7
|
+
* `TimeoutError`, a manual abort with `AbortError` (#1354).
|
|
7
8
|
* Callers may pass `extraPatterns` to whitelist additional transient
|
|
8
9
|
* substrings on `error.message` (e.g. provider-specific framings).
|
|
9
10
|
*/
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
* `maximum context length is N tokens`. Actionable, so it renders on
|
|
41
41
|
* both surfaces rather than collapsing to the one-line comment.
|
|
42
42
|
*
|
|
43
|
+
* 4b'. Run time limit — the agent was still working when the run's own
|
|
44
|
+
* timeout fired. Actionable (raise the limit), so both surfaces.
|
|
45
|
+
*
|
|
43
46
|
* 4c. Transient upstream failure (#1173) — Anthropic `529 Overloaded`,
|
|
44
47
|
* OpenRouter `provider_unavailable` / `timeout`, Zen `Streaming response
|
|
45
48
|
* failed: [5xx]`. Last of the classified branches so every more specific
|
|
@@ -63,8 +66,8 @@
|
|
|
63
66
|
* the hang case, since the raw internal string helps nobody on the PR.
|
|
64
67
|
*
|
|
65
68
|
* Net: the actionable classifications (billing, API-key, model-not-found,
|
|
66
|
-
* no-provider-available, context-overflow, transient-upstream)
|
|
67
|
-
* bodies on both surfaces; the non-actionable ones (unexplained hang,
|
|
69
|
+
* no-provider-available, context-overflow, run time limit, transient-upstream)
|
|
70
|
+
* render identical bodies on both surfaces; the non-actionable ones (unexplained hang,
|
|
68
71
|
* generic) keep the forensics in the Actions job summary and show a calm
|
|
69
72
|
* one-liner in the PR comment, whose footer already carries Pullfrog
|
|
70
73
|
* branding + rerun links.
|
package/dist/yes/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export declare function range(n: number, fn: (i: number) => number): number[];
|
|
|
6
6
|
export declare function schedule(fn: (i: number) => number, count: number): number[];
|
|
7
7
|
/**
|
|
8
8
|
* read a retry delay (ms) from a thrown HTTP error's response headers, honoring
|
|
9
|
-
* GitHub's rate-limit backoff hints on octokit errors (`error.response.headers
|
|
9
|
+
* GitHub's rate-limit backoff hints on octokit errors (`error.response.headers`, or
|
|
10
|
+
* `error.headers` on a GraphQL response error):
|
|
10
11
|
* - `retry-after` (RFC 9110 delta-seconds or an HTTP-date) — an explicit
|
|
11
12
|
* backoff directive whenever present (covers secondary rate limits, which
|
|
12
13
|
* carry it with `x-ratelimit-remaining > 0`).
|
package/dist/yes.js
CHANGED
|
@@ -1034,9 +1034,8 @@ function jitter(delayMs) {
|
|
|
1034
1034
|
var DEFAULT_RETRY_AFTER_CAP_MS = 2e4;
|
|
1035
1035
|
function getErrorResponseHeaders(error) {
|
|
1036
1036
|
if (error === null || typeof error !== "object") return void 0;
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
const headers = response.headers;
|
|
1037
|
+
const source = error;
|
|
1038
|
+
const headers = source.response?.headers ?? source.headers;
|
|
1040
1039
|
if (headers === null || typeof headers !== "object") return void 0;
|
|
1041
1040
|
return headers;
|
|
1042
1041
|
}
|