pullfrog 0.1.56 → 0.1.57

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
@@ -106536,15 +106536,13 @@ function formatMcpToolRef(agentId, toolName) {
106536
106536
  function extractMcpToolRefs(agentId, text) {
106537
106537
  const prefix = formatMcpToolRef(agentId, "");
106538
106538
  const escaped = prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
106539
- return [...text.matchAll(new RegExp(`${escaped}([a-z0-9_]+)`, "g"))].map((match3) => match3[1]);
106539
+ return [...text.matchAll(new RegExp(`(?<![A-Za-z0-9_])${escaped}([a-z0-9_]+)`, "g"))].map(
106540
+ (match3) => match3[1]
106541
+ );
106540
106542
  }
106541
- function assertPromptToolRefs(params) {
106543
+ function findDanglingPromptToolRefs(params) {
106542
106544
  const registered = new Set(params.toolNames);
106543
- const dangling = [...new Set(extractMcpToolRefs(params.agentId, params.prompt))].filter((name) => !registered.has(name)).sort();
106544
- if (dangling.length === 0) return;
106545
- throw new Error(
106546
- `prompt advertises ${dangling.length} tool(s) the MCP server did not register: ${dangling.join(", ")}. registered: ${[...registered].sort().join(", ")}`
106547
- );
106545
+ return [...new Set(extractMcpToolRefs(params.agentId, params.prompt))].filter((name) => !registered.has(name)).sort();
106548
106546
  }
106549
106547
  function hasSimilarIssues(params) {
106550
106548
  return params.repoIntelligence && !!params.event.issue_number && !params.event.is_pr;
@@ -107319,7 +107317,7 @@ var import_semver = __toESM(require_semver2(), 1);
107319
107317
  // package.json
107320
107318
  var package_default = {
107321
107319
  name: "pullfrog",
107322
- version: "0.1.56",
107320
+ version: "0.1.57",
107323
107321
  type: "module",
107324
107322
  bin: {
107325
107323
  pullfrog: "dist/cli.mjs",
@@ -197698,11 +197696,16 @@ async function main() {
197698
197696
  xrepoLearningsFilePath: toolState.xrepoLearningsFilePath ?? null,
197699
197697
  xrepoLearningsHeadings: runContext.repoSettings.xrepoLearningsHeadings
197700
197698
  });
197701
- assertPromptToolRefs({
197699
+ const danglingToolRefs = findDanglingPromptToolRefs({
197702
197700
  agentId,
197703
197701
  prompt: instructions.full,
197704
197702
  toolNames: mcpHttpServer.toolNames
197705
197703
  });
197704
+ if (danglingToolRefs.length > 0) {
197705
+ log2.warning(
197706
+ `\xBB prompt advertises ${danglingToolRefs.length} tool(s) the MCP server did not register: ${danglingToolRefs.join(", ")}`
197707
+ );
197708
+ }
197706
197709
  const logParts = [
197707
197710
  instructions.eventInstructions ? `EVENT-LEVEL INSTRUCTIONS:
197708
197711
  ${instructions.eventInstructions}` : null,
@@ -198893,7 +198896,7 @@ async function runCli4(input) {
198893
198896
  }
198894
198897
 
198895
198898
  // cli.ts
198896
- var VERSION10 = "0.1.56";
198899
+ var VERSION10 = "0.1.57";
198897
198900
  var bin = basename2(process.argv[1] || "");
198898
198901
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
198899
198902
  var rawArgs = process.argv.slice(2);
@@ -25,7 +25,7 @@ export declare function formatMcpToolRef(agentId: AgentId, toolName: string): st
25
25
  */
26
26
  export declare function extractMcpToolRefs(agentId: AgentId, text: string): string[];
27
27
  /**
28
- * Fail the run if the assembled prompt advertises a tool the MCP server did not
28
+ * Report when the assembled prompt advertises a tool the MCP server did not
29
29
  * actually register.
30
30
  *
31
31
  * Prompt text and tool registration are decided in different files off
@@ -35,12 +35,19 @@ export declare function extractMcpToolRefs(agentId: AgentId, text: string): stri
35
35
  * never learns about one that is. `toolNames` comes straight back from
36
36
  * `startMcpHttpServer`, i.e. the list the server registered rather than a
37
37
  * second derivation of it, so there is nothing to keep in sync.
38
+ *
39
+ * WARNS rather than throws, and that is deliberate. The prompt embeds
40
+ * customer-authored text — repo instructions, an issue or PR body — so a
41
+ * customer who merely WRITES a prefixed token controls this predicate. Throwing
42
+ * handed them a way to fail every run on their repo, which is what happened to
43
+ * `arcainc/arca` on 0.1.56. A drift check that aborts a customer run is the
44
+ * same mistake 0.1.54 made; the drift still has to be visible, so it is logged.
38
45
  */
39
- export declare function assertPromptToolRefs(params: {
46
+ export declare function findDanglingPromptToolRefs(params: {
40
47
  agentId: AgentId;
41
48
  prompt: string;
42
49
  toolNames: string[];
43
- }): void;
50
+ }): string[];
44
51
  export type { EffortPosition } from "./effort.ts";
45
52
  export { DEFAULT_EFFORT_POSITION, EFFORT_ALIASES, isEffortPosition, offeredRungs, parseEffortPosition, resolveRung, rungLabel, rungPosition, } from "./effort.ts";
46
53
  export type { AutoTier, ModelAlias, ModelProvider, ProviderConfig } from "./models.ts";
package/dist/index.js CHANGED
@@ -104369,15 +104369,13 @@ function formatMcpToolRef(agentId, toolName) {
104369
104369
  function extractMcpToolRefs(agentId, text) {
104370
104370
  const prefix = formatMcpToolRef(agentId, "");
104371
104371
  const escaped = prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
104372
- return [...text.matchAll(new RegExp(`${escaped}([a-z0-9_]+)`, "g"))].map((match3) => match3[1]);
104372
+ return [...text.matchAll(new RegExp(`(?<![A-Za-z0-9_])${escaped}([a-z0-9_]+)`, "g"))].map(
104373
+ (match3) => match3[1]
104374
+ );
104373
104375
  }
104374
- function assertPromptToolRefs(params) {
104376
+ function findDanglingPromptToolRefs(params) {
104375
104377
  const registered = new Set(params.toolNames);
104376
- const dangling = [...new Set(extractMcpToolRefs(params.agentId, params.prompt))].filter((name) => !registered.has(name)).sort();
104377
- if (dangling.length === 0) return;
104378
- throw new Error(
104379
- `prompt advertises ${dangling.length} tool(s) the MCP server did not register: ${dangling.join(", ")}. registered: ${[...registered].sort().join(", ")}`
104380
- );
104378
+ return [...new Set(extractMcpToolRefs(params.agentId, params.prompt))].filter((name) => !registered.has(name)).sort();
104381
104379
  }
104382
104380
  function hasSimilarIssues(params) {
104383
104381
  return params.repoIntelligence && !!params.event.issue_number && !params.event.is_pr;
@@ -105152,7 +105150,7 @@ var import_semver = __toESM(require_semver2(), 1);
105152
105150
  // package.json
105153
105151
  var package_default = {
105154
105152
  name: "pullfrog",
105155
- version: "0.1.56",
105153
+ version: "0.1.57",
105156
105154
  type: "module",
105157
105155
  bin: {
105158
105156
  pullfrog: "dist/cli.mjs",
@@ -195574,11 +195572,16 @@ async function main() {
195574
195572
  xrepoLearningsFilePath: toolState.xrepoLearningsFilePath ?? null,
195575
195573
  xrepoLearningsHeadings: runContext.repoSettings.xrepoLearningsHeadings
195576
195574
  });
195577
- assertPromptToolRefs({
195575
+ const danglingToolRefs = findDanglingPromptToolRefs({
195578
195576
  agentId,
195579
195577
  prompt: instructions.full,
195580
195578
  toolNames: mcpHttpServer.toolNames
195581
195579
  });
195580
+ if (danglingToolRefs.length > 0) {
195581
+ log.warning(
195582
+ `\xBB prompt advertises ${danglingToolRefs.length} tool(s) the MCP server did not register: ${danglingToolRefs.join(", ")}`
195583
+ );
195584
+ }
195582
195585
  const logParts = [
195583
195586
  instructions.eventInstructions ? `EVENT-LEVEL INSTRUCTIONS:
195584
195587
  ${instructions.eventInstructions}` : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",