pullfrog 0.1.7 → 0.1.9

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.
@@ -0,0 +1,40 @@
1
+ export type OpenCodeConfig = {
2
+ mcp?: Record<string, unknown>;
3
+ permission?: Record<string, unknown>;
4
+ provider?: Record<string, unknown>;
5
+ agent?: Record<string, unknown>;
6
+ experimental?: Record<string, unknown>;
7
+ model?: string;
8
+ enabled_providers?: string[];
9
+ [key: string]: unknown;
10
+ };
11
+ /**
12
+ * Build the `provider.google.models[id].options` map that pins every direct-Google
13
+ * Gemini alias to `thinkingLevel: "high"`. Sourced from the model registry so
14
+ * adding/renaming a Google alias in `action/models.ts` flows through automatically.
15
+ */
16
+ export declare function geminiHighThinkingOverrides(): Record<string, {
17
+ options: object;
18
+ }>;
19
+ /**
20
+ * Read-only `reviewfrog` subagent for lens-based review. Non-mutative +
21
+ * non-recursive — enforced by the system prompt in reviewer.ts.
22
+ *
23
+ * Per-subagent `model:` override is driven by the registry in
24
+ * `action/models.ts` via each alias's `subagentModel` field. Currently wired:
25
+ * Anthropic opus → sonnet, OpenAI gpt-pro → gpt and gpt → gpt-5.4, Google
26
+ * gemini-pro → gemini-flash. Other providers inherit (no override).
27
+ */
28
+ export declare function buildReviewerAgentConfig(orchestratorModel: string | undefined): Record<string, unknown>;
29
+ /**
30
+ * Install the opencode-ai npm tarball and return the path to the executable.
31
+ *
32
+ * The bin path differs by version: v1.4.x and earlier shipped `bin/opencode`;
33
+ * v1.14+ renames the platform-specific binary to `bin/opencode.exe` for every
34
+ * OS via the postinstall script. Callers pass the binPath that matches their
35
+ * pinned version so a v1↔v2 swap can't silently install the wrong file.
36
+ */
37
+ export declare function installOpencodeCli(params: {
38
+ binPath: string;
39
+ }): Promise<string>;
40
+ export declare function autoSelectModel(cliPath: string): string | undefined;
@@ -54,6 +54,7 @@ export declare function collectPostRunIssues(ctx: AgentRunContext, options?: {
54
54
  skipSummaryStale?: boolean;
55
55
  }): Promise<PostRunIssues>;
56
56
  export declare function buildPostRunPrompt(issues: PostRunIssues): string;
57
+ export declare function shouldRunReflection(mode: string | undefined): boolean;
57
58
  /**
58
59
  * prompt for a dedicated post-run reflection turn nudging the agent to edit
59
60
  * the rolling learnings file if it discovered anything worth persisting.
@@ -72,11 +73,18 @@ export declare function buildPostRunPrompt(issues: PostRunIssues): string;
72
73
  * agent has been writing (issue #619 in pullfrog/app). recurring failure
73
74
  * modes the framing pushes back on:
74
75
  * - massive multi-paragraph "bullets" that are really mini-articles
75
- * - PR-/review-/commit-/date-anchored facts that decay within weeks
76
- * - rediscovery of pullfrog-tool quirks that belong in tool descriptions,
77
- * not per-repo learnings
76
+ * - facts anchored to moving repo state (PR / review / commit / branch
77
+ * refs, dates, version pins, line numbers) that decay within weeks
78
78
  * - sections growing into giant flat lists with no internal structure,
79
79
  * forcing future runs to read kilobytes to find one fact
80
+ *
81
+ * single litmus delivered in the prompt: "would a future run on this repo
82
+ * do its work better because this bullet exists?". tool-quirk workarounds
83
+ * are explicitly allowed when the agent burned calls discovering the
84
+ * quirk this run — recording the workaround prevents next run from
85
+ * repeating the waste. tradeoff: the same quirk gets duplicated across
86
+ * repos, so when a quirk is fixed upstream in tool descriptions the
87
+ * per-repo bullets go stale and we have no batch-invalidation path.
80
88
  */
81
89
  export declare function buildLearningsReflectionPrompt(filePath: string): string;
82
90
  /**
@@ -113,6 +113,13 @@ export interface AgentRunContext {
113
113
  */
114
114
  onActivityTimeout?: (() => void) | undefined;
115
115
  onToolUse?: ((event: AgentToolUseEvent) => void) | undefined;
116
+ /**
117
+ * Pullfrog API JWT scoped to this run. agents only need this when they
118
+ * have to write state back to Pullfrog mid-run (today: opencode.ts uses
119
+ * it to seed the post-hook's writeback envelope for Codex auth refresh).
120
+ * empty string when the run wasn't context-resolved (e.g. local dry-runs).
121
+ */
122
+ apiToken: string;
116
123
  }
117
124
  export interface Agent {
118
125
  name: AgentId;