revu-ai 0.2.1 → 0.3.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/CHANGELOG.md +25 -0
- package/README.md +40 -3
- package/dist/cli.js +20 -2
- package/dist/cli.js.map +1 -1
- package/dist/discovery.d.ts +31 -0
- package/dist/discovery.js +75 -1
- package/dist/discovery.js.map +1 -1
- package/dist/forges/post-cmd.js +7 -4
- package/dist/forges/post-cmd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/mcp/aggregator.d.ts +23 -1
- package/dist/mcp/aggregator.js +71 -0
- package/dist/mcp/aggregator.js.map +1 -1
- package/dist/mcp/server.js +59 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools.d.ts +50 -2
- package/dist/mcp/tools.js +47 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/output/pretty.d.ts +30 -0
- package/dist/output/pretty.js +97 -0
- package/dist/output/pretty.js.map +1 -1
- package/dist/prompts/review-system.d.ts +1 -0
- package/dist/prompts/review-system.js +47 -4
- package/dist/prompts/review-system.js.map +1 -1
- package/dist/providers/claude-code.d.ts +7 -1
- package/dist/providers/claude-code.js +27 -3
- package/dist/providers/claude-code.js.map +1 -1
- package/dist/providers/opencode.js +40 -14
- package/dist/providers/opencode.js.map +1 -1
- package/dist/providers/types.d.ts +16 -0
- package/dist/runner.d.ts +5 -1
- package/dist/runner.js +87 -1
- package/dist/runner.js.map +1 -1
- package/dist/types.d.ts +64 -10
- package/package.json +3 -1
package/dist/types.d.ts
CHANGED
|
@@ -8,6 +8,40 @@ export interface RuleFile {
|
|
|
8
8
|
absPath: string;
|
|
9
9
|
relPath: string;
|
|
10
10
|
content: string;
|
|
11
|
+
/** Glob patterns (repo-root-relative) specifying which changed files this rule applies to.
|
|
12
|
+
* Parsed from the YAML frontmatter `files:` field. When absent, the rule applies to all changed files. */
|
|
13
|
+
filePatterns?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface RuleResult {
|
|
16
|
+
id: string;
|
|
17
|
+
path: string;
|
|
18
|
+
ok: boolean;
|
|
19
|
+
durationMs: number;
|
|
20
|
+
findingCount: number;
|
|
21
|
+
/** Count of `report_review_summary` calls the agent emitted via the MCP sidecar.
|
|
22
|
+
* Expected to be exactly 1 for a healthy review. 0 means the agent never
|
|
23
|
+
* signed off — usually a symptom of a broken / silent agent — and surfaces
|
|
24
|
+
* as an "incomplete review" warning. >1 means the agent called it multiple
|
|
25
|
+
* times; only the first is kept. Always present on non-skipped rules. */
|
|
26
|
+
summaryCount: number;
|
|
27
|
+
/** Count of `report_check` calls the agent emitted — incremental compliance
|
|
28
|
+
* notes. No required minimum; high values just mean the agent showed its
|
|
29
|
+
* working. */
|
|
30
|
+
checkCount: number;
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
/** True if this rule was stopped by the per-rule timeout. */
|
|
33
|
+
timedOut?: boolean;
|
|
34
|
+
/** True if this rule was skipped because no changed files matched its `files:` patterns. */
|
|
35
|
+
skipped?: boolean;
|
|
36
|
+
/** Observability counters from the provider — text chars emitted and
|
|
37
|
+
* report_finding tool calls observed. The pretty output surfaces a warning
|
|
38
|
+
* when textChars is high but findingCount is 0 (model wrote findings as
|
|
39
|
+
* prose instead of calling the MCP tool). Absent for skipped rules and for
|
|
40
|
+
* providers that don't report them. */
|
|
41
|
+
diagnostics?: {
|
|
42
|
+
textChars: number;
|
|
43
|
+
findingToolCalls: number;
|
|
44
|
+
};
|
|
11
45
|
}
|
|
12
46
|
export type ReviewTarget = {
|
|
13
47
|
mode: "ref-range";
|
|
@@ -53,20 +87,34 @@ export interface Resolution {
|
|
|
53
87
|
/** Commit at which the agent considered the finding resolved. */
|
|
54
88
|
resolvedAtSha: string;
|
|
55
89
|
}
|
|
56
|
-
export interface
|
|
57
|
-
|
|
90
|
+
export interface Check {
|
|
91
|
+
ruleId: string;
|
|
92
|
+
/** Repo-relative file path the agent verified. */
|
|
58
93
|
path: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
94
|
+
line?: number;
|
|
95
|
+
lineEnd?: number;
|
|
96
|
+
/** What was verified and the evidence that it complies with the rule. */
|
|
97
|
+
message: string;
|
|
98
|
+
category?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface ReviewSummary {
|
|
101
|
+
ruleId: string;
|
|
102
|
+
/** Agent's explicit declaration. "pass" = no findings reported for this rule;
|
|
103
|
+
* "concerns" = one or more findings reported. The runner cross-checks this
|
|
104
|
+
* against the recorded finding count. */
|
|
105
|
+
outcome: "pass" | "concerns";
|
|
106
|
+
/** Concrete description of what the agent examined (files, behaviours, areas). */
|
|
107
|
+
checked: string;
|
|
108
|
+
/** Why the outcome holds, tied to what was checked. */
|
|
109
|
+
rationale: string;
|
|
65
110
|
}
|
|
66
111
|
export interface RunReport {
|
|
67
112
|
/** Bumped to 2 when prior-run-aware features (resolutions, fingerprint, commentId) were added.
|
|
68
|
-
*
|
|
69
|
-
|
|
113
|
+
* Bumped to 3 when the review-summary protocol arrived: required `summaryCount`/`checkCount`
|
|
114
|
+
* on each RuleResult, and required `summaries: ReviewSummary[]` / `checks: Check[]` arrays
|
|
115
|
+
* on the report.
|
|
116
|
+
* Readers SHOULD accept v1, v2, and v3 reports and treat missing fields as defaults. */
|
|
117
|
+
schemaVersion: 3;
|
|
70
118
|
runId: string;
|
|
71
119
|
startedAt: string;
|
|
72
120
|
completedAt: string;
|
|
@@ -77,6 +125,12 @@ export interface RunReport {
|
|
|
77
125
|
findings: Finding[];
|
|
78
126
|
/** Resolutions emitted by reviewers this run, OR carried forward from `--prior-report`. */
|
|
79
127
|
resolutions: Resolution[];
|
|
128
|
+
/** Per-rule review summaries — one per rule that called `report_review_summary`.
|
|
129
|
+
* A rule with no entry here is flagged as a possibly-incomplete review. */
|
|
130
|
+
summaries: ReviewSummary[];
|
|
131
|
+
/** All compliance checks the agents emitted via `report_check`. Granular
|
|
132
|
+
* positive evidence; not findings, not subject to resolution. */
|
|
133
|
+
checks: Check[];
|
|
80
134
|
}
|
|
81
135
|
export interface RevuConfig {
|
|
82
136
|
pattern: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revu-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Parallel AI code review — pluggable agent harnesses (Claude Code, opencode); pick any provider/model",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -63,10 +63,12 @@
|
|
|
63
63
|
"commander": "^12.1.0",
|
|
64
64
|
"fast-glob": "^3.3.2",
|
|
65
65
|
"ignore": "^5.3.2",
|
|
66
|
+
"micromatch": "^4.0.8",
|
|
66
67
|
"undici": "^7.25.0",
|
|
67
68
|
"zod": "^3.23.8"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
71
|
+
"@types/micromatch": "^4.0.10",
|
|
70
72
|
"@types/node": "^22.0.0",
|
|
71
73
|
"tsx": "^4.19.0",
|
|
72
74
|
"typescript": "^5.6.0",
|