pullfrog 0.1.8 → 0.1.10
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/agents/opencodeShared.d.ts +40 -0
- package/dist/agents/postRun.d.ts +11 -3
- package/dist/agents/shared.d.ts +7 -0
- package/dist/cli.mjs +4275 -3256
- package/dist/external.d.ts +1 -1
- package/dist/index.js +1706 -1219
- package/dist/internal/index.d.ts +2 -1
- package/dist/internal.js +245 -85
- package/dist/models.d.ts +10 -0
- package/dist/modes.d.ts +1 -1
- package/dist/toolState.d.ts +4 -0
- package/dist/utils/activity.d.ts +31 -1
- package/dist/utils/apiKeys.d.ts +5 -1
- package/dist/utils/billingErrors.d.ts +85 -0
- package/dist/utils/buildPullfrogFooter.d.ts +7 -0
- package/dist/utils/byokFallback.d.ts +50 -0
- package/dist/utils/codexHome.d.ts +23 -0
- package/dist/utils/errorReport.d.ts +9 -0
- package/dist/utils/learnings.d.ts +20 -0
- package/dist/utils/learningsTruncate.d.ts +25 -0
- package/dist/utils/lifecycle.d.ts +23 -3
- package/dist/utils/overrides.d.ts +40 -0
- package/dist/utils/payload.d.ts +7 -0
- package/dist/utils/prSummary.d.ts +21 -0
- package/dist/utils/proxy.d.ts +47 -0
- package/dist/utils/runContext.d.ts +0 -9
- package/dist/utils/runErrorRenderer.d.ts +41 -0
- package/dist/utils/runLifecycle.d.ts +75 -0
- package/dist/utils/runStartupLog.d.ts +15 -0
- package/dist/utils/subprocess.d.ts +1 -0
- package/package.json +3 -2
- /package/dist/agents/{opencode.d.ts → opencode_v2.d.ts} +0 -0
|
@@ -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;
|
package/dist/agents/postRun.d.ts
CHANGED
|
@@ -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
|
|
76
|
-
*
|
|
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
|
/**
|
package/dist/agents/shared.d.ts
CHANGED
|
@@ -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;
|