@codacy/verity-cli 0.29.4-experimental.6726d0f → 0.29.4-experimental.988bfb7
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/bin/verity.js +71 -7
- package/package.json +1 -1
package/bin/verity.js
CHANGED
|
@@ -16601,6 +16601,7 @@ function createRun(opts, globals) {
|
|
|
16601
16601
|
urlResult: { ok: false, error: "unresolved" },
|
|
16602
16602
|
serviceUrl: "",
|
|
16603
16603
|
token: "",
|
|
16604
|
+
modeDecision: null,
|
|
16604
16605
|
sessionIdForMemory: "",
|
|
16605
16606
|
contextFilePaths: [],
|
|
16606
16607
|
analysisMode: "standard",
|
|
@@ -16713,8 +16714,15 @@ function formatRunEvidence(run, startedAt) {
|
|
|
16713
16714
|
out += row("changed", `${run.changedUniverse.length} from git \xB7 analyzable ${run.analyzable.length} \xB7 reviewable ${run.reviewable.length} \xB7 security ${run.securityFiles.length} \xB7 forReview ${run.allForReview.length}`);
|
|
16714
16715
|
const done = (phase) => run.phasesCompleted.includes(phase);
|
|
16715
16716
|
const ifDone = (phase, value) => done(phase) ? value : "?";
|
|
16716
|
-
|
|
16717
|
-
if (
|
|
16717
|
+
const md = run.modeDecision;
|
|
16718
|
+
if (md) {
|
|
16719
|
+
const how = md.forced ? "forced by --mode" : `predicted=${md.predicted ?? "none"} \u2192 ${md.resolved}`;
|
|
16720
|
+
out += row("mode", `${md.resolved} \xB7 ${how} \xB7 authored=${md.authored ? "yes" : "no"} \xB7 investigated=${md.investigated ? "yes" : "no"}`);
|
|
16721
|
+
} else {
|
|
16722
|
+
out += row("mode", `? (this run stopped in ${run.phaseReached || "no phase"}, before the mode was decided)`);
|
|
16723
|
+
}
|
|
16724
|
+
out += row("signals", `baseline=${ifDone("bootstrap", run.baseline ? "yes" : "no")} \xB7 authored=${ifDone("intentInputs", run.turnAuthoredCode ? "yes" : "no")} \xB7 observable=${ifDone("intentInputs", run.authorshipIsObservable ? "yes" : "no")}` + (run.actionSummary?.transcript_windowed ? ` \xB7 window=${run.actionSummary.transcript_windowed}` : ""));
|
|
16725
|
+
if (!done("intentInputs")) {
|
|
16718
16726
|
out += row("", `(\`?\` = the phase that determines it did not complete \u2014 this run stopped in ${run.phaseReached})`);
|
|
16719
16727
|
}
|
|
16720
16728
|
out += row("sent", `${sent.length} \xB7 ${list(sent)}`);
|
|
@@ -16741,6 +16749,22 @@ function formatRunEvidence(run, startedAt) {
|
|
|
16741
16749
|
out += row("withheld", "(nothing \u2014 every changed file was reviewed)");
|
|
16742
16750
|
}
|
|
16743
16751
|
}
|
|
16752
|
+
const cov = run.foldResult?.coverage;
|
|
16753
|
+
if (cov) {
|
|
16754
|
+
const delegated = run.foldResult.authored.filter((a) => a.owner === "subagent").length;
|
|
16755
|
+
if (cov.dispatched > 0 || cov.subagentFiles > 0 || cov.subagentSkipped > 0) {
|
|
16756
|
+
out += row("delegated", `${cov.dispatched} dispatched \xB7 ${cov.subagentFiles} agent log(s) read \xB7 ${delegated} path(s) attributed to subagents`);
|
|
16757
|
+
}
|
|
16758
|
+
if (cov.subagentSkipped > 0) {
|
|
16759
|
+
out += row("", `\u26A0 ${cov.subagentSkipped} agent log(s) REFUSED by the byte budget \u2014 the authored set above is PARTIAL`);
|
|
16760
|
+
}
|
|
16761
|
+
if (cov.dispatched > 0 && cov.subagentFiles === 0) {
|
|
16762
|
+
out += row("", `\u26A0 this turn dispatched ${cov.dispatched} agent(s) but no agent log was found \u2014 delegated work is unattributed (has the transcript layout moved?)`);
|
|
16763
|
+
}
|
|
16764
|
+
if (cov.outsideRepo > 0) {
|
|
16765
|
+
out += row("", `${cov.outsideRepo} authored path(s) refused as outside the repo`);
|
|
16766
|
+
}
|
|
16767
|
+
}
|
|
16744
16768
|
if (run.staticResults.findings.length > 0) {
|
|
16745
16769
|
out += row("static", `${run.staticResults.findings.length} finding(s) from ${run.staticResults.summary.tools_run.join(", ") || "no tools"}`);
|
|
16746
16770
|
}
|
|
@@ -16936,6 +16960,8 @@ function buildSummary(lines) {
|
|
|
16936
16960
|
break;
|
|
16937
16961
|
case "Agent":
|
|
16938
16962
|
case "Task":
|
|
16963
|
+
case "Workflow":
|
|
16964
|
+
case "SendMessage":
|
|
16939
16965
|
subagents++;
|
|
16940
16966
|
break;
|
|
16941
16967
|
case "WebFetch":
|
|
@@ -17190,7 +17216,7 @@ function channelSilence(input) {
|
|
|
17190
17216
|
// src/lib/cli-version.ts
|
|
17191
17217
|
function cliVersion() {
|
|
17192
17218
|
try {
|
|
17193
|
-
return true ? "0.29.4-experimental.
|
|
17219
|
+
return true ? "0.29.4-experimental.988bfb7" : "dev";
|
|
17194
17220
|
} catch {
|
|
17195
17221
|
return "dev";
|
|
17196
17222
|
}
|
|
@@ -17859,7 +17885,8 @@ async function mode(run) {
|
|
|
17859
17885
|
let analysisMode;
|
|
17860
17886
|
const sessionAuthoredCode = !!baseline && allForReview.some((f) => changedSinceBaseline(f, baseline));
|
|
17861
17887
|
const modeOverride = opts.mode;
|
|
17862
|
-
|
|
17888
|
+
const forced = !!modeOverride && ["standard", "plan", "debug", "skip"].includes(modeOverride);
|
|
17889
|
+
if (forced) {
|
|
17863
17890
|
analysisMode = modeOverride;
|
|
17864
17891
|
} else {
|
|
17865
17892
|
analysisMode = reconcileAnalysisMode(
|
|
@@ -17867,6 +17894,25 @@ async function mode(run) {
|
|
|
17867
17894
|
{ noFilesChanged, assistantResponse, actionSummary, conversationPrompts, sessionAuthoredCode }
|
|
17868
17895
|
);
|
|
17869
17896
|
}
|
|
17897
|
+
const investigated = didAgentInvestigate(actionSummary);
|
|
17898
|
+
run.modeDecision = {
|
|
17899
|
+
predicted: predictedMode ?? null,
|
|
17900
|
+
resolved: analysisMode,
|
|
17901
|
+
authored: turnAuthoredCode,
|
|
17902
|
+
investigated,
|
|
17903
|
+
forced
|
|
17904
|
+
};
|
|
17905
|
+
logEvent("mode_resolved", {
|
|
17906
|
+
predicted: predictedMode ?? null,
|
|
17907
|
+
resolved: analysisMode,
|
|
17908
|
+
forced,
|
|
17909
|
+
authored: turnAuthoredCode,
|
|
17910
|
+
investigated,
|
|
17911
|
+
// The two counters that decide `investigated`, so a false reading is
|
|
17912
|
+
// traceable to the tool that was not recognised.
|
|
17913
|
+
subagents: actionSummary?.subagents ?? null,
|
|
17914
|
+
files_read: actionSummary?.files_read.length ?? null
|
|
17915
|
+
});
|
|
17870
17916
|
if (analysisMode === "skip") {
|
|
17871
17917
|
await passAndExit(
|
|
17872
17918
|
run,
|
|
@@ -18160,6 +18206,15 @@ function toRepoRelative(path, repoRoot2) {
|
|
|
18160
18206
|
}
|
|
18161
18207
|
return p.replace(/^\/+/, "");
|
|
18162
18208
|
}
|
|
18209
|
+
function isInsideRepo(path, repoRoot2) {
|
|
18210
|
+
const p = path.replace(/\\/g, "/");
|
|
18211
|
+
if (!isAbsolutePath(p)) return true;
|
|
18212
|
+
if (!repoRoot2) return true;
|
|
18213
|
+
return candidateRoots(repoRoot2).some((root) => p === root || p.startsWith(root + "/"));
|
|
18214
|
+
}
|
|
18215
|
+
function isAbsolutePath(p) {
|
|
18216
|
+
return p.startsWith("/") || /^[A-Za-z]:\//.test(p);
|
|
18217
|
+
}
|
|
18163
18218
|
function fold(transcriptPath, opts = {}) {
|
|
18164
18219
|
const result = {
|
|
18165
18220
|
authored: [],
|
|
@@ -18171,6 +18226,7 @@ function fold(transcriptPath, opts = {}) {
|
|
|
18171
18226
|
totalRecords: 0,
|
|
18172
18227
|
malformed: 0,
|
|
18173
18228
|
subagentFiles: 0,
|
|
18229
|
+
outsideRepo: 0,
|
|
18174
18230
|
dispatched: 0,
|
|
18175
18231
|
userMessages: 0,
|
|
18176
18232
|
subagentSkipped: 0,
|
|
@@ -18211,7 +18267,11 @@ function fold(transcriptPath, opts = {}) {
|
|
|
18211
18267
|
return result;
|
|
18212
18268
|
}
|
|
18213
18269
|
try {
|
|
18214
|
-
const sidecarDir = (0, import_node_path18.join)(
|
|
18270
|
+
const sidecarDir = (0, import_node_path18.join)(
|
|
18271
|
+
(0, import_node_path18.dirname)(transcriptPath),
|
|
18272
|
+
(0, import_node_path18.basename)(transcriptPath).replace(/\.jsonl$/, ""),
|
|
18273
|
+
"subagents"
|
|
18274
|
+
);
|
|
18215
18275
|
if ((0, import_node_fs23.existsSync)(sidecarDir)) {
|
|
18216
18276
|
const maxFiles = opts.maxSidecars ?? 200;
|
|
18217
18277
|
const maxBytes = opts.maxSidecarBytes ?? 16 * 1024 * 1024;
|
|
@@ -18283,6 +18343,10 @@ function collectFromRecord(record, owner, byPath, commandStats, pendingByToolUse
|
|
|
18283
18343
|
const input = block.input ?? {};
|
|
18284
18344
|
if (EDIT_TOOLS.has(name)) {
|
|
18285
18345
|
const rawPath = typeof input.notebook_path === "string" ? input.notebook_path : typeof input.file_path === "string" ? input.file_path : null;
|
|
18346
|
+
if (rawPath && !isInsideRepo(rawPath, repoRoot2)) {
|
|
18347
|
+
if (tally) tally.outsideRepo += 1;
|
|
18348
|
+
continue;
|
|
18349
|
+
}
|
|
18286
18350
|
const path = rawPath ? toRepoRelative(rawPath, repoRoot2) : null;
|
|
18287
18351
|
if (path) {
|
|
18288
18352
|
const entry = byPath.get(path) ?? { p: path, h: 0, a: 0, d: 0, owner };
|
|
@@ -21935,8 +21999,8 @@ function registerTelemetryCommands(program2) {
|
|
|
21935
21999
|
}
|
|
21936
22000
|
|
|
21937
22001
|
// src/cli.ts
|
|
21938
|
-
program.name("verity").description("CLI for Verity quality gate service").version("0.29.4-experimental.
|
|
21939
|
-
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.29.4-experimental.
|
|
22002
|
+
program.name("verity").description("CLI for Verity quality gate service").version("0.29.4-experimental.988bfb7").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
|
|
22003
|
+
installStderrLog(actionCommand.name(), process.argv.slice(2), "0.29.4-experimental.988bfb7");
|
|
21940
22004
|
setUserNamedServiceUrl(program.opts().serviceUrl);
|
|
21941
22005
|
try {
|
|
21942
22006
|
await foldLegacyLocalCredential();
|
package/package.json
CHANGED