@harness-engineering/cli 2.3.0 → 2.4.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/agents/skills/claude-code/harness-compliance/SKILL.md +19 -0
- package/dist/agents/skills/codex/harness-compliance/SKILL.md +19 -0
- package/dist/agents/skills/cursor/harness-compliance/SKILL.md +19 -0
- package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +19 -0
- package/dist/{agents-md-N7YBQPE3.js → agents-md-ROTDQOXM.js} +3 -3
- package/dist/{architecture-PP7WERSV.js → architecture-I2G7PNQB.js} +4 -4
- package/dist/{assess-project-WXFCJQTX.js → assess-project-LO6NCLE7.js} +1 -1
- package/dist/bin/harness-mcp.js +15 -15
- package/dist/bin/harness.js +25 -25
- package/dist/{check-phase-gate-R3KQFBAH.js → check-phase-gate-52SQFNJB.js} +4 -4
- package/dist/{chunk-5PPV4WYY.js → chunk-27EHWQPK.js} +5 -5
- package/dist/{chunk-7PGYJO3L.js → chunk-2L2A6W6I.js} +3 -3
- package/dist/{chunk-GTXUUGFG.js → chunk-4XB37LST.js} +9 -9
- package/dist/{chunk-5KTTKXQN.js → chunk-54JTO4NZ.js} +1 -1
- package/dist/{chunk-D2LZUJLP.js → chunk-5YOHXTK3.js} +2 -2
- package/dist/{chunk-YG4ZBGEH.js → chunk-7BNK4M23.js} +1 -1
- package/dist/{chunk-MKPRB4PL.js → chunk-DJRRTZGD.js} +1 -1
- package/dist/{chunk-DLBMYLYR.js → chunk-FJJYQWUP.js} +1 -1
- package/dist/{chunk-4DWOMGUM.js → chunk-GDJ2MRYH.js} +476 -85
- package/dist/{chunk-4NFV5UZO.js → chunk-GN2CSZC6.js} +3 -3
- package/dist/{chunk-L3CEN42B.js → chunk-JGPOQJ73.js} +1 -1
- package/dist/{chunk-PW3U4YJV.js → chunk-KPWUZSHL.js} +32 -4
- package/dist/{chunk-MT2MMBUA.js → chunk-MQRKPF46.js} +9 -9
- package/dist/{chunk-NP2ZI6E3.js → chunk-MSBVH6ER.js} +1 -1
- package/dist/{chunk-LM4F5KBK.js → chunk-NGCM4B4V.js} +5 -5
- package/dist/{chunk-6CHNY3NJ.js → chunk-OFMQEUYN.js} +1 -1
- package/dist/{chunk-3LPOTTPX.js → chunk-Q43LM7CO.js} +92 -92
- package/dist/{chunk-GUIX2TMZ.js → chunk-RYVL76ZF.js} +1 -1
- package/dist/{chunk-YEBUFRTT.js → chunk-RZASDABE.js} +2 -2
- package/dist/{chunk-35FI23SO.js → chunk-TCR5PKMU.js} +216 -119
- package/dist/{chunk-KTWKW6KJ.js → chunk-TIQU5VY7.js} +1 -1
- package/dist/{chunk-KUVPSUG4.js → chunk-TVJZX53C.js} +1 -1
- package/dist/{chunk-KWD6FF7M.js → chunk-U4XK4BB3.js} +8 -8
- package/dist/{chunk-EJPR5VCT.js → chunk-WY2J54IZ.js} +6 -6
- package/dist/{chunk-BMM3GXV6.js → chunk-XPRGWHBL.js} +80 -37
- package/dist/{ci-workflow-GFCXFJ4G.js → ci-workflow-MYBH64CR.js} +3 -3
- package/dist/{dist-D27LJR2T.js → dist-SQAOKWXM.js} +5 -3
- package/dist/{dist-I4LWG3IN.js → dist-ZJGFXGIB.js} +10 -2
- package/dist/{docs-UXKDKPJF.js → docs-7CW7WUFB.js} +4 -4
- package/dist/{engine-A63FRDLF.js → engine-Y75QZW6N.js} +3 -3
- package/dist/{entropy-IFIP4ZP4.js → entropy-P6QELTFA.js} +3 -3
- package/dist/{feedback-W36DSJQA.js → feedback-PJWCDRRZ.js} +1 -1
- package/dist/{generate-agent-definitions-F4YMKQLP.js → generate-agent-definitions-ONDIJHHK.js} +4 -4
- package/dist/{glob-helper-FZPPTGJN.js → glob-helper-JE3MO4UD.js} +1 -1
- package/dist/{graph-loader-5MKHAJJF.js → graph-loader-TJU4E7KL.js} +1 -1
- package/dist/index.d.ts +66 -0
- package/dist/index.js +25 -25
- package/dist/{loader-4UAOGUSS.js → loader-DQRNWKOZ.js} +3 -3
- package/dist/{mcp-YW7PLXVQ.js → mcp-UUNLS3MC.js} +15 -15
- package/dist/{performance-AZ5UYPOQ.js → performance-7X3EFAOD.js} +4 -4
- package/dist/{review-pipeline-OLQVGBWJ.js → review-pipeline-GAJ22PBC.js} +3 -3
- package/dist/{runtime-GG3U5HH5.js → runtime-6TK6U72R.js} +3 -3
- package/dist/{scan-BIJYHOE7.js → scan-SFX5U3TE.js} +1 -1
- package/dist/{security-MYTRFSR7.js → security-ZSU643D7.js} +1 -1
- package/dist/{validate-QI4V4JY6.js → validate-IDX6RI3U.js} +4 -4
- package/dist/{validate-cross-check-XRSSAXJP.js → validate-cross-check-5YEWZ3EW.js} +3 -3
- package/package.json +7 -7
|
@@ -9,17 +9,19 @@ import {
|
|
|
9
9
|
isOk
|
|
10
10
|
} from "./chunk-RL4VMEXL.js";
|
|
11
11
|
import {
|
|
12
|
+
DEFAULT_SKIP_DIRS,
|
|
12
13
|
GraphStore,
|
|
13
14
|
NODE_STABILITY,
|
|
14
15
|
init_dist as init_dist2,
|
|
15
|
-
queryTraceability
|
|
16
|
-
|
|
16
|
+
queryTraceability,
|
|
17
|
+
skipDirGlobs
|
|
18
|
+
} from "./chunk-XPRGWHBL.js";
|
|
17
19
|
import {
|
|
18
20
|
__esm,
|
|
19
21
|
__export
|
|
20
22
|
} from "./chunk-KFQGP6VL.js";
|
|
21
23
|
|
|
22
|
-
// ../core/dist/chunk-
|
|
24
|
+
// ../core/dist/chunk-4UI65RLE.mjs
|
|
23
25
|
import { z } from "zod";
|
|
24
26
|
import { createHash } from "crypto";
|
|
25
27
|
import { minimatch } from "minimatch";
|
|
@@ -1421,7 +1423,7 @@ function mapForbiddenImportViolations(forbidden, rootDir, category) {
|
|
|
1421
1423
|
});
|
|
1422
1424
|
}
|
|
1423
1425
|
function isSkippedEntry(name) {
|
|
1424
|
-
return name.startsWith(".") || name
|
|
1426
|
+
return name.startsWith(".") || DEFAULT_SKIP_DIRS.has(name);
|
|
1425
1427
|
}
|
|
1426
1428
|
function isTsSourceFile(name) {
|
|
1427
1429
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -1510,7 +1512,7 @@ function extractImportSources(content, filePath) {
|
|
|
1510
1512
|
return sources;
|
|
1511
1513
|
}
|
|
1512
1514
|
function isSkippedEntry2(name) {
|
|
1513
|
-
return name.startsWith(".") || name
|
|
1515
|
+
return name.startsWith(".") || DEFAULT_SKIP_DIRS.has(name);
|
|
1514
1516
|
}
|
|
1515
1517
|
function isTsSourceFile2(name) {
|
|
1516
1518
|
if (!name.endsWith(".ts") && !name.endsWith(".tsx")) return false;
|
|
@@ -1746,10 +1748,12 @@ async function toHaveMaxDepDepth(received, maxDepth) {
|
|
|
1746
1748
|
};
|
|
1747
1749
|
}
|
|
1748
1750
|
var __defProp, __export2, ArchMetricCategorySchema, ViolationSchema, MetricResultSchema, CategoryBaselineSchema, ArchBaselineSchema, CategoryRegressionSchema, ArchDiffResultSchema, ThresholdConfigSchema, ArchConfigSchema, ConstraintRuleSchema, ViolationSnapshotSchema, ViolationHistorySchema, EmergenceConfidenceSchema, EmergentConstraintSuggestionSchema, EmergenceResultSchema, accessAsync, readFileAsync, EXTENSION_BY_LANG, JS_EXT_FALLBACKS, CircularDepsCollector, TypeScriptParser, EXTENSION_MAP, parserCache, initialized, GRAMMAR_MAP, TOP_LEVEL_TYPES, METHOD_TYPES, IDENTIFIER_TYPES, NAME_EXTRACTORS, pythonStrategy, goStrategy, RUST_USE_ARG_TYPES, RUST_PUB_ITEM_TYPES, rustStrategy, JAVA_IMPORT_TYPES, JAVA_EXPORT_TYPES, javaStrategy, STRATEGIES, TreeSitterParser, ParserRegistry, defaultRegistry, LayerViolationCollector, ArchBaselineManager, DEFAULT_THRESHOLDS, FUNCTION_PATTERNS, DECISION_PATTERNS, ComplexityCollector, DEFAULT_THRESHOLDS2, CouplingCollector, ForbiddenImportCollector, ModuleSizeCollector, DepDepthCollector, defaultCollectors, archMatchers;
|
|
1749
|
-
var
|
|
1750
|
-
"../core/dist/chunk-
|
|
1751
|
+
var init_chunk_4UI65RLE = __esm({
|
|
1752
|
+
"../core/dist/chunk-4UI65RLE.mjs"() {
|
|
1751
1753
|
"use strict";
|
|
1752
1754
|
init_dist();
|
|
1755
|
+
init_dist2();
|
|
1756
|
+
init_dist2();
|
|
1753
1757
|
__defProp = Object.defineProperty;
|
|
1754
1758
|
__export2 = (target, all) => {
|
|
1755
1759
|
for (var name in all)
|
|
@@ -2982,6 +2986,7 @@ __export(dist_exports, {
|
|
|
2982
2986
|
ViolationHistorySchema: () => ViolationHistorySchema,
|
|
2983
2987
|
ViolationSchema: () => ViolationSchema,
|
|
2984
2988
|
ViolationSnapshotSchema: () => ViolationSnapshotSchema,
|
|
2989
|
+
WHATWG_BAD_PORTS: () => WHATWG_BAD_PORTS,
|
|
2985
2990
|
acquireCompoundLock: () => acquireCompoundLock,
|
|
2986
2991
|
addProvenance: () => addProvenance,
|
|
2987
2992
|
agentConfigRules: () => agentConfigRules,
|
|
@@ -3007,6 +3012,7 @@ __export(dist_exports, {
|
|
|
3007
3012
|
archiveStream: () => archiveStream,
|
|
3008
3013
|
assembleCandidateReport: () => assembleCandidateReport,
|
|
3009
3014
|
assembleReport: () => assembleReport,
|
|
3015
|
+
assertPortUsable: () => assertPortUsable,
|
|
3010
3016
|
assertSanitized: () => assertSanitized,
|
|
3011
3017
|
assignFeature: () => assignFeature,
|
|
3012
3018
|
buildDependencyGraph: () => buildDependencyGraph,
|
|
@@ -3121,6 +3127,7 @@ __export(dist_exports, {
|
|
|
3121
3127
|
goRules: () => goRules,
|
|
3122
3128
|
injectionRules: () => injectionRules,
|
|
3123
3129
|
insecureDefaultsRules: () => insecureDefaultsRules,
|
|
3130
|
+
isBadPort: () => isBadPort,
|
|
3124
3131
|
isDuplicateFinding: () => isDuplicateFinding,
|
|
3125
3132
|
isErr: () => isErr,
|
|
3126
3133
|
isOk: () => isOk,
|
|
@@ -3256,6 +3263,7 @@ __export(dist_exports, {
|
|
|
3256
3263
|
validateAgentConfigs: () => validateAgentConfigs,
|
|
3257
3264
|
validateAgentsMap: () => validateAgentsMap,
|
|
3258
3265
|
validateBoundaries: () => validateBoundaries,
|
|
3266
|
+
validateBranchName: () => validateBranchName,
|
|
3259
3267
|
validateCommitMessage: () => validateCommitMessage,
|
|
3260
3268
|
validateConfig: () => validateConfig,
|
|
3261
3269
|
validateDependencies: () => validateDependencies,
|
|
@@ -3313,17 +3321,19 @@ import { join as join12 } from "path";
|
|
|
3313
3321
|
import * as fs3 from "fs";
|
|
3314
3322
|
import * as path3 from "path";
|
|
3315
3323
|
import { minimatch as minimatch2 } from "minimatch";
|
|
3324
|
+
import { minimatch as minimatch22 } from "minimatch";
|
|
3316
3325
|
import { basename as basename2 } from "path";
|
|
3317
3326
|
import { join as join14, basename as basename3 } from "path";
|
|
3318
3327
|
import { basename as basename4, dirname as dirname42 } from "path";
|
|
3319
3328
|
import { z as z3 } from "zod";
|
|
3320
3329
|
import * as fs4 from "fs/promises";
|
|
3321
3330
|
import * as fs5 from "fs/promises";
|
|
3322
|
-
import {
|
|
3323
|
-
import { minimatch as minimatch22 } from "minimatch";
|
|
3324
|
-
import { dirname as dirname5, resolve as resolve5 } from "path";
|
|
3325
|
-
import { dirname as dirname6, extname as extname2, resolve as resolve6 } from "path";
|
|
3331
|
+
import { resolve as resolve5 } from "path";
|
|
3326
3332
|
import { minimatch as minimatch3 } from "minimatch";
|
|
3333
|
+
import { join as join15, resolve as resolve42 } from "path";
|
|
3334
|
+
import { dirname as dirname5, resolve as resolve6 } from "path";
|
|
3335
|
+
import { dirname as dirname6, extname as extname2, resolve as resolve7 } from "path";
|
|
3336
|
+
import { minimatch as minimatch4 } from "minimatch";
|
|
3327
3337
|
import { readdirSync, statSync as statSync2 } from "fs";
|
|
3328
3338
|
import { join as join16 } from "path";
|
|
3329
3339
|
import * as fs6 from "fs";
|
|
@@ -3388,7 +3398,7 @@ import * as fs26 from "fs";
|
|
|
3388
3398
|
import * as path23 from "path";
|
|
3389
3399
|
import { z as z9 } from "zod";
|
|
3390
3400
|
import * as fs28 from "fs/promises";
|
|
3391
|
-
import { minimatch as
|
|
3401
|
+
import { minimatch as minimatch5 } from "minimatch";
|
|
3392
3402
|
import { z as z10 } from "zod";
|
|
3393
3403
|
import * as fs27 from "fs";
|
|
3394
3404
|
import * as path24 from "path";
|
|
@@ -3455,6 +3465,16 @@ import { execFile as execFile2 } from "child_process";
|
|
|
3455
3465
|
import { promisify as promisify3 } from "util";
|
|
3456
3466
|
import * as fs46 from "fs/promises";
|
|
3457
3467
|
import * as path45 from "path";
|
|
3468
|
+
function isBadPort(port) {
|
|
3469
|
+
return BAD_PORT_SET.has(port);
|
|
3470
|
+
}
|
|
3471
|
+
function assertPortUsable(port, label = "server") {
|
|
3472
|
+
if (isBadPort(port)) {
|
|
3473
|
+
throw new Error(
|
|
3474
|
+
`Refusing to bind ${label} to port ${port}: this port is on the WHATWG fetch bad-ports list, so browsers and Node's fetch() will reject every connection with "bad port". Choose a different port. See https://fetch.spec.whatwg.org/#port-blocking for the full list.`
|
|
3475
|
+
);
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3458
3478
|
async function validateFileStructure(projectPath, conventions) {
|
|
3459
3479
|
const missing = [];
|
|
3460
3480
|
const unexpected = [];
|
|
@@ -3714,7 +3734,7 @@ function isAgnixDisabled() {
|
|
|
3714
3734
|
return v === "1" || v === "true";
|
|
3715
3735
|
}
|
|
3716
3736
|
function runAgnix(cwd, strict, binPath, timeoutMs = DEFAULT_AGNIX_TIMEOUT_MS, spawnFn = spawn) {
|
|
3717
|
-
return new Promise((
|
|
3737
|
+
return new Promise((resolve10) => {
|
|
3718
3738
|
const args = ["--format", "json"];
|
|
3719
3739
|
if (strict) args.push("--strict");
|
|
3720
3740
|
args.push(cwd);
|
|
@@ -3728,7 +3748,7 @@ function runAgnix(cwd, strict, binPath, timeoutMs = DEFAULT_AGNIX_TIMEOUT_MS, sp
|
|
|
3728
3748
|
if (settled) return;
|
|
3729
3749
|
settled = true;
|
|
3730
3750
|
clearTimeout(timer);
|
|
3731
|
-
|
|
3751
|
+
resolve10(outcome);
|
|
3732
3752
|
};
|
|
3733
3753
|
const timer = setTimeout(() => {
|
|
3734
3754
|
child.kill("SIGKILL");
|
|
@@ -4789,6 +4809,75 @@ function validateRoadmapMode(config, projectRoot) {
|
|
|
4789
4809
|
}
|
|
4790
4810
|
return Ok(void 0);
|
|
4791
4811
|
}
|
|
4812
|
+
function validateBranchName(branchName, config) {
|
|
4813
|
+
for (const pattern of config.ignore) {
|
|
4814
|
+
if (minimatch2(branchName, pattern)) {
|
|
4815
|
+
return { valid: true, branchName };
|
|
4816
|
+
}
|
|
4817
|
+
}
|
|
4818
|
+
if (config.customRegex) {
|
|
4819
|
+
const regex = new RegExp(config.customRegex);
|
|
4820
|
+
if (!regex.test(branchName)) {
|
|
4821
|
+
return {
|
|
4822
|
+
valid: false,
|
|
4823
|
+
branchName,
|
|
4824
|
+
message: `Branch name "${branchName}" does not match the custom regex: ${config.customRegex}`
|
|
4825
|
+
};
|
|
4826
|
+
}
|
|
4827
|
+
return { valid: true, branchName };
|
|
4828
|
+
}
|
|
4829
|
+
const parts = branchName.split("/");
|
|
4830
|
+
if (parts.length < 2) {
|
|
4831
|
+
return {
|
|
4832
|
+
valid: false,
|
|
4833
|
+
branchName,
|
|
4834
|
+
message: `Branch name "${branchName}" must have a prefix followed by a slash (e.g., "feat/my-feature").`,
|
|
4835
|
+
suggestion: `Try renaming to "feat/${branchName}" or "fix/${branchName}".`
|
|
4836
|
+
};
|
|
4837
|
+
}
|
|
4838
|
+
const prefix = parts[0];
|
|
4839
|
+
const slug = parts.slice(1).join("/");
|
|
4840
|
+
if (!config.prefixes.includes(prefix)) {
|
|
4841
|
+
return {
|
|
4842
|
+
valid: false,
|
|
4843
|
+
branchName,
|
|
4844
|
+
message: `Prefix "${prefix}" is not allowed.`,
|
|
4845
|
+
suggestion: `Allowed prefixes: ${config.prefixes.join(", ")}.`
|
|
4846
|
+
};
|
|
4847
|
+
}
|
|
4848
|
+
if (config.enforceKebabCase) {
|
|
4849
|
+
for (const part of slug.split("/")) {
|
|
4850
|
+
const ticketMatch = part.match(TICKET_ID);
|
|
4851
|
+
if (ticketMatch) {
|
|
4852
|
+
const rest = ticketMatch[2];
|
|
4853
|
+
if (rest && !KEBAB_CASE.test(rest)) {
|
|
4854
|
+
return {
|
|
4855
|
+
valid: false,
|
|
4856
|
+
branchName,
|
|
4857
|
+
message: `Branch slug part "${part}" does not follow kebab-case after the ticket ID.`,
|
|
4858
|
+
suggestion: `Ensure the description after "${ticketMatch[1]}" uses kebab-case (lowercase, single hyphens, no leading/trailing hyphen).`
|
|
4859
|
+
};
|
|
4860
|
+
}
|
|
4861
|
+
} else if (!KEBAB_CASE.test(part)) {
|
|
4862
|
+
return {
|
|
4863
|
+
valid: false,
|
|
4864
|
+
branchName,
|
|
4865
|
+
message: `Branch slug part "${part}" must be in kebab-case (lowercase, single hyphens, no leading/trailing hyphen).`,
|
|
4866
|
+
suggestion: `Change "${part}" to match the convention.`
|
|
4867
|
+
};
|
|
4868
|
+
}
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
if (typeof config.maxLength === "number" && config.maxLength > 0 && slug.length > config.maxLength) {
|
|
4872
|
+
return {
|
|
4873
|
+
valid: false,
|
|
4874
|
+
branchName,
|
|
4875
|
+
message: `Branch slug is ${slug.length} characters; max allowed is ${config.maxLength}.`,
|
|
4876
|
+
suggestion: `Shorten the description after "${prefix}/" to ${config.maxLength} characters or fewer.`
|
|
4877
|
+
};
|
|
4878
|
+
}
|
|
4879
|
+
return { valid: true, branchName };
|
|
4880
|
+
}
|
|
4792
4881
|
function determineImportance(filePath) {
|
|
4793
4882
|
const name = basename2(filePath).toLowerCase();
|
|
4794
4883
|
if (name === "index.ts" || name === "index.js" || name === "main.ts") {
|
|
@@ -4830,7 +4919,7 @@ async function checkDocCoverage(domain, options = {}) {
|
|
|
4830
4919
|
const filteredSourceFiles = sourceFiles.filter((file) => {
|
|
4831
4920
|
const relativePath = relativePosix(sourceDir, file);
|
|
4832
4921
|
return !excludePatterns.some((pattern) => {
|
|
4833
|
-
return
|
|
4922
|
+
return minimatch22(relativePath, pattern, { dot: true }) || minimatch22(file, pattern, { dot: true });
|
|
4834
4923
|
});
|
|
4835
4924
|
});
|
|
4836
4925
|
const docFiles = await findFiles("**/*.md", docsDir);
|
|
@@ -5867,44 +5956,232 @@ function extractPackageEntries(rootDir, pkg) {
|
|
|
5867
5956
|
if (entries.length === 0 && typeof pkg["main"] === "string") {
|
|
5868
5957
|
entries.push(resolve42(rootDir, pkg["main"]));
|
|
5869
5958
|
}
|
|
5870
|
-
if (pkg["bin"])
|
|
5871
|
-
entries.push(...collectFieldEntries(rootDir, pkg["bin"]));
|
|
5872
|
-
}
|
|
5959
|
+
if (pkg["bin"]) entries.push(...collectFieldEntries(rootDir, pkg["bin"]));
|
|
5873
5960
|
return entries;
|
|
5874
5961
|
}
|
|
5875
|
-
async function
|
|
5876
|
-
|
|
5877
|
-
|
|
5962
|
+
async function readPackageJsonEntries(rootDir, pkgPath) {
|
|
5963
|
+
const content = await readFileContent(pkgPath);
|
|
5964
|
+
if (!content.ok) return [];
|
|
5965
|
+
try {
|
|
5966
|
+
const pkg = JSON.parse(content.value);
|
|
5967
|
+
return extractPackageEntries(rootDir, pkg);
|
|
5968
|
+
} catch {
|
|
5969
|
+
return [];
|
|
5878
5970
|
}
|
|
5971
|
+
}
|
|
5972
|
+
async function resolveTypeScript(rootDir) {
|
|
5879
5973
|
const pkgPath = join15(rootDir, "package.json");
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5974
|
+
const detected = await fileExists(pkgPath);
|
|
5975
|
+
if (detected) {
|
|
5976
|
+
const entries = await readPackageJsonEntries(rootDir, pkgPath);
|
|
5977
|
+
if (entries.length > 0) {
|
|
5978
|
+
return { language: "typescript", detected: true, entries, hints: TS_HINTS };
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
for (const conv of TS_CONVENTIONS) {
|
|
5982
|
+
const p = join15(rootDir, conv);
|
|
5983
|
+
if (await fileExists(p)) {
|
|
5984
|
+
return { language: "typescript", detected: true, entries: [p], hints: TS_HINTS };
|
|
5985
|
+
}
|
|
5986
|
+
}
|
|
5987
|
+
return { language: "typescript", detected, entries: [], hints: TS_HINTS };
|
|
5988
|
+
}
|
|
5989
|
+
async function detectPython(rootDir) {
|
|
5990
|
+
return await fileExists(join15(rootDir, "pyproject.toml")) || await fileExists(join15(rootDir, "setup.py")) || await fileExists(join15(rootDir, "requirements.txt"));
|
|
5991
|
+
}
|
|
5992
|
+
async function readPyProject(rootDir) {
|
|
5993
|
+
const pyproject = join15(rootDir, "pyproject.toml");
|
|
5994
|
+
if (!await fileExists(pyproject)) return { scriptTargets: [] };
|
|
5995
|
+
const content = await readFileContent(pyproject);
|
|
5996
|
+
if (!content.ok) return { scriptTargets: [] };
|
|
5997
|
+
return parsePyProject(content.value);
|
|
5998
|
+
}
|
|
5999
|
+
async function resolveScriptTargetEntry(rootDir, target) {
|
|
6000
|
+
const mod = target.split(":")[0];
|
|
6001
|
+
if (!mod) return void 0;
|
|
6002
|
+
const relPath2 = mod.replaceAll(".", "/") + ".py";
|
|
6003
|
+
for (const candidate of [join15(rootDir, relPath2), join15(rootDir, "src", relPath2)]) {
|
|
6004
|
+
if (await fileExists(candidate)) return candidate;
|
|
6005
|
+
}
|
|
6006
|
+
return void 0;
|
|
6007
|
+
}
|
|
6008
|
+
async function resolvePythonFromScripts(rootDir, targets) {
|
|
6009
|
+
const entries = [];
|
|
6010
|
+
for (const target of targets) {
|
|
6011
|
+
const entry = await resolveScriptTargetEntry(rootDir, target);
|
|
6012
|
+
if (entry) entries.push(entry);
|
|
6013
|
+
}
|
|
6014
|
+
return entries;
|
|
6015
|
+
}
|
|
6016
|
+
async function resolvePythonFromProjectName(rootDir, projectName) {
|
|
6017
|
+
if (!projectName) return [];
|
|
6018
|
+
const normalized = projectName.replaceAll("-", "_");
|
|
6019
|
+
const candidates = [
|
|
6020
|
+
join15(rootDir, normalized, "__init__.py"),
|
|
6021
|
+
join15(rootDir, normalized, "__main__.py"),
|
|
6022
|
+
join15(rootDir, "src", normalized, "__init__.py"),
|
|
6023
|
+
join15(rootDir, "src", normalized, "__main__.py")
|
|
6024
|
+
];
|
|
6025
|
+
const entries = [];
|
|
6026
|
+
for (const c of candidates) {
|
|
6027
|
+
if (await fileExists(c)) entries.push(c);
|
|
6028
|
+
}
|
|
6029
|
+
return entries;
|
|
6030
|
+
}
|
|
6031
|
+
async function resolvePythonConventions(rootDir) {
|
|
6032
|
+
const entries = [];
|
|
6033
|
+
for (const conv of PYTHON_CONVENTIONS) {
|
|
6034
|
+
const p = join15(rootDir, conv);
|
|
6035
|
+
if (await fileExists(p)) entries.push(p);
|
|
6036
|
+
}
|
|
6037
|
+
return entries;
|
|
6038
|
+
}
|
|
6039
|
+
async function findPythonTopLevelPackages(rootDir) {
|
|
6040
|
+
const found = await findFiles("*/__init__.py", rootDir);
|
|
6041
|
+
if (found.length > 0) return found;
|
|
6042
|
+
return findFiles("src/*/__init__.py", rootDir);
|
|
6043
|
+
}
|
|
6044
|
+
async function resolvePython(rootDir) {
|
|
6045
|
+
if (!await detectPython(rootDir)) {
|
|
6046
|
+
return { language: "python", detected: false, entries: [], hints: PYTHON_HINTS };
|
|
6047
|
+
}
|
|
6048
|
+
const info = await readPyProject(rootDir);
|
|
6049
|
+
const strategies = [
|
|
6050
|
+
() => resolvePythonFromScripts(rootDir, info.scriptTargets),
|
|
6051
|
+
() => resolvePythonFromProjectName(rootDir, info.projectName),
|
|
6052
|
+
() => resolvePythonConventions(rootDir),
|
|
6053
|
+
() => findPythonTopLevelPackages(rootDir)
|
|
6054
|
+
];
|
|
6055
|
+
for (const strategy of strategies) {
|
|
6056
|
+
const entries = await strategy();
|
|
6057
|
+
if (entries.length > 0) {
|
|
6058
|
+
return { language: "python", detected: true, entries, hints: PYTHON_HINTS };
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
return { language: "python", detected: true, entries: [], hints: PYTHON_HINTS };
|
|
6062
|
+
}
|
|
6063
|
+
async function resolveGo(rootDir) {
|
|
6064
|
+
const hints = ["Create main.go at the project root, or use the cmd/<name>/main.go layout"];
|
|
6065
|
+
const detected = await fileExists(join15(rootDir, "go.mod"));
|
|
6066
|
+
if (!detected) return { language: "go", detected: false, entries: [], hints };
|
|
6067
|
+
const entries = [];
|
|
6068
|
+
const mainGo = join15(rootDir, "main.go");
|
|
6069
|
+
if (await fileExists(mainGo)) entries.push(mainGo);
|
|
6070
|
+
entries.push(...await findFiles("cmd/*/main.go", rootDir));
|
|
6071
|
+
return { language: "go", detected: true, entries, hints };
|
|
6072
|
+
}
|
|
6073
|
+
async function resolveRust(rootDir) {
|
|
6074
|
+
const hints = [
|
|
6075
|
+
"Create src/main.rs or src/lib.rs",
|
|
6076
|
+
"Declare [[bin]] entries with a `path` in Cargo.toml"
|
|
6077
|
+
];
|
|
6078
|
+
const cargoPath = join15(rootDir, "Cargo.toml");
|
|
6079
|
+
const detected = await fileExists(cargoPath);
|
|
6080
|
+
if (!detected) return { language: "rust", detected: false, entries: [], hints };
|
|
6081
|
+
const entries = [];
|
|
6082
|
+
const content = await readFileContent(cargoPath);
|
|
6083
|
+
if (content.ok) {
|
|
6084
|
+
for (const bp of parseCargoBinPaths(content.value)) {
|
|
6085
|
+
const abs = resolve42(rootDir, bp);
|
|
6086
|
+
if (await fileExists(abs)) entries.push(abs);
|
|
5889
6087
|
}
|
|
5890
6088
|
}
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
return Ok([convPath]);
|
|
6089
|
+
if (entries.length === 0) {
|
|
6090
|
+
for (const conv of ["src/main.rs", "src/lib.rs"]) {
|
|
6091
|
+
const p = join15(rootDir, conv);
|
|
6092
|
+
if (await fileExists(p)) entries.push(p);
|
|
5896
6093
|
}
|
|
6094
|
+
entries.push(...await findFiles("src/bin/*.rs", rootDir));
|
|
5897
6095
|
}
|
|
6096
|
+
return { language: "rust", detected: true, entries, hints };
|
|
6097
|
+
}
|
|
6098
|
+
async function resolveJava(rootDir) {
|
|
6099
|
+
const hints = [
|
|
6100
|
+
"Place an entry class at src/main/java/**/Main.java (or *Application.java for Spring Boot)"
|
|
6101
|
+
];
|
|
6102
|
+
const detected = await fileExists(join15(rootDir, "pom.xml")) || await fileExists(join15(rootDir, "build.gradle")) || await fileExists(join15(rootDir, "build.gradle.kts"));
|
|
6103
|
+
if (!detected) return { language: "java", detected: false, entries: [], hints };
|
|
6104
|
+
const entries = [];
|
|
6105
|
+
entries.push(...await findFiles("src/main/java/**/Main.java", rootDir));
|
|
6106
|
+
entries.push(...await findFiles("src/main/java/**/*Application.java", rootDir));
|
|
6107
|
+
return { language: "java", detected: true, entries, hints };
|
|
6108
|
+
}
|
|
6109
|
+
function parseTomlLine(raw) {
|
|
6110
|
+
const line = raw.replace(/(^|\s)#.*$/, "").trim();
|
|
6111
|
+
if (!line) return {};
|
|
6112
|
+
const sectionMatch = /^\[([^\]]+)\]$/.exec(line);
|
|
6113
|
+
if (sectionMatch) return { section: sectionMatch[1] ?? "" };
|
|
6114
|
+
const eq = line.indexOf("=");
|
|
6115
|
+
if (eq <= 0) return {};
|
|
6116
|
+
return {
|
|
6117
|
+
key: line.slice(0, eq).trim(),
|
|
6118
|
+
value: stripTomlString2(line.slice(eq + 1).trim())
|
|
6119
|
+
};
|
|
6120
|
+
}
|
|
6121
|
+
function parsePyProject(content) {
|
|
6122
|
+
const result = { scriptTargets: [] };
|
|
6123
|
+
let section = null;
|
|
6124
|
+
for (const raw of content.split(/\r?\n/)) {
|
|
6125
|
+
const parsed = parseTomlLine(raw);
|
|
6126
|
+
if (parsed.section !== void 0) {
|
|
6127
|
+
section = parsed.section;
|
|
6128
|
+
continue;
|
|
6129
|
+
}
|
|
6130
|
+
if (parsed.key === void 0 || parsed.value === void 0) continue;
|
|
6131
|
+
if (section === "project" && parsed.key === "name") result.projectName = parsed.value;
|
|
6132
|
+
else if (section === "project.scripts") result.scriptTargets.push(parsed.value);
|
|
6133
|
+
}
|
|
6134
|
+
return result;
|
|
6135
|
+
}
|
|
6136
|
+
function parseCargoBinPaths(content) {
|
|
6137
|
+
const paths = [];
|
|
6138
|
+
let inBin = false;
|
|
6139
|
+
for (const raw of content.split(/\r?\n/)) {
|
|
6140
|
+
const line = raw.replace(/(^|\s)#.*$/, "").trim();
|
|
6141
|
+
if (!line) continue;
|
|
6142
|
+
if (line === "[[bin]]") {
|
|
6143
|
+
inBin = true;
|
|
6144
|
+
continue;
|
|
6145
|
+
}
|
|
6146
|
+
if (line.startsWith("[")) {
|
|
6147
|
+
inBin = false;
|
|
6148
|
+
continue;
|
|
6149
|
+
}
|
|
6150
|
+
if (!inBin) continue;
|
|
6151
|
+
const eq = line.indexOf("=");
|
|
6152
|
+
if (eq <= 0) continue;
|
|
6153
|
+
const key = line.slice(0, eq).trim();
|
|
6154
|
+
if (key === "path") paths.push(stripTomlString2(line.slice(eq + 1).trim()));
|
|
6155
|
+
}
|
|
6156
|
+
return paths;
|
|
6157
|
+
}
|
|
6158
|
+
function stripTomlString2(value) {
|
|
6159
|
+
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
6160
|
+
return value.slice(1, -1);
|
|
6161
|
+
}
|
|
6162
|
+
return value;
|
|
6163
|
+
}
|
|
6164
|
+
async function resolveEntryPoints(rootDir, explicitEntries) {
|
|
6165
|
+
if (explicitEntries && explicitEntries.length > 0) {
|
|
6166
|
+
return Ok(explicitEntries.map((e) => resolve42(rootDir, e)));
|
|
6167
|
+
}
|
|
6168
|
+
const resolvers = [resolveTypeScript, resolvePython, resolveGo, resolveRust, resolveJava];
|
|
6169
|
+
const resolutions = [];
|
|
6170
|
+
for (const resolver of resolvers) {
|
|
6171
|
+
const res = await resolver(rootDir);
|
|
6172
|
+
resolutions.push(res);
|
|
6173
|
+
if (res.entries.length > 0) return Ok(res.entries);
|
|
6174
|
+
}
|
|
6175
|
+
const detectedLangs = resolutions.filter((r) => r.detected);
|
|
6176
|
+
const suggestions = detectedLangs.length > 0 ? detectedLangs.flatMap((r) => r.hints) : resolutions.flatMap((r) => r.hints);
|
|
6177
|
+
suggestions.push("Specify entryPoints in config");
|
|
6178
|
+
const reason = detectedLangs.length > 0 ? `Detected ${detectedLangs.map((r) => r.language).join(", ")} project but found no entry points` : "No language manifest (package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml) and no conventional entry files found";
|
|
5898
6179
|
return Err(
|
|
5899
6180
|
createEntropyError(
|
|
5900
6181
|
"ENTRY_POINT_NOT_FOUND",
|
|
5901
6182
|
"Could not resolve entry points",
|
|
5902
|
-
{ reason
|
|
5903
|
-
|
|
5904
|
-
'Add "exports" or "main" to package.json',
|
|
5905
|
-
"Create src/index.ts",
|
|
5906
|
-
"Specify entryPoints in config"
|
|
5907
|
-
]
|
|
6183
|
+
{ reason },
|
|
6184
|
+
suggestions
|
|
5908
6185
|
)
|
|
5909
6186
|
);
|
|
5910
6187
|
}
|
|
@@ -6001,6 +6278,7 @@ function extractSymbolsFromNode(node) {
|
|
|
6001
6278
|
return [];
|
|
6002
6279
|
}
|
|
6003
6280
|
function extractInternalSymbols(ast) {
|
|
6281
|
+
if (ast.language !== "typescript" && ast.language !== "javascript") return [];
|
|
6004
6282
|
const body = ast.body;
|
|
6005
6283
|
if (!body?.body) return [];
|
|
6006
6284
|
const nodes = body.body;
|
|
@@ -6011,6 +6289,7 @@ function toJSDocComment(comment) {
|
|
|
6011
6289
|
return { content: comment.value, line: comment.loc?.start?.line || 0 };
|
|
6012
6290
|
}
|
|
6013
6291
|
function extractJSDocComments(ast) {
|
|
6292
|
+
if (ast.language !== "typescript" && ast.language !== "javascript") return [];
|
|
6014
6293
|
const body = ast.body;
|
|
6015
6294
|
if (!body?.comments) return [];
|
|
6016
6295
|
return body.comments.flatMap((c) => {
|
|
@@ -6068,19 +6347,16 @@ function extractAllCodeReferences(docs) {
|
|
|
6068
6347
|
}
|
|
6069
6348
|
async function buildSnapshot2(config) {
|
|
6070
6349
|
const startTime = Date.now();
|
|
6071
|
-
const
|
|
6072
|
-
const rootDir = resolve42(config.rootDir);
|
|
6350
|
+
const rootDir = resolve5(config.rootDir);
|
|
6073
6351
|
const entryPointsResult = await resolveEntryPoints(rootDir, config.entryPoints);
|
|
6074
6352
|
if (!entryPointsResult.ok) {
|
|
6075
6353
|
return Err(entryPointsResult.error);
|
|
6076
6354
|
}
|
|
6077
|
-
const
|
|
6078
|
-
const
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
"**/*.spec.ts"
|
|
6083
|
-
];
|
|
6355
|
+
const registry = getDefaultRegistry();
|
|
6356
|
+
const singleParser = config.parser;
|
|
6357
|
+
const parserForFile = (filePath) => singleParser ?? registry.getForFile(filePath);
|
|
6358
|
+
const includePatterns = config.include || DEFAULT_INCLUDE_PATTERNS;
|
|
6359
|
+
const excludePatterns = config.exclude || [...skipDirGlobs(), "**/*.test.ts", "**/*.spec.ts"];
|
|
6084
6360
|
let sourceFilePaths = [];
|
|
6085
6361
|
for (const pattern of includePatterns) {
|
|
6086
6362
|
const files2 = await findFiles(pattern, rootDir);
|
|
@@ -6088,14 +6364,16 @@ async function buildSnapshot2(config) {
|
|
|
6088
6364
|
}
|
|
6089
6365
|
sourceFilePaths = sourceFilePaths.filter((f) => {
|
|
6090
6366
|
const rel = relativePosix(rootDir, f);
|
|
6091
|
-
return !excludePatterns.some((p) =>
|
|
6367
|
+
return !excludePatterns.some((p) => minimatch3(rel, p));
|
|
6092
6368
|
});
|
|
6093
6369
|
const files = [];
|
|
6094
6370
|
for (const filePath of sourceFilePaths) {
|
|
6095
|
-
const
|
|
6371
|
+
const fileParser = parserForFile(filePath);
|
|
6372
|
+
if (!fileParser) continue;
|
|
6373
|
+
const parseResult = await fileParser.parseFile(filePath);
|
|
6096
6374
|
if (!parseResult.ok) continue;
|
|
6097
|
-
const importsResult =
|
|
6098
|
-
const exportsResult =
|
|
6375
|
+
const importsResult = fileParser.extractImports(parseResult.value);
|
|
6376
|
+
const exportsResult = fileParser.extractExports(parseResult.value);
|
|
6099
6377
|
const internalSymbols = extractInternalSymbols(parseResult.value);
|
|
6100
6378
|
const jsDocComments = extractJSDocComments(parseResult.value);
|
|
6101
6379
|
files.push({
|
|
@@ -6107,7 +6385,7 @@ async function buildSnapshot2(config) {
|
|
|
6107
6385
|
jsDocComments
|
|
6108
6386
|
});
|
|
6109
6387
|
}
|
|
6110
|
-
const graphResult = await buildDependencyGraph(sourceFilePaths,
|
|
6388
|
+
const graphResult = await buildDependencyGraph(sourceFilePaths, singleParser ?? registry);
|
|
6111
6389
|
const dependencyGraph = graphResult.ok ? graphResult.value : { nodes: [], edges: [] };
|
|
6112
6390
|
const docPatterns = config.docPaths || ["docs/**/*.md", "README.md", "**/README.md"];
|
|
6113
6391
|
let docFilePaths = [];
|
|
@@ -6242,7 +6520,7 @@ async function checkStructureDrift(snapshot, _config) {
|
|
|
6242
6520
|
for (const doc of snapshot.docs) {
|
|
6243
6521
|
const fileLinks = extractFileLinks(doc.content);
|
|
6244
6522
|
for (const { link, line } of fileLinks) {
|
|
6245
|
-
const resolvedPath =
|
|
6523
|
+
const resolvedPath = resolve6(dirname5(doc.path), link);
|
|
6246
6524
|
const exists = await fileExists(resolvedPath);
|
|
6247
6525
|
if (!exists) {
|
|
6248
6526
|
drifts.push({
|
|
@@ -6344,7 +6622,7 @@ function resolveImportToFile(importSource, fromFile, snapshot, fileIndex) {
|
|
|
6344
6622
|
}
|
|
6345
6623
|
const hasFile = fileIndex ? (p) => fileIndex.has(p) : (p) => snapshot.files.some((f) => f.path === p);
|
|
6346
6624
|
const fromDir = dirname6(fromFile);
|
|
6347
|
-
const resolved =
|
|
6625
|
+
const resolved = resolve7(fromDir, importSource);
|
|
6348
6626
|
const sourceExt = extname2(resolved);
|
|
6349
6627
|
const fallbacks = JS_EXT_FALLBACKS2[sourceExt];
|
|
6350
6628
|
if (fallbacks) {
|
|
@@ -6354,7 +6632,7 @@ function resolveImportToFile(importSource, fromFile, snapshot, fileIndex) {
|
|
|
6354
6632
|
if (hasFile(candidate)) return candidate;
|
|
6355
6633
|
}
|
|
6356
6634
|
for (const indexExt of [".ts", ".tsx", ".jsx"]) {
|
|
6357
|
-
const indexPath2 =
|
|
6635
|
+
const indexPath2 = resolve7(base, "index" + indexExt);
|
|
6358
6636
|
if (hasFile(indexPath2)) return indexPath2;
|
|
6359
6637
|
}
|
|
6360
6638
|
}
|
|
@@ -6365,7 +6643,7 @@ function resolveImportToFile(importSource, fromFile, snapshot, fileIndex) {
|
|
|
6365
6643
|
if (hasFile(candidate)) return candidate;
|
|
6366
6644
|
}
|
|
6367
6645
|
for (const indexExt of [".ts", ".tsx"]) {
|
|
6368
|
-
const indexPath2 =
|
|
6646
|
+
const indexPath2 = resolve7(resolved, "index" + indexExt);
|
|
6369
6647
|
if (hasFile(indexPath2)) return indexPath2;
|
|
6370
6648
|
}
|
|
6371
6649
|
}
|
|
@@ -6677,7 +6955,7 @@ async function detectDeadCode(snapshot, graphDeadCodeData, protectedRegions) {
|
|
|
6677
6955
|
}
|
|
6678
6956
|
function fileMatchesPattern(filePath, pattern, rootDir) {
|
|
6679
6957
|
const relativePath = relativePosix(rootDir, filePath);
|
|
6680
|
-
return
|
|
6958
|
+
return minimatch4(relativePath, pattern);
|
|
6681
6959
|
}
|
|
6682
6960
|
function checkMustExport(rule, file, message) {
|
|
6683
6961
|
if (rule.type !== "must-export") return [];
|
|
@@ -6881,7 +7159,7 @@ function dirSize(dirPath) {
|
|
|
6881
7159
|
return 0;
|
|
6882
7160
|
}
|
|
6883
7161
|
for (const entry of entries) {
|
|
6884
|
-
if (entry
|
|
7162
|
+
if (DEFAULT_SKIP_DIRS.has(entry)) continue;
|
|
6885
7163
|
const fullPath = join16(dirPath, entry);
|
|
6886
7164
|
try {
|
|
6887
7165
|
const stat2 = statSync2(fullPath);
|
|
@@ -8938,7 +9216,7 @@ function checkOverlap(newEntry, existingEntries, options) {
|
|
|
8938
9216
|
};
|
|
8939
9217
|
}
|
|
8940
9218
|
function sleep(ms) {
|
|
8941
|
-
return new Promise((
|
|
9219
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
8942
9220
|
}
|
|
8943
9221
|
async function acquireFileLock(lockPath) {
|
|
8944
9222
|
for (let attempt = 0; attempt < LOCK_RETRIES; attempt++) {
|
|
@@ -10415,8 +10693,7 @@ async function runDocsCheck(projectRoot, config) {
|
|
|
10415
10693
|
docsDir,
|
|
10416
10694
|
sourceDir: projectRoot,
|
|
10417
10695
|
excludePatterns: entropyConfig.excludePatterns || [
|
|
10418
|
-
|
|
10419
|
-
"**/dist/**",
|
|
10696
|
+
...skipDirGlobs(),
|
|
10420
10697
|
"**/*.test.ts",
|
|
10421
10698
|
"**/fixtures/**"
|
|
10422
10699
|
]
|
|
@@ -10481,12 +10758,7 @@ async function runSecurityCheck(projectRoot, config) {
|
|
|
10481
10758
|
const { glob: globFn } = await import("glob");
|
|
10482
10759
|
const sourceFiles = await globFn("**/*.{ts,tsx,js,jsx,go,py}", {
|
|
10483
10760
|
cwd: projectRoot,
|
|
10484
|
-
ignore: securityConfig.exclude ?? [
|
|
10485
|
-
"**/node_modules/**",
|
|
10486
|
-
"**/dist/**",
|
|
10487
|
-
"**/*.test.ts",
|
|
10488
|
-
"**/fixtures/**"
|
|
10489
|
-
],
|
|
10761
|
+
ignore: securityConfig.exclude ?? [...skipDirGlobs(), "**/*.test.ts", "**/fixtures/**"],
|
|
10490
10762
|
absolute: true
|
|
10491
10763
|
});
|
|
10492
10764
|
const scanResult = await scanner.scanFiles(sourceFiles);
|
|
@@ -13008,7 +13280,7 @@ function parseRepoParts(repo) {
|
|
|
13008
13280
|
return { owner: parts[0], repo: parts[1] };
|
|
13009
13281
|
}
|
|
13010
13282
|
function sleep2(ms) {
|
|
13011
|
-
return new Promise((
|
|
13283
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
13012
13284
|
}
|
|
13013
13285
|
async function fetchWithRetry(fetchFn, input, init, opts = RETRY_DEFAULTS) {
|
|
13014
13286
|
let lastResponse;
|
|
@@ -13158,8 +13430,8 @@ async function syncFromExternal(roadmap, adapter2, config, options, prefetchedTi
|
|
|
13158
13430
|
async function fullSync(roadmapPath, adapter2, config, options) {
|
|
13159
13431
|
const previousSync = syncMutex;
|
|
13160
13432
|
let releaseMutex;
|
|
13161
|
-
syncMutex = new Promise((
|
|
13162
|
-
releaseMutex =
|
|
13433
|
+
syncMutex = new Promise((resolve10) => {
|
|
13434
|
+
releaseMutex = resolve10;
|
|
13163
13435
|
});
|
|
13164
13436
|
await previousSync;
|
|
13165
13437
|
try {
|
|
@@ -14822,7 +15094,7 @@ function collectEvents(projectRoot, consent) {
|
|
|
14822
15094
|
);
|
|
14823
15095
|
}
|
|
14824
15096
|
function sleep3(ms) {
|
|
14825
|
-
return new Promise((
|
|
15097
|
+
return new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
14826
15098
|
}
|
|
14827
15099
|
async function send(events, apiKey) {
|
|
14828
15100
|
if (events.length === 0) return;
|
|
@@ -15395,14 +15667,20 @@ function assembleCandidateReport(input) {
|
|
|
15395
15667
|
}
|
|
15396
15668
|
return lines.join("\n");
|
|
15397
15669
|
}
|
|
15398
|
-
var VALID_TYPES, CONVENTIONAL_PATTERN, LOOKBACK_PATTERN, PulseDbSourceSchema, PulseSourcesSchema, PulseConfigSchema, BUG_TRACK_CATEGORIES, KNOWLEDGE_TRACK_CATEGORIES, ALL_SOLUTION_CATEGORIES, ISO_DATE, BugTrackSchema, KnowledgeTrackSchema, BaseFrontmatter, SolutionDocFrontmatterSchema, TRACK_CATEGORIES, DEFAULT_AGNIX_TIMEOUT_MS, HARNESS_AGNIX_DISABLE, HARNESS_AGNIX_BIN, CLAUDE_MD_WARN_BYTES, CLAUDE_MD_ERROR_BYTES, CONTEXT_FILES, MIN_DESCRIPTION_LENGTH, SETTINGS_PATHS, KNOWN_HOOK_EVENTS, MCP_SETTINGS_FILES, REQUIRED_SECTIONS, SETTINGS_FILES, KNOWN_AGNIX_TOOLS, DEFAULT_SECTIONS, DEFAULT_RATIOS, NODE_TYPE_TO_CATEGORY, SECTION_LEVEL_MAP, DEFAULT_LEVEL, DEFAULT_BUDGET, DEFAULT_LOADER_CONFIG, LEVEL_FRACTIONS, PHASE_PRIORITIES, ManifestSchema, BundleConstraintsSchema, BundleSchema, ContributionsSchema, LockfilePackageSchema, LockfileSchema, SharableLayerSchema, SharableForbiddenImportSchema, SharableBoundaryConfigSchema, SharableSecurityRulesSchema, VALID_SCOPES, LINE_PATTERN, START_PATTERN, END_PATTERN, CODE_BLOCK_LANGUAGES, DEFAULT_DRIFT_CONFIG, JS_EXT_FALLBACKS2, FILE_TYPES, EXPORT_TYPES, CONVENTION_DESCRIPTIONS, RULE_CHECKERS, EntropyAnalyzer, readFile62, writeFile32, unlink22, mkdir22, copyFile2, DEFAULT_FIX_CONFIG, EXPORT_TYPE_KEYWORD, ALWAYS_UNSAFE_TYPES, idCounter, DEAD_CODE_FIX_ACTIONS, MustExportRuleSchema, MustExportDefaultRuleSchema, NoExportRuleSchema, MustImportRuleSchema, NoImportRuleSchema, NamingRuleSchema, MaxExportsRuleSchema, MaxLinesRuleSchema, RequireJSDocRuleSchema, RuleSchema, ConfigPatternSchema, PatternConfigSchema, DriftConfigSchema, DeadCodeConfigSchema, EntropyConfigSchema, BaselineManager, BenchmarkRunner, RegressionDetector,
|
|
15670
|
+
var WHATWG_BAD_PORTS, BAD_PORT_SET, VALID_TYPES, CONVENTIONAL_PATTERN, LOOKBACK_PATTERN, PulseDbSourceSchema, PulseSourcesSchema, PulseConfigSchema, BUG_TRACK_CATEGORIES, KNOWLEDGE_TRACK_CATEGORIES, ALL_SOLUTION_CATEGORIES, ISO_DATE, BugTrackSchema, KnowledgeTrackSchema, BaseFrontmatter, SolutionDocFrontmatterSchema, TRACK_CATEGORIES, DEFAULT_AGNIX_TIMEOUT_MS, HARNESS_AGNIX_DISABLE, HARNESS_AGNIX_BIN, CLAUDE_MD_WARN_BYTES, CLAUDE_MD_ERROR_BYTES, CONTEXT_FILES, MIN_DESCRIPTION_LENGTH, SETTINGS_PATHS, KNOWN_HOOK_EVENTS, MCP_SETTINGS_FILES, REQUIRED_SECTIONS, SETTINGS_FILES, KNOWN_AGNIX_TOOLS, KEBAB_CASE, TICKET_ID, DEFAULT_SECTIONS, DEFAULT_RATIOS, NODE_TYPE_TO_CATEGORY, SECTION_LEVEL_MAP, DEFAULT_LEVEL, DEFAULT_BUDGET, DEFAULT_LOADER_CONFIG, LEVEL_FRACTIONS, PHASE_PRIORITIES, ManifestSchema, BundleConstraintsSchema, BundleSchema, ContributionsSchema, LockfilePackageSchema, LockfileSchema, SharableLayerSchema, SharableForbiddenImportSchema, SharableBoundaryConfigSchema, SharableSecurityRulesSchema, VALID_SCOPES, LINE_PATTERN, START_PATTERN, END_PATTERN, TS_HINTS, TS_CONVENTIONS, PYTHON_HINTS, PYTHON_CONVENTIONS, DEFAULT_INCLUDE_PATTERNS, CODE_BLOCK_LANGUAGES, DEFAULT_DRIFT_CONFIG, JS_EXT_FALLBACKS2, FILE_TYPES, EXPORT_TYPES, CONVENTION_DESCRIPTIONS, RULE_CHECKERS, EntropyAnalyzer, readFile62, writeFile32, unlink22, mkdir22, copyFile2, DEFAULT_FIX_CONFIG, EXPORT_TYPE_KEYWORD, ALWAYS_UNSAFE_TYPES, idCounter, DEAD_CODE_FIX_ACTIONS, MustExportRuleSchema, MustExportDefaultRuleSchema, NoExportRuleSchema, MustImportRuleSchema, NoImportRuleSchema, NamingRuleSchema, MaxExportsRuleSchema, MaxLinesRuleSchema, RequireJSDocRuleSchema, RuleSchema, ConfigPatternSchema, PatternConfigSchema, DriftConfigSchema, DeadCodeConfigSchema, EntropyConfigSchema, BaselineManager, BenchmarkRunner, RegressionDetector, SOURCE_EXTENSIONS, FUNCTION_DECL_RE, CONST_DECL_RE, CriticalPathResolver, NoOpTelemetryAdapter, NoOpExecutor, ConsoleSink, feedbackConfig, ChecklistBuilder, AgentActionEmitter, globalEmitter, FileSink, NoOpSink, CategorySnapshotSchema, TimelineSnapshotSchema, TimelineFileSchema, TrendLineSchema, TrendResultSchema, DEFAULT_STABILITY_THRESHOLDS, ALL_CATEGORIES, TimelineManager, ConfidenceTierSchema, RegressionResultSchema, DirectionSchema, CategoryForecastSchema, SpecImpactSignalsSchema, SpecImpactEstimateSchema, ContributingFeatureSchema, AdjustedForecastSchema, PredictionWarningSchema, StabilityForecastSchema, PredictionResultSchema, PredictionOptionsSchema, VALID_STATUSES, EM_DASH, VALID_PRIORITIES, ALL_CATEGORIES2, DIRECTION_THRESHOLD, PredictionEngine, DEFAULT_COEFFICIENTS, SpecImpactEstimator, EMPTY_HISTORY, ViolationHistoryManager, NORMALIZERS, MAX_SAMPLES, DEFAULT_WINDOW_WEEKS, DEFAULT_MIN_OCCURRENCES, FailureEntrySchema, HandoffSchema, GateCheckSchema, GateResultSchema, GateConfigSchema, HarnessStateSchema, DEFAULT_STATE, StreamInfoSchema, StreamIndexSchema, DEFAULT_STREAM_INDEX, HARNESS_DIR, STATE_FILE, LEARNINGS_FILE, FAILURES_FILE, HANDOFF_FILE, GATE_CONFIG_FILE, INDEX_FILE, SESSIONS_DIR, SESSION_INDEX_FILE, SUMMARY_FILE, SESSION_STATE_FILE, ARCHIVE_DIR, CONTENT_HASHES_FILE, EVENTS_FILE, STREAMS_DIR, STREAM_NAME_REGEX, branchCache, BRANCH_CACHE_TTL_MS, STATE_FILES, MAX_CACHE_ENTRIES, learningsCacheMap, WEIGHTS, LOCK_RETRIES, LOCK_BACKOFFS, PROMOTABLE_OUTCOMES, failuresCacheMap, FAILURE_LINE_REGEX, SAFE_GATE_COMMAND, SkillEventSchema, knownHashesCache, EVENT_FORMATTERS, RuleRegistry, DEFAULT_SECURITY_CONFIG, RuleOverrideSchema, SecurityConfigSchema, secretRules, injectionRules, xssRules, cryptoRules, pathTraversalRules, networkRules, deserializationRules, agentConfigRules, mcpRules, insecureDefaultsRules, sharpEdgesRules, nodeRules, expressRules, reactRules, goRules, SecurityScanner, hiddenUnicodePatterns, reRolingPatterns, permissionEscalationPatterns, encodedPayloadPatterns, indirectInjectionPatterns, contextManipulationPatterns, socialEngineeringPatterns, suspiciousPatterns, ALL_PATTERNS, DESTRUCTIVE_BASH, TAINT_DURATION_MS, DEFAULT_SESSION_ID, SecurityCategorySnapshotSchema, SupplyChainSnapshotSchema, SecurityTimelineSnapshotSchema, FindingLifecycleSchema, SecurityTimelineFileSchema, DirectionSchema2, SecurityTrendLineSchema, TrendAttributionSchema, SecurityTrendResultSchema, TimeToFixStatsSchema, TimeToFixResultSchema, EMPTY_SUPPLY_CHAIN, SecurityTimelineManager, ALL_CHECKS, STATUS_ICONS, CINotifier, ExclusionSet, PREFIX_PATTERNS, TEST_FILE_PATTERN, MD_FILE_PATTERN, ALL_DOMAINS, SECURITY_PATTERNS, JS_EXT_FALLBACKS22, SEVERITY_RANK, SEVERITY_ORDER, SEVERITY_LABELS, VALIDATED_BY_RANK, VALIDATION_SCORES, DOMAIN_BASELINES, FACTOR_WEIGHTS, EVIDENCE_SATURATION, CORROBORATED_AGREEMENT, STANDALONE_AGREEMENT, AGREEMENT_LINE_GAP, COMPLIANCE_DESCRIPTOR, EXPORT_RE, BUG_DETECTION_DESCRIPTOR, SECURITY_DESCRIPTOR, EVAL_PATTERN, SECRET_PATTERNS, SQL_CONCAT_PATTERN, SHELL_EXEC_PATTERN, ARCHITECTURE_DESCRIPTOR, LARGE_FILE_THRESHOLD, VIOLATION_FILE_RE, LEARNINGS_DESCRIPTOR, RELEVANCE_THRESHOLD, AGENT_DESCRIPTORS, AGENT_RUNNERS, DOWNGRADE_MAP, DEFAULT_PROVIDER_TIERS, SMALL_SUGGESTION_LINE_LIMIT, FILE_LINE_RANGE_PATTERN, FILE_LINE_PATTERN, FILE_ONLY_PATTERN, SECURITY_SENSITIVE_PATH, MIGRATION_PATH, TEST_PATH, CONFIG_PATH, STAGE_DOMAINS, EM_DASH2, STATUS_RANK, RETRY_DEFAULTS, GitHubIssuesSyncAdapter, syncMutex, PRIORITY_RANK, PRIORITY_RANK2, POSITION_WEIGHT, DEPENDENTS_WEIGHT, AFFINITY_WEIGHT, ConflictError, DEFAULTS, GitHubHttp, ETagStore, START_MARKER, END_MARKER, SERIALIZER_FIELDS, GitHubIssuesTrackerAdapter, migrate_exports, HASH_RE, InteractionTypeSchema, QuestionSchema, ConfirmationSchema, TransitionSchema, EmitInteractionInputSchema, ProjectScanner, SHELL_TEMPLATE, STYLES, SCRIPTS, MockLLMService, llmService, ContentPipeline, BlueprintGenerator, TOKENS_PER_MILLION, fallback_default, LITELLM_PRICING_URL, CACHE_TTL_MS, STALENESS_WARNING_DAYS, MICRODOLLARS_PER_DOLLAR, TOKENS_PER_MILLION2, StructuralStrategy, DEFAULT_TOKEN_BUDGET, CHARS_PER_TOKEN, TRUNCATION_MARKER, TruncationStrategy, CompactionPipeline, STABILITY_LOOKUP, TIER_ORDER, AnthropicCacheAdapter, TIER_ORDER2, OpenAICacheAdapter, TIER_ORDER3, CACHED_CONTENT_MARKER, GeminiCacheAdapter, VERSION, POSTHOG_BATCH_URL, MAX_ATTEMPTS, TIMEOUT_MS, CompoundLockHeldError, KNOWN_CATEGORIES, ALLOWED_FIELD_KEYS, PII_TOKENS, PII_FIELD_DENYLIST, PII_LINE_RE, ALLOWED_SET, PulseAdapterAlreadyRegisteredError, REGISTRY, MOCK_ADAPTER_NAME, ALLOWED_FIELD_SET, adapter, LOOKBACK_RE, MAX_LINES, INLINE_TEMPLATE, TRUNCATION_MARKER2, execFileAsync, FIX_RE, EMPTY_REPO_RE, execFileAsync2, TRACK_CATEGORIES2, STOPWORDS, KEYWORD_TO_CATEGORY;
|
|
15399
15671
|
var init_dist3 = __esm({
|
|
15400
15672
|
"../core/dist/index.mjs"() {
|
|
15401
|
-
|
|
15673
|
+
init_chunk_4UI65RLE();
|
|
15402
15674
|
init_dist();
|
|
15675
|
+
init_dist2();
|
|
15676
|
+
init_dist2();
|
|
15677
|
+
init_dist2();
|
|
15403
15678
|
init_dist();
|
|
15404
15679
|
init_dist();
|
|
15405
15680
|
init_dist2();
|
|
15681
|
+
init_dist2();
|
|
15682
|
+
init_dist2();
|
|
15683
|
+
init_dist2();
|
|
15406
15684
|
init_dist();
|
|
15407
15685
|
init_dist();
|
|
15408
15686
|
init_dist();
|
|
@@ -15410,6 +15688,91 @@ var init_dist3 = __esm({
|
|
|
15410
15688
|
init_dist();
|
|
15411
15689
|
init_dist();
|
|
15412
15690
|
init_dist2();
|
|
15691
|
+
WHATWG_BAD_PORTS = Object.freeze([
|
|
15692
|
+
1,
|
|
15693
|
+
7,
|
|
15694
|
+
9,
|
|
15695
|
+
11,
|
|
15696
|
+
13,
|
|
15697
|
+
15,
|
|
15698
|
+
17,
|
|
15699
|
+
19,
|
|
15700
|
+
20,
|
|
15701
|
+
21,
|
|
15702
|
+
22,
|
|
15703
|
+
23,
|
|
15704
|
+
25,
|
|
15705
|
+
37,
|
|
15706
|
+
42,
|
|
15707
|
+
43,
|
|
15708
|
+
53,
|
|
15709
|
+
69,
|
|
15710
|
+
77,
|
|
15711
|
+
79,
|
|
15712
|
+
87,
|
|
15713
|
+
95,
|
|
15714
|
+
101,
|
|
15715
|
+
102,
|
|
15716
|
+
103,
|
|
15717
|
+
104,
|
|
15718
|
+
109,
|
|
15719
|
+
110,
|
|
15720
|
+
111,
|
|
15721
|
+
113,
|
|
15722
|
+
115,
|
|
15723
|
+
117,
|
|
15724
|
+
119,
|
|
15725
|
+
123,
|
|
15726
|
+
135,
|
|
15727
|
+
137,
|
|
15728
|
+
139,
|
|
15729
|
+
143,
|
|
15730
|
+
161,
|
|
15731
|
+
179,
|
|
15732
|
+
389,
|
|
15733
|
+
427,
|
|
15734
|
+
465,
|
|
15735
|
+
512,
|
|
15736
|
+
513,
|
|
15737
|
+
514,
|
|
15738
|
+
515,
|
|
15739
|
+
526,
|
|
15740
|
+
530,
|
|
15741
|
+
531,
|
|
15742
|
+
532,
|
|
15743
|
+
540,
|
|
15744
|
+
548,
|
|
15745
|
+
554,
|
|
15746
|
+
556,
|
|
15747
|
+
563,
|
|
15748
|
+
587,
|
|
15749
|
+
601,
|
|
15750
|
+
636,
|
|
15751
|
+
989,
|
|
15752
|
+
990,
|
|
15753
|
+
993,
|
|
15754
|
+
995,
|
|
15755
|
+
1719,
|
|
15756
|
+
1720,
|
|
15757
|
+
1723,
|
|
15758
|
+
2049,
|
|
15759
|
+
3659,
|
|
15760
|
+
4045,
|
|
15761
|
+
4190,
|
|
15762
|
+
5060,
|
|
15763
|
+
5061,
|
|
15764
|
+
6e3,
|
|
15765
|
+
6566,
|
|
15766
|
+
6665,
|
|
15767
|
+
6666,
|
|
15768
|
+
6667,
|
|
15769
|
+
6668,
|
|
15770
|
+
6669,
|
|
15771
|
+
6679,
|
|
15772
|
+
6697,
|
|
15773
|
+
10080
|
|
15774
|
+
]);
|
|
15775
|
+
BAD_PORT_SET = new Set(WHATWG_BAD_PORTS);
|
|
15413
15776
|
VALID_TYPES = [
|
|
15414
15777
|
"feat",
|
|
15415
15778
|
"fix",
|
|
@@ -15534,6 +15897,8 @@ var init_dist3 = __esm({
|
|
|
15534
15897
|
"kiro",
|
|
15535
15898
|
"windsurf"
|
|
15536
15899
|
]);
|
|
15900
|
+
KEBAB_CASE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
15901
|
+
TICKET_ID = /^([A-Z0-9]+-[0-9]+)-(.*)$/;
|
|
15537
15902
|
DEFAULT_SECTIONS = [
|
|
15538
15903
|
{
|
|
15539
15904
|
name: "Documentation",
|
|
@@ -15724,6 +16089,32 @@ var init_dist3 = __esm({
|
|
|
15724
16089
|
LINE_PATTERN = /^[ \t]*(?:\/\/|#)\s*harness-ignore(?!\s*(?:SEC-|-start|-end))(?:\s+([\w,]+))?(?::\s*(.+))?$/;
|
|
15725
16090
|
START_PATTERN = /^[ \t]*(?:\/\/|#)\s*harness-ignore-start(?:\s+([\w,]+))?(?::\s*(.+))?$/;
|
|
15726
16091
|
END_PATTERN = /^[ \t]*(?:\/\/|#)\s*harness-ignore-end\s*$/;
|
|
16092
|
+
TS_HINTS = ['Add "exports" or "main" to package.json', "Create src/index.ts"];
|
|
16093
|
+
TS_CONVENTIONS = ["src/index.ts", "src/main.ts", "src/index.tsx", "index.ts", "main.ts"];
|
|
16094
|
+
PYTHON_HINTS = [
|
|
16095
|
+
"Add an entry to [project.scripts] in pyproject.toml",
|
|
16096
|
+
"Create main.py or <package>/__main__.py"
|
|
16097
|
+
];
|
|
16098
|
+
PYTHON_CONVENTIONS = [
|
|
16099
|
+
"__main__.py",
|
|
16100
|
+
"main.py",
|
|
16101
|
+
"app.py",
|
|
16102
|
+
"src/__main__.py",
|
|
16103
|
+
"src/main.py",
|
|
16104
|
+
"src/app.py"
|
|
16105
|
+
];
|
|
16106
|
+
DEFAULT_INCLUDE_PATTERNS = [
|
|
16107
|
+
"**/*.ts",
|
|
16108
|
+
"**/*.tsx",
|
|
16109
|
+
"**/*.js",
|
|
16110
|
+
"**/*.jsx",
|
|
16111
|
+
"**/*.mjs",
|
|
16112
|
+
"**/*.cjs",
|
|
16113
|
+
"**/*.py",
|
|
16114
|
+
"**/*.go",
|
|
16115
|
+
"**/*.rs",
|
|
16116
|
+
"**/*.java"
|
|
16117
|
+
];
|
|
15727
16118
|
CODE_BLOCK_LANGUAGES = /* @__PURE__ */ new Set(["typescript", "ts", "javascript", "js"]);
|
|
15728
16119
|
DEFAULT_DRIFT_CONFIG = {
|
|
15729
16120
|
docPaths: [],
|
|
@@ -15762,10 +16153,7 @@ var init_dist3 = __esm({
|
|
|
15762
16153
|
snapshot;
|
|
15763
16154
|
report;
|
|
15764
16155
|
constructor(config) {
|
|
15765
|
-
this.config = {
|
|
15766
|
-
...config,
|
|
15767
|
-
parser: config.parser || new TypeScriptParser()
|
|
15768
|
-
};
|
|
16156
|
+
this.config = { ...config };
|
|
15769
16157
|
}
|
|
15770
16158
|
/**
|
|
15771
16159
|
* Run full entropy analysis.
|
|
@@ -16357,7 +16745,6 @@ var init_dist3 = __esm({
|
|
|
16357
16745
|
};
|
|
16358
16746
|
}
|
|
16359
16747
|
};
|
|
16360
|
-
SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "dist", ".git"]);
|
|
16361
16748
|
SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx"]);
|
|
16362
16749
|
FUNCTION_DECL_RE = /(?:export\s+)?(?:async\s+)?function\s+(\w+)/;
|
|
16363
16750
|
CONST_DECL_RE = /(?:export\s+)?(?:const|let)\s+(\w+)\s*=/;
|
|
@@ -16398,7 +16785,7 @@ var init_dist3 = __esm({
|
|
|
16398
16785
|
}
|
|
16399
16786
|
for (const item of items) {
|
|
16400
16787
|
if (item.isDirectory()) {
|
|
16401
|
-
if (
|
|
16788
|
+
if (DEFAULT_SKIP_DIRS.has(item.name)) continue;
|
|
16402
16789
|
this.walkDir(path4.join(dir, item.name), entries);
|
|
16403
16790
|
} else if (item.isFile() && SOURCE_EXTENSIONS.has(path4.extname(item.name))) {
|
|
16404
16791
|
this.scanFile(path4.join(dir, item.name), entries);
|
|
@@ -17878,14 +18265,14 @@ var init_dist3 = __esm({
|
|
|
17878
18265
|
enabled: true,
|
|
17879
18266
|
strict: false,
|
|
17880
18267
|
rules: {},
|
|
17881
|
-
exclude: [
|
|
18268
|
+
exclude: [...skipDirGlobs(), "**/*.test.ts", "**/fixtures/**"]
|
|
17882
18269
|
};
|
|
17883
18270
|
RuleOverrideSchema = z10.enum(["off", "error", "warning", "info"]);
|
|
17884
18271
|
SecurityConfigSchema = z10.object({
|
|
17885
18272
|
enabled: z10.boolean().default(true),
|
|
17886
18273
|
strict: z10.boolean().default(false),
|
|
17887
18274
|
rules: z10.record(z10.string(), RuleOverrideSchema).optional().default({}),
|
|
17888
|
-
exclude: z10.array(z10.string()).optional().default([
|
|
18275
|
+
exclude: z10.array(z10.string()).optional().default([...skipDirGlobs(), "**/*.test.ts", "**/fixtures/**"]),
|
|
17889
18276
|
external: z10.object({
|
|
17890
18277
|
semgrep: z10.object({
|
|
17891
18278
|
enabled: z10.union([z10.literal("auto"), z10.boolean()]).default("auto"),
|
|
@@ -18691,7 +19078,7 @@ var init_dist3 = __esm({
|
|
|
18691
19078
|
const applicableRules = this.activeRules.filter((rule) => {
|
|
18692
19079
|
if (!rule.fileGlob) return true;
|
|
18693
19080
|
const globs = rule.fileGlob.split(",").map((g) => g.trim());
|
|
18694
|
-
return globs.some((glob5) =>
|
|
19081
|
+
return globs.some((glob5) => minimatch5(filePath, glob5, { dot: true }));
|
|
18695
19082
|
});
|
|
18696
19083
|
return this.scanLinesWithRules(lines, applicableRules, filePath, startLine);
|
|
18697
19084
|
}
|
|
@@ -21300,6 +21687,9 @@ export {
|
|
|
21300
21687
|
architecture,
|
|
21301
21688
|
archModule,
|
|
21302
21689
|
archMatchers,
|
|
21690
|
+
WHATWG_BAD_PORTS,
|
|
21691
|
+
isBadPort,
|
|
21692
|
+
assertPortUsable,
|
|
21303
21693
|
validateFileStructure,
|
|
21304
21694
|
validateConfig,
|
|
21305
21695
|
validateCommitMessage,
|
|
@@ -21320,6 +21710,7 @@ export {
|
|
|
21320
21710
|
validateAgentConfigs,
|
|
21321
21711
|
getRoadmapMode,
|
|
21322
21712
|
validateRoadmapMode,
|
|
21713
|
+
validateBranchName,
|
|
21323
21714
|
checkDocCoverage,
|
|
21324
21715
|
validateKnowledgeMap,
|
|
21325
21716
|
generateAgentsMap,
|