audit-tools 0.50.13 → 0.50.14

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.
Files changed (98) hide show
  1. package/dist/audit/cli/nextStepHelpers.js +1 -1
  2. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  3. package/dist/audit/cli/reviewRun.js +1 -1
  4. package/dist/audit/cli/reviewRun.js.map +1 -1
  5. package/dist/audit/orchestrator/ingestionExecutors.js +1 -1
  6. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  7. package/dist/audit/reporting/mergeFindings.js +1 -1
  8. package/dist/audit/reporting/mergeFindings.js.map +1 -1
  9. package/dist/audit/reporting/workBlocks.js +1 -1
  10. package/dist/audit/reporting/workBlocks.js.map +1 -1
  11. package/dist/remediate/steps/nextStep.js +1 -1
  12. package/dist/remediate/steps/nextStep.js.map +1 -1
  13. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  14. package/dist/shared/loopCorePaths.js +0 -1
  15. package/dist/shared/loopCorePaths.js.map +1 -1
  16. package/dist/shared/tooling/allowlistedExec.d.ts +4 -4
  17. package/dist/shared/tooling/allowlistedExec.js +7 -7
  18. package/package.json +4 -5
  19. package/dist/audit/adapters/astGrep.d.ts +0 -30
  20. package/dist/audit/adapters/astGrep.d.ts.map +0 -1
  21. package/dist/audit/adapters/astGrep.js +0 -46
  22. package/dist/audit/adapters/astGrep.js.map +0 -1
  23. package/dist/audit/adapters/codeql.d.ts +0 -47
  24. package/dist/audit/adapters/codeql.d.ts.map +0 -1
  25. package/dist/audit/adapters/codeql.js +0 -52
  26. package/dist/audit/adapters/codeql.js.map +0 -1
  27. package/dist/audit/adapters/coverageSummary.d.ts +0 -9
  28. package/dist/audit/adapters/coverageSummary.d.ts.map +0 -1
  29. package/dist/audit/adapters/coverageSummary.js +0 -18
  30. package/dist/audit/adapters/coverageSummary.js.map +0 -1
  31. package/dist/audit/adapters/eslint.d.ts +0 -14
  32. package/dist/audit/adapters/eslint.d.ts.map +0 -1
  33. package/dist/audit/adapters/eslint.js +0 -28
  34. package/dist/audit/adapters/eslint.js.map +0 -1
  35. package/dist/audit/adapters/npmAudit.d.ts +0 -16
  36. package/dist/audit/adapters/npmAudit.d.ts.map +0 -1
  37. package/dist/audit/adapters/npmAudit.js +0 -24
  38. package/dist/audit/adapters/npmAudit.js.map +0 -1
  39. package/dist/audit/adapters/semgrep.d.ts +0 -42
  40. package/dist/audit/adapters/semgrep.d.ts.map +0 -1
  41. package/dist/audit/adapters/semgrep.js +0 -93
  42. package/dist/audit/adapters/semgrep.js.map +0 -1
  43. package/dist/audit/cli/dispatch.d.ts +0 -10
  44. package/dist/audit/cli/dispatch.d.ts.map +0 -1
  45. package/dist/audit/cli/dispatch.js +0 -10
  46. package/dist/audit/cli/dispatch.js.map +0 -1
  47. package/dist/audit/cli/paths.d.ts +0 -2
  48. package/dist/audit/cli/paths.d.ts.map +0 -1
  49. package/dist/audit/cli/paths.js +0 -10
  50. package/dist/audit/cli/paths.js.map +0 -1
  51. package/dist/audit/orchestrator/chunking.d.ts +0 -6
  52. package/dist/audit/orchestrator/chunking.d.ts.map +0 -1
  53. package/dist/audit/orchestrator/chunking.js +0 -14
  54. package/dist/audit/orchestrator/chunking.js.map +0 -1
  55. package/dist/audit/orchestrator/continuityScore.d.ts +0 -2
  56. package/dist/audit/orchestrator/continuityScore.d.ts.map +0 -1
  57. package/dist/audit/orchestrator/continuityScore.js +0 -9
  58. package/dist/audit/orchestrator/continuityScore.js.map +0 -1
  59. package/dist/audit/orchestrator/fileAnchors.d.ts +0 -69
  60. package/dist/audit/orchestrator/fileAnchors.d.ts.map +0 -1
  61. package/dist/audit/orchestrator/fileAnchors.js +0 -314
  62. package/dist/audit/orchestrator/fileAnchors.js.map +0 -1
  63. package/dist/audit/orchestrator/knipGraphCrosscheck.d.ts +0 -65
  64. package/dist/audit/orchestrator/knipGraphCrosscheck.d.ts.map +0 -1
  65. package/dist/audit/orchestrator/knipGraphCrosscheck.js +0 -85
  66. package/dist/audit/orchestrator/knipGraphCrosscheck.js.map +0 -1
  67. package/dist/audit/orchestrator/selectiveDeepening.d.ts +0 -3
  68. package/dist/audit/orchestrator/selectiveDeepening.d.ts.map +0 -1
  69. package/dist/audit/orchestrator/selectiveDeepening.js +0 -7
  70. package/dist/audit/orchestrator/selectiveDeepening.js.map +0 -1
  71. package/dist/audit/orchestrator.d.ts +0 -7
  72. package/dist/audit/orchestrator.d.ts.map +0 -1
  73. package/dist/audit/orchestrator.js +0 -60
  74. package/dist/audit/orchestrator.js.map +0 -1
  75. package/dist/audit/reporting/findingRanks.d.ts +0 -2
  76. package/dist/audit/reporting/findingRanks.d.ts.map +0 -1
  77. package/dist/audit/reporting/findingRanks.js +0 -7
  78. package/dist/audit/reporting/findingRanks.js.map +0 -1
  79. package/dist/audit/types/workerResult.d.ts +0 -14
  80. package/dist/audit/types/workerResult.d.ts.map +0 -1
  81. package/dist/audit/types/workerResult.js +0 -2
  82. package/dist/audit/types/workerResult.js.map +0 -1
  83. package/dist/audit/validation/anchorGrounding.d.ts +0 -59
  84. package/dist/audit/validation/anchorGrounding.d.ts.map +0 -1
  85. package/dist/audit/validation/anchorGrounding.js +0 -187
  86. package/dist/audit/validation/anchorGrounding.js.map +0 -1
  87. package/dist/audit/validation/quoteGrounding.d.ts +0 -18
  88. package/dist/audit/validation/quoteGrounding.d.ts.map +0 -1
  89. package/dist/audit/validation/quoteGrounding.js +0 -18
  90. package/dist/audit/validation/quoteGrounding.js.map +0 -1
  91. package/dist/remediate/state/accessMemory.d.ts +0 -53
  92. package/dist/remediate/state/accessMemory.d.ts.map +0 -1
  93. package/dist/remediate/state/accessMemory.js +0 -105
  94. package/dist/remediate/state/accessMemory.js.map +0 -1
  95. package/dist/remediate/steps/dispatch.d.ts +0 -4
  96. package/dist/remediate/steps/dispatch.d.ts.map +0 -1
  97. package/dist/remediate/steps/dispatch.js +0 -12
  98. package/dist/remediate/steps/dispatch.js.map +0 -1
@@ -1,46 +0,0 @@
1
- import { normalizeGenericExternalEdges } from "audit-tools/shared";
2
- /** Default capture name holding the edge target path/specifier. */
3
- const DEFAULT_TARGET_META_VAR = "TARGET";
4
- /**
5
- * Normalize `ast-grep scan --json` output into language-neutral graph edges:
6
- * one `matched-file → captured-target` edge per match whose target meta-variable
7
- * resolves to a non-empty string distinct from the matched file. ast-grep is a
8
- * structural matcher, so the target capture is whatever the operator's rule
9
- * binds (a module specifier, a referenced symbol path); endpoint resolution
10
- * against the repo path lookup happens downstream in the graph extractor.
11
- *
12
- * Degrades to an empty edge list on any malformed / missing field and never
13
- * throws; `normalizeGenericExternalEdges` dedupes + sorts for determinism.
14
- */
15
- export function normalizeAstGrepJson(matches, targetMetaVar = DEFAULT_TARGET_META_VAR) {
16
- const candidates = [];
17
- for (const match of Array.isArray(matches) ? matches : []) {
18
- if (!match || typeof match !== "object")
19
- continue;
20
- const from = typeof match.file === "string" && match.file.trim().length > 0
21
- ? match.file.trim()
22
- : undefined;
23
- const target = match.metaVariables?.single?.[targetMetaVar]?.text;
24
- const to = typeof target === "string" && target.trim().length > 0
25
- ? target.trim()
26
- : undefined;
27
- if (!from || !to)
28
- continue;
29
- candidates.push({
30
- from,
31
- to,
32
- kind: "analyzer-dataflow-edge",
33
- confidence: 0.7,
34
- reason: typeof match.ruleId === "string"
35
- ? `ast-grep rule '${match.ruleId}' links match to captured target.`
36
- : "ast-grep structural match links file to captured target.",
37
- });
38
- }
39
- return {
40
- tool: "ast-grep",
41
- generated_at: new Date().toISOString(),
42
- graph_edges: normalizeGenericExternalEdges(candidates),
43
- results: [],
44
- };
45
- }
46
- //# sourceMappingURL=astGrep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"astGrep.js","sourceRoot":"","sources":["../../../src/audit/adapters/astGrep.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAgBnE,mEAAmE;AACnE,MAAM,uBAAuB,GAAG,QAAQ,CAAC;AAEzC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,CAAC,UAAU,CAAC;QACtD,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC"}
@@ -1,47 +0,0 @@
1
- import type { ExternalAnalyzerResults } from "audit-tools/shared";
2
- /**
3
- * Minimal SARIF 2.1.0 shape for CodeQL dataflow queries. Only the fields needed
4
- * to recover source→sink file edges from `codeFlows` are typed; everything is
5
- * optional so a partial / malformed report degrades rather than throwing.
6
- */
7
- interface SarifArtifactLocation {
8
- uri?: string;
9
- }
10
- interface SarifLocation {
11
- physicalLocation?: {
12
- artifactLocation?: SarifArtifactLocation;
13
- };
14
- }
15
- interface SarifThreadFlowLocation {
16
- location?: SarifLocation;
17
- }
18
- interface SarifThreadFlow {
19
- locations?: SarifThreadFlowLocation[];
20
- }
21
- interface SarifCodeFlow {
22
- threadFlows?: SarifThreadFlow[];
23
- }
24
- interface SarifResult {
25
- ruleId?: string;
26
- codeFlows?: SarifCodeFlow[];
27
- }
28
- interface SarifRun {
29
- results?: SarifResult[];
30
- }
31
- export interface CodeqlSarif {
32
- runs?: SarifRun[];
33
- }
34
- /**
35
- * Normalize a CodeQL SARIF dataflow report into language-neutral graph edges:
36
- * for each result's code flow, emit one `source-file → sink-file` edge from the
37
- * first to the last thread-flow location whose file paths differ. CodeQL's
38
- * dataflow queries already model taint propagation, so the first/last locations
39
- * are the source and sink; downstream the graph extractor resolves the URIs
40
- * against the repo path lookup.
41
- *
42
- * Degrades to an empty edge list on any malformed / missing SARIF field and
43
- * never throws; `normalizeGenericExternalEdges` dedupes + sorts for determinism.
44
- */
45
- export declare function normalizeCodeqlSarif(input: CodeqlSarif): ExternalAnalyzerResults;
46
- export {};
47
- //# sourceMappingURL=codeql.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeql.d.ts","sourceRoot":"","sources":["../../../src/audit/adapters/codeql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAG5B;;;;GAIG;AACH,UAAU,qBAAqB;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AACD,UAAU,aAAa;IACrB,gBAAgB,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;CACjE;AACD,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AACD,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACvC;AACD,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC;AACD,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;CAC7B;AACD,UAAU,QAAQ;IAChB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;CACnB;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB,CAiChF"}
@@ -1,52 +0,0 @@
1
- import { normalizeGenericExternalEdges } from "audit-tools/shared";
2
- function locationUri(location) {
3
- const uri = location?.location?.physicalLocation?.artifactLocation?.uri;
4
- return typeof uri === "string" && uri.trim().length > 0 ? uri.trim() : undefined;
5
- }
6
- /**
7
- * Normalize a CodeQL SARIF dataflow report into language-neutral graph edges:
8
- * for each result's code flow, emit one `source-file → sink-file` edge from the
9
- * first to the last thread-flow location whose file paths differ. CodeQL's
10
- * dataflow queries already model taint propagation, so the first/last locations
11
- * are the source and sink; downstream the graph extractor resolves the URIs
12
- * against the repo path lookup.
13
- *
14
- * Degrades to an empty edge list on any malformed / missing SARIF field and
15
- * never throws; `normalizeGenericExternalEdges` dedupes + sorts for determinism.
16
- */
17
- export function normalizeCodeqlSarif(input) {
18
- const candidates = [];
19
- for (const run of input.runs ?? []) {
20
- for (const result of run?.results ?? []) {
21
- for (const codeFlow of result?.codeFlows ?? []) {
22
- for (const threadFlow of codeFlow?.threadFlows ?? []) {
23
- if (!threadFlow || typeof threadFlow !== "object")
24
- continue;
25
- const locations = Array.isArray(threadFlow.locations)
26
- ? threadFlow.locations
27
- : [];
28
- const from = locationUri(locations[0]);
29
- const to = locationUri(locations[locations.length - 1]);
30
- if (!from || !to)
31
- continue;
32
- candidates.push({
33
- from,
34
- to,
35
- kind: "analyzer-dataflow-edge",
36
- confidence: 0.7,
37
- reason: typeof result.ruleId === "string"
38
- ? `CodeQL query '${result.ruleId}' flows source → sink.`
39
- : "CodeQL dataflow flows source → sink.",
40
- });
41
- }
42
- }
43
- }
44
- }
45
- return {
46
- tool: "codeql",
47
- generated_at: new Date().toISOString(),
48
- graph_edges: normalizeGenericExternalEdges(candidates),
49
- results: [],
50
- };
51
- }
52
- //# sourceMappingURL=codeql.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeql.js","sourceRoot":"","sources":["../../../src/audit/adapters/codeql.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAiCnE,SAAS,WAAW,CAAC,QAA6C;IAChE,MAAM,GAAG,GAAG,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,CAAC;IACxE,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,MAAM,UAAU,GAA8C,EAAE,CAAC;IACjE,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QACnC,KAAK,MAAM,MAAM,IAAI,GAAG,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YACxC,KAAK,MAAM,QAAQ,IAAI,MAAM,EAAE,SAAS,IAAI,EAAE,EAAE,CAAC;gBAC/C,KAAK,MAAM,UAAU,IAAI,QAAQ,EAAE,WAAW,IAAI,EAAE,EAAE,CAAC;oBACrD,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ;wBAAE,SAAS;oBAC5D,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;wBACnD,CAAC,CAAC,UAAU,CAAC,SAAS;wBACtB,CAAC,CAAC,EAAE,CAAC;oBACP,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;oBACvC,MAAM,EAAE,GAAG,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;oBACxD,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE;wBAAE,SAAS;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,IAAI;wBACJ,EAAE;wBACF,IAAI,EAAE,wBAAwB;wBAC9B,UAAU,EAAE,GAAG;wBACf,MAAM,EACJ,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;4BAC/B,CAAC,CAAC,iBAAiB,MAAM,CAAC,MAAM,wBAAwB;4BACxD,CAAC,CAAC,sCAAsC;qBAC7C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACtC,WAAW,EAAE,6BAA6B,CAAC,UAAU,CAAC;QACtD,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { ExternalAnalyzerResults } from "audit-tools/shared";
2
- interface CoverageFileSummary {
3
- path: string;
4
- lines_pct: number;
5
- branches_pct?: number;
6
- }
7
- export declare function normalizeCoverageSummary(files: CoverageFileSummary[]): ExternalAnalyzerResults;
8
- export {};
9
- //# sourceMappingURL=coverageSummary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coverageSummary.d.ts","sourceRoot":"","sources":["../../../src/audit/adapters/coverageSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAQlE,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,mBAAmB,EAAE,GAC3B,uBAAuB,CAczB"}
@@ -1,18 +0,0 @@
1
- import { normalizeGenericExternalResults } from "audit-tools/shared";
2
- /** Minimum acceptable line coverage percentage; files below this are flagged. */
3
- const COVERAGE_THRESHOLD_LOW = 80;
4
- /** Line coverage percentage below which severity is escalated to "high" (otherwise "medium"). */
5
- const COVERAGE_SEVERITY_HIGH = 50;
6
- export function normalizeCoverageSummary(files) {
7
- return normalizeGenericExternalResults("coverage-summary", files
8
- .filter((file) => file.lines_pct < COVERAGE_THRESHOLD_LOW)
9
- .map((file, index) => ({
10
- id: `coverage-${index + 1}`,
11
- category: "tests",
12
- severity: file.lines_pct < COVERAGE_SEVERITY_HIGH ? "high" : "medium",
13
- path: file.path,
14
- summary: `Low line coverage: ${file.lines_pct}%${typeof file.branches_pct === "number" ? `, branch coverage ${file.branches_pct}%` : ""}.`,
15
- raw: file,
16
- })));
17
- }
18
- //# sourceMappingURL=coverageSummary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coverageSummary.js","sourceRoot":"","sources":["../../../src/audit/adapters/coverageSummary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAErE,iFAAiF;AACjF,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,iGAAiG;AACjG,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAQlC,MAAM,UAAU,wBAAwB,CACtC,KAA4B;IAE5B,OAAO,+BAA+B,CACpC,kBAAkB,EAClB,KAAK;SACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,GAAG,sBAAsB,CAAC;SACzD,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,EAAE,EAAE,YAAY,KAAK,GAAG,CAAC,EAAE;QAC3B,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,IAAI,CAAC,SAAS,GAAG,sBAAsB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;QACrE,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,sBAAsB,IAAI,CAAC,SAAS,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG;QAC1I,GAAG,EAAE,IAAI;KACV,CAAC,CAAC,CACN,CAAC;AACJ,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { ExternalAnalyzerResults } from "audit-tools/shared";
2
- interface EslintResult {
3
- filePath?: string;
4
- messages?: Array<{
5
- ruleId?: string | null;
6
- severity?: number;
7
- line?: number;
8
- endLine?: number;
9
- message?: string;
10
- }>;
11
- }
12
- export declare function normalizeEslintJson(input: EslintResult[]): ExternalAnalyzerResults;
13
- export {};
14
- //# sourceMappingURL=eslint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/audit/adapters/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ;AAiBD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EAAE,GACpB,uBAAuB,CAiBzB"}
@@ -1,28 +0,0 @@
1
- import { normalizeGenericExternalResults } from "audit-tools/shared";
2
- const ESLINT_SEVERITY_ERROR = 2;
3
- const ESLINT_SEVERITY_WARNING = 1;
4
- const ESLINT_SEVERITY_MAP = {
5
- [ESLINT_SEVERITY_ERROR]: "medium",
6
- [ESLINT_SEVERITY_WARNING]: "low",
7
- };
8
- function mapSeverity(value) {
9
- // ESLint's JSON formatter emits 2 for errors and 1 for warnings.
10
- if (typeof value !== "number") {
11
- return "info";
12
- }
13
- return ESLINT_SEVERITY_MAP[value] ?? "info";
14
- }
15
- export function normalizeEslintJson(input) {
16
- return normalizeGenericExternalResults("eslint", input.flatMap((file) => (file.messages ?? []).map((message, index) => ({
17
- id: `${file.filePath ?? "unknown"}:${index + 1}`,
18
- category: "maintainability",
19
- severity: mapSeverity(message.severity),
20
- path: file.filePath,
21
- line_start: message.line,
22
- line_end: message.endLine,
23
- summary: message.message,
24
- rule: message.ruleId ?? undefined,
25
- raw: message,
26
- }))));
27
- }
28
- //# sourceMappingURL=eslint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../../src/audit/adapters/eslint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAarE,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAClC,MAAM,mBAAmB,GAAG;IAC1B,CAAC,qBAAqB,CAAC,EAAE,QAAQ;IACjC,CAAC,uBAAuB,CAAC,EAAE,KAAK;CACxB,CAAC;AAEX,SAAS,WAAW,CAAC,KAAc;IACjC,iEAAiE;IACjE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,mBAAmB,CAAC,KAAyC,CAAC,IAAI,MAAM,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,KAAqB;IAErB,OAAO,+BAA+B,CACpC,QAAQ,EACR,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACrB,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7C,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,KAAK,GAAG,CAAC,EAAE;QAChD,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC;QACvC,IAAI,EAAE,IAAI,CAAC,QAAQ;QACnB,UAAU,EAAE,OAAO,CAAC,IAAI;QACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;QACzB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;QACjC,GAAG,EAAE,OAAO;KACb,CAAC,CAAC,CACJ,CACF,CAAC;AACJ,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { ExternalAnalyzerResults } from "audit-tools/shared";
2
- interface NpmAuditVuln {
3
- name?: string;
4
- severity?: string;
5
- range?: string;
6
- fixAvailable?: boolean | {
7
- name?: string;
8
- version?: string;
9
- };
10
- }
11
- interface NpmAuditJson {
12
- vulnerabilities?: Record<string, NpmAuditVuln>;
13
- }
14
- export declare function normalizeNpmAuditJson(input: NpmAuditJson): ExternalAnalyzerResults;
15
- export {};
16
- //# sourceMappingURL=npmAudit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"npmAudit.d.ts","sourceRoot":"","sources":["../../../src/audit/adapters/npmAudit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D;AAED,UAAU,YAAY;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAChD;AAWD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,GAClB,uBAAuB,CAgBzB"}
@@ -1,24 +0,0 @@
1
- import { normalizeGenericExternalResults } from "audit-tools/shared";
2
- const NPM_SEVERITY_MAP = {
3
- critical: "critical",
4
- high: "high",
5
- moderate: "medium",
6
- medium: "medium",
7
- low: "low",
8
- info: "info",
9
- };
10
- export function normalizeNpmAuditJson(input) {
11
- return normalizeGenericExternalResults("npm-audit", Object.entries(input.vulnerabilities ?? {}).map(([pkg, vuln], index) => {
12
- const severity = NPM_SEVERITY_MAP[vuln.severity ?? ""] ?? "low";
13
- return {
14
- id: `npm-audit-${index}`,
15
- category: "dependency_risk",
16
- severity,
17
- path: "package.json",
18
- summary: `Package ${pkg} has a ${severity} severity vulnerability in range ${vuln.range ?? "unknown"}.`,
19
- rule: pkg,
20
- raw: vuln,
21
- };
22
- }));
23
- }
24
- //# sourceMappingURL=npmAudit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"npmAudit.js","sourceRoot":"","sources":["../../../src/audit/adapters/npmAudit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAarE,MAAM,gBAAgB,GAA2B;IAC/C,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,KAAmB;IAEnB,OAAO,+BAA+B,CACpC,WAAW,EACX,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;QACrE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC;QAChE,OAAO;YACL,EAAE,EAAE,aAAa,KAAK,EAAE;YACxB,QAAQ,EAAE,iBAAiB;YAC3B,QAAQ;YACR,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,WAAW,GAAG,UAAU,QAAQ,oCAAoC,IAAI,CAAC,KAAK,IAAI,SAAS,GAAG;YACvG,IAAI,EAAE,GAAG;YACT,GAAG,EAAE,IAAI;SACV,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,42 +0,0 @@
1
- import type { ExternalAnalyzerResults } from "audit-tools/shared";
2
- interface SemgrepDataflowTraceNode {
3
- location?: {
4
- path?: string;
5
- };
6
- }
7
- interface SemgrepResult {
8
- check_id?: string;
9
- path?: string;
10
- start?: {
11
- line?: number;
12
- };
13
- end?: {
14
- line?: number;
15
- };
16
- extra?: {
17
- severity?: string;
18
- message?: string;
19
- metadata?: {
20
- category?: string;
21
- };
22
- dataflow_trace?: {
23
- taint_source?: SemgrepDataflowTraceNode | SemgrepDataflowTraceNode[];
24
- intermediate_vars?: SemgrepDataflowTraceNode[];
25
- taint_sink?: SemgrepDataflowTraceNode | SemgrepDataflowTraceNode[];
26
- };
27
- };
28
- }
29
- interface SemgrepJson {
30
- results?: SemgrepResult[];
31
- }
32
- export declare function normalizeSemgrepJson(input: SemgrepJson): ExternalAnalyzerResults;
33
- /**
34
- * Normalize semgrep's broader `--dataflow-traces` output into language-neutral
35
- * graph edges: one `taint-source → taint-sink` edge per result whose source and
36
- * sink resolve to distinct file paths. Intermediate vars are not edges (they are
37
- * within-file steps). Malformed / missing traces degrade to an empty edge list;
38
- * `normalizeGenericExternalEdges` dedupes + sorts so output is deterministic.
39
- */
40
- export declare function normalizeSemgrepDataflowJson(input: SemgrepJson): ExternalAnalyzerResults;
41
- export {};
42
- //# sourceMappingURL=semgrep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semgrep.d.ts","sourceRoot":"","sources":["../../../src/audit/adapters/semgrep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAM5B,UAAU,wBAAwB;IAChC,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9B;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,GAAG,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACjC,cAAc,CAAC,EAAE;YACf,YAAY,CAAC,EAAE,wBAAwB,GAAG,wBAAwB,EAAE,CAAC;YACrE,iBAAiB,CAAC,EAAE,wBAAwB,EAAE,CAAC;YAC/C,UAAU,CAAC,EAAE,wBAAwB,GAAG,wBAAwB,EAAE,CAAC;SACpE,CAAC;KACH,CAAC;CACH;AAED,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;CAC3B;AA6BD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,WAAW,GACjB,uBAAuB,CAezB;AAwBD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,WAAW,GACjB,uBAAuB,CA0BzB"}
@@ -1,93 +0,0 @@
1
- import { normalizeGenericExternalEdges, normalizeGenericExternalResults, } from "audit-tools/shared";
2
- /**
3
- * Maps semgrep's native uppercase severity strings to the lowercase enum values
4
- * required by ExternalAnalyzerResultsSchema. Case-insensitive lookup so
5
- * any casing variant is handled uniformly.
6
- *
7
- * Semgrep → schema:
8
- * CRITICAL → 'critical'
9
- * ERROR → 'high'
10
- * WARNING → 'medium'
11
- * INFO → 'info'
12
- *
13
- * Any other / undefined value returns undefined so
14
- * normalizeGenericExternalResults can apply its own fallback.
15
- */
16
- function normalizeSemgrepSeverity(raw) {
17
- if (raw === undefined)
18
- return undefined;
19
- switch (raw.toUpperCase()) {
20
- case "CRITICAL": return "critical";
21
- case "ERROR": return "high";
22
- case "WARNING": return "medium";
23
- case "INFO": return "info";
24
- default: return undefined;
25
- }
26
- }
27
- export function normalizeSemgrepJson(input) {
28
- return normalizeGenericExternalResults("semgrep", (input.results ?? []).map((result) => ({
29
- id: result.check_id,
30
- category: result.extra?.metadata?.category ?? "security",
31
- severity: normalizeSemgrepSeverity(result.extra?.severity),
32
- path: result.path,
33
- line_start: result.start?.line,
34
- line_end: result.end?.line,
35
- summary: result.extra?.message,
36
- rule: result.check_id,
37
- raw: result,
38
- })));
39
- }
40
- function dataflowNodePath(node) {
41
- const path = node?.location?.path;
42
- return typeof path === "string" && path.trim().length > 0
43
- ? path.trim()
44
- : undefined;
45
- }
46
- function firstDataflowPath(value) {
47
- if (Array.isArray(value)) {
48
- for (const node of value) {
49
- const path = dataflowNodePath(node);
50
- if (path)
51
- return path;
52
- }
53
- return undefined;
54
- }
55
- return dataflowNodePath(value);
56
- }
57
- /**
58
- * Normalize semgrep's broader `--dataflow-traces` output into language-neutral
59
- * graph edges: one `taint-source → taint-sink` edge per result whose source and
60
- * sink resolve to distinct file paths. Intermediate vars are not edges (they are
61
- * within-file steps). Malformed / missing traces degrade to an empty edge list;
62
- * `normalizeGenericExternalEdges` dedupes + sorts so output is deterministic.
63
- */
64
- export function normalizeSemgrepDataflowJson(input) {
65
- const candidates = [];
66
- for (const result of input.results ?? []) {
67
- if (!result || typeof result !== "object")
68
- continue;
69
- const trace = result.extra?.dataflow_trace;
70
- if (!trace)
71
- continue;
72
- const from = firstDataflowPath(trace.taint_source);
73
- const to = firstDataflowPath(trace.taint_sink);
74
- if (!from || !to)
75
- continue;
76
- candidates.push({
77
- from,
78
- to,
79
- kind: "analyzer-dataflow-edge",
80
- confidence: 0.7,
81
- reason: typeof result.check_id === "string"
82
- ? `semgrep dataflow trace '${result.check_id}' flows source → sink.`
83
- : "semgrep dataflow trace flows source → sink.",
84
- });
85
- }
86
- return {
87
- tool: "semgrep-dataflow",
88
- generated_at: new Date().toISOString(),
89
- graph_edges: normalizeGenericExternalEdges(candidates),
90
- results: [],
91
- };
92
- }
93
- //# sourceMappingURL=semgrep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semgrep.js","sourceRoot":"","sources":["../../../src/audit/adapters/semgrep.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AA2B5B;;;;;;;;;;;;;GAaG;AACH,SAAS,wBAAwB,CAC/B,GAAuB;IAEvB,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,QAAQ,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QAC1B,KAAK,UAAU,CAAC,CAAC,OAAO,UAAU,CAAC;QACnC,KAAK,OAAO,CAAC,CAAI,OAAO,MA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
3
- *
4
- * Audit-tools derives the pending semantic-review tasks, publishes their
5
- * complete workload, and validates the host's bound results. It does not
6
- * launch workers, admit packets, choose a backend, or track execution quota.
7
- */
8
- export { buildPendingAuditTasks } from "./dispatch/packetFilter.js";
9
- export { dropAcceptedResults, ingestAuditHostResults, prepareAuditHostHandoff, type AuditHostIngestSummary, type AuditHostResultMap, type AuditHostResultMapEntry, type AuditHostTask, type AuditHostWorkItem, type AuditHostWorkload, type PreparedAuditHostHandoff, } from "./dispatch/hostHandoff.js";
10
- //# sourceMappingURL=dispatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,2BAA2B,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Provider-neutral audit handoff boundary.
3
- *
4
- * Audit-tools derives the pending semantic-review tasks, publishes their
5
- * complete workload, and validates the host's bound results. It does not
6
- * launch workers, admit packets, choose a backend, or track execution quota.
7
- */
8
- export { buildPendingAuditTasks } from "./dispatch/packetFilter.js";
9
- export { dropAcceptedResults, ingestAuditHostResults, prepareAuditHostHandoff, } from "./dispatch/hostHandoff.js";
10
- //# sourceMappingURL=dispatch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/audit/cli/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GAQxB,MAAM,2BAA2B,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const packageRoot: string;
2
- //# sourceMappingURL=paths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/paths.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,QAKvB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { dirname, resolve } from "node:path";
2
- import { fileURLToPath } from "node:url";
3
- // Absolute path to the package root (the single `audit-tools` package). Computed
4
- // relative to this module's location (src/audit/cli/ in source, dist/audit/cli/
5
- // when built), so it stays correct regardless of which command module imports it.
6
- // Three levels up reaches the package root, which holds the packaged asset dirs
7
- // (dispatch/, schemas/, skills/). Shared by renderSemanticReviewStep and
8
- // cmdRunToCompletion to locate packaged assets when preparing dispatch.
9
- export const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
10
- //# sourceMappingURL=paths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/audit/cli/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,iFAAiF;AACjF,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,yEAAyE;AACzE,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAChC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACvC,IAAI,EACJ,IAAI,EACJ,IAAI,CACL,CAAC"}
@@ -1,6 +0,0 @@
1
- export interface LineRange {
2
- start: number;
3
- end: number;
4
- }
5
- export declare function chunkLineCount(totalLines: number, chunkSize?: number): LineRange[];
6
- //# sourceMappingURL=chunking.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunking.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/chunking.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,SAAM,GACd,SAAS,EAAE,CAeb"}
@@ -1,14 +0,0 @@
1
- export function chunkLineCount(totalLines, chunkSize = 200) {
2
- if (totalLines <= 0) {
3
- return [];
4
- }
5
- const ranges = [];
6
- let start = 1;
7
- while (start <= totalLines) {
8
- const end = Math.min(start + chunkSize - 1, totalLines);
9
- ranges.push({ start, end });
10
- start = end + 1;
11
- }
12
- return ranges;
13
- }
14
- //# sourceMappingURL=chunking.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunking.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/chunking.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,cAAc,CAC5B,UAAkB,EAClB,SAAS,GAAG,GAAG;IAEf,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,KAAK,IAAI,UAAU,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,SAAS,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QAC5B,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { computeContinuityScores } from "audit-tools/shared";
2
- //# sourceMappingURL=continuityScore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"continuityScore.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/continuityScore.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,9 +0,0 @@
1
- // Continuity scoring is single-sourced in `audit-tools/shared`
2
- // (`computeContinuityScores`) so the audit and remediate orchestrators bias on
3
- // the IDENTICAL scorer — the auditor/remediator mirroring the harvest core
4
- // (`deriveAccessMemoryFromEvents`) already established. Audit consumes it to bias
5
- // review-packet ordering (`orderReviewPackets`); remediate to bias file-ownership
6
- // sub-wave admission. This re-export keeps audit's import sites stable; the byte-
7
- // identical behaviour is unchanged from the pre-extraction audit-local scorer.
8
- export { computeContinuityScores } from "audit-tools/shared";
9
- //# sourceMappingURL=continuityScore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"continuityScore.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/continuityScore.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+EAA+E;AAC/E,2EAA2E;AAC3E,kFAAkF;AAClF,kFAAkF;AAClF,kFAAkF;AAClF,+EAA+E;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,69 +0,0 @@
1
- import type { ExternalAnalyzerResults, AnalyzerLeadProvenance } from "audit-tools/shared";
2
- import type { GraphBundle } from "audit-tools/shared";
3
- export type FileAnchorKind = "boundary" | "import" | "export" | "symbol" | "route" | "keyword" | "graph" | "analyzer_signal";
4
- export interface FileAnchor {
5
- kind: FileAnchorKind;
6
- name: string;
7
- line?: number;
8
- /**
9
- * Approximate END line of a `symbol`-kind anchor's body (increment 2d,
10
- * `path::symbol` slicing). Computed deterministically as the line before the
11
- * next top-level declaration boundary (`symbol`/`route` start), clamped to the
12
- * file's line count — a lightweight, language-neutral, brace-agnostic extent
13
- * (no nesting awareness). Advisory ONLY: it seeds a targeted symbol-span read
14
- * so a worker need not re-read a whole god-file, but the worker always
15
- * fail-safes to reading more when evidence crosses the span. Present only on
16
- * `symbol` anchors that have a `line`; absent everywhere else.
17
- */
18
- end_line?: number;
19
- detail?: string;
20
- /**
21
- * Content-anchored lead identity (item C), present only on `analyzer_signal`
22
- * anchors whose source signal carried one. Rendered into the packet prompt so
23
- * the worker can copy it verbatim into `analyzer_provenance` on a finding
24
- * born from this lead.
25
- */
26
- provenance?: AnalyzerLeadProvenance;
27
- }
28
- export interface FileAnchorSummary {
29
- contract_version: "audit-code-file-anchors/v1alpha1";
30
- path: string;
31
- total_lines: number;
32
- review_mode: "isolated_large_file";
33
- scope_basis: string[];
34
- anchors: FileAnchor[];
35
- omitted_anchor_count: number;
36
- counts: {
37
- symbols: number;
38
- routes: number;
39
- keywords: number;
40
- graph_edges: number;
41
- analyzer_signals: number;
42
- };
43
- }
44
- /**
45
- * Path-keyed index of external-analyzer signal anchors (rule/line/summary),
46
- * built ONCE per dispatch from the whole `externalAnalyzerResults` set so
47
- * per-task/per-file prompt rendering is an O(1) map read rather than an
48
- * O(tasks × files × total-results) re-flatten. Key = normalized lowercased
49
- * path; each bucket is pre-sorted by (line_start, id), matching the original
50
- * per-path ordering. See {@link analyzerSignalAnchorsForPath} for the reader.
51
- */
52
- export type AnalyzerSignalAnchorIndex = Map<string, FileAnchor[]>;
53
- export declare function buildAnalyzerSignalAnchorIndex(externalAnalyzerResults: ExternalAnalyzerResults[] | undefined): AnalyzerSignalAnchorIndex;
54
- /**
55
- * External-analyzer signal anchors (rule/line/summary) for one path — an O(1)
56
- * read of the pre-built {@link AnalyzerSignalAnchorIndex}. Split out of
57
- * {@link buildFileAnchorSummary} so packet-level prompt rendering (any
58
- * multi-file packet, not just isolated-large-file mode) can surface the same
59
- * grounded lead detail without paying for whole-file content scanning.
60
- */
61
- export declare function analyzerSignalAnchorsForPath(path: string, index: AnalyzerSignalAnchorIndex | undefined): FileAnchor[];
62
- export declare function buildFileAnchorSummary(params: {
63
- path: string;
64
- content: string;
65
- totalLines: number;
66
- graphBundle?: GraphBundle;
67
- externalAnalyzerResults?: ExternalAnalyzerResults[];
68
- }): FileAnchorSummary;
69
- //# sourceMappingURL=fileAnchors.d.ts.map