pullfrog 0.0.196 → 0.0.198
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/claude.d.ts +1 -0
- package/dist/agents/index.d.ts +6 -0
- package/dist/agents/opentoad.d.ts +1 -0
- package/dist/agents/shared.d.ts +46 -0
- package/dist/cli.mjs +6 -9
- package/dist/external.d.ts +213 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +151703 -0
- package/dist/internal/index.d.ts +12 -0
- package/dist/internal.js +681 -0
- package/dist/lifecycle.d.ts +2 -0
- package/dist/main.d.ts +8 -0
- package/dist/mcp/arkConfig.d.ts +1 -0
- package/dist/mcp/checkSuite.d.ts +9 -0
- package/dist/mcp/checkout.d.ts +63 -0
- package/dist/mcp/comment.d.ts +87 -0
- package/dist/mcp/commitInfo.d.ts +9 -0
- package/dist/mcp/dependencies.d.ts +3 -0
- package/dist/mcp/git.d.ts +38 -0
- package/dist/mcp/issue.d.ts +18 -0
- package/dist/mcp/issueComments.d.ts +9 -0
- package/dist/mcp/issueEvents.d.ts +9 -0
- package/dist/mcp/issueInfo.d.ts +9 -0
- package/dist/mcp/labels.d.ts +12 -0
- package/dist/mcp/learnings.d.ts +6 -0
- package/dist/mcp/output.d.ts +12 -0
- package/dist/mcp/pr.d.ts +29 -0
- package/dist/mcp/prInfo.d.ts +9 -0
- package/dist/mcp/review.d.ts +47 -0
- package/dist/mcp/reviewComments.d.ts +135 -0
- package/dist/mcp/selectMode.d.ts +24 -0
- package/dist/mcp/server.d.ts +93 -0
- package/dist/mcp/shared.d.ts +21 -0
- package/dist/mcp/shell.d.ts +32 -0
- package/dist/mcp/upload.d.ts +6 -0
- package/dist/models.d.ts +69 -0
- package/dist/modes.d.ts +9 -0
- package/dist/prep/index.d.ts +7 -0
- package/dist/prep/installNodeDependencies.d.ts +2 -0
- package/dist/prep/installPythonDependencies.d.ts +2 -0
- package/dist/prep/types.d.ts +29 -0
- package/dist/utils/activity.d.ts +21 -0
- package/dist/utils/agent.d.ts +15 -0
- package/dist/utils/apiFetch.d.ts +19 -0
- package/dist/utils/apiKeys.d.ts +10 -0
- package/dist/utils/apiUrl.d.ts +9 -0
- package/dist/utils/body.d.ts +16 -0
- package/dist/utils/browser.d.ts +21 -0
- package/dist/utils/buildPullfrogFooter.d.ts +30 -0
- package/dist/utils/cli.d.ts +10 -0
- package/dist/utils/errorReport.d.ts +8 -0
- package/dist/utils/exitHandler.d.ts +8 -0
- package/dist/utils/fixDoubleEscapedString.d.ts +1 -0
- package/dist/utils/gitAuth.d.ts +47 -0
- package/dist/utils/gitAuthServer.d.ts +18 -0
- package/dist/utils/github.d.ts +78 -0
- package/dist/utils/globals.d.ts +3 -0
- package/dist/utils/install.d.ts +60 -0
- package/dist/utils/instructions.d.ts +22 -0
- package/dist/utils/lifecycle.d.ts +9 -0
- package/dist/utils/log.d.ts +92 -0
- package/dist/utils/normalizeEnv.d.ts +10 -0
- package/dist/utils/payload.d.ts +41 -0
- package/dist/utils/providerErrors.d.ts +1 -0
- package/dist/utils/rangeDiff.d.ts +51 -0
- package/dist/utils/retry.d.ts +7 -0
- package/dist/utils/reviewCleanup.d.ts +14 -0
- package/dist/utils/run.d.ts +9 -0
- package/dist/utils/runContext.d.ts +36 -0
- package/dist/utils/runContextData.d.ts +24 -0
- package/dist/utils/secrets.d.ts +17 -0
- package/dist/utils/setup.d.ts +33 -0
- package/dist/utils/shell.d.ts +32 -0
- package/dist/utils/skills.d.ts +6 -0
- package/dist/utils/subprocess.d.ts +32 -0
- package/dist/utils/time.d.ts +14 -0
- package/dist/utils/timer.d.ts +12 -0
- package/dist/utils/todoTracking.d.ts +14 -0
- package/dist/utils/token.d.ts +40 -0
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/versioning.d.ts +7 -0
- package/dist/utils/workflow.d.ts +14 -0
- package/package.json +5 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const claude: import("./shared.ts").Agent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const opentoad: import("./shared.ts").Agent;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AgentId } from "../external.ts";
|
|
2
|
+
import type { ResolvedInstructions } from "../utils/instructions.ts";
|
|
3
|
+
import type { ResolvedPayload } from "../utils/payload.ts";
|
|
4
|
+
import type { TodoTracker } from "../utils/todoTracking.ts";
|
|
5
|
+
export declare const MAX_STDERR_LINES = 20;
|
|
6
|
+
export declare const MAX_COMMIT_RETRIES = 3;
|
|
7
|
+
export declare function getGitStatus(): string;
|
|
8
|
+
export declare function buildCommitPrompt(_agentId: AgentId, status: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* token/cost usage data from a single agent run
|
|
11
|
+
*/
|
|
12
|
+
export interface AgentUsage {
|
|
13
|
+
agent: string;
|
|
14
|
+
inputTokens: number;
|
|
15
|
+
outputTokens: number;
|
|
16
|
+
cacheReadTokens?: number | undefined;
|
|
17
|
+
cacheWriteTokens?: number | undefined;
|
|
18
|
+
costUsd?: number | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Result returned by agent execution
|
|
22
|
+
*/
|
|
23
|
+
export interface AgentResult {
|
|
24
|
+
success: boolean;
|
|
25
|
+
output?: string | undefined;
|
|
26
|
+
error?: string | undefined;
|
|
27
|
+
metadata?: Record<string, unknown>;
|
|
28
|
+
usage?: AgentUsage | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Minimal context passed to agent.run()
|
|
32
|
+
*/
|
|
33
|
+
export interface AgentRunContext {
|
|
34
|
+
payload: ResolvedPayload;
|
|
35
|
+
resolvedModel?: string | undefined;
|
|
36
|
+
mcpServerUrl: string;
|
|
37
|
+
tmpdir: string;
|
|
38
|
+
instructions: ResolvedInstructions;
|
|
39
|
+
todoTracker?: TodoTracker | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface Agent {
|
|
42
|
+
name: AgentId;
|
|
43
|
+
install: (token?: string) => Promise<string>;
|
|
44
|
+
run: (ctx: AgentRunContext) => Promise<AgentResult>;
|
|
45
|
+
}
|
|
46
|
+
export declare const agent: (input: Agent) => Agent;
|
package/dist/cli.mjs
CHANGED
|
@@ -144992,7 +144992,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
144992
144992
|
// package.json
|
|
144993
144993
|
var package_default = {
|
|
144994
144994
|
name: "pullfrog",
|
|
144995
|
-
version: "0.0.
|
|
144995
|
+
version: "0.0.198",
|
|
144996
144996
|
type: "module",
|
|
144997
144997
|
bin: {
|
|
144998
144998
|
pullfrog: "dist/cli.mjs",
|
|
@@ -145005,7 +145005,7 @@ var package_default = {
|
|
|
145005
145005
|
scripts: {
|
|
145006
145006
|
test: "vitest",
|
|
145007
145007
|
typecheck: "tsc --noEmit",
|
|
145008
|
-
build: "node esbuild.config.js",
|
|
145008
|
+
build: "node esbuild.config.js && tsc -p tsconfig.exports.json",
|
|
145009
145009
|
"check:entrypoints": "node scripts/check-entrypoint-imports.ts",
|
|
145010
145010
|
play: "node play.ts",
|
|
145011
145011
|
runtest: "node test/run.ts",
|
|
@@ -145066,22 +145066,19 @@ var package_default = {
|
|
|
145066
145066
|
url: "https://github.com/pullfrog/pullfrog/issues"
|
|
145067
145067
|
},
|
|
145068
145068
|
homepage: "https://github.com/pullfrog/pullfrog#readme",
|
|
145069
|
-
zshy: {
|
|
145070
|
-
exports: "./index.ts"
|
|
145071
|
-
},
|
|
145072
145069
|
main: "./dist/index.js",
|
|
145073
145070
|
module: "./dist/index.js",
|
|
145074
145071
|
types: "./dist/index.d.ts",
|
|
145075
145072
|
exports: {
|
|
145076
145073
|
".": {
|
|
145077
145074
|
"@pullfrog/source": "./index.ts",
|
|
145078
|
-
types: "./dist/index.d.
|
|
145075
|
+
types: "./dist/index.d.ts",
|
|
145079
145076
|
import: "./dist/index.js",
|
|
145080
|
-
|
|
145077
|
+
default: "./dist/index.js"
|
|
145081
145078
|
},
|
|
145082
145079
|
"./internal": {
|
|
145083
145080
|
"@pullfrog/source": "./internal/index.ts",
|
|
145084
|
-
types: "./dist/internal.d.
|
|
145081
|
+
types: "./dist/internal/index.d.ts",
|
|
145085
145082
|
import: "./dist/internal.js",
|
|
145086
145083
|
default: "./dist/internal.js"
|
|
145087
145084
|
},
|
|
@@ -153828,7 +153825,7 @@ async function run2() {
|
|
|
153828
153825
|
}
|
|
153829
153826
|
|
|
153830
153827
|
// cli.ts
|
|
153831
|
-
var VERSION10 = "0.0.
|
|
153828
|
+
var VERSION10 = "0.0.198";
|
|
153832
153829
|
var bin = basename2(process.argv[1] || "");
|
|
153833
153830
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
153834
153831
|
var rawArgs = process.argv.slice(2);
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ LIMITED IMPORTS - this file is imported by Next.js and must avoid pulling in backend code.
|
|
3
|
+
* All shared constants, types, and data used by both the Next.js app and the action runtime live here.
|
|
4
|
+
* Other files in action/ re-export from this file for backward compatibility.
|
|
5
|
+
*/
|
|
6
|
+
export declare const pullfrogMcpName = "pullfrog";
|
|
7
|
+
/** @see {@link file://./agents/shared.ts} Agent interface that uses this type */
|
|
8
|
+
export type AgentId = "claude" | "opentoad";
|
|
9
|
+
/**
|
|
10
|
+
* format a tool name the way each agent's MCP client presents it to the model.
|
|
11
|
+
* claude code: mcp__pullfrog__select_mode
|
|
12
|
+
* opencode: pullfrog_select_mode
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatMcpToolRef(agentId: AgentId, toolName: string): string;
|
|
15
|
+
export type { ModelAlias, ModelProvider, ProviderConfig } from "./models.ts";
|
|
16
|
+
export { getModelEnvVars, getModelProvider, getProviderDisplayName, modelAliases, parseModel, providers, resolveCliModel, resolveModelSlug, } from "./models.ts";
|
|
17
|
+
export type ToolPermission = "disabled" | "enabled";
|
|
18
|
+
export type ShellPermission = "disabled" | "restricted" | "enabled";
|
|
19
|
+
export type PushPermission = "disabled" | "restricted" | "enabled";
|
|
20
|
+
export type WorkflowPermissionValue = "read" | "write" | "none";
|
|
21
|
+
export type WorkflowIdTokenPermissionValue = "write" | "none";
|
|
22
|
+
export interface WorkflowPermissions {
|
|
23
|
+
actions?: WorkflowPermissionValue;
|
|
24
|
+
attestations?: WorkflowPermissionValue;
|
|
25
|
+
checks?: WorkflowPermissionValue;
|
|
26
|
+
contents?: WorkflowPermissionValue;
|
|
27
|
+
deployments?: WorkflowPermissionValue;
|
|
28
|
+
discussions?: WorkflowPermissionValue;
|
|
29
|
+
"id-token"?: WorkflowIdTokenPermissionValue;
|
|
30
|
+
issues?: WorkflowPermissionValue;
|
|
31
|
+
models?: WorkflowPermissionValue;
|
|
32
|
+
packages?: WorkflowPermissionValue;
|
|
33
|
+
pages?: WorkflowPermissionValue;
|
|
34
|
+
"pull-requests"?: WorkflowPermissionValue;
|
|
35
|
+
"repository-projects"?: WorkflowPermissionValue;
|
|
36
|
+
"security-events"?: WorkflowPermissionValue;
|
|
37
|
+
statuses?: WorkflowPermissionValue;
|
|
38
|
+
}
|
|
39
|
+
export type AuthorPermission = "admin" | "maintain" | "write" | "triage" | "read" | "none";
|
|
40
|
+
interface BasePayloadEvent {
|
|
41
|
+
issue_number?: number;
|
|
42
|
+
is_pr?: boolean;
|
|
43
|
+
branch?: string;
|
|
44
|
+
/** title of the issue/PR (or contextual title for comments) */
|
|
45
|
+
title?: string;
|
|
46
|
+
/** primary content for this trigger (issue body, PR body, comment body, review body, etc.) */
|
|
47
|
+
body?: string | null;
|
|
48
|
+
comment_id?: number;
|
|
49
|
+
review_id?: number;
|
|
50
|
+
review_state?: string;
|
|
51
|
+
thread?: any;
|
|
52
|
+
pull_request?: any;
|
|
53
|
+
check_suite?: {
|
|
54
|
+
id: number;
|
|
55
|
+
head_sha: string;
|
|
56
|
+
head_branch: string | null;
|
|
57
|
+
status: string | null;
|
|
58
|
+
conclusion: string | null;
|
|
59
|
+
url: string;
|
|
60
|
+
};
|
|
61
|
+
comment_ids?: number[] | "all";
|
|
62
|
+
/** permission level of the user who triggered this event */
|
|
63
|
+
authorPermission?: AuthorPermission;
|
|
64
|
+
/** when true, runs silently without progress comments (e.g., auto-labeling) */
|
|
65
|
+
silent?: boolean;
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
}
|
|
68
|
+
interface PullRequestOpenedEvent extends BasePayloadEvent {
|
|
69
|
+
trigger: "pull_request_opened";
|
|
70
|
+
issue_number: number;
|
|
71
|
+
is_pr: true;
|
|
72
|
+
title: string;
|
|
73
|
+
body: string | null;
|
|
74
|
+
branch: string;
|
|
75
|
+
}
|
|
76
|
+
interface PullRequestReadyForReviewEvent extends BasePayloadEvent {
|
|
77
|
+
trigger: "pull_request_ready_for_review";
|
|
78
|
+
issue_number: number;
|
|
79
|
+
is_pr: true;
|
|
80
|
+
title: string;
|
|
81
|
+
body: string | null;
|
|
82
|
+
branch: string;
|
|
83
|
+
}
|
|
84
|
+
interface PullRequestReviewRequestedEvent extends BasePayloadEvent {
|
|
85
|
+
trigger: "pull_request_review_requested";
|
|
86
|
+
issue_number: number;
|
|
87
|
+
is_pr: true;
|
|
88
|
+
title: string;
|
|
89
|
+
body: string | null;
|
|
90
|
+
branch: string;
|
|
91
|
+
}
|
|
92
|
+
interface PullRequestReviewSubmittedEvent extends BasePayloadEvent {
|
|
93
|
+
trigger: "pull_request_review_submitted";
|
|
94
|
+
issue_number: number;
|
|
95
|
+
is_pr: true;
|
|
96
|
+
review_id: number;
|
|
97
|
+
/** review body is the primary content */
|
|
98
|
+
body: string | null;
|
|
99
|
+
review_state: string;
|
|
100
|
+
branch: string;
|
|
101
|
+
}
|
|
102
|
+
interface PullRequestReviewCommentCreatedEvent extends BasePayloadEvent {
|
|
103
|
+
trigger: "pull_request_review_comment_created";
|
|
104
|
+
issue_number: number;
|
|
105
|
+
is_pr: true;
|
|
106
|
+
title: string;
|
|
107
|
+
comment_id: number;
|
|
108
|
+
/** comment body is the primary content (null if already in prompt) */
|
|
109
|
+
body: string | null;
|
|
110
|
+
thread?: any;
|
|
111
|
+
branch: string;
|
|
112
|
+
}
|
|
113
|
+
interface IssuesOpenedEvent extends BasePayloadEvent {
|
|
114
|
+
trigger: "issues_opened";
|
|
115
|
+
issue_number: number;
|
|
116
|
+
title: string;
|
|
117
|
+
body: string | null;
|
|
118
|
+
}
|
|
119
|
+
interface IssuesAssignedEvent extends BasePayloadEvent {
|
|
120
|
+
trigger: "issues_assigned";
|
|
121
|
+
issue_number: number;
|
|
122
|
+
title: string;
|
|
123
|
+
body: string | null;
|
|
124
|
+
}
|
|
125
|
+
interface IssuesLabeledEvent extends BasePayloadEvent {
|
|
126
|
+
trigger: "issues_labeled";
|
|
127
|
+
issue_number: number;
|
|
128
|
+
title: string;
|
|
129
|
+
body: string | null;
|
|
130
|
+
}
|
|
131
|
+
interface IssueCommentCreatedEvent extends BasePayloadEvent {
|
|
132
|
+
trigger: "issue_comment_created";
|
|
133
|
+
comment_id: number;
|
|
134
|
+
/** distinguishes this from PR review comments (which use pull_request_review_comment_created) */
|
|
135
|
+
comment_type: "issue";
|
|
136
|
+
/** comment body is the primary content (null if already in prompt) */
|
|
137
|
+
body: string | null;
|
|
138
|
+
issue_number: number;
|
|
139
|
+
is_pr?: true;
|
|
140
|
+
branch?: string;
|
|
141
|
+
title?: string;
|
|
142
|
+
}
|
|
143
|
+
interface CheckSuiteCompletedEvent extends BasePayloadEvent {
|
|
144
|
+
trigger: "check_suite_completed";
|
|
145
|
+
issue_number: number;
|
|
146
|
+
is_pr: true;
|
|
147
|
+
title: string;
|
|
148
|
+
body: string | null;
|
|
149
|
+
pull_request: any;
|
|
150
|
+
branch: string;
|
|
151
|
+
check_suite: {
|
|
152
|
+
id: number;
|
|
153
|
+
head_sha: string;
|
|
154
|
+
head_branch: string | null;
|
|
155
|
+
status: string | null;
|
|
156
|
+
conclusion: string | null;
|
|
157
|
+
url: string;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
interface WorkflowDispatchEvent extends BasePayloadEvent {
|
|
161
|
+
trigger: "workflow_dispatch";
|
|
162
|
+
}
|
|
163
|
+
interface FixReviewEvent extends BasePayloadEvent {
|
|
164
|
+
trigger: "fix_review";
|
|
165
|
+
issue_number: number;
|
|
166
|
+
is_pr: true;
|
|
167
|
+
review_id: number;
|
|
168
|
+
/** when true, only address comments the triggerer approved with 👍 (vs all comments) */
|
|
169
|
+
approved_only?: boolean | undefined;
|
|
170
|
+
}
|
|
171
|
+
interface ImplementPlanEvent extends BasePayloadEvent {
|
|
172
|
+
trigger: "implement_plan";
|
|
173
|
+
issue_number: number;
|
|
174
|
+
plan_comment_id: number;
|
|
175
|
+
/** plan content is the primary content (null if already in prompt) */
|
|
176
|
+
body: string | null;
|
|
177
|
+
}
|
|
178
|
+
interface PullRequestSynchronizeEvent extends BasePayloadEvent {
|
|
179
|
+
trigger: "pull_request_synchronize";
|
|
180
|
+
issue_number: number;
|
|
181
|
+
is_pr: true;
|
|
182
|
+
title: string;
|
|
183
|
+
body: string | null;
|
|
184
|
+
branch: string;
|
|
185
|
+
/** SHA before the push -- used to compute incremental range-diff between PR versions */
|
|
186
|
+
before_sha: string;
|
|
187
|
+
}
|
|
188
|
+
interface UnknownEvent extends BasePayloadEvent {
|
|
189
|
+
trigger: "unknown";
|
|
190
|
+
}
|
|
191
|
+
export type PayloadEvent = PullRequestOpenedEvent | PullRequestReadyForReviewEvent | PullRequestSynchronizeEvent | PullRequestReviewRequestedEvent | PullRequestReviewSubmittedEvent | PullRequestReviewCommentCreatedEvent | IssuesOpenedEvent | IssuesAssignedEvent | IssuesLabeledEvent | IssueCommentCreatedEvent | CheckSuiteCompletedEvent | WorkflowDispatchEvent | FixReviewEvent | ImplementPlanEvent | UnknownEvent;
|
|
192
|
+
export interface WriteablePayload {
|
|
193
|
+
"~pullfrog": true;
|
|
194
|
+
/** semantic version of the payload to ensure compatibility */
|
|
195
|
+
version: string;
|
|
196
|
+
/** provider/model slug (e.g. "anthropic/claude-opus") */
|
|
197
|
+
model?: string | undefined;
|
|
198
|
+
/** the user's actual request (body if @pullfrog tagged) */
|
|
199
|
+
prompt: string;
|
|
200
|
+
/** github username of the human who triggered this workflow run */
|
|
201
|
+
triggerer?: string | undefined;
|
|
202
|
+
/** event-level instructions for this trigger type (flag-expanded server-side) */
|
|
203
|
+
eventInstructions?: string | undefined;
|
|
204
|
+
/** event data from webhook payload - discriminated union based on trigger field */
|
|
205
|
+
event: PayloadEvent;
|
|
206
|
+
/** timeout for agent run (e.g., "10m", "1h30m") - defaults to "1h" */
|
|
207
|
+
timeout?: string | undefined;
|
|
208
|
+
/** working directory for the agent */
|
|
209
|
+
cwd?: string | undefined;
|
|
210
|
+
/** pre-created progress comment ID for updating status */
|
|
211
|
+
progressCommentId?: string | undefined;
|
|
212
|
+
}
|
|
213
|
+
export type Payload = Readonly<WriteablePayload>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry point for npm package
|
|
3
|
+
* This exports the main function for programmatic usage
|
|
4
|
+
*/
|
|
5
|
+
export type { Agent, AgentResult, AgentRunContext } from "./agents/shared.ts";
|
|
6
|
+
export { type Inputs as ExecutionInputs, type MainResult, main, } from "./main.ts";
|