pullfrog 0.1.3 → 0.1.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/cli.mjs CHANGED
@@ -142589,7 +142589,7 @@ var import_semver = __toESM(require_semver2(), 1);
142589
142589
  // package.json
142590
142590
  var package_default = {
142591
142591
  name: "pullfrog",
142592
- version: "0.1.3",
142592
+ version: "0.1.4",
142593
142593
  type: "module",
142594
142594
  bin: {
142595
142595
  pullfrog: "dist/cli.mjs",
@@ -152964,6 +152964,7 @@ function buildRuntimeContext(ctx) {
152964
152964
  "~pullfrog": _2,
152965
152965
  prompt: _p,
152966
152966
  eventInstructions: _ei,
152967
+ previousRunsNote: _prn,
152967
152968
  event: _e2,
152968
152969
  ...payloadRest
152969
152970
  } = ctx.payload;
@@ -153044,14 +153045,16 @@ In case of conflict between instructions, follow this precedence (highest to low
153044
153045
  2. User prompt
153045
153046
  3. Event-level instructions`;
153046
153047
  function buildTaskSection(ctx) {
153048
+ const previousRunsNote = ctx.payload.previousRunsNote?.trim() ?? "";
153047
153049
  if (ctx.userQuoted) {
153050
+ const parts = [ctx.userQuoted, previousRunsNote].filter(Boolean);
153048
153051
  return `************* YOUR TASK *************
153049
153052
 
153050
- ${ctx.userQuoted}`;
153053
+ ${parts.join("\n\n")}`;
153051
153054
  }
153052
153055
  const eventInstructions = ctx.payload.eventInstructions ?? "";
153053
- if (eventInstructions) {
153054
- const parts = [ctx.eventTitle, eventInstructions].filter(Boolean);
153056
+ if (eventInstructions || previousRunsNote) {
153057
+ const parts = [ctx.eventTitle, eventInstructions, previousRunsNote].filter(Boolean);
153055
153058
  return `************* YOUR TASK *************
153056
153059
 
153057
153060
  ${parts.join("\n\n")}`;
@@ -153366,6 +153369,7 @@ var JsonPayload = type({
153366
153369
  prompt: "string",
153367
153370
  "triggerer?": "string | undefined",
153368
153371
  "eventInstructions?": "string",
153372
+ "previousRunsNote?": "string",
153369
153373
  "event?": "object",
153370
153374
  "timeout?": "string | undefined",
153371
153375
  "progressComment?": type({
@@ -153451,6 +153455,7 @@ function resolvePayload(resolvedPromptInput, repoSettings) {
153451
153455
  triggerer: jsonPayload?.triggerer ?? // it's not a common use case but GITHUB_ACTOR can be a user when the workflow is manually triggered by a user through GitHub Actions UI
153452
153456
  (!isPullfrog(process.env.GITHUB_ACTOR) ? process.env.GITHUB_ACTOR : void 0),
153453
153457
  eventInstructions: jsonPayload?.eventInstructions,
153458
+ previousRunsNote: jsonPayload?.previousRunsNote,
153454
153459
  event,
153455
153460
  timeout: inputs.timeout ?? jsonPayload?.timeout,
153456
153461
  cwd: resolveCwd(inputs.cwd),
@@ -156513,7 +156518,7 @@ async function run2() {
156513
156518
  }
156514
156519
 
156515
156520
  // cli.ts
156516
- var VERSION10 = "0.1.3";
156521
+ var VERSION10 = "0.1.4";
156517
156522
  var bin = basename2(process.argv[1] || "");
156518
156523
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
156519
156524
  var rawArgs = process.argv.slice(2);
@@ -201,6 +201,13 @@ export interface WriteablePayload {
201
201
  triggerer?: string | undefined;
202
202
  /** event-level instructions for this trigger type (flag-expanded server-side) */
203
203
  eventInstructions?: string | undefined;
204
+ /**
205
+ * system-injected note about prior superseded runs (e.g. when the
206
+ * triggering @pullfrog comment is edited). rendered alongside the user's
207
+ * prompt rather than via eventInstructions so it survives user-prompt
208
+ * precedence.
209
+ */
210
+ previousRunsNote?: string | undefined;
204
211
  /** event data from webhook payload - discriminated union based on trigger field */
205
212
  event: PayloadEvent;
206
213
  /** timeout for agent run (e.g., "10m", "1h30m") - defaults to "1h" */
package/dist/index.js CHANGED
@@ -142306,7 +142306,7 @@ var import_semver = __toESM(require_semver2(), 1);
142306
142306
  // package.json
142307
142307
  var package_default = {
142308
142308
  name: "pullfrog",
142309
- version: "0.1.3",
142309
+ version: "0.1.4",
142310
142310
  type: "module",
142311
142311
  bin: {
142312
142312
  pullfrog: "dist/cli.mjs",
@@ -152681,6 +152681,7 @@ function buildRuntimeContext(ctx) {
152681
152681
  "~pullfrog": _,
152682
152682
  prompt: _p,
152683
152683
  eventInstructions: _ei,
152684
+ previousRunsNote: _prn,
152684
152685
  event: _e,
152685
152686
  ...payloadRest
152686
152687
  } = ctx.payload;
@@ -152761,14 +152762,16 @@ In case of conflict between instructions, follow this precedence (highest to low
152761
152762
  2. User prompt
152762
152763
  3. Event-level instructions`;
152763
152764
  function buildTaskSection(ctx) {
152765
+ const previousRunsNote = ctx.payload.previousRunsNote?.trim() ?? "";
152764
152766
  if (ctx.userQuoted) {
152767
+ const parts = [ctx.userQuoted, previousRunsNote].filter(Boolean);
152765
152768
  return `************* YOUR TASK *************
152766
152769
 
152767
- ${ctx.userQuoted}`;
152770
+ ${parts.join("\n\n")}`;
152768
152771
  }
152769
152772
  const eventInstructions = ctx.payload.eventInstructions ?? "";
152770
- if (eventInstructions) {
152771
- const parts = [ctx.eventTitle, eventInstructions].filter(Boolean);
152773
+ if (eventInstructions || previousRunsNote) {
152774
+ const parts = [ctx.eventTitle, eventInstructions, previousRunsNote].filter(Boolean);
152772
152775
  return `************* YOUR TASK *************
152773
152776
 
152774
152777
  ${parts.join("\n\n")}`;
@@ -153083,6 +153086,7 @@ var JsonPayload = type({
153083
153086
  prompt: "string",
153084
153087
  "triggerer?": "string | undefined",
153085
153088
  "eventInstructions?": "string",
153089
+ "previousRunsNote?": "string",
153086
153090
  "event?": "object",
153087
153091
  "timeout?": "string | undefined",
153088
153092
  "progressComment?": type({
@@ -153168,6 +153172,7 @@ function resolvePayload(resolvedPromptInput, repoSettings) {
153168
153172
  triggerer: jsonPayload?.triggerer ?? // it's not a common use case but GITHUB_ACTOR can be a user when the workflow is manually triggered by a user through GitHub Actions UI
153169
153173
  (!isPullfrog(process.env.GITHUB_ACTOR) ? process.env.GITHUB_ACTOR : void 0),
153170
153174
  eventInstructions: jsonPayload?.eventInstructions,
153175
+ previousRunsNote: jsonPayload?.previousRunsNote,
153171
153176
  event,
153172
153177
  timeout: inputs.timeout ?? jsonPayload?.timeout,
153173
153178
  cwd: resolveCwd(inputs.cwd),
@@ -7,6 +7,7 @@ export declare const JsonPayload: import("arktype/internal/variants/object.ts").
7
7
  model?: string | undefined;
8
8
  triggerer?: string | undefined;
9
9
  eventInstructions?: string;
10
+ previousRunsNote?: string;
10
11
  event?: object;
11
12
  timeout?: string | undefined;
12
13
  progressComment?: {
@@ -34,6 +35,7 @@ export declare function resolvePayload(resolvedPromptInput: ResolvedPromptInput,
34
35
  prompt: string;
35
36
  triggerer: string | undefined;
36
37
  eventInstructions: string | undefined;
38
+ previousRunsNote: string | undefined;
37
39
  event: PayloadEvent;
38
40
  timeout: string | undefined;
39
41
  cwd: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",