pullfrog 0.1.55 → 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.
@@ -13,6 +13,41 @@ export type AgentId = "claude" | "opencode";
13
13
  * opencode: pullfrog_select_mode
14
14
  */
15
15
  export declare function formatMcpToolRef(agentId: AgentId, toolName: string): string;
16
+ /**
17
+ * Every MCP tool name `text` references, parsed with the same naming scheme
18
+ * `formatMcpToolRef` emits. Deliberately lives next to that function so the
19
+ * producer and the parser cannot drift apart.
20
+ *
21
+ * The convention this assumes — and enforces, via `assertPromptToolRefs` — is
22
+ * that a prefixed token appearing anywhere in prompt text IS a tool reference.
23
+ * Prose that merely looks like one would read as a tool reference to the model
24
+ * too, so treating it as a mistake is correct.
25
+ */
26
+ export declare function extractMcpToolRefs(agentId: AgentId, text: string): string[];
27
+ /**
28
+ * Report when the assembled prompt advertises a tool the MCP server did not
29
+ * actually register.
30
+ *
31
+ * Prompt text and tool registration are decided in different files off
32
+ * overlapping conditions (`signedCommits`, `repoIntelligence`, `shell`, the
33
+ * `gh` mirror threshold, …), so they can silently disagree — and the failure
34
+ * mode is invisible: the agent burns turns calling a tool that isn't there, or
35
+ * never learns about one that is. `toolNames` comes straight back from
36
+ * `startMcpHttpServer`, i.e. the list the server registered rather than a
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.
45
+ */
46
+ export declare function findDanglingPromptToolRefs(params: {
47
+ agentId: AgentId;
48
+ prompt: string;
49
+ toolNames: string[];
50
+ }): string[];
16
51
  export type { EffortPosition } from "./effort.ts";
17
52
  export { DEFAULT_EFFORT_POSITION, EFFORT_ALIASES, isEffortPosition, offeredRungs, parseEffortPosition, resolveRung, rungLabel, rungPosition, } from "./effort.ts";
18
53
  export type { AutoTier, ModelAlias, ModelProvider, ProviderConfig } from "./models.ts";