@harness-engineering/cli 2.3.1 → 2.4.1
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-2M46KG4F.js +10 -0
- package/dist/{architecture-544ISXDI.js → architecture-3ZSN5RDQ.js} +5 -5
- package/dist/{assess-project-PBO6XFJC.js → assess-project-KZWFQEJE.js} +5 -3
- package/dist/bin/harness-mcp.js +16 -16
- package/dist/bin/harness.js +29 -27
- package/dist/{check-phase-gate-BZU4DGF3.js → check-phase-gate-EWV5VYTG.js} +5 -5
- package/dist/{chunk-YNG7BWGB.js → chunk-2TGCYJMT.js} +340 -12
- package/dist/{chunk-TIQU5VY7.js → chunk-5FDBXUFW.js} +1 -1
- package/dist/{chunk-7BNK4M23.js → chunk-5XLLIYYL.js} +1 -1
- package/dist/{chunk-KJR4Z2YC.js → chunk-73KZ2E47.js} +9 -9
- package/dist/{chunk-J4MX5DIA.js → chunk-7RZZV73V.js} +5 -5
- package/dist/{chunk-TIJXG4UB.js → chunk-B2ZYMQGT.js} +64 -30
- package/dist/{chunk-XPRGWHBL.js → chunk-BCFDGOMA.js} +1 -1
- package/dist/{chunk-YI6NTL72.js → chunk-GLKASJZE.js} +6 -6
- package/dist/{chunk-N6DVSOLZ.js → chunk-GOSUZC5H.js} +608 -211
- package/dist/{chunk-22OKI5QI.js → chunk-I2KULMPD.js} +10 -10
- package/dist/{chunk-R6GLLMRZ.js → chunk-IEHXZB6J.js} +9 -9
- package/dist/{chunk-U2SF3KAQ.js → chunk-KOK7BFP2.js} +3 -3
- package/dist/{chunk-QZ67TDLJ.js → chunk-KRQTN46U.js} +3 -3
- package/dist/{chunk-EMJFHTPZ.js → chunk-LHHO7AH4.js} +3 -3
- package/dist/{chunk-2564TBT6.js → chunk-LJF6UY4R.js} +2 -2
- package/dist/{chunk-DBJC4ULT.js → chunk-MXOQEI72.js} +48 -8
- package/dist/{chunk-JMACX5FN.js → chunk-NM3ZIWVN.js} +2 -2
- package/dist/{chunk-KT5PWWWO.js → chunk-NTOKQJOX.js} +2 -2
- package/dist/chunk-O63AAPIZ.js +190 -0
- package/dist/{chunk-WMZKZCCE.js → chunk-OUXYITL5.js} +2 -2
- package/dist/{chunk-T2ZMHXCX.js → chunk-PPQ3TY2R.js} +2 -2
- package/dist/{chunk-LBYGGNEZ.js → chunk-QV5EBDWA.js} +1 -1
- package/dist/{chunk-IYA3NS5P.js → chunk-RRTTJ3VB.js} +2 -2
- package/dist/{chunk-A36MGB3V.js → chunk-TPNA2I4J.js} +206 -97
- package/dist/{chunk-LYMPKO6N.js → chunk-UPV7VDUB.js} +2 -2
- package/dist/{chunk-DHWFOHPX.js → chunk-UQJV7NNM.js} +2 -2
- package/dist/ci-workflow-5TBUHJFC.js +10 -0
- package/dist/{dist-ZS3Y3YWP.js → dist-HA6IIPRC.js} +41 -3
- package/dist/dist-O733ZU6I.js +49 -0
- package/dist/{dist-SQAOKWXM.js → dist-QPWXPCPL.js} +1 -1
- package/dist/{docs-VW2KDPI3.js → docs-D6WI2LCF.js} +5 -5
- package/dist/engine-GBEVIZZQ.js +10 -0
- package/dist/{entropy-P62LCVJI.js → entropy-V6M4KJDC.js} +4 -4
- package/dist/{feedback-O3TZAPGX.js → feedback-22I4HHXM.js} +1 -1
- package/dist/{generate-agent-definitions-WVCOZDKI.js → generate-agent-definitions-UM7T3WLA.js} +5 -5
- package/dist/{glob-helper-JE3MO4UD.js → glob-helper-XE2UGEOV.js} +1 -1
- package/dist/{graph-loader-TJU4E7KL.js → graph-loader-EQBOIHFZ.js} +1 -1
- package/dist/index.d.ts +158 -2
- package/dist/index.js +26 -26
- package/dist/loader-5V72NYMF.js +12 -0
- package/dist/{mcp-ST26QMDK.js → mcp-5KQGFG5U.js} +16 -16
- package/dist/{performance-5HQG3IU6.js → performance-MVORVVMG.js} +5 -5
- package/dist/{review-pipeline-VRDL5A7J.js → review-pipeline-JYSVCNGJ.js} +4 -4
- package/dist/runtime-KZC2OQI7.js +11 -0
- package/dist/{scan-SFX5U3TE.js → scan-4PPP6ZXT.js} +1 -1
- package/dist/{security-IMFAE6MW.js → security-WOVOBLCI.js} +1 -1
- package/dist/{tool-tiers-7QGZ3FKY.js → tool-tiers-QVWKAZX4.js} +5 -1
- package/dist/{validate-GW2DG64P.js → validate-55HGQKWR.js} +5 -5
- package/dist/validate-cross-check-H3PSV4VY.js +10 -0
- package/package.json +5 -5
- package/dist/agents-md-5JG3AE5A.js +0 -10
- package/dist/chunk-RL4VMEXL.js +0 -53
- package/dist/ci-workflow-ZO6FPO3V.js +0 -10
- package/dist/dist-3EWNRFFQ.js +0 -21
- package/dist/engine-LFQ2JSHY.js +0 -10
- package/dist/loader-UB2A65DN.js +0 -12
- package/dist/runtime-TQQT2MWQ.js +0 -11
- package/dist/validate-cross-check-F5YQVXLT.js +0 -10
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AuthAuditEntrySchema,
|
|
3
|
+
AuthTokenPublicSchema,
|
|
4
|
+
AuthTokenSchema,
|
|
5
|
+
BridgeKindSchema,
|
|
2
6
|
DEFAULT_SKILL_CONTEXT_BUDGET,
|
|
3
7
|
Err,
|
|
8
|
+
GatewayEventSchema,
|
|
9
|
+
OTLPKeyValueSchema,
|
|
10
|
+
OTLPSpanSchema,
|
|
4
11
|
Ok,
|
|
12
|
+
PromptCacheStatsSchema,
|
|
5
13
|
SESSION_SECTION_NAMES,
|
|
6
14
|
STANDARD_COGNITIVE_MODES,
|
|
15
|
+
TokenScopeSchema,
|
|
16
|
+
TrajectoryMetadataSchema,
|
|
17
|
+
WebhookDeliverySchema,
|
|
18
|
+
WebhookDeliveryStatusSchema,
|
|
19
|
+
WebhookSubscriptionPublicSchema,
|
|
20
|
+
WebhookSubscriptionSchema,
|
|
7
21
|
init_dist,
|
|
8
22
|
isErr,
|
|
9
23
|
isOk
|
|
10
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-O63AAPIZ.js";
|
|
11
25
|
import {
|
|
12
26
|
DEFAULT_SKIP_DIRS,
|
|
13
27
|
GraphStore,
|
|
@@ -15,7 +29,7 @@ import {
|
|
|
15
29
|
init_dist as init_dist2,
|
|
16
30
|
queryTraceability,
|
|
17
31
|
skipDirGlobs
|
|
18
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BCFDGOMA.js";
|
|
19
33
|
import {
|
|
20
34
|
__esm,
|
|
21
35
|
__export
|
|
@@ -2841,17 +2855,22 @@ __export(dist_exports, {
|
|
|
2841
2855
|
ArchConfigSchema: () => ArchConfigSchema,
|
|
2842
2856
|
ArchDiffResultSchema: () => ArchDiffResultSchema,
|
|
2843
2857
|
ArchMetricCategorySchema: () => ArchMetricCategorySchema,
|
|
2858
|
+
AuthAuditEntrySchema: () => AuthAuditEntrySchema,
|
|
2859
|
+
AuthTokenPublicSchema: () => AuthTokenPublicSchema,
|
|
2860
|
+
AuthTokenSchema: () => AuthTokenSchema,
|
|
2844
2861
|
BUG_DETECTION_DESCRIPTOR: () => BUG_DETECTION_DESCRIPTOR,
|
|
2845
2862
|
BUG_TRACK_CATEGORIES: () => BUG_TRACK_CATEGORIES,
|
|
2846
2863
|
BaselineManager: () => BaselineManager,
|
|
2847
2864
|
BenchmarkRunner: () => BenchmarkRunner,
|
|
2848
2865
|
BlueprintGenerator: () => BlueprintGenerator,
|
|
2866
|
+
BridgeKindSchema: () => BridgeKindSchema,
|
|
2849
2867
|
BundleConstraintsSchema: () => BundleConstraintsSchema,
|
|
2850
2868
|
BundleSchema: () => BundleSchema,
|
|
2851
2869
|
CACHE_TTL_MS: () => CACHE_TTL_MS,
|
|
2852
2870
|
CINotifier: () => CINotifier,
|
|
2853
2871
|
COMPLIANCE_DESCRIPTOR: () => COMPLIANCE_DESCRIPTOR,
|
|
2854
2872
|
CORROBORATED_AGREEMENT: () => CORROBORATED_AGREEMENT,
|
|
2873
|
+
CacheMetricsRecorder: () => CacheMetricsRecorder,
|
|
2855
2874
|
CategoryBaselineSchema: () => CategoryBaselineSchema,
|
|
2856
2875
|
CategoryForecastSchema: () => CategoryForecastSchema,
|
|
2857
2876
|
CategoryRegressionSchema: () => CategoryRegressionSchema,
|
|
@@ -2901,6 +2920,7 @@ __export(dist_exports, {
|
|
|
2901
2920
|
ForbiddenImportCollector: () => ForbiddenImportCollector,
|
|
2902
2921
|
GateConfigSchema: () => GateConfigSchema,
|
|
2903
2922
|
GateResultSchema: () => GateResultSchema,
|
|
2923
|
+
GatewayEventSchema: () => GatewayEventSchema,
|
|
2904
2924
|
GeminiCacheAdapter: () => GeminiCacheAdapter,
|
|
2905
2925
|
GitHubIssuesSyncAdapter: () => GitHubIssuesSyncAdapter,
|
|
2906
2926
|
HandoffSchema: () => HandoffSchema,
|
|
@@ -2918,6 +2938,9 @@ __export(dist_exports, {
|
|
|
2918
2938
|
NoOpExecutor: () => NoOpExecutor,
|
|
2919
2939
|
NoOpSink: () => NoOpSink,
|
|
2920
2940
|
NoOpTelemetryAdapter: () => NoOpTelemetryAdapter,
|
|
2941
|
+
OTLPExporter: () => OTLPExporter,
|
|
2942
|
+
OTLPKeyValueSchema: () => OTLPKeyValueSchema,
|
|
2943
|
+
OTLPSpanSchema: () => OTLPSpanSchema,
|
|
2921
2944
|
Ok: () => Ok,
|
|
2922
2945
|
OpenAICacheAdapter: () => OpenAICacheAdapter,
|
|
2923
2946
|
PII_FIELD_DENYLIST: () => PII_FIELD_DENYLIST,
|
|
@@ -2930,6 +2953,7 @@ __export(dist_exports, {
|
|
|
2930
2953
|
PredictionResultSchema: () => PredictionResultSchema,
|
|
2931
2954
|
PredictionWarningSchema: () => PredictionWarningSchema,
|
|
2932
2955
|
ProjectScanner: () => ProjectScanner,
|
|
2956
|
+
PromptCacheStatsSchema: () => PromptCacheStatsSchema,
|
|
2933
2957
|
PulseAdapterAlreadyRegisteredError: () => PulseAdapterAlreadyRegisteredError,
|
|
2934
2958
|
PulseConfigSchema: () => PulseConfigSchema,
|
|
2935
2959
|
PulseDbSourceSchema: () => PulseDbSourceSchema,
|
|
@@ -2959,6 +2983,7 @@ __export(dist_exports, {
|
|
|
2959
2983
|
SharableSecurityRulesSchema: () => SharableSecurityRulesSchema,
|
|
2960
2984
|
SkillEventSchema: () => SkillEventSchema,
|
|
2961
2985
|
SolutionDocFrontmatterSchema: () => SolutionDocFrontmatterSchema,
|
|
2986
|
+
SpanKind: () => SpanKind,
|
|
2962
2987
|
SpecImpactEstimateSchema: () => SpecImpactEstimateSchema,
|
|
2963
2988
|
SpecImpactEstimator: () => SpecImpactEstimator,
|
|
2964
2989
|
SpecImpactSignalsSchema: () => SpecImpactSignalsSchema,
|
|
@@ -2973,6 +2998,8 @@ __export(dist_exports, {
|
|
|
2973
2998
|
TimelineFileSchema: () => TimelineFileSchema,
|
|
2974
2999
|
TimelineManager: () => TimelineManager,
|
|
2975
3000
|
TimelineSnapshotSchema: () => TimelineSnapshotSchema,
|
|
3001
|
+
TokenScopeSchema: () => TokenScopeSchema,
|
|
3002
|
+
TrajectoryMetadataSchema: () => TrajectoryMetadataSchema,
|
|
2976
3003
|
TransitionSchema: () => TransitionSchema,
|
|
2977
3004
|
TrendAttributionSchema: () => TrendAttributionSchema,
|
|
2978
3005
|
TrendLineSchema: () => TrendLineSchema,
|
|
@@ -2987,6 +3014,10 @@ __export(dist_exports, {
|
|
|
2987
3014
|
ViolationSchema: () => ViolationSchema,
|
|
2988
3015
|
ViolationSnapshotSchema: () => ViolationSnapshotSchema,
|
|
2989
3016
|
WHATWG_BAD_PORTS: () => WHATWG_BAD_PORTS,
|
|
3017
|
+
WebhookDeliverySchema: () => WebhookDeliverySchema,
|
|
3018
|
+
WebhookDeliveryStatusSchema: () => WebhookDeliveryStatusSchema,
|
|
3019
|
+
WebhookSubscriptionPublicSchema: () => WebhookSubscriptionPublicSchema,
|
|
3020
|
+
WebhookSubscriptionSchema: () => WebhookSubscriptionSchema,
|
|
2990
3021
|
acquireCompoundLock: () => acquireCompoundLock,
|
|
2991
3022
|
addProvenance: () => addProvenance,
|
|
2992
3023
|
agentConfigRules: () => agentConfigRules,
|
|
@@ -3127,6 +3158,7 @@ __export(dist_exports, {
|
|
|
3127
3158
|
goRules: () => goRules,
|
|
3128
3159
|
injectionRules: () => injectionRules,
|
|
3129
3160
|
insecureDefaultsRules: () => insecureDefaultsRules,
|
|
3161
|
+
invalidateCheckState: () => invalidateCheckState,
|
|
3130
3162
|
isBadPort: () => isBadPort,
|
|
3131
3163
|
isDuplicateFinding: () => isDuplicateFinding,
|
|
3132
3164
|
isErr: () => isErr,
|
|
@@ -3263,6 +3295,7 @@ __export(dist_exports, {
|
|
|
3263
3295
|
validateAgentConfigs: () => validateAgentConfigs,
|
|
3264
3296
|
validateAgentsMap: () => validateAgentsMap,
|
|
3265
3297
|
validateBoundaries: () => validateBoundaries,
|
|
3298
|
+
validateBranchName: () => validateBranchName,
|
|
3266
3299
|
validateCommitMessage: () => validateCommitMessage,
|
|
3267
3300
|
validateConfig: () => validateConfig,
|
|
3268
3301
|
validateDependencies: () => validateDependencies,
|
|
@@ -3320,6 +3353,7 @@ import { join as join12 } from "path";
|
|
|
3320
3353
|
import * as fs3 from "fs";
|
|
3321
3354
|
import * as path3 from "path";
|
|
3322
3355
|
import { minimatch as minimatch2 } from "minimatch";
|
|
3356
|
+
import { minimatch as minimatch22 } from "minimatch";
|
|
3323
3357
|
import { basename as basename2 } from "path";
|
|
3324
3358
|
import { join as join14, basename as basename3 } from "path";
|
|
3325
3359
|
import { basename as basename4, dirname as dirname42 } from "path";
|
|
@@ -3327,11 +3361,11 @@ import { z as z3 } from "zod";
|
|
|
3327
3361
|
import * as fs4 from "fs/promises";
|
|
3328
3362
|
import * as fs5 from "fs/promises";
|
|
3329
3363
|
import { resolve as resolve5 } from "path";
|
|
3330
|
-
import { minimatch as
|
|
3364
|
+
import { minimatch as minimatch3 } from "minimatch";
|
|
3331
3365
|
import { join as join15, resolve as resolve42 } from "path";
|
|
3332
3366
|
import { dirname as dirname5, resolve as resolve6 } from "path";
|
|
3333
3367
|
import { dirname as dirname6, extname as extname2, resolve as resolve7 } from "path";
|
|
3334
|
-
import { minimatch as
|
|
3368
|
+
import { minimatch as minimatch4 } from "minimatch";
|
|
3335
3369
|
import { readdirSync, statSync as statSync2 } from "fs";
|
|
3336
3370
|
import { join as join16 } from "path";
|
|
3337
3371
|
import * as fs6 from "fs";
|
|
@@ -3396,7 +3430,7 @@ import * as fs26 from "fs";
|
|
|
3396
3430
|
import * as path23 from "path";
|
|
3397
3431
|
import { z as z9 } from "zod";
|
|
3398
3432
|
import * as fs28 from "fs/promises";
|
|
3399
|
-
import { minimatch as
|
|
3433
|
+
import { minimatch as minimatch5 } from "minimatch";
|
|
3400
3434
|
import { z as z10 } from "zod";
|
|
3401
3435
|
import * as fs27 from "fs";
|
|
3402
3436
|
import * as path24 from "path";
|
|
@@ -4807,6 +4841,75 @@ function validateRoadmapMode(config, projectRoot) {
|
|
|
4807
4841
|
}
|
|
4808
4842
|
return Ok(void 0);
|
|
4809
4843
|
}
|
|
4844
|
+
function validateBranchName(branchName, config) {
|
|
4845
|
+
for (const pattern of config.ignore) {
|
|
4846
|
+
if (minimatch2(branchName, pattern)) {
|
|
4847
|
+
return { valid: true, branchName };
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
if (config.customRegex) {
|
|
4851
|
+
const regex = new RegExp(config.customRegex);
|
|
4852
|
+
if (!regex.test(branchName)) {
|
|
4853
|
+
return {
|
|
4854
|
+
valid: false,
|
|
4855
|
+
branchName,
|
|
4856
|
+
message: `Branch name "${branchName}" does not match the custom regex: ${config.customRegex}`
|
|
4857
|
+
};
|
|
4858
|
+
}
|
|
4859
|
+
return { valid: true, branchName };
|
|
4860
|
+
}
|
|
4861
|
+
const parts = branchName.split("/");
|
|
4862
|
+
if (parts.length < 2) {
|
|
4863
|
+
return {
|
|
4864
|
+
valid: false,
|
|
4865
|
+
branchName,
|
|
4866
|
+
message: `Branch name "${branchName}" must have a prefix followed by a slash (e.g., "feat/my-feature").`,
|
|
4867
|
+
suggestion: `Try renaming to "feat/${branchName}" or "fix/${branchName}".`
|
|
4868
|
+
};
|
|
4869
|
+
}
|
|
4870
|
+
const prefix = parts[0];
|
|
4871
|
+
const slug = parts.slice(1).join("/");
|
|
4872
|
+
if (!config.prefixes.includes(prefix)) {
|
|
4873
|
+
return {
|
|
4874
|
+
valid: false,
|
|
4875
|
+
branchName,
|
|
4876
|
+
message: `Prefix "${prefix}" is not allowed.`,
|
|
4877
|
+
suggestion: `Allowed prefixes: ${config.prefixes.join(", ")}.`
|
|
4878
|
+
};
|
|
4879
|
+
}
|
|
4880
|
+
if (config.enforceKebabCase) {
|
|
4881
|
+
for (const part of slug.split("/")) {
|
|
4882
|
+
const ticketMatch = part.match(TICKET_ID);
|
|
4883
|
+
if (ticketMatch) {
|
|
4884
|
+
const rest = ticketMatch[2];
|
|
4885
|
+
if (rest && !KEBAB_CASE.test(rest)) {
|
|
4886
|
+
return {
|
|
4887
|
+
valid: false,
|
|
4888
|
+
branchName,
|
|
4889
|
+
message: `Branch slug part "${part}" does not follow kebab-case after the ticket ID.`,
|
|
4890
|
+
suggestion: `Ensure the description after "${ticketMatch[1]}" uses kebab-case (lowercase, single hyphens, no leading/trailing hyphen).`
|
|
4891
|
+
};
|
|
4892
|
+
}
|
|
4893
|
+
} else if (!KEBAB_CASE.test(part)) {
|
|
4894
|
+
return {
|
|
4895
|
+
valid: false,
|
|
4896
|
+
branchName,
|
|
4897
|
+
message: `Branch slug part "${part}" must be in kebab-case (lowercase, single hyphens, no leading/trailing hyphen).`,
|
|
4898
|
+
suggestion: `Change "${part}" to match the convention.`
|
|
4899
|
+
};
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
if (typeof config.maxLength === "number" && config.maxLength > 0 && slug.length > config.maxLength) {
|
|
4904
|
+
return {
|
|
4905
|
+
valid: false,
|
|
4906
|
+
branchName,
|
|
4907
|
+
message: `Branch slug is ${slug.length} characters; max allowed is ${config.maxLength}.`,
|
|
4908
|
+
suggestion: `Shorten the description after "${prefix}/" to ${config.maxLength} characters or fewer.`
|
|
4909
|
+
};
|
|
4910
|
+
}
|
|
4911
|
+
return { valid: true, branchName };
|
|
4912
|
+
}
|
|
4810
4913
|
function determineImportance(filePath) {
|
|
4811
4914
|
const name = basename2(filePath).toLowerCase();
|
|
4812
4915
|
if (name === "index.ts" || name === "index.js" || name === "main.ts") {
|
|
@@ -4848,7 +4951,7 @@ async function checkDocCoverage(domain, options = {}) {
|
|
|
4848
4951
|
const filteredSourceFiles = sourceFiles.filter((file) => {
|
|
4849
4952
|
const relativePath = relativePosix(sourceDir, file);
|
|
4850
4953
|
return !excludePatterns.some((pattern) => {
|
|
4851
|
-
return
|
|
4954
|
+
return minimatch22(relativePath, pattern, { dot: true }) || minimatch22(file, pattern, { dot: true });
|
|
4852
4955
|
});
|
|
4853
4956
|
});
|
|
4854
4957
|
const docFiles = await findFiles("**/*.md", docsDir);
|
|
@@ -6293,7 +6396,7 @@ async function buildSnapshot2(config) {
|
|
|
6293
6396
|
}
|
|
6294
6397
|
sourceFilePaths = sourceFilePaths.filter((f) => {
|
|
6295
6398
|
const rel = relativePosix(rootDir, f);
|
|
6296
|
-
return !excludePatterns.some((p) =>
|
|
6399
|
+
return !excludePatterns.some((p) => minimatch3(rel, p));
|
|
6297
6400
|
});
|
|
6298
6401
|
const files = [];
|
|
6299
6402
|
for (const filePath of sourceFilePaths) {
|
|
@@ -6722,7 +6825,10 @@ function findDeadFiles(snapshot, reachability) {
|
|
|
6722
6825
|
return deadFiles;
|
|
6723
6826
|
}
|
|
6724
6827
|
function isIdentifierUsedInAST(ast, identifier, skipImportDeclaration = true) {
|
|
6725
|
-
const astString = JSON.stringify(
|
|
6828
|
+
const astString = JSON.stringify(
|
|
6829
|
+
ast,
|
|
6830
|
+
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
6831
|
+
);
|
|
6726
6832
|
const identifierPattern = new RegExp(`"name"\\s*:\\s*"${identifier}"`, "g");
|
|
6727
6833
|
const matches = astString.match(identifierPattern);
|
|
6728
6834
|
if (!matches) return false;
|
|
@@ -6884,7 +6990,7 @@ async function detectDeadCode(snapshot, graphDeadCodeData, protectedRegions) {
|
|
|
6884
6990
|
}
|
|
6885
6991
|
function fileMatchesPattern(filePath, pattern, rootDir) {
|
|
6886
6992
|
const relativePath = relativePosix(rootDir, filePath);
|
|
6887
|
-
return
|
|
6993
|
+
return minimatch4(relativePath, pattern);
|
|
6888
6994
|
}
|
|
6889
6995
|
function checkMustExport(rule, file, message) {
|
|
6890
6996
|
if (rule.type !== "must-export") return [];
|
|
@@ -14077,6 +14183,12 @@ function shouldRunCheck(state, intervalMs) {
|
|
|
14077
14183
|
if (state === null) return true;
|
|
14078
14184
|
return state.lastCheckTime + intervalMs <= Date.now();
|
|
14079
14185
|
}
|
|
14186
|
+
function invalidateCheckState() {
|
|
14187
|
+
try {
|
|
14188
|
+
fs36.unlinkSync(getStatePath());
|
|
14189
|
+
} catch {
|
|
14190
|
+
}
|
|
14191
|
+
}
|
|
14080
14192
|
function readCheckState() {
|
|
14081
14193
|
try {
|
|
14082
14194
|
const raw = fs36.readFileSync(getStatePath(), "utf-8");
|
|
@@ -15046,6 +15158,26 @@ async function send(events, apiKey) {
|
|
|
15046
15158
|
}
|
|
15047
15159
|
}
|
|
15048
15160
|
}
|
|
15161
|
+
function toUnixNanoString(ns) {
|
|
15162
|
+
return ns.toString(10);
|
|
15163
|
+
}
|
|
15164
|
+
function attributesToOTLP(attrs) {
|
|
15165
|
+
const out = [];
|
|
15166
|
+
for (const [key, value] of Object.entries(attrs)) {
|
|
15167
|
+
if (typeof value === "string") {
|
|
15168
|
+
out.push({ key, value: { stringValue: value } });
|
|
15169
|
+
} else if (typeof value === "boolean") {
|
|
15170
|
+
out.push({ key, value: { boolValue: value } });
|
|
15171
|
+
} else if (typeof value === "number") {
|
|
15172
|
+
if (Number.isInteger(value)) {
|
|
15173
|
+
out.push({ key, value: { intValue: String(value) } });
|
|
15174
|
+
} else {
|
|
15175
|
+
out.push({ key, value: { doubleValue: value } });
|
|
15176
|
+
}
|
|
15177
|
+
}
|
|
15178
|
+
}
|
|
15179
|
+
return out;
|
|
15180
|
+
}
|
|
15049
15181
|
function acquireCompoundLock(category, opts = {}) {
|
|
15050
15182
|
if (!KNOWN_CATEGORIES.has(category)) {
|
|
15051
15183
|
throw new Error(
|
|
@@ -15596,7 +15728,7 @@ function assembleCandidateReport(input) {
|
|
|
15596
15728
|
}
|
|
15597
15729
|
return lines.join("\n");
|
|
15598
15730
|
}
|
|
15599
|
-
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, 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;
|
|
15731
|
+
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, DEFAULT_CAPACITY, CacheMetricsRecorder, RETRY_BACKOFFS_MS, OTLPExporter, SpanKind, 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;
|
|
15600
15732
|
var init_dist3 = __esm({
|
|
15601
15733
|
"../core/dist/index.mjs"() {
|
|
15602
15734
|
init_chunk_4UI65RLE();
|
|
@@ -15826,6 +15958,8 @@ var init_dist3 = __esm({
|
|
|
15826
15958
|
"kiro",
|
|
15827
15959
|
"windsurf"
|
|
15828
15960
|
]);
|
|
15961
|
+
KEBAB_CASE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
15962
|
+
TICKET_ID = /^([A-Z0-9]+-[0-9]+)-(.*)$/;
|
|
15829
15963
|
DEFAULT_SECTIONS = [
|
|
15830
15964
|
{
|
|
15831
15965
|
name: "Documentation",
|
|
@@ -19005,7 +19139,7 @@ var init_dist3 = __esm({
|
|
|
19005
19139
|
const applicableRules = this.activeRules.filter((rule) => {
|
|
19006
19140
|
if (!rule.fileGlob) return true;
|
|
19007
19141
|
const globs = rule.fileGlob.split(",").map((g) => g.trim());
|
|
19008
|
-
return globs.some((glob5) =>
|
|
19142
|
+
return globs.some((glob5) => minimatch5(filePath, glob5, { dot: true }));
|
|
19009
19143
|
});
|
|
19010
19144
|
return this.scanLinesWithRules(lines, applicableRules, filePath, startLine);
|
|
19011
19145
|
}
|
|
@@ -21418,10 +21552,199 @@ console.log('Blueprint player initialized.');
|
|
|
21418
21552
|
};
|
|
21419
21553
|
}
|
|
21420
21554
|
};
|
|
21421
|
-
VERSION = "0.
|
|
21555
|
+
VERSION = "0.25.0";
|
|
21422
21556
|
POSTHOG_BATCH_URL = "https://app.posthog.com/batch";
|
|
21423
21557
|
MAX_ATTEMPTS = 3;
|
|
21424
21558
|
TIMEOUT_MS = 5e3;
|
|
21559
|
+
DEFAULT_CAPACITY = 1e3;
|
|
21560
|
+
CacheMetricsRecorder = class {
|
|
21561
|
+
capacity;
|
|
21562
|
+
now;
|
|
21563
|
+
buffer = [];
|
|
21564
|
+
windowStartedAt = 0;
|
|
21565
|
+
constructor(opts = {}) {
|
|
21566
|
+
this.capacity = opts.capacity ?? DEFAULT_CAPACITY;
|
|
21567
|
+
this.now = opts.now ?? Date.now;
|
|
21568
|
+
}
|
|
21569
|
+
/**
|
|
21570
|
+
* Append a single cache observation. Hot-path: O(1) amortized, no
|
|
21571
|
+
* allocations beyond the sample object itself.
|
|
21572
|
+
*/
|
|
21573
|
+
record(backendId, hit, tokensCreated, tokensRead) {
|
|
21574
|
+
if (this.windowStartedAt === 0) this.windowStartedAt = this.now();
|
|
21575
|
+
if (this.buffer.length >= this.capacity) this.buffer.shift();
|
|
21576
|
+
this.buffer.push({ backendId, hit, tokensCreated, tokensRead });
|
|
21577
|
+
}
|
|
21578
|
+
/** Aggregate the current window into a `PromptCacheStats` snapshot. */
|
|
21579
|
+
getStats() {
|
|
21580
|
+
let hits = 0;
|
|
21581
|
+
let misses = 0;
|
|
21582
|
+
const byBackend = {};
|
|
21583
|
+
for (const s of this.buffer) {
|
|
21584
|
+
if (s.hit) hits++;
|
|
21585
|
+
else misses++;
|
|
21586
|
+
const slot = byBackend[s.backendId] ?? { hits: 0, misses: 0 };
|
|
21587
|
+
if (s.hit) slot.hits++;
|
|
21588
|
+
else slot.misses++;
|
|
21589
|
+
byBackend[s.backendId] = slot;
|
|
21590
|
+
}
|
|
21591
|
+
const totalRequests = hits + misses;
|
|
21592
|
+
const hitRate = totalRequests === 0 ? 0 : hits / totalRequests;
|
|
21593
|
+
return {
|
|
21594
|
+
totalRequests,
|
|
21595
|
+
hits,
|
|
21596
|
+
misses,
|
|
21597
|
+
hitRate,
|
|
21598
|
+
byBackend,
|
|
21599
|
+
windowStartedAt: this.windowStartedAt
|
|
21600
|
+
};
|
|
21601
|
+
}
|
|
21602
|
+
/** Clear the buffer and reset the window-start marker. */
|
|
21603
|
+
reset() {
|
|
21604
|
+
this.buffer.length = 0;
|
|
21605
|
+
this.windowStartedAt = 0;
|
|
21606
|
+
}
|
|
21607
|
+
};
|
|
21608
|
+
RETRY_BACKOFFS_MS = [1e3, 2e3, 4e3];
|
|
21609
|
+
OTLPExporter = class {
|
|
21610
|
+
endpoint;
|
|
21611
|
+
enabled;
|
|
21612
|
+
headers;
|
|
21613
|
+
flushIntervalMs;
|
|
21614
|
+
batchSize;
|
|
21615
|
+
fetchImpl;
|
|
21616
|
+
warn;
|
|
21617
|
+
buffer = [];
|
|
21618
|
+
timer = null;
|
|
21619
|
+
inFlightFlushes = /* @__PURE__ */ new Set();
|
|
21620
|
+
constructor(opts) {
|
|
21621
|
+
this.endpoint = opts.endpoint;
|
|
21622
|
+
this.enabled = opts.enabled !== false;
|
|
21623
|
+
this.headers = { "Content-Type": "application/json", ...opts.headers ?? {} };
|
|
21624
|
+
this.flushIntervalMs = opts.flushIntervalMs ?? 2e3;
|
|
21625
|
+
this.batchSize = opts.batchSize ?? 64;
|
|
21626
|
+
this.fetchImpl = opts.fetchImpl ?? globalThis.fetch.bind(globalThis);
|
|
21627
|
+
this.warn = opts.warn ?? ((...a) => console.warn(...a));
|
|
21628
|
+
}
|
|
21629
|
+
/**
|
|
21630
|
+
* O(1) buffer push. When `enabled === false` this is a no-op. If the
|
|
21631
|
+
* buffer reaches `batchSize`, a flush is triggered without awaiting.
|
|
21632
|
+
*/
|
|
21633
|
+
push(span) {
|
|
21634
|
+
if (!this.enabled) return;
|
|
21635
|
+
this.buffer.push(span);
|
|
21636
|
+
if (this.buffer.length >= this.batchSize) {
|
|
21637
|
+
void this.flush();
|
|
21638
|
+
}
|
|
21639
|
+
}
|
|
21640
|
+
/** Start the periodic flush timer. Idempotent. */
|
|
21641
|
+
start() {
|
|
21642
|
+
if (!this.enabled || this.timer !== null) return;
|
|
21643
|
+
this.timer = setInterval(() => {
|
|
21644
|
+
void this.flush();
|
|
21645
|
+
}, this.flushIntervalMs);
|
|
21646
|
+
if (typeof this.timer.unref === "function") {
|
|
21647
|
+
this.timer.unref();
|
|
21648
|
+
}
|
|
21649
|
+
}
|
|
21650
|
+
/** Flush any pending spans and stop the timer. Awaits all in-flight flushes. */
|
|
21651
|
+
async stop() {
|
|
21652
|
+
if (this.timer !== null) {
|
|
21653
|
+
clearInterval(this.timer);
|
|
21654
|
+
this.timer = null;
|
|
21655
|
+
}
|
|
21656
|
+
void this.flush();
|
|
21657
|
+
while (this.inFlightFlushes.size > 0) {
|
|
21658
|
+
await Promise.all([...this.inFlightFlushes]);
|
|
21659
|
+
}
|
|
21660
|
+
}
|
|
21661
|
+
/**
|
|
21662
|
+
* Synchronously claim the current buffer and POST it to `/v1/traces`.
|
|
21663
|
+
* Each invocation runs independently — concurrent flushes (e.g. one
|
|
21664
|
+
* from the timer, one from a `batchSize` trip) each drain their own
|
|
21665
|
+
* batch. Retries up to 3 times on transport or 5xx failure, then
|
|
21666
|
+
* drops with a single warning.
|
|
21667
|
+
*/
|
|
21668
|
+
flush() {
|
|
21669
|
+
if (this.buffer.length === 0) return Promise.resolve();
|
|
21670
|
+
const batch = this.buffer;
|
|
21671
|
+
this.buffer = [];
|
|
21672
|
+
const payload = this.spansToOTLPJSON(batch);
|
|
21673
|
+
const work = (async () => {
|
|
21674
|
+
let lastError = null;
|
|
21675
|
+
for (let attempt = 0; attempt < RETRY_BACKOFFS_MS.length; attempt++) {
|
|
21676
|
+
try {
|
|
21677
|
+
const response = await this.fetchImpl(this.endpoint, {
|
|
21678
|
+
method: "POST",
|
|
21679
|
+
headers: this.headers,
|
|
21680
|
+
body: JSON.stringify(payload)
|
|
21681
|
+
});
|
|
21682
|
+
if (response.ok) return;
|
|
21683
|
+
try {
|
|
21684
|
+
await response.text();
|
|
21685
|
+
} catch {
|
|
21686
|
+
}
|
|
21687
|
+
lastError = new Error(`OTLP endpoint returned ${response.status}`);
|
|
21688
|
+
} catch (err) {
|
|
21689
|
+
lastError = err;
|
|
21690
|
+
}
|
|
21691
|
+
const backoff = RETRY_BACKOFFS_MS[attempt] ?? 0;
|
|
21692
|
+
if (attempt < RETRY_BACKOFFS_MS.length - 1) {
|
|
21693
|
+
await new Promise((resolve10) => setTimeout(resolve10, backoff));
|
|
21694
|
+
}
|
|
21695
|
+
}
|
|
21696
|
+
this.warn(
|
|
21697
|
+
`[harness telemetry] dropping ${batch.length} span(s) after 3 failed OTLP attempts:`,
|
|
21698
|
+
lastError
|
|
21699
|
+
);
|
|
21700
|
+
})();
|
|
21701
|
+
this.inFlightFlushes.add(work);
|
|
21702
|
+
void work.finally(() => this.inFlightFlushes.delete(work));
|
|
21703
|
+
return work;
|
|
21704
|
+
}
|
|
21705
|
+
/**
|
|
21706
|
+
* Build the OTLP/HTTP JSON envelope for a batch of spans. Public for
|
|
21707
|
+
* tests; not part of the supported API surface.
|
|
21708
|
+
*/
|
|
21709
|
+
spansToOTLPJSON(spans) {
|
|
21710
|
+
return {
|
|
21711
|
+
resourceSpans: [
|
|
21712
|
+
{
|
|
21713
|
+
resource: {
|
|
21714
|
+
attributes: [{ key: "service.name", value: { stringValue: "harness" } }]
|
|
21715
|
+
},
|
|
21716
|
+
scopeSpans: [
|
|
21717
|
+
{
|
|
21718
|
+
scope: { name: "harness" },
|
|
21719
|
+
spans: spans.map((s) => {
|
|
21720
|
+
const span = {
|
|
21721
|
+
traceId: s.traceId,
|
|
21722
|
+
spanId: s.spanId,
|
|
21723
|
+
name: s.name,
|
|
21724
|
+
kind: s.kind,
|
|
21725
|
+
startTimeUnixNano: toUnixNanoString(s.startTimeNs),
|
|
21726
|
+
endTimeUnixNano: toUnixNanoString(s.endTimeNs),
|
|
21727
|
+
attributes: attributesToOTLP(s.attributes)
|
|
21728
|
+
};
|
|
21729
|
+
if (s.parentSpanId !== void 0) span["parentSpanId"] = s.parentSpanId;
|
|
21730
|
+
if (s.statusCode !== void 0) span["status"] = { code: s.statusCode };
|
|
21731
|
+
return span;
|
|
21732
|
+
})
|
|
21733
|
+
}
|
|
21734
|
+
]
|
|
21735
|
+
}
|
|
21736
|
+
]
|
|
21737
|
+
};
|
|
21738
|
+
}
|
|
21739
|
+
};
|
|
21740
|
+
SpanKind = /* @__PURE__ */ ((SpanKind2) => {
|
|
21741
|
+
SpanKind2[SpanKind2["INTERNAL"] = 1] = "INTERNAL";
|
|
21742
|
+
SpanKind2[SpanKind2["SERVER"] = 2] = "SERVER";
|
|
21743
|
+
SpanKind2[SpanKind2["CLIENT"] = 3] = "CLIENT";
|
|
21744
|
+
SpanKind2[SpanKind2["PRODUCER"] = 4] = "PRODUCER";
|
|
21745
|
+
SpanKind2[SpanKind2["CONSUMER"] = 5] = "CONSUMER";
|
|
21746
|
+
return SpanKind2;
|
|
21747
|
+
})(SpanKind || {});
|
|
21425
21748
|
CompoundLockHeldError = class extends Error {
|
|
21426
21749
|
constructor(category, holderPid, lockPath) {
|
|
21427
21750
|
super(
|
|
@@ -21637,6 +21960,7 @@ export {
|
|
|
21637
21960
|
validateAgentConfigs,
|
|
21638
21961
|
getRoadmapMode,
|
|
21639
21962
|
validateRoadmapMode,
|
|
21963
|
+
validateBranchName,
|
|
21640
21964
|
checkDocCoverage,
|
|
21641
21965
|
validateKnowledgeMap,
|
|
21642
21966
|
generateAgentsMap,
|
|
@@ -21946,6 +22270,7 @@ export {
|
|
|
21946
22270
|
BlueprintGenerator,
|
|
21947
22271
|
isUpdateCheckEnabled,
|
|
21948
22272
|
shouldRunCheck,
|
|
22273
|
+
invalidateCheckState,
|
|
21949
22274
|
readCheckState,
|
|
21950
22275
|
spawnBackgroundCheck,
|
|
21951
22276
|
getUpdateNotification,
|
|
@@ -21983,6 +22308,9 @@ export {
|
|
|
21983
22308
|
VERSION,
|
|
21984
22309
|
collectEvents,
|
|
21985
22310
|
send,
|
|
22311
|
+
CacheMetricsRecorder,
|
|
22312
|
+
OTLPExporter,
|
|
22313
|
+
SpanKind,
|
|
21986
22314
|
CompoundLockHeldError,
|
|
21987
22315
|
acquireCompoundLock,
|
|
21988
22316
|
ALLOWED_FIELD_KEYS,
|
|
@@ -15,7 +15,7 @@ function evictIfNeeded() {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
async function doLoadGraphStore(projectRoot) {
|
|
18
|
-
const { GraphStore } = await import("./dist-
|
|
18
|
+
const { GraphStore } = await import("./dist-QPWXPCPL.js");
|
|
19
19
|
const graphDir = path.join(projectRoot, ".harness", "graph");
|
|
20
20
|
const store = new GraphStore();
|
|
21
21
|
const loaded = await store.load(graphDir);
|
|
@@ -41,7 +41,7 @@ async function runScan(projectPath) {
|
|
|
41
41
|
KnowledgeIngestor,
|
|
42
42
|
GitIngestor,
|
|
43
43
|
RequirementIngestor
|
|
44
|
-
} = await import("./dist-
|
|
44
|
+
} = await import("./dist-QPWXPCPL.js");
|
|
45
45
|
const store = new GraphStore();
|
|
46
46
|
const start = Date.now();
|
|
47
47
|
const ingestOptions = loadIngestOptions(projectPath);
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
findConfigFile,
|
|
9
9
|
loadConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MXOQEI72.js";
|
|
11
11
|
import {
|
|
12
12
|
init_dist
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2TGCYJMT.js";
|
|
14
14
|
import {
|
|
15
15
|
Ok
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O63AAPIZ.js";
|
|
17
17
|
|
|
18
18
|
// src/mcp/tools/performance.ts
|
|
19
19
|
init_dist();
|
|
@@ -35,7 +35,7 @@ var checkPerformanceDefinition = {
|
|
|
35
35
|
};
|
|
36
36
|
async function handleCheckPerformance(input) {
|
|
37
37
|
try {
|
|
38
|
-
const { EntropyAnalyzer } = await import("./dist-
|
|
38
|
+
const { EntropyAnalyzer } = await import("./dist-HA6IIPRC.js");
|
|
39
39
|
const typeFilter = input.type ?? "all";
|
|
40
40
|
const projectPath = sanitizePath(input.path);
|
|
41
41
|
let entryPoints;
|
|
@@ -58,10 +58,10 @@ async function handleCheckPerformance(input) {
|
|
|
58
58
|
});
|
|
59
59
|
let graphOptions;
|
|
60
60
|
try {
|
|
61
|
-
const { loadGraphStore } = await import("./graph-loader-
|
|
61
|
+
const { loadGraphStore } = await import("./graph-loader-EQBOIHFZ.js");
|
|
62
62
|
const store = await loadGraphStore(projectPath);
|
|
63
63
|
if (store) {
|
|
64
|
-
const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-
|
|
64
|
+
const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-QPWXPCPL.js");
|
|
65
65
|
const complexityAdapter = new GraphComplexityAdapter(store);
|
|
66
66
|
const couplingAdapter = new GraphCouplingAdapter(store);
|
|
67
67
|
graphOptions = {
|
|
@@ -98,7 +98,7 @@ var getPerfBaselinesDefinition = {
|
|
|
98
98
|
};
|
|
99
99
|
async function handleGetPerfBaselines(input) {
|
|
100
100
|
try {
|
|
101
|
-
const { BaselineManager } = await import("./dist-
|
|
101
|
+
const { BaselineManager } = await import("./dist-HA6IIPRC.js");
|
|
102
102
|
const manager = new BaselineManager(sanitizePath(input.path));
|
|
103
103
|
const baselines = manager.load();
|
|
104
104
|
return resultToMcpResponse(
|
|
@@ -146,7 +146,7 @@ var updatePerfBaselinesDefinition = {
|
|
|
146
146
|
};
|
|
147
147
|
async function handleUpdatePerfBaselines(input) {
|
|
148
148
|
try {
|
|
149
|
-
const { BaselineManager } = await import("./dist-
|
|
149
|
+
const { BaselineManager } = await import("./dist-HA6IIPRC.js");
|
|
150
150
|
const manager = new BaselineManager(sanitizePath(input.path));
|
|
151
151
|
manager.save(input.results, input.commitHash);
|
|
152
152
|
const updated = manager.load();
|
|
@@ -176,7 +176,7 @@ var getCriticalPathsDefinition = {
|
|
|
176
176
|
};
|
|
177
177
|
async function handleGetCriticalPaths(input) {
|
|
178
178
|
try {
|
|
179
|
-
const { CriticalPathResolver } = await import("./dist-
|
|
179
|
+
const { CriticalPathResolver } = await import("./dist-HA6IIPRC.js");
|
|
180
180
|
const resolver = new CriticalPathResolver(sanitizePath(input.path));
|
|
181
181
|
const result = await resolver.resolve();
|
|
182
182
|
return resultToMcpResponse(Ok(result));
|