pullfrog 0.0.200 → 0.0.201

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.
@@ -2,5 +2,5 @@ import type { Agent } from "./shared.ts";
2
2
  export type { Agent, AgentUsage } from "./shared.ts";
3
3
  export declare const agents: {
4
4
  claude: Agent;
5
- opentoad: Agent;
5
+ opencode: Agent;
6
6
  };
@@ -0,0 +1 @@
1
+ export declare const opencode: import("./shared.ts").Agent;
package/dist/cli.mjs CHANGED
@@ -97692,14 +97692,14 @@ var require_turndown_cjs = __commonJS({
97692
97692
  } else if (node2.nodeType === 1) {
97693
97693
  replacement = replacementForNode.call(self2, node2);
97694
97694
  }
97695
- return join14(output, replacement);
97695
+ return join15(output, replacement);
97696
97696
  }, "");
97697
97697
  }
97698
97698
  function postProcess(output) {
97699
97699
  var self2 = this;
97700
97700
  this.rules.forEach(function(rule) {
97701
97701
  if (typeof rule.append === "function") {
97702
- output = join14(output, rule.append(self2.options));
97702
+ output = join15(output, rule.append(self2.options));
97703
97703
  }
97704
97704
  });
97705
97705
  return output.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, "");
@@ -97711,7 +97711,7 @@ var require_turndown_cjs = __commonJS({
97711
97711
  if (whitespace.leading || whitespace.trailing) content = content.trim();
97712
97712
  return whitespace.leading + rule.replacement(content, node2, this.options) + whitespace.trailing;
97713
97713
  }
97714
- function join14(output, replacement) {
97714
+ function join15(output, replacement) {
97715
97715
  var s1 = trimTrailingNewlines(output);
97716
97716
  var s2 = trimLeadingNewlines(replacement);
97717
97717
  var nls = Math.max(output.length - s1.length, replacement.length - s2.length);
@@ -99208,6 +99208,8 @@ import { dirname as dirname3 } from "node:path";
99208
99208
 
99209
99209
  // main.ts
99210
99210
  var core6 = __toESM(require_core(), 1);
99211
+ import { existsSync as existsSync6, readdirSync } from "node:fs";
99212
+ import { join as join14 } from "node:path";
99211
99213
 
99212
99214
  // node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/arrays.js
99213
99215
  var liftArray = (data) => Array.isArray(data) ? data : [data];
@@ -141945,7 +141947,7 @@ function formatMcpToolRef(agentId, toolName) {
141945
141947
  switch (agentId) {
141946
141948
  case "claude":
141947
141949
  return `mcp__${pullfrogMcpName}__${toolName}`;
141948
- case "opentoad":
141950
+ case "opencode":
141949
141951
  return `${pullfrogMcpName}_${toolName}`;
141950
141952
  default:
141951
141953
  return agentId;
@@ -141993,7 +141995,7 @@ var import_semver = __toESM(require_semver2(), 1);
141993
141995
  // package.json
141994
141996
  var package_default = {
141995
141997
  name: "pullfrog",
141996
- version: "0.0.200",
141998
+ version: "0.0.201",
141997
141999
  type: "module",
141998
142000
  bin: {
141999
142001
  pullfrog: "dist/cli.mjs",
@@ -144688,7 +144690,7 @@ ${PR_SUMMARY_FORMAT}`
144688
144690
  }
144689
144691
  ];
144690
144692
  }
144691
- var modes = computeModes("opentoad");
144693
+ var modes = computeModes("opencode");
144692
144694
 
144693
144695
  // mcp/selectMode.ts
144694
144696
  var SelectModeParams = type({
@@ -144891,13 +144893,19 @@ function detectSandboxMethod() {
144891
144893
  } catch {
144892
144894
  }
144893
144895
  detectedSandboxMethod = "none";
144894
- log.info("PID namespace isolation not available - falling back to env filtering only");
144896
+ log.info("PID namespace isolation not available");
144895
144897
  return "none";
144896
144898
  }
144897
144899
  var PROC_CLEANUP = "umount /proc 2>/dev/null; umount /proc 2>/dev/null; mount -t proc proc /proc 2>/dev/null;";
144898
144900
  function spawnShell(params) {
144899
144901
  const spawnOpts = { env: params.env, cwd: params.cwd, stdio: params.stdio, detached: true };
144900
144902
  const sandboxMethod = detectSandboxMethod();
144903
+ const ci = process.env.CI === "true";
144904
+ if (ci && sandboxMethod === "none") {
144905
+ throw new Error(
144906
+ "pid namespace isolation is required in CI but unavailable (both unshare and sudo unshare failed)"
144907
+ );
144908
+ }
144901
144909
  if (sandboxMethod === "unshare") {
144902
144910
  return spawn2(
144903
144911
  "unshare",
@@ -145954,7 +145962,7 @@ ${status}`);
145954
145962
  }
145955
145963
  });
145956
145964
 
145957
- // agents/opentoad.ts
145965
+ // agents/opencode.ts
145958
145966
  import { execFileSync as execFileSync4 } from "node:child_process";
145959
145967
  import { mkdirSync as mkdirSync4 } from "node:fs";
145960
145968
  import { join as join10 } from "node:path";
@@ -146322,8 +146330,8 @@ ${stderrContext}`
146322
146330
  };
146323
146331
  }
146324
146332
  }
146325
- var opentoad = agent({
146326
- name: "opentoad",
146333
+ var opencode = agent({
146334
+ name: "opencode",
146327
146335
  install: installOpencodeCli,
146328
146336
  run: async (ctx) => {
146329
146337
  const cliPath = await installOpencodeCli();
@@ -146373,7 +146381,7 @@ var opentoad = agent({
146373
146381
  ${status}`);
146374
146382
  result = await runOpenCode({
146375
146383
  ...runParams,
146376
- args: [...baseArgs, "--continue", buildCommitPrompt("opentoad", status)]
146384
+ args: [...baseArgs, "--continue", buildCommitPrompt("opencode", status)]
146377
146385
  });
146378
146386
  }
146379
146387
  return result;
@@ -146381,7 +146389,7 @@ ${status}`);
146381
146389
  });
146382
146390
 
146383
146391
  // agents/index.ts
146384
- var agents = { claude, opentoad };
146392
+ var agents = { claude, opencode };
146385
146393
 
146386
146394
  // utils/agent.ts
146387
146395
  function hasEnvVar(name) {
@@ -146426,7 +146434,7 @@ function resolveAgent(ctx) {
146426
146434
  } catch {
146427
146435
  }
146428
146436
  }
146429
- return agents.opentoad;
146437
+ return agents.opencode;
146430
146438
  }
146431
146439
 
146432
146440
  // utils/apiKeys.ts
@@ -150914,6 +150922,8 @@ Never use \`sleep\` to wait for commands to complete. Commands run synchronously
150914
150922
 
150915
150923
  When posting comments via ${pullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionable \u2014 do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question."
150916
150924
 
150925
+ When embedding images (e.g. uploaded screenshots) in comments or PR bodies, always use markdown image syntax: \`![description](url)\`. Never paste a naked URL \u2014 it will not render as an image.
150926
+
150917
150927
  ### Progress reporting
150918
150928
 
150919
150929
  **Task list**: at the start of every run, create an internal task list based on the steps in your current mode. Update it as you complete each step. The system automatically renders this list to the progress comment \u2014 you do not need to call \`report_progress\` for this.
@@ -151818,6 +151828,18 @@ ${instructions.user}` : null,
151818
151828
  log.group("View full prompt", () => {
151819
151829
  log.info(instructions.full);
151820
151830
  });
151831
+ if (agentId === "opencode") {
151832
+ const pluginDir = join14(process.cwd(), ".opencode", "plugin");
151833
+ const hasPlugins = existsSync6(pluginDir) && readdirSync(pluginDir).some((f) => /\.[jt]sx?$/.test(f));
151834
+ if (hasPlugins && toolState.dependencyInstallation?.promise) {
151835
+ log.info(
151836
+ "\xBB .opencode/plugin/ detected \u2014 awaiting dependency installation before agent start"
151837
+ );
151838
+ await toolState.dependencyInstallation.promise.catch(() => {
151839
+ });
151840
+ timer.checkpoint("awaitDepsForPlugins");
151841
+ }
151842
+ }
151821
151843
  activityTimeout = createProcessOutputActivityTimeout({
151822
151844
  timeoutMs: DEFAULT_ACTIVITY_TIMEOUT_MS,
151823
151845
  checkIntervalMs: DEFAULT_ACTIVITY_CHECK_INTERVAL_MS
@@ -151912,7 +151934,14 @@ ${instructions.user}` : null,
151912
151934
  killTrackedChildren();
151913
151935
  log.error(errorMessage);
151914
151936
  try {
151915
- await writeJobSummary(toolState);
151937
+ const errorSummary = `### \u274C Pullfrog failed
151938
+
151939
+ \`\`\`
151940
+ ${errorMessage}
151941
+ \`\`\``;
151942
+ const usageSummary = formatUsageSummary(toolState.usageEntries);
151943
+ const parts = [errorSummary, toolState.lastProgressBody, usageSummary].filter(Boolean);
151944
+ await writeSummary(parts.join("\n\n"));
151916
151945
  } catch {
151917
151946
  }
151918
151947
  try {
@@ -153852,7 +153881,7 @@ async function run2() {
153852
153881
  }
153853
153882
 
153854
153883
  // cli.ts
153855
- var VERSION10 = "0.0.200";
153884
+ var VERSION10 = "0.0.201";
153856
153885
  var bin = basename2(process.argv[1] || "");
153857
153886
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
153858
153887
  var rawArgs = process.argv.slice(2);
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const pullfrogMcpName = "pullfrog";
7
7
  /** @see {@link file://./agents/shared.ts} Agent interface that uses this type */
8
- export type AgentId = "claude" | "opentoad";
8
+ export type AgentId = "claude" | "opencode";
9
9
  /**
10
10
  * format a tool name the way each agent's MCP client presents it to the model.
11
11
  * claude code: mcp__pullfrog__select_mode
package/dist/index.js CHANGED
@@ -97475,14 +97475,14 @@ var require_turndown_cjs = __commonJS({
97475
97475
  } else if (node2.nodeType === 1) {
97476
97476
  replacement = replacementForNode.call(self2, node2);
97477
97477
  }
97478
- return join14(output, replacement);
97478
+ return join15(output, replacement);
97479
97479
  }, "");
97480
97480
  }
97481
97481
  function postProcess(output) {
97482
97482
  var self2 = this;
97483
97483
  this.rules.forEach(function(rule) {
97484
97484
  if (typeof rule.append === "function") {
97485
- output = join14(output, rule.append(self2.options));
97485
+ output = join15(output, rule.append(self2.options));
97486
97486
  }
97487
97487
  });
97488
97488
  return output.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, "");
@@ -97494,7 +97494,7 @@ var require_turndown_cjs = __commonJS({
97494
97494
  if (whitespace.leading || whitespace.trailing) content = content.trim();
97495
97495
  return whitespace.leading + rule.replacement(content, node2, this.options) + whitespace.trailing;
97496
97496
  }
97497
- function join14(output, replacement) {
97497
+ function join15(output, replacement) {
97498
97498
  var s1 = trimTrailingNewlines(output);
97499
97499
  var s2 = trimLeadingNewlines(replacement);
97500
97500
  var nls = Math.max(output.length - s1.length, replacement.length - s2.length);
@@ -98925,6 +98925,8 @@ var require_fast_content_type_parse = __commonJS({
98925
98925
 
98926
98926
  // main.ts
98927
98927
  var core6 = __toESM(require_core(), 1);
98928
+ import { existsSync as existsSync6, readdirSync } from "node:fs";
98929
+ import { join as join14 } from "node:path";
98928
98930
 
98929
98931
  // node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/arrays.js
98930
98932
  var liftArray = (data) => Array.isArray(data) ? data : [data];
@@ -141661,7 +141663,7 @@ function formatMcpToolRef(agentId, toolName) {
141661
141663
  switch (agentId) {
141662
141664
  case "claude":
141663
141665
  return `mcp__${pullfrogMcpName}__${toolName}`;
141664
- case "opentoad":
141666
+ case "opencode":
141665
141667
  return `${pullfrogMcpName}_${toolName}`;
141666
141668
  default:
141667
141669
  return agentId;
@@ -141709,7 +141711,7 @@ var import_semver = __toESM(require_semver2(), 1);
141709
141711
  // package.json
141710
141712
  var package_default = {
141711
141713
  name: "pullfrog",
141712
- version: "0.0.200",
141714
+ version: "0.0.201",
141713
141715
  type: "module",
141714
141716
  bin: {
141715
141717
  pullfrog: "dist/cli.mjs",
@@ -144404,7 +144406,7 @@ ${PR_SUMMARY_FORMAT}`
144404
144406
  }
144405
144407
  ];
144406
144408
  }
144407
- var modes = computeModes("opentoad");
144409
+ var modes = computeModes("opencode");
144408
144410
 
144409
144411
  // mcp/selectMode.ts
144410
144412
  var SelectModeParams = type({
@@ -144607,13 +144609,19 @@ function detectSandboxMethod() {
144607
144609
  } catch {
144608
144610
  }
144609
144611
  detectedSandboxMethod = "none";
144610
- log.info("PID namespace isolation not available - falling back to env filtering only");
144612
+ log.info("PID namespace isolation not available");
144611
144613
  return "none";
144612
144614
  }
144613
144615
  var PROC_CLEANUP = "umount /proc 2>/dev/null; umount /proc 2>/dev/null; mount -t proc proc /proc 2>/dev/null;";
144614
144616
  function spawnShell(params) {
144615
144617
  const spawnOpts = { env: params.env, cwd: params.cwd, stdio: params.stdio, detached: true };
144616
144618
  const sandboxMethod = detectSandboxMethod();
144619
+ const ci = process.env.CI === "true";
144620
+ if (ci && sandboxMethod === "none") {
144621
+ throw new Error(
144622
+ "pid namespace isolation is required in CI but unavailable (both unshare and sudo unshare failed)"
144623
+ );
144624
+ }
144617
144625
  if (sandboxMethod === "unshare") {
144618
144626
  return spawn2(
144619
144627
  "unshare",
@@ -145670,7 +145678,7 @@ ${status}`);
145670
145678
  }
145671
145679
  });
145672
145680
 
145673
- // agents/opentoad.ts
145681
+ // agents/opencode.ts
145674
145682
  import { execFileSync as execFileSync4 } from "node:child_process";
145675
145683
  import { mkdirSync as mkdirSync4 } from "node:fs";
145676
145684
  import { join as join10 } from "node:path";
@@ -146038,8 +146046,8 @@ ${stderrContext}`
146038
146046
  };
146039
146047
  }
146040
146048
  }
146041
- var opentoad = agent({
146042
- name: "opentoad",
146049
+ var opencode = agent({
146050
+ name: "opencode",
146043
146051
  install: installOpencodeCli,
146044
146052
  run: async (ctx) => {
146045
146053
  const cliPath = await installOpencodeCli();
@@ -146089,7 +146097,7 @@ var opentoad = agent({
146089
146097
  ${status}`);
146090
146098
  result = await runOpenCode({
146091
146099
  ...runParams,
146092
- args: [...baseArgs, "--continue", buildCommitPrompt("opentoad", status)]
146100
+ args: [...baseArgs, "--continue", buildCommitPrompt("opencode", status)]
146093
146101
  });
146094
146102
  }
146095
146103
  return result;
@@ -146097,7 +146105,7 @@ ${status}`);
146097
146105
  });
146098
146106
 
146099
146107
  // agents/index.ts
146100
- var agents = { claude, opentoad };
146108
+ var agents = { claude, opencode };
146101
146109
 
146102
146110
  // utils/agent.ts
146103
146111
  function hasEnvVar(name) {
@@ -146142,7 +146150,7 @@ function resolveAgent(ctx) {
146142
146150
  } catch {
146143
146151
  }
146144
146152
  }
146145
- return agents.opentoad;
146153
+ return agents.opencode;
146146
146154
  }
146147
146155
 
146148
146156
  // utils/apiKeys.ts
@@ -150630,6 +150638,8 @@ Never use \`sleep\` to wait for commands to complete. Commands run synchronously
150630
150638
 
150631
150639
  When posting comments via ${pullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionable \u2014 do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question."
150632
150640
 
150641
+ When embedding images (e.g. uploaded screenshots) in comments or PR bodies, always use markdown image syntax: \`![description](url)\`. Never paste a naked URL \u2014 it will not render as an image.
150642
+
150633
150643
  ### Progress reporting
150634
150644
 
150635
150645
  **Task list**: at the start of every run, create an internal task list based on the steps in your current mode. Update it as you complete each step. The system automatically renders this list to the progress comment \u2014 you do not need to call \`report_progress\` for this.
@@ -151534,6 +151544,18 @@ ${instructions.user}` : null,
151534
151544
  log.group("View full prompt", () => {
151535
151545
  log.info(instructions.full);
151536
151546
  });
151547
+ if (agentId === "opencode") {
151548
+ const pluginDir = join14(process.cwd(), ".opencode", "plugin");
151549
+ const hasPlugins = existsSync6(pluginDir) && readdirSync(pluginDir).some((f) => /\.[jt]sx?$/.test(f));
151550
+ if (hasPlugins && toolState.dependencyInstallation?.promise) {
151551
+ log.info(
151552
+ "\xBB .opencode/plugin/ detected \u2014 awaiting dependency installation before agent start"
151553
+ );
151554
+ await toolState.dependencyInstallation.promise.catch(() => {
151555
+ });
151556
+ timer.checkpoint("awaitDepsForPlugins");
151557
+ }
151558
+ }
151537
151559
  activityTimeout = createProcessOutputActivityTimeout({
151538
151560
  timeoutMs: DEFAULT_ACTIVITY_TIMEOUT_MS,
151539
151561
  checkIntervalMs: DEFAULT_ACTIVITY_CHECK_INTERVAL_MS
@@ -151628,7 +151650,14 @@ ${instructions.user}` : null,
151628
151650
  killTrackedChildren();
151629
151651
  log.error(errorMessage);
151630
151652
  try {
151631
- await writeJobSummary(toolState);
151653
+ const errorSummary = `### \u274C Pullfrog failed
151654
+
151655
+ \`\`\`
151656
+ ${errorMessage}
151657
+ \`\`\``;
151658
+ const usageSummary = formatUsageSummary(toolState.usageEntries);
151659
+ const parts = [errorSummary, toolState.lastProgressBody, usageSummary].filter(Boolean);
151660
+ await writeSummary(parts.join("\n\n"));
151632
151661
  } catch {
151633
151662
  }
151634
151663
  try {
package/dist/internal.js CHANGED
@@ -319,7 +319,7 @@ function formatMcpToolRef(agentId, toolName) {
319
319
  switch (agentId) {
320
320
  case "claude":
321
321
  return `mcp__${pullfrogMcpName}__${toolName}`;
322
- case "opentoad":
322
+ case "opencode":
323
323
  return `${pullfrogMcpName}_${toolName}`;
324
324
  default:
325
325
  return agentId;
@@ -605,7 +605,7 @@ ${PR_SUMMARY_FORMAT}`
605
605
  }
606
606
  ];
607
607
  }
608
- var modes = computeModes("opentoad");
608
+ var modes = computeModes("opencode");
609
609
 
610
610
  // utils/buildPullfrogFooter.ts
611
611
  var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.0.200",
3
+ "version": "0.0.201",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",
@@ -1 +0,0 @@
1
- export declare const opentoad: import("./shared.ts").Agent;