@nk070281sjv/cli 2.3.10 → 2.3.11
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.js +130 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30779,7 +30779,7 @@ ${hint}
|
|
|
30779
30779
|
}
|
|
30780
30780
|
|
|
30781
30781
|
// src/lib/version.ts
|
|
30782
|
-
var CLI_VERSION = true ? "2.3.
|
|
30782
|
+
var CLI_VERSION = true ? "2.3.11" : createRequire(import.meta.url)("../../package.json").version;
|
|
30783
30783
|
|
|
30784
30784
|
// src/lib/deps.ts
|
|
30785
30785
|
init_src();
|
|
@@ -38025,12 +38025,121 @@ function pipelinePrompt(context, stage, agent, promptPath, artifactPath) {
|
|
|
38025
38025
|
}
|
|
38026
38026
|
function schemaHint(stage) {
|
|
38027
38027
|
if (stage === "aggregation") {
|
|
38028
|
-
return
|
|
38028
|
+
return [
|
|
38029
|
+
"AggregationJson:",
|
|
38030
|
+
"- Output exactly this JSON shape inside one fenced ```ocr-json block.",
|
|
38031
|
+
"- Do not rename fields. Do not use markdown tables inside the JSON block.",
|
|
38032
|
+
"",
|
|
38033
|
+
"```json",
|
|
38034
|
+
"{",
|
|
38035
|
+
' "findings": [',
|
|
38036
|
+
" {",
|
|
38037
|
+
' "id": "agg-1",',
|
|
38038
|
+
' "title": "Short finding title",',
|
|
38039
|
+
' "source_findings": ["architect-1:finding-or-heading"],',
|
|
38040
|
+
' "signal": "keep",',
|
|
38041
|
+
' "severity": "high",',
|
|
38042
|
+
' "root_cause": "Why this issue exists.",',
|
|
38043
|
+
' "affected_behavior": "What user/system behavior is affected.",',
|
|
38044
|
+
' "fix_direction": "Concrete direction for the fix."',
|
|
38045
|
+
" }",
|
|
38046
|
+
" ],",
|
|
38047
|
+
' "dropped": [',
|
|
38048
|
+
" {",
|
|
38049
|
+
' "source_findings": ["performance-1:finding-or-heading"],',
|
|
38050
|
+
' "reason": "Why this reviewer finding is noise or duplicate."',
|
|
38051
|
+
" }",
|
|
38052
|
+
" ]",
|
|
38053
|
+
"}",
|
|
38054
|
+
"```",
|
|
38055
|
+
"",
|
|
38056
|
+
'- `signal` must be one of: "keep", "merge", "needs_validation", "likely_noise", "false_positive_candidate".',
|
|
38057
|
+
'- `severity` must be one of: "critical", "high", "medium", "low", "info".',
|
|
38058
|
+
"- `source_findings` must always be an array of non-empty strings, even for one source."
|
|
38059
|
+
].join("\n");
|
|
38029
38060
|
}
|
|
38030
38061
|
if (stage === "validation") {
|
|
38031
|
-
return
|
|
38062
|
+
return [
|
|
38063
|
+
"ValidationJson:",
|
|
38064
|
+
"- Output exactly this JSON shape inside one fenced ```ocr-json block.",
|
|
38065
|
+
"- Do not rename fields. Do not use markdown tables inside the JSON block.",
|
|
38066
|
+
"",
|
|
38067
|
+
"```json",
|
|
38068
|
+
"{",
|
|
38069
|
+
' "confirmed": [',
|
|
38070
|
+
" {",
|
|
38071
|
+
' "finding_id": "agg-1",',
|
|
38072
|
+
' "checked_files": ["src/main/java/example/File.java"],',
|
|
38073
|
+
' "result": "confirmed",',
|
|
38074
|
+
' "final_category": "blocker",',
|
|
38075
|
+
' "reason": "Code evidence confirms the issue."',
|
|
38076
|
+
" }",
|
|
38077
|
+
" ],",
|
|
38078
|
+
' "downgraded": [',
|
|
38079
|
+
" {",
|
|
38080
|
+
' "finding_id": "agg-2",',
|
|
38081
|
+
' "checked_files": ["src/main/java/example/File.java"],',
|
|
38082
|
+
' "result": "downgraded",',
|
|
38083
|
+
' "final_category": "suggestion",',
|
|
38084
|
+
' "reason": "Issue is real but lower impact."',
|
|
38085
|
+
" }",
|
|
38086
|
+
" ],",
|
|
38087
|
+
' "rejected": [',
|
|
38088
|
+
" {",
|
|
38089
|
+
' "finding_id": "agg-3",',
|
|
38090
|
+
' "checked_files": ["src/main/java/example/File.java"],',
|
|
38091
|
+
' "result": "rejected",',
|
|
38092
|
+
' "reason": "Code evidence disproves the issue."',
|
|
38093
|
+
" }",
|
|
38094
|
+
" ]",
|
|
38095
|
+
"}",
|
|
38096
|
+
"```",
|
|
38097
|
+
"",
|
|
38098
|
+
'- `final_category` must be one of: "blocker", "should_fix", "suggestion", "style".',
|
|
38099
|
+
"- `checked_files` must always be an array of non-empty strings."
|
|
38100
|
+
].join("\n");
|
|
38032
38101
|
}
|
|
38033
|
-
return
|
|
38102
|
+
return [
|
|
38103
|
+
"SynthesisJson:",
|
|
38104
|
+
"- Output exactly this JSON shape inside one fenced ```ocr-json block.",
|
|
38105
|
+
"- Do not rename fields. Do not use markdown tables inside the JSON block.",
|
|
38106
|
+
"",
|
|
38107
|
+
"```json",
|
|
38108
|
+
"{",
|
|
38109
|
+
' "verdict": "REQUEST CHANGES",',
|
|
38110
|
+
' "synthesis_counts": {',
|
|
38111
|
+
' "blockers": 1,',
|
|
38112
|
+
' "should_fix": 1,',
|
|
38113
|
+
' "suggestions": 0',
|
|
38114
|
+
" },",
|
|
38115
|
+
' "findings": [',
|
|
38116
|
+
" {",
|
|
38117
|
+
' "title": "Short final finding title",',
|
|
38118
|
+
' "category": "blocker",',
|
|
38119
|
+
' "severity": "high",',
|
|
38120
|
+
' "summary": "Developer-facing explanation.",',
|
|
38121
|
+
' "file_path": "src/main/java/example/File.java",',
|
|
38122
|
+
' "line_start": 42,',
|
|
38123
|
+
' "line_end": 45,',
|
|
38124
|
+
' "flagged_by": ["agg-1"],',
|
|
38125
|
+
' "validation_source": "confirmed"',
|
|
38126
|
+
" }",
|
|
38127
|
+
" ],",
|
|
38128
|
+
' "reviewers": [',
|
|
38129
|
+
" {",
|
|
38130
|
+
' "type": "architect",',
|
|
38131
|
+
' "instance": 1,',
|
|
38132
|
+
' "findings": ["architect-1:finding-or-heading"]',
|
|
38133
|
+
" }",
|
|
38134
|
+
" ]",
|
|
38135
|
+
"}",
|
|
38136
|
+
"```",
|
|
38137
|
+
"",
|
|
38138
|
+
'- `verdict` must be one of: "APPROVE", "REQUEST CHANGES", "NEEDS DISCUSSION".',
|
|
38139
|
+
'- `category` must be one of: "blocker", "should_fix", "suggestion", "style".',
|
|
38140
|
+
'- `severity` must be one of: "critical", "high", "medium", "low", "info".',
|
|
38141
|
+
"- `synthesis_counts` must exactly match the categories in `findings`."
|
|
38142
|
+
].join("\n");
|
|
38034
38143
|
}
|
|
38035
38144
|
|
|
38036
38145
|
// src/lib/agent-orchestrator/review-orchestrator.ts
|
|
@@ -38891,7 +39000,17 @@ function renderRunAgentsProgress(event) {
|
|
|
38891
39000
|
}
|
|
38892
39001
|
async function waitForDetachedRun(sessionDir, round) {
|
|
38893
39002
|
let lastLine2 = "";
|
|
39003
|
+
let stderrOffset = 0;
|
|
38894
39004
|
while (true) {
|
|
39005
|
+
const stderrLogPath = join28(
|
|
39006
|
+
sessionDir,
|
|
39007
|
+
"rounds",
|
|
39008
|
+
`round-${round}`,
|
|
39009
|
+
"process-logs",
|
|
39010
|
+
"run-agents-worker.stderr.log"
|
|
39011
|
+
);
|
|
39012
|
+
const flushed = flushNewLogText(stderrLogPath, stderrOffset, process.stderr);
|
|
39013
|
+
stderrOffset = flushed.offset;
|
|
38895
39014
|
const snapshot = readDetachedSnapshot(sessionDir, round);
|
|
38896
39015
|
const line = formatDetachedProgress(snapshot);
|
|
38897
39016
|
if (line !== lastLine2) {
|
|
@@ -38913,6 +39032,13 @@ async function waitForDetachedRun(sessionDir, round) {
|
|
|
38913
39032
|
await new Promise((resolve4) => setTimeout(resolve4, 15e3));
|
|
38914
39033
|
}
|
|
38915
39034
|
}
|
|
39035
|
+
function flushNewLogText(path2, offset, stream) {
|
|
39036
|
+
if (!existsSync23(path2)) return { offset };
|
|
39037
|
+
const text = readFileSync17(path2, "utf-8");
|
|
39038
|
+
if (text.length <= offset) return { offset: text.length };
|
|
39039
|
+
stream.write(text.slice(offset));
|
|
39040
|
+
return { offset: text.length };
|
|
39041
|
+
}
|
|
38916
39042
|
function readDetachedSnapshot(sessionDir, round) {
|
|
38917
39043
|
const roundDir = join28(sessionDir, "rounds", `round-${round}`);
|
|
38918
39044
|
const runMeta = readJson(join28(roundDir, "run-meta.json"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nk070281sjv/cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.11",
|
|
4
4
|
"description": "CLI for Open Code Review - Multi-environment setup and progress tracking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@inquirer/prompts": "^7.2.0",
|
|
40
|
-
"@nk070281sjv/agents": "2.3.
|
|
40
|
+
"@nk070281sjv/agents": "2.3.11",
|
|
41
41
|
"chalk": "^5.4.1",
|
|
42
42
|
"chokidar": "^4.0.3",
|
|
43
43
|
"commander": "^13.0.0",
|