@getfoyer/review-core 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/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +360 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/package.json +34 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @getfoyer/review-core — frozen schema contract for Foyer run artifacts.
|
|
3
|
+
*
|
|
4
|
+
* See `./types.ts` for the full surface. This index re-exports everything
|
|
5
|
+
* so consumers can `import { RunArtifact } from '@getfoyer/review-core'`
|
|
6
|
+
* without specifying the subpath.
|
|
7
|
+
*/
|
|
8
|
+
export * from './types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @getfoyer/review-core — frozen schema contract for Foyer run artifacts.
|
|
3
|
+
*
|
|
4
|
+
* See `./types.ts` for the full surface. This index re-exports everything
|
|
5
|
+
* so consumers can `import { RunArtifact } from '@getfoyer/review-core'`
|
|
6
|
+
* without specifying the subpath.
|
|
7
|
+
*/
|
|
8
|
+
export * from './types.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RunArtifact v0.1 — the frozen contract for a single Foyer verification run.
|
|
3
|
+
*
|
|
4
|
+
* This file is the cross-cutting schema written by the GitHub App, written
|
|
5
|
+
* by the CLI's `foyer review`, rendered by the hosted report, and consumed
|
|
6
|
+
* by future PR-comment writers. It is intentionally separate from the
|
|
7
|
+
* implementation-internal types in `api/src/verification/types.ts` so the
|
|
8
|
+
* public shape can evolve under semver while internal modules iterate.
|
|
9
|
+
*
|
|
10
|
+
* Stability contract:
|
|
11
|
+
* - schemaVersion is "0.1". Breaking changes require a version bump.
|
|
12
|
+
* - Adding new optional fields is a minor change (no version bump).
|
|
13
|
+
* - Removing or renaming fields, or changing semantics of existing
|
|
14
|
+
* fields, requires bumping schemaVersion AND maintaining a reader
|
|
15
|
+
* for the prior version for one release cycle.
|
|
16
|
+
*
|
|
17
|
+
* No runtime code lives here. No I/O, no dependencies. Pure types.
|
|
18
|
+
*/
|
|
19
|
+
/** Frozen schema version. Bump on breaking changes. */
|
|
20
|
+
export declare const SCHEMA_VERSION: "0.1";
|
|
21
|
+
export type SchemaVersion = typeof SCHEMA_VERSION;
|
|
22
|
+
/**
|
|
23
|
+
* One artifact per verification run (one PR head SHA → one row).
|
|
24
|
+
*
|
|
25
|
+
* Produced by both the GitHub App (post-PR, in `api/src/verification/`) and
|
|
26
|
+
* the CLI (pre-PR, in `packages/cli` via the future `foyer review` command).
|
|
27
|
+
* The hosted report at app.getfoyer.dev renders this shape directly.
|
|
28
|
+
*
|
|
29
|
+
* Partner-visible fields are public. Admin-only fields (see
|
|
30
|
+
* `AdminAttribution`) are captured unconditionally for abuse detection and
|
|
31
|
+
* reviewer-model independence enforcement, but the render layer redacts
|
|
32
|
+
* them from any UI a partner sees — surfaced only to staff Supabase roles.
|
|
33
|
+
*/
|
|
34
|
+
export interface RunArtifact {
|
|
35
|
+
schemaVersion: SchemaVersion;
|
|
36
|
+
/** Stable run identifier; format is opaque to consumers. */
|
|
37
|
+
runId: string;
|
|
38
|
+
/** Repository + commit state the run executed against. */
|
|
39
|
+
repo: RepoMeta;
|
|
40
|
+
/** Overall verdict — drives the headline copy in CLI output and PR comments. */
|
|
41
|
+
verdict: Verdict;
|
|
42
|
+
/**
|
|
43
|
+
* Wall-clock timestamps in ISO-8601 / UTC. `startedAt` is set when the
|
|
44
|
+
* run is dequeued; `completedAt` is set at terminal status.
|
|
45
|
+
*/
|
|
46
|
+
startedAt: string;
|
|
47
|
+
completedAt?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Optional plan-review pass (Phase 3 of the CLI MVP). When present, this
|
|
50
|
+
* is the agent-supervisor gate — checks that a human-approved plan is
|
|
51
|
+
* coherent against repo context before the agent implements. Absent on
|
|
52
|
+
* implementation-only runs (GitHub App post-PR, CLI `foyer review` without
|
|
53
|
+
* an attached plan).
|
|
54
|
+
*/
|
|
55
|
+
planReview?: PlanReview;
|
|
56
|
+
/**
|
|
57
|
+
* The implementation-review pass — runs every signal against the diff.
|
|
58
|
+
* Always present on a completed run.
|
|
59
|
+
*/
|
|
60
|
+
implementationReview: ImplementationReview;
|
|
61
|
+
/** Origin of the run — which client emitted this artifact. */
|
|
62
|
+
origin: RunOrigin;
|
|
63
|
+
/** Hosted-report metadata (if uploaded). */
|
|
64
|
+
report?: ReportMeta;
|
|
65
|
+
/**
|
|
66
|
+
* Admin-only attribution. Captured unconditionally. The render layer
|
|
67
|
+
* MUST redact this from any partner-facing surface; surfaced only to
|
|
68
|
+
* staff Supabase roles / `/admin` routes. See `AdminAttribution`.
|
|
69
|
+
*/
|
|
70
|
+
adminAttribution: AdminAttribution;
|
|
71
|
+
}
|
|
72
|
+
export interface RepoMeta {
|
|
73
|
+
/** Internal Foyer repo id (links to `repos` table). */
|
|
74
|
+
repoId: string;
|
|
75
|
+
/** Canonical clone URL. */
|
|
76
|
+
url: string;
|
|
77
|
+
/** Default branch, used when computing the diff base. */
|
|
78
|
+
defaultBranch: string;
|
|
79
|
+
/** Branch the run was triggered against. */
|
|
80
|
+
branch?: string;
|
|
81
|
+
/** Merge-base commit SHA. */
|
|
82
|
+
baseSha: string;
|
|
83
|
+
/** Head commit SHA the run executed against. */
|
|
84
|
+
headSha: string;
|
|
85
|
+
/** PR number when the run was triggered from a PR webhook. */
|
|
86
|
+
prNumber?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Headline verdict for the run.
|
|
90
|
+
*
|
|
91
|
+
* - 'clean' — all signals passed (or unavailable + no failures).
|
|
92
|
+
* - 'warnings' — at least one signal warned, no failures.
|
|
93
|
+
* - 'blocked' — at least one signal failed; merging is risky.
|
|
94
|
+
* - 'needs_human' — signals couldn't be evaluated and a human judgment
|
|
95
|
+
* call is required (e.g., intent text is ambiguous).
|
|
96
|
+
* - 'stale' — head SHA moved after the run produced this artifact;
|
|
97
|
+
* the artifact remains useful for history but should not
|
|
98
|
+
* drive merge decisions.
|
|
99
|
+
*/
|
|
100
|
+
export type Verdict = 'clean' | 'warnings' | 'blocked' | 'needs_human' | 'stale';
|
|
101
|
+
/**
|
|
102
|
+
* Which client wrote this artifact. Future-proofs the schema for additional
|
|
103
|
+
* surfaces (e.g., CI-runner direct upload) without bumping schemaVersion.
|
|
104
|
+
*/
|
|
105
|
+
export type RunOrigin = 'github_app' | 'cli' | 'eval_script' | 'mcp_tool';
|
|
106
|
+
export interface ImplementationReview {
|
|
107
|
+
/** Per-signal results. One entry per `SignalKey` that ran. */
|
|
108
|
+
signals: SignalResult[];
|
|
109
|
+
/**
|
|
110
|
+
* Files changed in the diff between baseSha and headSha. Path is repo-
|
|
111
|
+
* relative, posix-style.
|
|
112
|
+
*/
|
|
113
|
+
changedFiles: ChangedFile[];
|
|
114
|
+
/**
|
|
115
|
+
* Symbol-level changes when AST analysis succeeded. Empty when the
|
|
116
|
+
* languages in the diff aren't supported (currently TypeScript /
|
|
117
|
+
* JavaScript only).
|
|
118
|
+
*/
|
|
119
|
+
changedSymbols: ChangedSymbol[];
|
|
120
|
+
/** Risk-area classifications applied to the diff. */
|
|
121
|
+
riskAreas: RiskArea[];
|
|
122
|
+
/** Aggregated findings across all signals (de-duped for renderer use). */
|
|
123
|
+
findings: Finding[];
|
|
124
|
+
/**
|
|
125
|
+
* Diff narrative — a plain-English summary of what the diff does. Drives
|
|
126
|
+
* non-technical audience rendering. Optional; absent on tiny / structural
|
|
127
|
+
* diffs where the narrative would be noise.
|
|
128
|
+
*/
|
|
129
|
+
narrative?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface ChangedFile {
|
|
132
|
+
/** Repo-relative posix path. */
|
|
133
|
+
path: string;
|
|
134
|
+
/** Lines added / removed in this file relative to baseSha. */
|
|
135
|
+
added: number;
|
|
136
|
+
removed: number;
|
|
137
|
+
/**
|
|
138
|
+
* Optional language tag from tree-sitter / detection. Absent when
|
|
139
|
+
* detection failed or the file type isn't supported.
|
|
140
|
+
*/
|
|
141
|
+
language?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ChangedSymbol {
|
|
144
|
+
/** Repo-relative posix path of the file the symbol lives in. */
|
|
145
|
+
file: string;
|
|
146
|
+
/** Symbol kind. */
|
|
147
|
+
kind: 'function' | 'method' | 'class' | 'interface' | 'type' | 'enum' | 'variable' | 'export' | 'import';
|
|
148
|
+
/** Fully-qualified name within the file (e.g., 'ClassName.methodName'). */
|
|
149
|
+
name: string;
|
|
150
|
+
/** What happened to this symbol in the diff. */
|
|
151
|
+
change: 'added' | 'modified' | 'removed';
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Risk-area tags assigned to changed files. Drives reviewer prompt
|
|
155
|
+
* structuring (e.g., auth-touching diffs get a tighter review pass).
|
|
156
|
+
*/
|
|
157
|
+
export type RiskArea = 'auth' | 'session' | 'permissions' | 'billing' | 'payments' | 'db_schema' | 'db_migration' | 'queues' | 'background_jobs' | 'external_provider' | 'env_config' | 'api_routes' | 'api_contracts' | 'data_deletion' | 'destructive_update' | 'large_deletion' | 'tests_only' | 'generated_files';
|
|
158
|
+
/**
|
|
159
|
+
* The set of signals Foyer evaluates. Stable identifiers — renderers
|
|
160
|
+
* branch on these strings.
|
|
161
|
+
*/
|
|
162
|
+
export type SignalKey = 'intent_fidelity' | 'plan_fidelity' | 'code_review' | 'tests_build' | 'deploy_build' | 'security' | 'browser_smoke' | 'dead_code' | 'hallucinated_api' | 'template_cruft' | 'dependency_hygiene';
|
|
163
|
+
/**
|
|
164
|
+
* Status of a single signal. `unavailable` is a real value — emitted when
|
|
165
|
+
* the runner couldn't evaluate (e.g., no CI for `deploy_build`, language
|
|
166
|
+
* not supported for `dead_code`). Never absent: every signal that ran
|
|
167
|
+
* has a status.
|
|
168
|
+
*/
|
|
169
|
+
export type SignalStatus = 'passed' | 'warning' | 'failed' | 'unavailable';
|
|
170
|
+
export interface SignalResult {
|
|
171
|
+
key: SignalKey;
|
|
172
|
+
status: SignalStatus;
|
|
173
|
+
/** Technical summary (always present). */
|
|
174
|
+
summary: string;
|
|
175
|
+
/**
|
|
176
|
+
* Plain-English counterpart to `summary`. Populated by LLM-backed
|
|
177
|
+
* runners when the partner's audience is non-technical. Renderer picks
|
|
178
|
+
* this when the audience flag warrants; repair packets always use the
|
|
179
|
+
* technical `summary`.
|
|
180
|
+
*/
|
|
181
|
+
audienceSummary?: string;
|
|
182
|
+
evidence: Evidence[];
|
|
183
|
+
/** Optional routing hint shown under the signal row in the PR comment. */
|
|
184
|
+
routingHint?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Cross-agent repair packet for `failed` signals. The CLI surfaces this
|
|
187
|
+
* via `get_blockers` MCP tool; the PR comment renders it inline.
|
|
188
|
+
*/
|
|
189
|
+
repairPacket?: RepairPacket;
|
|
190
|
+
}
|
|
191
|
+
export interface Evidence {
|
|
192
|
+
kind: 'log' | 'screenshot' | 'command' | 'diff' | 'repro';
|
|
193
|
+
/** Technical label. */
|
|
194
|
+
label: string;
|
|
195
|
+
/** Plain-English counterpart to `label` for non-technical audiences. */
|
|
196
|
+
audienceLabel?: string;
|
|
197
|
+
/**
|
|
198
|
+
* For inline evidence: the value itself (truncated). For separate-table
|
|
199
|
+
* evidence: the storage URL or row id reference. Renderer treats both
|
|
200
|
+
* the same way.
|
|
201
|
+
*/
|
|
202
|
+
value: string;
|
|
203
|
+
/** Severity tag for findings that have one. */
|
|
204
|
+
severity?: 'P1' | 'P2' | 'P3';
|
|
205
|
+
/** Repo-relative posix path when the evidence is file-anchored. */
|
|
206
|
+
file?: string;
|
|
207
|
+
/** Line number (1-indexed) when the evidence is line-anchored. */
|
|
208
|
+
line?: number;
|
|
209
|
+
/** Reviewer confidence in this finding (1-10). */
|
|
210
|
+
confidence?: number;
|
|
211
|
+
/** Reviewer rationale (technical voice). */
|
|
212
|
+
rationale?: string;
|
|
213
|
+
/** Plain-English counterpart to `rationale`. */
|
|
214
|
+
audienceRationale?: string;
|
|
215
|
+
/** For requirement-style evidence (intent_fidelity rows): satisfied or not. */
|
|
216
|
+
met?: boolean;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* A finding is a renderer-ready item lifted out of `Evidence`. The
|
|
220
|
+
* implementation-review aggregator de-dupes across signals so the same
|
|
221
|
+
* code issue surfaces once in the PR comment / hosted report.
|
|
222
|
+
*/
|
|
223
|
+
export interface Finding {
|
|
224
|
+
/** Stable id within this run (e.g., 'F001'). */
|
|
225
|
+
id: string;
|
|
226
|
+
severity: 'blocker' | 'warning' | 'info';
|
|
227
|
+
/** Originating signal that emitted the underlying evidence. */
|
|
228
|
+
signalKey: SignalKey;
|
|
229
|
+
/** Repo-relative posix path. */
|
|
230
|
+
file?: string;
|
|
231
|
+
line?: number;
|
|
232
|
+
/** Human-readable problem description. */
|
|
233
|
+
problem: string;
|
|
234
|
+
/** Evidence backing the finding (excerpts, links). */
|
|
235
|
+
evidence?: string;
|
|
236
|
+
/** Concrete change required to clear the finding. */
|
|
237
|
+
requiredChange?: string;
|
|
238
|
+
/** How to verify the fix landed. */
|
|
239
|
+
verification?: string;
|
|
240
|
+
/** Reviewer confidence (1-10). */
|
|
241
|
+
confidence?: number;
|
|
242
|
+
}
|
|
243
|
+
export interface Intent {
|
|
244
|
+
source: 'linear_issue' | 'github_issue' | 'pr_body' | 'pasted_spec' | 'plan_artifact';
|
|
245
|
+
confidence: 'high' | 'medium';
|
|
246
|
+
text: string;
|
|
247
|
+
/**
|
|
248
|
+
* Atomic verifiable claims extracted from `text`. Each claim is scored
|
|
249
|
+
* independently by intent_fidelity, not `text` as a whole.
|
|
250
|
+
* Imperative voice, one claim per string.
|
|
251
|
+
*/
|
|
252
|
+
requirements: string[];
|
|
253
|
+
/** Source-specific metadata. */
|
|
254
|
+
sourceId?: string;
|
|
255
|
+
sourceUrl?: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Repair packet keyed to the partner's coding agent. The CLI MVP's
|
|
259
|
+
* Phase 2 MCP `get_blockers` tool inlines these. The PR comment renders
|
|
260
|
+
* them as markdown sections.
|
|
261
|
+
*/
|
|
262
|
+
export interface RepairPacket {
|
|
263
|
+
agent: 'claude-code' | 'codex' | 'cursor' | 'windsurf' | 'generic';
|
|
264
|
+
/** Agent-ready prompt. May include code-fence blocks, file paths, etc. */
|
|
265
|
+
prompt: string;
|
|
266
|
+
/** Free-form context the renderer may pass through to the agent. */
|
|
267
|
+
context: Record<string, unknown>;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Output of a plan-review pass. Stored alongside the implementation review
|
|
271
|
+
* so the eventual diff can be checked against the approved plan
|
|
272
|
+
* (plan_fidelity).
|
|
273
|
+
*/
|
|
274
|
+
export interface PlanReview {
|
|
275
|
+
verdict: 'approved' | 'approved_with_warnings' | 'needs_revision' | 'blocked';
|
|
276
|
+
/** Files the plan said it would touch. */
|
|
277
|
+
approvedScope: string[];
|
|
278
|
+
/** Symbols the plan said it would introduce or modify. */
|
|
279
|
+
expectedSymbols: string[];
|
|
280
|
+
/** Nearby context the implementation should respect (files / modules). */
|
|
281
|
+
relatedContext: string[];
|
|
282
|
+
/** Tests the plan expects to update or add. */
|
|
283
|
+
requiredTests: string[];
|
|
284
|
+
/** Out-of-scope items the implementation must NOT touch. */
|
|
285
|
+
nonGoals: string[];
|
|
286
|
+
/** Risk areas implicated by the planned changes. */
|
|
287
|
+
riskAreas: RiskArea[];
|
|
288
|
+
/** Findings against the plan itself (missing tests, wrong abstraction). */
|
|
289
|
+
findings: Finding[];
|
|
290
|
+
}
|
|
291
|
+
export interface ReportMeta {
|
|
292
|
+
/** Whether the artifact was uploaded to the hosted report renderer. */
|
|
293
|
+
uploaded: boolean;
|
|
294
|
+
/** Public URL for the hosted report. Present iff uploaded. */
|
|
295
|
+
url?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Whether raw source snippets are included in the upload. Default false
|
|
298
|
+
* per the privacy policy; opt-in via `--include-source-snippets`.
|
|
299
|
+
*/
|
|
300
|
+
includesSourceSnippets?: boolean;
|
|
301
|
+
/** Whether the diff itself was uploaded. Always true when uploaded=true. */
|
|
302
|
+
includesDiff?: boolean;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Internal-only attribution for every LLM call made during the run.
|
|
306
|
+
*
|
|
307
|
+
* CAPTURED UNCONDITIONALLY for:
|
|
308
|
+
* - abuse / cost-overrun forensics
|
|
309
|
+
* - reviewer-model independence enforcement (the reviewer must differ
|
|
310
|
+
* from whatever model the partner's coding agent used)
|
|
311
|
+
* - per-call cost attribution against `prVerifications.cost_usd`
|
|
312
|
+
*
|
|
313
|
+
* NOT VISIBLE TO PARTNERS. The render layer (PR comment writer, hosted
|
|
314
|
+
* report, CLI output) must redact this entire object. Surfaced only to
|
|
315
|
+
* staff Supabase roles via `/admin` routes.
|
|
316
|
+
*/
|
|
317
|
+
export interface AdminAttribution {
|
|
318
|
+
/** Per-LLM-call attribution. One entry per call made during the run. */
|
|
319
|
+
calls: LLMCallAttribution[];
|
|
320
|
+
/** Aggregated totals across all calls in this run. */
|
|
321
|
+
totals: UsageTotals;
|
|
322
|
+
}
|
|
323
|
+
export interface LLMCallAttribution {
|
|
324
|
+
/** Stable id for this call within the run. Format opaque. */
|
|
325
|
+
callId: string;
|
|
326
|
+
/** Model name as reported by the provider (e.g., 'claude-sonnet-4-6'). */
|
|
327
|
+
model: string;
|
|
328
|
+
/**
|
|
329
|
+
* Stable hash of model + provider config, used to detect drift. Useful
|
|
330
|
+
* when prompts span model versions or when a partner declares their
|
|
331
|
+
* coding agent's model and we want to confirm reviewer independence.
|
|
332
|
+
*/
|
|
333
|
+
modelHash: string;
|
|
334
|
+
/** Which stage of the run made this call. */
|
|
335
|
+
stage: 'intent_extract' | 'intent_judge' | 'code_review' | 'plan_fidelity' | 'diff_narrative' | 'repair_packet' | 'audience_voice' | 'other';
|
|
336
|
+
usage: TokenUsage;
|
|
337
|
+
/** Wall-clock duration of this call in milliseconds. */
|
|
338
|
+
durationMs?: number;
|
|
339
|
+
}
|
|
340
|
+
export interface TokenUsage {
|
|
341
|
+
tokensIn: number;
|
|
342
|
+
tokensOut: number;
|
|
343
|
+
/** Anthropic-style cache write tokens. */
|
|
344
|
+
cacheCreation?: number;
|
|
345
|
+
/** Anthropic-style cache read tokens. */
|
|
346
|
+
cacheRead?: number;
|
|
347
|
+
/** USD cost computed from per-model pricing. */
|
|
348
|
+
costCents: number;
|
|
349
|
+
}
|
|
350
|
+
export interface UsageTotals {
|
|
351
|
+
tokensIn: number;
|
|
352
|
+
tokensOut: number;
|
|
353
|
+
cacheCreation: number;
|
|
354
|
+
cacheRead: number;
|
|
355
|
+
/** Sum across all `calls[].usage.costCents`. */
|
|
356
|
+
costCents: number;
|
|
357
|
+
/** Number of LLM calls in this run. */
|
|
358
|
+
callCount: number;
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,uDAAuD;AACvD,eAAO,M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C;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RunArtifact v0.1 — the frozen contract for a single Foyer verification run.
|
|
3
|
+
*
|
|
4
|
+
* This file is the cross-cutting schema written by the GitHub App, written
|
|
5
|
+
* by the CLI's `foyer review`, rendered by the hosted report, and consumed
|
|
6
|
+
* by future PR-comment writers. It is intentionally separate from the
|
|
7
|
+
* implementation-internal types in `api/src/verification/types.ts` so the
|
|
8
|
+
* public shape can evolve under semver while internal modules iterate.
|
|
9
|
+
*
|
|
10
|
+
* Stability contract:
|
|
11
|
+
* - schemaVersion is "0.1". Breaking changes require a version bump.
|
|
12
|
+
* - Adding new optional fields is a minor change (no version bump).
|
|
13
|
+
* - Removing or renaming fields, or changing semantics of existing
|
|
14
|
+
* fields, requires bumping schemaVersion AND maintaining a reader
|
|
15
|
+
* for the prior version for one release cycle.
|
|
16
|
+
*
|
|
17
|
+
* No runtime code lives here. No I/O, no dependencies. Pure types.
|
|
18
|
+
*/
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Schema version
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
/** Frozen schema version. Bump on breaking changes. */
|
|
23
|
+
export const SCHEMA_VERSION = '0.1';
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,uDAAuD;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,KAAc,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@getfoyer/review-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Frozen contract for Foyer run artifacts (RunArtifact v0.1) — the shared shape consumed by the GitHub App, the CLI, the hosted report, and PR-comment writers.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./types": {
|
|
14
|
+
"types": "./dist/types.d.ts",
|
|
15
|
+
"import": "./dist/types.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/**/*.js",
|
|
20
|
+
"dist/**/*.js.map",
|
|
21
|
+
"dist/**/*.d.ts",
|
|
22
|
+
"dist/**/*.d.ts.map"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"typecheck": "tsc --noEmit"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "^5.5.0"
|
|
33
|
+
}
|
|
34
|
+
}
|