@agent-native/recap-cli 0.1.0
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.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +10 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/openai-compatible-endpoint.d.ts +3 -0
- package/dist/openai-compatible-endpoint.d.ts.map +1 -0
- package/dist/openai-compatible-endpoint.js +23 -0
- package/dist/openai-compatible-endpoint.js.map +1 -0
- package/dist/plan-blocks.d.ts +19 -0
- package/dist/plan-blocks.d.ts.map +1 -0
- package/dist/plan-blocks.js +96 -0
- package/dist/plan-blocks.js.map +1 -0
- package/dist/plan-publish-store.d.ts +62 -0
- package/dist/plan-publish-store.d.ts.map +1 -0
- package/dist/plan-publish-store.js +128 -0
- package/dist/plan-publish-store.js.map +1 -0
- package/dist/pr-visual-recap-workflow.d.ts +3 -0
- package/dist/pr-visual-recap-workflow.d.ts.map +1 -0
- package/dist/pr-visual-recap-workflow.js +3 -0
- package/dist/pr-visual-recap-workflow.js.map +1 -0
- package/dist/recap.d.ts +565 -0
- package/dist/recap.d.ts.map +1 -0
- package/dist/recap.js +3877 -0
- package/dist/recap.js.map +1 -0
- package/dist/skill-content/connection.d.ts +2 -0
- package/dist/skill-content/connection.d.ts.map +1 -0
- package/dist/skill-content/connection.js +53 -0
- package/dist/skill-content/connection.js.map +1 -0
- package/dist/skill-content/local-files.d.ts +2 -0
- package/dist/skill-content/local-files.d.ts.map +1 -0
- package/dist/skill-content/local-files.js +101 -0
- package/dist/skill-content/local-files.js.map +1 -0
- package/dist/skill-content/visual-recap-skill.d.ts +2 -0
- package/dist/skill-content/visual-recap-skill.d.ts.map +1 -0
- package/dist/skill-content/visual-recap-skill.js +548 -0
- package/dist/skill-content/visual-recap-skill.js.map +1 -0
- package/dist/skill-content/wireframe.d.ts +4 -0
- package/dist/skill-content/wireframe.d.ts.map +1 -0
- package/dist/skill-content/wireframe.js +347 -0
- package/dist/skill-content/wireframe.js.map +1 -0
- package/dist/skill-content.d.ts +8 -0
- package/dist/skill-content.d.ts.map +1 -0
- package/dist/skill-content.js +11 -0
- package/dist/skill-content.js.map +1 -0
- package/package.json +50 -0
package/dist/recap.d.ts
ADDED
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agent-native recap` — the helper surface used by the PR Visual Recap GitHub
|
|
3
|
+
* Action. Run `agent-native recap help` for the full subcommand list.
|
|
4
|
+
*
|
|
5
|
+
* The action no longer generates the recap deterministically. Instead a coding
|
|
6
|
+
* agent (Claude Code or Codex) RUNS THE REPO'S visual-recap skill against the
|
|
7
|
+
* diff and publishes the plan via the plan MCP tools. These subcommands are the
|
|
8
|
+
* thin, deterministic glue around that:
|
|
9
|
+
*
|
|
10
|
+
* gate The security boundary: decide whether the recap runs at all
|
|
11
|
+
* (skipping drafts, forks without secret access, bots, missing
|
|
12
|
+
* secrets, an invalid agent/model, and untrusted PRs that touch
|
|
13
|
+
* recap-control files) and which normalized backend agent to use.
|
|
14
|
+
* collect-diff Collect the bounded base...head diff (excluding lockfiles,
|
|
15
|
+
* build output, snapshots), cap it at ~600KB, and classify the
|
|
16
|
+
* huge/tiny flags.
|
|
17
|
+
* scan Refuse to hand a secret-leaking diff to the agent.
|
|
18
|
+
* block-reference
|
|
19
|
+
* Fetch the live get-plan-blocks reference for the target app.
|
|
20
|
+
* build-prompt Assemble the agent prompt = latest visual-recap skill bundle
|
|
21
|
+
* + a task wrapper (or repo-pinned skill with --skill-source).
|
|
22
|
+
* publish Publish the agent-authored recap-source.json over HTTP.
|
|
23
|
+
* shot Screenshot the published plan and upload it to the plan app's
|
|
24
|
+
* signed public image route (for an inline PR-comment image).
|
|
25
|
+
* usage Parse and emit agent token-usage/cost from stdout.
|
|
26
|
+
* comment Find the previous plan id / upsert the sticky PR comment.
|
|
27
|
+
* check Evaluate the recap result and set a GitHub commit status.
|
|
28
|
+
* setup Install the PR Visual Recap GitHub Action workflow.
|
|
29
|
+
* doctor Diagnose missing secrets / misconfigured workflow.
|
|
30
|
+
*
|
|
31
|
+
* Promoting these to the published CLI means an installed repo's workflow calls
|
|
32
|
+
* `agent-native recap …` instead of copying helper scripts into the repo.
|
|
33
|
+
*
|
|
34
|
+
* Node built-ins only (plus an optional dynamic `playwright` import for `shot`).
|
|
35
|
+
*/
|
|
36
|
+
/** GitHub secrets the installed PR Visual Recap workflow needs. */
|
|
37
|
+
export declare const PR_VISUAL_RECAP_SETUP: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Result of attempting to write the PR Visual Recap workflow.
|
|
40
|
+
*
|
|
41
|
+
* - `written` — the file was written (new or forced overwrite).
|
|
42
|
+
* - `skipped` — the file already exists and is identical; no-op.
|
|
43
|
+
* - `refused` — the file already exists and differs; nothing was written.
|
|
44
|
+
* Caller should re-run with `--force` (or pass `force: true`) to overwrite.
|
|
45
|
+
*/
|
|
46
|
+
export type WriteWorkflowResult = {
|
|
47
|
+
status: "written";
|
|
48
|
+
path: string;
|
|
49
|
+
existed: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
status: "skipped";
|
|
52
|
+
path: string;
|
|
53
|
+
} | {
|
|
54
|
+
status: "refused";
|
|
55
|
+
path: string;
|
|
56
|
+
message: string;
|
|
57
|
+
};
|
|
58
|
+
/** Write .github/workflows/pr-visual-recap.yml into a repo. */
|
|
59
|
+
export declare function writePrVisualRecapWorkflow(baseDir: string, options?: {
|
|
60
|
+
force?: boolean;
|
|
61
|
+
}): WriteWorkflowResult;
|
|
62
|
+
/**
|
|
63
|
+
* The thin caller workflow that consumers paste into their repo when using the
|
|
64
|
+
* reusable variant. It references the canonical reusable workflow in the
|
|
65
|
+
* BuilderIO/agent-native repo rather than carrying a full copy.
|
|
66
|
+
*
|
|
67
|
+
* Callers must trigger on the same `pull_request` event types so that
|
|
68
|
+
* `github.event.pull_request.*` expressions in the reusable workflow resolve
|
|
69
|
+
* correctly (workflow_call inherits the caller's event context).
|
|
70
|
+
*
|
|
71
|
+
* @param options.cliVersion Semver or tag to pin (default "main" / latest).
|
|
72
|
+
* @param options.ref Git ref to pin the reusable workflow to (default "@main").
|
|
73
|
+
*/
|
|
74
|
+
export declare function buildReusableCallerWorkflow(options?: {
|
|
75
|
+
ref?: string;
|
|
76
|
+
agent?: RecapAgentValue;
|
|
77
|
+
model?: string;
|
|
78
|
+
runsOn?: string;
|
|
79
|
+
gateRunsOn?: string;
|
|
80
|
+
}): string;
|
|
81
|
+
/** Write the thin caller workflow that references the reusable workflow. */
|
|
82
|
+
export declare function writePrVisualRecapReusableCallerWorkflow(baseDir: string, options?: {
|
|
83
|
+
force?: boolean;
|
|
84
|
+
ref?: string;
|
|
85
|
+
agent?: RecapAgentValue;
|
|
86
|
+
model?: string;
|
|
87
|
+
runsOn?: string;
|
|
88
|
+
gateRunsOn?: string;
|
|
89
|
+
}): WriteWorkflowResult;
|
|
90
|
+
type RecapAgentValue = "claude" | "codex" | "openai-compatible";
|
|
91
|
+
export type RecapAgent = "claude" | "codex" | "openai-compatible";
|
|
92
|
+
export declare function normalizeRecapAgent(value: string | undefined): RecapAgent;
|
|
93
|
+
export declare function recapRequiredSecrets(agent: RecapAgent): string[];
|
|
94
|
+
export interface RecapRunner {
|
|
95
|
+
name: string;
|
|
96
|
+
status: string;
|
|
97
|
+
labels: string[];
|
|
98
|
+
}
|
|
99
|
+
export declare function matchingRecapRunners(runners: RecapRunner[], requiredLabels: string[]): RecapRunner[];
|
|
100
|
+
export interface RecapSetupPlan {
|
|
101
|
+
agent: RecapAgent;
|
|
102
|
+
appUrl: string;
|
|
103
|
+
repo?: string;
|
|
104
|
+
workflowPath: string;
|
|
105
|
+
workflowExists: boolean;
|
|
106
|
+
requiredSecrets: string[];
|
|
107
|
+
requiredVariables: readonly RecapVariableRequirement[];
|
|
108
|
+
variableProblems: RecapVariableProblem[];
|
|
109
|
+
variableValues: Record<string, string>;
|
|
110
|
+
secretValues: Record<string, string | undefined>;
|
|
111
|
+
}
|
|
112
|
+
export interface RecapVariableRequirement {
|
|
113
|
+
name: "VISUAL_RECAP_BASE_URL" | "VISUAL_RECAP_MODEL" | "VISUAL_RECAP_RUNS_ON" | "VISUAL_RECAP_GATE_RUNS_ON";
|
|
114
|
+
example: string;
|
|
115
|
+
}
|
|
116
|
+
export interface RecapVariableProblem {
|
|
117
|
+
requirement: RecapVariableRequirement;
|
|
118
|
+
reason: string;
|
|
119
|
+
}
|
|
120
|
+
export interface RecapRunsOnConfig {
|
|
121
|
+
json: string;
|
|
122
|
+
labels: string[];
|
|
123
|
+
selfHosted: boolean;
|
|
124
|
+
}
|
|
125
|
+
/** Parse the JSON consumed by GitHub Actions `fromJSON(...)` for `runs-on`. */
|
|
126
|
+
export declare function parseRecapRunsOn(value: string): RecapRunsOnConfig;
|
|
127
|
+
/** Validate the plain label used directly by the gate job's `runs-on`. */
|
|
128
|
+
export declare function parseRecapGateRunsOn(value: string): string;
|
|
129
|
+
export declare function validateOpenAiCompatibleRecapVariables(input: {
|
|
130
|
+
baseUrl?: string;
|
|
131
|
+
model?: string;
|
|
132
|
+
}): RecapVariableProblem[];
|
|
133
|
+
export declare function buildRecapSetupPlan(input: {
|
|
134
|
+
baseDir: string;
|
|
135
|
+
appUrl?: string;
|
|
136
|
+
agent?: string;
|
|
137
|
+
repo?: string;
|
|
138
|
+
runsOn?: string;
|
|
139
|
+
gateRunsOn?: string;
|
|
140
|
+
env?: NodeJS.ProcessEnv;
|
|
141
|
+
}): RecapSetupPlan;
|
|
142
|
+
export type RecapSecretScanMode = "off" | "high-confidence" | "strict";
|
|
143
|
+
export declare function normalizeRecapSecretScanMode(value: string | undefined): RecapSecretScanMode;
|
|
144
|
+
export declare function lineLooksSecret(line: string, mode?: RecapSecretScanMode): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Parse a `.github/recap-scan-allowlist` file into a list of matchers.
|
|
147
|
+
* Each non-blank, non-comment line is either:
|
|
148
|
+
* - a `/regex/` literal (JS regex syntax) — matched against the full line
|
|
149
|
+
* - a plain literal string — checked with String.includes()
|
|
150
|
+
*
|
|
151
|
+
* Returns an empty array when the file is absent or empty.
|
|
152
|
+
*/
|
|
153
|
+
export declare function parseRecapScanAllowlist(allowlistPath: string): Array<RegExp | string>;
|
|
154
|
+
/**
|
|
155
|
+
* Return true when `line` matches ANY entry in the allowlist (i.e., the
|
|
156
|
+
* finding should be ignored).
|
|
157
|
+
*/
|
|
158
|
+
export declare function lineMatchesAllowlist(line: string, allowlist: Array<RegExp | string>): boolean;
|
|
159
|
+
export declare function diffContainsSecret(diffText: string, allowlist?: Array<RegExp | string>, mode?: RecapSecretScanMode): boolean;
|
|
160
|
+
export declare function sanitizeAgentFailureSummary(value: string, maxChars?: number): string;
|
|
161
|
+
export declare function summarizeAgentResult(agent: string, resultText: string): string;
|
|
162
|
+
export declare function summarizeAgentRun(input: {
|
|
163
|
+
agent: string;
|
|
164
|
+
resultText?: string;
|
|
165
|
+
stderrText?: string;
|
|
166
|
+
exitCode?: string;
|
|
167
|
+
}): string;
|
|
168
|
+
export declare function summarizeLocalAgentFailure(input?: {
|
|
169
|
+
cwd?: string;
|
|
170
|
+
agent?: string;
|
|
171
|
+
}): string;
|
|
172
|
+
/** ~600KB byte cap for the diff handed to the recap agent. */
|
|
173
|
+
export declare const RECAP_DIFF_BYTE_CAP = 614400;
|
|
174
|
+
/** The footer appended when a diff is truncated at the byte cap. */
|
|
175
|
+
export declare const RECAP_DIFF_TRUNCATED_FOOTER = "\n\n[diff truncated at 600KB for the recap agent]\n";
|
|
176
|
+
/**
|
|
177
|
+
* Classify a bounded diff into the `huge` / `tiny` flags the workflow consumes.
|
|
178
|
+
*
|
|
179
|
+
* - huge: BYTES over the ~600KB cap. The agent is told to summarize AND the
|
|
180
|
+
* diff file is physically truncated so it can't overflow the prompt budget.
|
|
181
|
+
* - tiny: <= 1 changed file AND <= 8 changed lines. Uses ORIGINAL line count
|
|
182
|
+
* (captured before any truncation) so a large diff is never misclassified as
|
|
183
|
+
* tiny after the byte cap drops most of its lines.
|
|
184
|
+
*
|
|
185
|
+
* Pure (no I/O) so the classification can be unit-tested without invoking git.
|
|
186
|
+
*/
|
|
187
|
+
export declare function classifyDiff(input: {
|
|
188
|
+
bytes: number;
|
|
189
|
+
changed: number;
|
|
190
|
+
originalLines: number;
|
|
191
|
+
}): {
|
|
192
|
+
huge: boolean;
|
|
193
|
+
tiny: boolean;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Reorder a unified diff's per-file segments so likely-noise paths (paths whose
|
|
197
|
+
* first component starts with `.`, e.g. `.changeset/`, `.github/`) sort LAST,
|
|
198
|
+
* and all other paths keep their original git order. This ensures that when
|
|
199
|
+
* `truncateDiffAtLineBoundary` drops the tail to stay under the byte cap, source
|
|
200
|
+
* files survive and dotfile dirs are sacrificed instead.
|
|
201
|
+
*
|
|
202
|
+
* Pure (string in → string out) for unit testing. The initial preamble (lines
|
|
203
|
+
* before the first `diff --git` header) is preserved unchanged.
|
|
204
|
+
*/
|
|
205
|
+
export declare function sortDiffSourceFirst(text: string): string;
|
|
206
|
+
/**
|
|
207
|
+
* Truncate a diff to the ~600KB byte cap at a COMPLETE LINE boundary, then
|
|
208
|
+
* append the truncated footer. Dropping the last (possibly-partial) line is the
|
|
209
|
+
* equivalent of the original `head -c 614400 | sed '$d'`: it guarantees the cap
|
|
210
|
+
* never cuts a multi-byte UTF-8 char or a diff line mid-way and corrupts the
|
|
211
|
+
* agent's input. Pure (string in, string out) so it can be unit-tested.
|
|
212
|
+
*/
|
|
213
|
+
export declare function truncateDiffAtLineBoundary(text: string): string;
|
|
214
|
+
/**
|
|
215
|
+
* Count lines that begin with `+` or `-` (added/removed diff lines), excluding
|
|
216
|
+
* the `+++ b/file` / `--- a/file` unified-diff header lines. Without this
|
|
217
|
+
* exclusion a single-file change loses ~2 "real" lines from the 8-line tiny
|
|
218
|
+
* threshold, incorrectly classifying a small-but-meaningful change as tiny.
|
|
219
|
+
*/
|
|
220
|
+
export declare function countDiffLines(diffText: string): number;
|
|
221
|
+
/**
|
|
222
|
+
* Locate the repo's visual-recap SKILL.md, preferring the host-agent install
|
|
223
|
+
* locations so a user's `agent-native skills add` copy wins, then falling back
|
|
224
|
+
* to the framework's own source locations.
|
|
225
|
+
*/
|
|
226
|
+
export declare function readRepoSkillMd(cwd?: string): {
|
|
227
|
+
text: string;
|
|
228
|
+
source: string;
|
|
229
|
+
};
|
|
230
|
+
type RecapSkillSourceMode = "auto" | "latest" | "repo";
|
|
231
|
+
export declare function readVisualRecapSkillBundle(cwd?: string, mode?: RecapSkillSourceMode): {
|
|
232
|
+
text: string;
|
|
233
|
+
source: string;
|
|
234
|
+
};
|
|
235
|
+
export declare function buildRecapPrompt(input: {
|
|
236
|
+
skillMd: string;
|
|
237
|
+
pr: string;
|
|
238
|
+
repo?: string;
|
|
239
|
+
head?: string;
|
|
240
|
+
appUrl: string;
|
|
241
|
+
diffPath: string;
|
|
242
|
+
statPath?: string;
|
|
243
|
+
blockReferencePath?: string;
|
|
244
|
+
prevPlanId?: string;
|
|
245
|
+
huge?: boolean;
|
|
246
|
+
localFiles?: boolean;
|
|
247
|
+
localDir?: string;
|
|
248
|
+
/** Fully-qualified PR URL to store on the plan as the back-link. When
|
|
249
|
+
* `repo` is supplied this is auto-derived; pass explicitly to override. */
|
|
250
|
+
sourceUrl?: string;
|
|
251
|
+
/**
|
|
252
|
+
* When true, the diff originates from a fork PR — an external contributor's
|
|
253
|
+
* branch. Add an explicit prompt-hardening note so the agent treats diff
|
|
254
|
+
* content as untrusted user data, never as instructions. This does NOT change
|
|
255
|
+
* what the agent is allowed to do; it is a reminder that the diff text is
|
|
256
|
+
* attacker-controlled input to an LLM that holds a publish token.
|
|
257
|
+
*/
|
|
258
|
+
forkPr?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* Byte size of the (possibly truncated) diff file — used to emit a
|
|
261
|
+
* consumption instruction so the agent knows how large the file is and reads
|
|
262
|
+
* it in full before authoring. When omitted, no size instruction is emitted.
|
|
263
|
+
*/
|
|
264
|
+
diffBytes?: number;
|
|
265
|
+
/**
|
|
266
|
+
* Line count of the (possibly truncated) diff — same purpose as diffBytes.
|
|
267
|
+
*/
|
|
268
|
+
diffLines?: number;
|
|
269
|
+
}): string;
|
|
270
|
+
type RecapScreenshotTheme = "light" | "dark";
|
|
271
|
+
type GitHubComment = {
|
|
272
|
+
id: number;
|
|
273
|
+
body?: string | null;
|
|
274
|
+
html_url?: string;
|
|
275
|
+
user?: {
|
|
276
|
+
type?: string | null;
|
|
277
|
+
} | null;
|
|
278
|
+
};
|
|
279
|
+
export declare function resolveGitHubPullRequestAuthor(input: {
|
|
280
|
+
token: string;
|
|
281
|
+
repo: string;
|
|
282
|
+
pr: string;
|
|
283
|
+
fetchFn?: typeof fetch;
|
|
284
|
+
}): Promise<{
|
|
285
|
+
email?: string;
|
|
286
|
+
name?: string;
|
|
287
|
+
login?: string;
|
|
288
|
+
}>;
|
|
289
|
+
export declare function isPullRequestHeadCurrent(input: {
|
|
290
|
+
token: string;
|
|
291
|
+
owner: string;
|
|
292
|
+
repo: string;
|
|
293
|
+
issue: string;
|
|
294
|
+
headSha: string;
|
|
295
|
+
fetchFn?: typeof fetch;
|
|
296
|
+
}): Promise<boolean | null>;
|
|
297
|
+
export declare function findExistingComment(input: {
|
|
298
|
+
token: string;
|
|
299
|
+
owner: string;
|
|
300
|
+
repo: string;
|
|
301
|
+
issue: string;
|
|
302
|
+
/** @internal test seam — defaults to global fetch */
|
|
303
|
+
fetchFn?: typeof fetch;
|
|
304
|
+
}): Promise<GitHubComment | null>;
|
|
305
|
+
export declare function upsertComment(input: {
|
|
306
|
+
token: string;
|
|
307
|
+
owner: string;
|
|
308
|
+
repo: string;
|
|
309
|
+
issue: string;
|
|
310
|
+
body: string;
|
|
311
|
+
/** When true, refresh an existing comment but never create a new one. */
|
|
312
|
+
updateOnly?: boolean;
|
|
313
|
+
/** @internal test seam — defaults to global fetch */
|
|
314
|
+
fetchFn?: typeof fetch;
|
|
315
|
+
}): Promise<{
|
|
316
|
+
action: "created" | "updated" | "skipped";
|
|
317
|
+
id: number;
|
|
318
|
+
html_url?: string;
|
|
319
|
+
}>;
|
|
320
|
+
export declare function withRecapImageCacheKey(imageUrl: string, cacheKey: string | undefined | null): string;
|
|
321
|
+
/** Build the sticky comment body from the workflow's environment. */
|
|
322
|
+
export declare function buildCommentBody(env?: NodeJS.ProcessEnv): string;
|
|
323
|
+
type RecapSourceFilePayload = {
|
|
324
|
+
title?: string;
|
|
325
|
+
brief?: string;
|
|
326
|
+
mdx: Record<string, unknown>;
|
|
327
|
+
};
|
|
328
|
+
export declare function readRecapSourcePayload(filePath?: string): RecapSourceFilePayload;
|
|
329
|
+
export declare function fetchRecapBlockReference(input: {
|
|
330
|
+
appUrl: string;
|
|
331
|
+
out?: string;
|
|
332
|
+
fetchFn?: typeof fetch;
|
|
333
|
+
}): Promise<{
|
|
334
|
+
ok: true;
|
|
335
|
+
out: string;
|
|
336
|
+
count?: number;
|
|
337
|
+
}>;
|
|
338
|
+
export declare function publishRecapSource(input: {
|
|
339
|
+
appUrl: string;
|
|
340
|
+
token: string;
|
|
341
|
+
githubToken?: string;
|
|
342
|
+
sourcePath?: string;
|
|
343
|
+
out?: string;
|
|
344
|
+
prevPlanId?: string;
|
|
345
|
+
repo?: string;
|
|
346
|
+
pr?: string;
|
|
347
|
+
sourceUrl?: string;
|
|
348
|
+
sourceType?: string;
|
|
349
|
+
sourceRepo?: string;
|
|
350
|
+
sourcePrNumber?: string;
|
|
351
|
+
sourcePrState?: string;
|
|
352
|
+
sourcePrMergedAt?: string;
|
|
353
|
+
sourceAuthorEmail?: string;
|
|
354
|
+
sourceAuthorName?: string;
|
|
355
|
+
sourceAuthorLogin?: string;
|
|
356
|
+
fetchFn?: typeof fetch;
|
|
357
|
+
cwd?: string;
|
|
358
|
+
}): Promise<{
|
|
359
|
+
ok: true;
|
|
360
|
+
url: string;
|
|
361
|
+
out: string;
|
|
362
|
+
}>;
|
|
363
|
+
/**
|
|
364
|
+
* Confirm GitHub can fetch the uploaded image anonymously before we embed it.
|
|
365
|
+
*
|
|
366
|
+
* Default budget: 8 attempts with capped exponential backoff (1s, 2s, 3s, …
|
|
367
|
+
* capped at 4s) → ~20s total. This is enough to survive a cold-start CDN
|
|
368
|
+
* propagation delay that would otherwise cause `uploadRecapImage` to return a
|
|
369
|
+
* URL that the GitHub PR comment can't display.
|
|
370
|
+
*
|
|
371
|
+
* The `attempts` and `delayMs` overrides remain for unit tests and for callers
|
|
372
|
+
* that need a tighter or looser budget.
|
|
373
|
+
*/
|
|
374
|
+
export declare function waitForPublicRecapImage(input: {
|
|
375
|
+
imageUrl: string;
|
|
376
|
+
attempts?: number;
|
|
377
|
+
delayMs?: number;
|
|
378
|
+
fetchFn?: typeof fetch;
|
|
379
|
+
}): Promise<boolean>;
|
|
380
|
+
/** Upload a PNG to the plan app's signed public image route; returns its URL. */
|
|
381
|
+
export declare function uploadRecapImage(input: {
|
|
382
|
+
appUrl: string;
|
|
383
|
+
token: string;
|
|
384
|
+
pngPath: string;
|
|
385
|
+
cacheKey?: string;
|
|
386
|
+
/** @internal test seam — defaults to global fetch */
|
|
387
|
+
fetchFn?: typeof fetch;
|
|
388
|
+
/** @internal test seam — defaults to waitForPublicRecapImage */
|
|
389
|
+
waitFn?: typeof waitForPublicRecapImage;
|
|
390
|
+
}): Promise<string | null>;
|
|
391
|
+
type PlaywrightModule = {
|
|
392
|
+
chromium: import("playwright").BrowserType;
|
|
393
|
+
};
|
|
394
|
+
export declare function launchRecapChromium(chromium: import("playwright").BrowserType): Promise<import("playwright").Browser>;
|
|
395
|
+
export declare function withRecapScreenshotParams(url: string, options?: {
|
|
396
|
+
theme?: RecapScreenshotTheme;
|
|
397
|
+
}): string;
|
|
398
|
+
export declare function runShot(args: Record<string, string | boolean>,
|
|
399
|
+
/** @internal test seam — defaults to dynamic playwright import */
|
|
400
|
+
importPlaywright?: () => Promise<PlaywrightModule>): Promise<void>;
|
|
401
|
+
/**
|
|
402
|
+
* Minimal shape of the `pull_request` object from a GitHub `pull_request` event
|
|
403
|
+
* payload that the gate inspects. Everything is optional so a malformed/partial
|
|
404
|
+
* payload degrades to "skip" rather than throwing.
|
|
405
|
+
*/
|
|
406
|
+
export interface RecapGatePullRequest {
|
|
407
|
+
number?: number;
|
|
408
|
+
draft?: boolean;
|
|
409
|
+
author_association?: string | null;
|
|
410
|
+
head?: {
|
|
411
|
+
repo?: {
|
|
412
|
+
full_name?: string | null;
|
|
413
|
+
} | null;
|
|
414
|
+
} | null;
|
|
415
|
+
user?: {
|
|
416
|
+
login?: string | null;
|
|
417
|
+
type?: string | null;
|
|
418
|
+
} | null;
|
|
419
|
+
}
|
|
420
|
+
export interface RecapGateInput {
|
|
421
|
+
/** The `pull_request` payload object, or null when absent. */
|
|
422
|
+
pr: RecapGatePullRequest | null;
|
|
423
|
+
/** GITHUB_REPOSITORY ("owner/name"). */
|
|
424
|
+
repository: string | undefined;
|
|
425
|
+
/** Whether the base repository is private. */
|
|
426
|
+
repositoryPrivate?: boolean;
|
|
427
|
+
/** PLAN_RECAP_TOKEN present. */
|
|
428
|
+
hasPlan: boolean;
|
|
429
|
+
/** ANTHROPIC_API_KEY present. */
|
|
430
|
+
hasAnthropic: boolean;
|
|
431
|
+
/** OPENAI_API_KEY present. */
|
|
432
|
+
hasOpenai: boolean;
|
|
433
|
+
/** VISUAL_RECAP_API_KEY present for OpenAI-compatible backends. */
|
|
434
|
+
hasOpenaiCompatible?: boolean;
|
|
435
|
+
/** Raw VISUAL_RECAP_AGENT value (may be undefined / mis-cased). */
|
|
436
|
+
agentRaw: string | undefined;
|
|
437
|
+
/** Raw VISUAL_RECAP_MODEL value (may be undefined). */
|
|
438
|
+
model: string | undefined;
|
|
439
|
+
/** Raw VISUAL_RECAP_BASE_URL value for OpenAI-compatible backends. */
|
|
440
|
+
baseUrl?: string;
|
|
441
|
+
/** Raw VISUAL_RECAP_SKILL_SOURCE value (auto/latest/repo; may be undefined). */
|
|
442
|
+
skillSource: string | undefined;
|
|
443
|
+
/** Filenames changed by the PR (for the self-modifying guard). */
|
|
444
|
+
changedFiles: string[];
|
|
445
|
+
}
|
|
446
|
+
export declare function isRecapSensitivePath(p: string, options?: {
|
|
447
|
+
skillSource?: string;
|
|
448
|
+
}): boolean;
|
|
449
|
+
/**
|
|
450
|
+
* The pure gate decision: given the PR payload, secret-presence flags, the
|
|
451
|
+
* configured backend/model, and the PR's changed files, decide whether the
|
|
452
|
+
* visual recap should run, which (normalized) agent to use, and — when skipped —
|
|
453
|
+
* the human-readable reasons. This is the security boundary; it replicates the
|
|
454
|
+
* inline github-script gate bit-for-bit. No I/O so it can be unit-tested.
|
|
455
|
+
*/
|
|
456
|
+
export declare function evaluateRecapGate(input: RecapGateInput): {
|
|
457
|
+
run: boolean;
|
|
458
|
+
agent: string;
|
|
459
|
+
reasons: string[];
|
|
460
|
+
};
|
|
461
|
+
/**
|
|
462
|
+
* Build the short skip-line appended to an existing recap comment when the
|
|
463
|
+
* gate skips. Pure so it can be unit-tested.
|
|
464
|
+
*
|
|
465
|
+
* @param reason - Human-readable skip reason (primary reason, short).
|
|
466
|
+
* @param headShort - 7-char short SHA, or "" if unavailable.
|
|
467
|
+
*/
|
|
468
|
+
export declare function buildGateSkipLine(reason: string, headShort: string): string;
|
|
469
|
+
export declare function buildGateSkipCommentBody(): string;
|
|
470
|
+
/**
|
|
471
|
+
* Append (or replace the last gate-skip line in) a sticky comment body.
|
|
472
|
+
* Idempotent: calling it twice with different skip lines replaces the old one.
|
|
473
|
+
* Pure so it can be unit-tested.
|
|
474
|
+
*/
|
|
475
|
+
export declare function appendGateSkipLine(existingBody: string, skipLine: string): string;
|
|
476
|
+
/**
|
|
477
|
+
* Canonicalize the agent-written plan URL into a trusted recap URL, or "".
|
|
478
|
+
*
|
|
479
|
+
* recap-url.txt is produced by the (LLM) agent, so the raw URL is untrusted.
|
|
480
|
+
* This rebuilds a canonical `${origin}${base}/recaps/<id>` link from the TRUSTED
|
|
481
|
+
* app URL plus a strictly-validated plan id, enforcing the app origin and
|
|
482
|
+
* honoring a path-prefixed mount (e.g. https://host/agent-native). Returns ""
|
|
483
|
+
* for a wrong origin or an unrecognized path. Pure so it can be unit-tested —
|
|
484
|
+
* SAME impl as the workflow's previous inline `canonicalRecapUrl`.
|
|
485
|
+
*/
|
|
486
|
+
export declare function canonicalRecapUrl(rawUrl: string, appUrl: string): string;
|
|
487
|
+
export declare function inferLocalRecapUrlFailureReason(input?: {
|
|
488
|
+
cwd?: string;
|
|
489
|
+
appUrl?: string;
|
|
490
|
+
}): string;
|
|
491
|
+
export declare function buildRecapFailureDiagnostic(input: {
|
|
492
|
+
failureSummary?: string;
|
|
493
|
+
urlReason?: string;
|
|
494
|
+
}): string;
|
|
495
|
+
/** The signals that decide the completed "Visual Recap" check's conclusion. */
|
|
496
|
+
export interface RecapCheckOutcomeInput {
|
|
497
|
+
/** steps.url.outputs.ok — the agent published a plan whose origin validated. */
|
|
498
|
+
planOk: boolean;
|
|
499
|
+
/** steps.url.outputs.plan_url — the (untrusted) agent-written plan URL. */
|
|
500
|
+
planUrl: string;
|
|
501
|
+
/** PLAN_RECAP_APP_URL — the trusted plan app origin/base. */
|
|
502
|
+
appUrl: string;
|
|
503
|
+
/** steps.diff.outputs.huge — the diff exceeded the byte cap (summarized). */
|
|
504
|
+
huge: boolean;
|
|
505
|
+
/** steps.diff.outputs.tiny — the diff was too small to recap. */
|
|
506
|
+
tiny: boolean;
|
|
507
|
+
/** steps.scan.outputs.suppressed — a secret pattern suppressed the recap. */
|
|
508
|
+
suppressed: boolean;
|
|
509
|
+
/** steps.scan.outputs.json — the raw scan JSON (carries the suppress reason). */
|
|
510
|
+
suppressedJson: string;
|
|
511
|
+
/** Sanitized final agent output when no valid plan URL was produced. */
|
|
512
|
+
failureSummary?: string;
|
|
513
|
+
/** Explanation from the URL-reading step when recap-url.txt was absent/bad. */
|
|
514
|
+
urlReason?: string;
|
|
515
|
+
/** The Actions run URL, used as the default details_url. */
|
|
516
|
+
workflowUrl: string;
|
|
517
|
+
}
|
|
518
|
+
/** The completed-check fields PATCHed to the GitHub check run. */
|
|
519
|
+
export interface RecapCheckOutcome {
|
|
520
|
+
conclusion: "neutral" | "success" | "skipped";
|
|
521
|
+
title: string;
|
|
522
|
+
summary: string;
|
|
523
|
+
text: string;
|
|
524
|
+
detailsUrl: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Map the workflow's terminal recap state to the completed check's
|
|
528
|
+
* conclusion/title/summary/text/details_url. Pure so it can be unit-tested —
|
|
529
|
+
* reproduces the workflow's previous inline branch logic EXACTLY:
|
|
530
|
+
*
|
|
531
|
+
* - default → neutral "Visual recap not generated"
|
|
532
|
+
* - planOk + valid recapUrl → success "Visual recap ready" (huge → "summarized"
|
|
533
|
+
* summary), Open-recap link as text, details_url = recapUrl
|
|
534
|
+
* - planOk + invalid url → neutral "Visual recap published" (see the comment)
|
|
535
|
+
* - else tiny → skipped "Visual recap skipped"
|
|
536
|
+
* - else suppressed → skipped "Visual recap suppressed" (reason from scan JSON)
|
|
537
|
+
*/
|
|
538
|
+
export declare function recapCheckOutcome(input: RecapCheckOutcomeInput): RecapCheckOutcome;
|
|
539
|
+
interface ParsedUsage {
|
|
540
|
+
inputTokens: number;
|
|
541
|
+
outputTokens: number;
|
|
542
|
+
cacheReadTokens: number;
|
|
543
|
+
cacheWriteTokens: number;
|
|
544
|
+
model?: string;
|
|
545
|
+
reportedCostUsd?: number;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Claude Code `-p --output-format json` prints one final result object with a
|
|
549
|
+
* `usage` block and `total_cost_usd`. Anthropic's `input_tokens` already
|
|
550
|
+
* EXCLUDES cache tokens, so no normalization is needed here.
|
|
551
|
+
*/
|
|
552
|
+
export declare function parseClaudeUsage(stdout: string): ParsedUsage | null;
|
|
553
|
+
/**
|
|
554
|
+
* Codex `exec --json` reports `input_tokens` INCLUSIVE of `cached_input_tokens`
|
|
555
|
+
* (OpenAI counts cached as a subset of prompt tokens) and bills
|
|
556
|
+
* `reasoning_output_tokens` separately. Normalize to the cache-exclusive shape
|
|
557
|
+
* `calculateCost` expects: strip cached out of input, fold reasoning into
|
|
558
|
+
* output. Without this, cached tokens are billed twice and reasoning is dropped.
|
|
559
|
+
*/
|
|
560
|
+
export declare function parseCodexUsage(jsonl: string): ParsedUsage | null;
|
|
561
|
+
/** Parse the usage sidecar emitted by an Agent-Native Code run. */
|
|
562
|
+
export declare function parseOpenAiCompatibleUsage(json: string): ParsedUsage | null;
|
|
563
|
+
export declare function runRecap(argv: string[]): Promise<void>;
|
|
564
|
+
export {};
|
|
565
|
+
//# sourceMappingURL=recap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recap.d.ts","sourceRoot":"","sources":["../src/recap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAgEH,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAczC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACrD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,+DAA+D;AAC/D,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,mBAAmB,CAsBrB;AAMD;;;;;;;;;;;GAW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