pullfrog 0.1.37 → 0.1.38
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 +15 -2
- package/dist/index.js +14 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -103001,7 +103001,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
103001
103001
|
// package.json
|
|
103002
103002
|
var package_default = {
|
|
103003
103003
|
name: "pullfrog",
|
|
103004
|
-
version: "0.1.
|
|
103004
|
+
version: "0.1.38",
|
|
103005
103005
|
type: "module",
|
|
103006
103006
|
bin: {
|
|
103007
103007
|
pullfrog: "dist/cli.mjs",
|
|
@@ -104375,6 +104375,7 @@ async function finalizeAgentResult(params) {
|
|
|
104375
104375
|
}
|
|
104376
104376
|
var REFLECTION_SKIP_MODES = /* @__PURE__ */ new Set(["IncrementalReview"]);
|
|
104377
104377
|
function shouldRunReflection(mode) {
|
|
104378
|
+
if (process.env.PULLFROG_DISABLE_LEARNINGS_REFLECTION === "1") return false;
|
|
104378
104379
|
if (!mode) return true;
|
|
104379
104380
|
return !REFLECTION_SKIP_MODES.has(mode);
|
|
104380
104381
|
}
|
|
@@ -158384,6 +158385,14 @@ var PushBranch = type({
|
|
|
158384
158385
|
"cross-repo runs only: the writable secondary repo whose checkout to push from (bare name, from list_repos). omit for the primary repo."
|
|
158385
158386
|
)
|
|
158386
158387
|
});
|
|
158388
|
+
function assertWritableMode(ctx, toolName) {
|
|
158389
|
+
const mode = ctx.toolState?.selectedMode;
|
|
158390
|
+
if (mode && NON_COMMITTING_MODES.has(mode)) {
|
|
158391
|
+
throw new Error(
|
|
158392
|
+
`${toolName} is blocked in ${mode} mode \u2014 review and plan runs must not push or commit code. finish by submitting your review (create_pull_request_review) or plan. if this PR genuinely needs a code change, that is a separate task from reviewing it.`
|
|
158393
|
+
);
|
|
158394
|
+
}
|
|
158395
|
+
}
|
|
158387
158396
|
function assertPushTarget(ctx, params) {
|
|
158388
158397
|
const branch = params.branch;
|
|
158389
158398
|
const pushDest = params.pushDest;
|
|
@@ -158508,6 +158517,7 @@ function PushBranchTool(ctx) {
|
|
|
158508
158517
|
if (pushPermission === "disabled") {
|
|
158509
158518
|
throw new Error("Push is disabled. This repository is configured for read-only access.");
|
|
158510
158519
|
}
|
|
158520
|
+
assertWritableMode(ctx, "push_branch");
|
|
158511
158521
|
const rc = resolveRepoCtx(ctx, repo);
|
|
158512
158522
|
if (rc.access === "read") {
|
|
158513
158523
|
throw new Error(
|
|
@@ -158634,6 +158644,7 @@ function CommitChangesTool(ctx) {
|
|
|
158634
158644
|
if (pushPermission === "disabled") {
|
|
158635
158645
|
throw new Error("Push is disabled. This repository is configured for read-only access.");
|
|
158636
158646
|
}
|
|
158647
|
+
assertWritableMode(ctx, "commit_changes");
|
|
158637
158648
|
const branch = $2("git", ["rev-parse", "--abbrev-ref", "HEAD"], { log: false }).trim();
|
|
158638
158649
|
if (branch === "HEAD") {
|
|
158639
158650
|
throw new Error(
|
|
@@ -158972,6 +158983,7 @@ function DeleteBranchTool(ctx) {
|
|
|
158972
158983
|
"Branch deletion requires push: enabled permission. Current mode only allows pushing to non-protected branches."
|
|
158973
158984
|
);
|
|
158974
158985
|
}
|
|
158986
|
+
assertWritableMode(ctx, "delete_branch");
|
|
158975
158987
|
rejectSpecialRef(params.branchName, "branchName");
|
|
158976
158988
|
if (params.branchName === defaultBranch) {
|
|
158977
158989
|
throw new Error(
|
|
@@ -159005,6 +159017,7 @@ function PushTagsTool(ctx) {
|
|
|
159005
159017
|
"Tag pushing requires push: enabled permission. Current mode only allows pushing branches."
|
|
159006
159018
|
);
|
|
159007
159019
|
}
|
|
159020
|
+
assertWritableMode(ctx, "push_tags");
|
|
159008
159021
|
validateTagName(params.tag);
|
|
159009
159022
|
const pushArgs = [...params.force ? ["-f"] : [], "origin", `refs/tags/${params.tag}`];
|
|
159010
159023
|
await pushWithRetry(pushArgs, ctx.gitToken, ctx.refreshGitToken);
|
|
@@ -168461,7 +168474,7 @@ async function runCli4(input) {
|
|
|
168461
168474
|
}
|
|
168462
168475
|
|
|
168463
168476
|
// cli.ts
|
|
168464
|
-
var VERSION10 = "0.1.
|
|
168477
|
+
var VERSION10 = "0.1.38";
|
|
168465
168478
|
var bin = basename2(process.argv[1] || "");
|
|
168466
168479
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
168467
168480
|
var rawArgs = process.argv.slice(2);
|
package/dist/index.js
CHANGED
|
@@ -101072,7 +101072,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
101072
101072
|
// package.json
|
|
101073
101073
|
var package_default = {
|
|
101074
101074
|
name: "pullfrog",
|
|
101075
|
-
version: "0.1.
|
|
101075
|
+
version: "0.1.38",
|
|
101076
101076
|
type: "module",
|
|
101077
101077
|
bin: {
|
|
101078
101078
|
pullfrog: "dist/cli.mjs",
|
|
@@ -102446,6 +102446,7 @@ async function finalizeAgentResult(params) {
|
|
|
102446
102446
|
}
|
|
102447
102447
|
var REFLECTION_SKIP_MODES = /* @__PURE__ */ new Set(["IncrementalReview"]);
|
|
102448
102448
|
function shouldRunReflection(mode) {
|
|
102449
|
+
if (process.env.PULLFROG_DISABLE_LEARNINGS_REFLECTION === "1") return false;
|
|
102449
102450
|
if (!mode) return true;
|
|
102450
102451
|
return !REFLECTION_SKIP_MODES.has(mode);
|
|
102451
102452
|
}
|
|
@@ -156497,6 +156498,14 @@ var PushBranch = type({
|
|
|
156497
156498
|
"cross-repo runs only: the writable secondary repo whose checkout to push from (bare name, from list_repos). omit for the primary repo."
|
|
156498
156499
|
)
|
|
156499
156500
|
});
|
|
156501
|
+
function assertWritableMode(ctx, toolName) {
|
|
156502
|
+
const mode = ctx.toolState?.selectedMode;
|
|
156503
|
+
if (mode && NON_COMMITTING_MODES.has(mode)) {
|
|
156504
|
+
throw new Error(
|
|
156505
|
+
`${toolName} is blocked in ${mode} mode \u2014 review and plan runs must not push or commit code. finish by submitting your review (create_pull_request_review) or plan. if this PR genuinely needs a code change, that is a separate task from reviewing it.`
|
|
156506
|
+
);
|
|
156507
|
+
}
|
|
156508
|
+
}
|
|
156500
156509
|
function assertPushTarget(ctx, params) {
|
|
156501
156510
|
const branch = params.branch;
|
|
156502
156511
|
const pushDest = params.pushDest;
|
|
@@ -156621,6 +156630,7 @@ function PushBranchTool(ctx) {
|
|
|
156621
156630
|
if (pushPermission === "disabled") {
|
|
156622
156631
|
throw new Error("Push is disabled. This repository is configured for read-only access.");
|
|
156623
156632
|
}
|
|
156633
|
+
assertWritableMode(ctx, "push_branch");
|
|
156624
156634
|
const rc = resolveRepoCtx(ctx, repo);
|
|
156625
156635
|
if (rc.access === "read") {
|
|
156626
156636
|
throw new Error(
|
|
@@ -156747,6 +156757,7 @@ function CommitChangesTool(ctx) {
|
|
|
156747
156757
|
if (pushPermission === "disabled") {
|
|
156748
156758
|
throw new Error("Push is disabled. This repository is configured for read-only access.");
|
|
156749
156759
|
}
|
|
156760
|
+
assertWritableMode(ctx, "commit_changes");
|
|
156750
156761
|
const branch = $("git", ["rev-parse", "--abbrev-ref", "HEAD"], { log: false }).trim();
|
|
156751
156762
|
if (branch === "HEAD") {
|
|
156752
156763
|
throw new Error(
|
|
@@ -157085,6 +157096,7 @@ function DeleteBranchTool(ctx) {
|
|
|
157085
157096
|
"Branch deletion requires push: enabled permission. Current mode only allows pushing to non-protected branches."
|
|
157086
157097
|
);
|
|
157087
157098
|
}
|
|
157099
|
+
assertWritableMode(ctx, "delete_branch");
|
|
157088
157100
|
rejectSpecialRef(params.branchName, "branchName");
|
|
157089
157101
|
if (params.branchName === defaultBranch) {
|
|
157090
157102
|
throw new Error(
|
|
@@ -157118,6 +157130,7 @@ function PushTagsTool(ctx) {
|
|
|
157118
157130
|
"Tag pushing requires push: enabled permission. Current mode only allows pushing branches."
|
|
157119
157131
|
);
|
|
157120
157132
|
}
|
|
157133
|
+
assertWritableMode(ctx, "push_tags");
|
|
157121
157134
|
validateTagName(params.tag);
|
|
157122
157135
|
const pushArgs = [...params.force ? ["-f"] : [], "origin", `refs/tags/${params.tag}`];
|
|
157123
157136
|
await pushWithRetry(pushArgs, ctx.gitToken, ctx.refreshGitToken);
|