pullfrog 0.0.204 → 0.0.205
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 +5 -11
- package/dist/agents/postRun.d.ts +21 -2
- package/dist/agents/shared.d.ts +22 -0
- package/dist/cli.mjs +795 -761
- package/dist/external.d.ts +2 -0
- package/dist/index.js +744 -553
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal.js +36 -42
- package/dist/mcp/comment.d.ts +4 -10
- package/dist/mcp/review.d.ts +2 -2
- package/dist/mcp/selectMode.d.ts +0 -6
- package/dist/mcp/server.d.ts +3 -1
- package/dist/utils/diffCoverage.d.ts +1 -0
- package/dist/utils/leapingComment.d.ts +11 -0
- package/dist/utils/patchWorkflowRunFields.d.ts +1 -1
- package/dist/utils/payload.d.ts +2 -0
- package/dist/utils/prSummary.d.ts +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,16 +72,14 @@ on:
|
|
|
72
72
|
description: 'Agent prompt'
|
|
73
73
|
|
|
74
74
|
permissions:
|
|
75
|
-
|
|
76
|
-
contents: write
|
|
77
|
-
pull-requests: write
|
|
78
|
-
issues: write
|
|
79
|
-
actions: read
|
|
80
|
-
checks: read
|
|
75
|
+
contents: read
|
|
81
76
|
|
|
82
77
|
jobs:
|
|
83
78
|
pullfrog:
|
|
84
79
|
runs-on: ubuntu-latest
|
|
80
|
+
permissions:
|
|
81
|
+
id-token: write
|
|
82
|
+
contents: read
|
|
85
83
|
steps:
|
|
86
84
|
- name: Checkout code
|
|
87
85
|
uses: actions/checkout@v6
|
|
@@ -130,11 +128,7 @@ jobs:
|
|
|
130
128
|
|
|
131
129
|
permissions:
|
|
132
130
|
id-token: write
|
|
133
|
-
contents:
|
|
134
|
-
issues: write
|
|
135
|
-
pull-requests: write
|
|
136
|
-
actions: read
|
|
137
|
-
checks: read
|
|
131
|
+
contents: read
|
|
138
132
|
uses: ./.github/workflows/pullfrog.yml
|
|
139
133
|
with:
|
|
140
134
|
# pass the full event payload as the prompt
|
package/dist/agents/postRun.d.ts
CHANGED
|
@@ -15,13 +15,24 @@ import { type AgentResult, type AgentUsage, type PostRunIssues, type StopHookFai
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function executeStopHook(script: string): Promise<StopHookFailure | null>;
|
|
17
17
|
export declare function buildStopHookPrompt(failure: StopHookFailure): string;
|
|
18
|
+
export declare function buildSummaryStalePrompt(filePath: string): string;
|
|
18
19
|
/**
|
|
19
|
-
* check the
|
|
20
|
-
*
|
|
20
|
+
* check the post-run gates: did the stop hook pass, is the working tree
|
|
21
|
+
* clean, and (when applicable) did the agent touch the rolling PR summary
|
|
22
|
+
* snapshot? returns everything that still needs nudging so the caller can
|
|
21
23
|
* render a single combined resume prompt.
|
|
24
|
+
*
|
|
25
|
+
* the summary-stale check is skipped when `summaryFilePath` / `summarySeed`
|
|
26
|
+
* are not provided; this is the common case (non-PR runs, runs where the
|
|
27
|
+
* dispatcher didn't request snapshot generation, runs where the seed step
|
|
28
|
+
* failed). loop callers also pass these as undefined after the agent has
|
|
29
|
+
* already been nudged once, to avoid burning the retry budget on a soft
|
|
30
|
+
* non-blocking gate.
|
|
22
31
|
*/
|
|
23
32
|
export declare function collectPostRunIssues(params: {
|
|
24
33
|
stopScript: string | null | undefined;
|
|
34
|
+
summaryFilePath?: string | undefined;
|
|
35
|
+
summarySeed?: string | undefined;
|
|
25
36
|
}): Promise<PostRunIssues>;
|
|
26
37
|
export declare function buildPostRunPrompt(issues: PostRunIssues): string;
|
|
27
38
|
/**
|
|
@@ -57,6 +68,14 @@ export declare function runPostRunRetryLoop<R extends AgentResult>(params: {
|
|
|
57
68
|
initialResult: R;
|
|
58
69
|
initialUsage: AgentUsage | undefined;
|
|
59
70
|
stopScript: string | null | undefined;
|
|
71
|
+
/** absolute path to the seeded PR summary file. when set together with
|
|
72
|
+
* `summarySeed`, the loop checks after each agent attempt whether the
|
|
73
|
+
* file has been edited; if not, it nudges the agent ONCE via a resume
|
|
74
|
+
* turn (subsequent iterations skip the check so we don't keep burning
|
|
75
|
+
* retries on a soft gate when the agent has decided no edit is warranted). */
|
|
76
|
+
summaryFilePath?: string | undefined;
|
|
77
|
+
/** exact bytes of the seeded summary file used for the unchanged-check. */
|
|
78
|
+
summarySeed?: string | undefined;
|
|
60
79
|
resume: (context: {
|
|
61
80
|
prompt: string;
|
|
62
81
|
previousResult: R;
|
package/dist/agents/shared.d.ts
CHANGED
|
@@ -14,9 +14,17 @@ export interface StopHookFailure {
|
|
|
14
14
|
exitCode: number;
|
|
15
15
|
output: string;
|
|
16
16
|
}
|
|
17
|
+
export interface SummaryStale {
|
|
18
|
+
/** absolute path to the seeded snapshot file the agent was meant to edit. */
|
|
19
|
+
filePath: string;
|
|
20
|
+
}
|
|
17
21
|
export interface PostRunIssues {
|
|
18
22
|
stopHook?: StopHookFailure;
|
|
19
23
|
dirtyTree?: string;
|
|
24
|
+
/** populated when the rolling PR summary file is byte-identical to its
|
|
25
|
+
* seed, i.e. the agent never touched it. soft gate — nudges once via a
|
|
26
|
+
* resume turn but never fails the run, parallel to dirtyTree semantics. */
|
|
27
|
+
summaryStale?: SummaryStale;
|
|
20
28
|
}
|
|
21
29
|
export declare function hasPostRunIssues(issues: PostRunIssues): boolean;
|
|
22
30
|
/**
|
|
@@ -71,6 +79,20 @@ export interface AgentRunContext {
|
|
|
71
79
|
* guidance. null when the repo has no stop hook configured.
|
|
72
80
|
*/
|
|
73
81
|
stopScript?: string | null | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* absolute path to the rolling PR summary tmpfile, when one was seeded
|
|
84
|
+
* for this run (Review / IncrementalReview / pr-summary Task). enables
|
|
85
|
+
* a post-run sanity nudge that prompts the agent if the file is still
|
|
86
|
+
* byte-identical to its seed.
|
|
87
|
+
*/
|
|
88
|
+
summaryFilePath?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* exact bytes of the seeded summary file. compared against the current
|
|
91
|
+
* file content after each agent attempt to detect "agent forgot to edit
|
|
92
|
+
* the summary" — particularly common with smaller models that lose
|
|
93
|
+
* track of multi-step instructions.
|
|
94
|
+
*/
|
|
95
|
+
summarySeed?: string | undefined;
|
|
74
96
|
/**
|
|
75
97
|
* called synchronously when the agent subprocess is killed for inner
|
|
76
98
|
* activity timeout. lets main.ts tear down shared resources (MCP HTTP
|