hunter-harness 0.2.15 → 0.2.16
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/bin.js +34 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1566,6 +1566,9 @@ function classifyFile(input) {
|
|
|
1566
1566
|
if (under(path, ".harness/knowledge/")) {
|
|
1567
1567
|
return USER_DIFF;
|
|
1568
1568
|
}
|
|
1569
|
+
if (/^\.harness\/archive\/[^/]+\/reports\/final\/summary-data\.json$/u.test(path)) {
|
|
1570
|
+
return GENERATED_REVIEWABLE;
|
|
1571
|
+
}
|
|
1569
1572
|
if (under(path, ".harness/codebase/map/") || path === ".harness/codebase/map-summary.md" || path === ".harness/codebase/map-manifest.json") {
|
|
1570
1573
|
return GENERATED_REVIEWABLE;
|
|
1571
1574
|
}
|
|
@@ -4196,6 +4199,7 @@ var SHARED_MANAGED_FILES = [
|
|
|
4196
4199
|
".harness/project.yaml",
|
|
4197
4200
|
".harness/context-index.json"
|
|
4198
4201
|
];
|
|
4202
|
+
var ARCHIVE_SUMMARY_PATH = /^\.harness\/archive\/[^/]+\/reports\/final\/summary-data\.json$/u;
|
|
4199
4203
|
async function exists3(path) {
|
|
4200
4204
|
try {
|
|
4201
4205
|
await lstat3(path);
|
|
@@ -4223,6 +4227,35 @@ async function walkFiles(root, current, output) {
|
|
|
4223
4227
|
}
|
|
4224
4228
|
}
|
|
4225
4229
|
}
|
|
4230
|
+
async function walkArchiveSummaries(root, output) {
|
|
4231
|
+
const archiveRoot = join11(root, ".harness", "archive");
|
|
4232
|
+
if (!await exists3(archiveRoot))
|
|
4233
|
+
return;
|
|
4234
|
+
for (const item2 of await readdir4(archiveRoot, { withFileTypes: true })) {
|
|
4235
|
+
if (item2.isSymbolicLink()) {
|
|
4236
|
+
throw new PushWorkflowError("symlink is not pushable", 6, "UNSAFE_SYMLINK");
|
|
4237
|
+
}
|
|
4238
|
+
if (!item2.isDirectory())
|
|
4239
|
+
continue;
|
|
4240
|
+
const summaryPath = join11(archiveRoot, item2.name, "reports", "final", "summary-data.json");
|
|
4241
|
+
try {
|
|
4242
|
+
const stats = await lstat3(summaryPath);
|
|
4243
|
+
if (stats.isSymbolicLink()) {
|
|
4244
|
+
throw new PushWorkflowError("symlink is not pushable", 6, "UNSAFE_SYMLINK");
|
|
4245
|
+
}
|
|
4246
|
+
if (!stats.isFile())
|
|
4247
|
+
continue;
|
|
4248
|
+
} catch (error) {
|
|
4249
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
4250
|
+
continue;
|
|
4251
|
+
throw error;
|
|
4252
|
+
}
|
|
4253
|
+
const relativePath = normalizeManagedPath(relative(root, summaryPath).replaceAll("\\", "/"));
|
|
4254
|
+
if (ARCHIVE_SUMMARY_PATH.test(relativePath)) {
|
|
4255
|
+
output.push(relativePath);
|
|
4256
|
+
}
|
|
4257
|
+
}
|
|
4258
|
+
}
|
|
4226
4259
|
function enabledHarnessAgents(project) {
|
|
4227
4260
|
return project.adapters.enabled.flatMap((agent) => {
|
|
4228
4261
|
const parsed = harnessAgentSchema.safeParse(agent);
|
|
@@ -4260,6 +4293,7 @@ async function managedFiles(projectRoot, project) {
|
|
|
4260
4293
|
for (const path of SHARED_MANAGED_ROOTS) {
|
|
4261
4294
|
await walkFiles(root, join11(root, path), paths);
|
|
4262
4295
|
}
|
|
4296
|
+
await walkArchiveSummaries(root, paths);
|
|
4263
4297
|
for (const adapter of adapters) {
|
|
4264
4298
|
if (adapter.rulesRoot !== null) {
|
|
4265
4299
|
await walkFiles(root, join11(root, adapter.rulesRoot), paths);
|