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 CHANGED
@@ -72,16 +72,14 @@ on:
72
72
  description: 'Agent prompt'
73
73
 
74
74
  permissions:
75
- id-token: write
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: write
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
@@ -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 two post-run gates: did the stop hook pass and is the working
20
- * tree clean? returns everything that still needs fixing so the caller can
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;
@@ -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