auditor-lambda 0.10.3 → 0.10.8

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 (183) hide show
  1. package/audit-code-wrapper-build.mjs +198 -0
  2. package/audit-code-wrapper-install-hosts.mjs +1140 -0
  3. package/audit-code-wrapper-io.mjs +155 -0
  4. package/audit-code-wrapper-legacy.mjs +125 -0
  5. package/audit-code-wrapper-lib.mjs +22 -1806
  6. package/audit-code-wrapper-opencode.mjs +255 -0
  7. package/dispatch/merge-results.mjs +5 -3
  8. package/dispatch/validate-result.mjs +2 -2
  9. package/dist/adapters/coverageSummary.js +6 -2
  10. package/dist/adapters/normalizeExternal.js +16 -1
  11. package/dist/adapters/npmAudit.js +20 -9
  12. package/dist/adapters/semgrep.js +26 -1
  13. package/dist/cli/advanceAuditCommand.d.ts +1 -0
  14. package/dist/cli/advanceAuditCommand.js +95 -0
  15. package/dist/cli/args.js +2 -3
  16. package/dist/cli/auditStep.js +2 -2
  17. package/dist/cli/cleanup.d.ts +11 -1
  18. package/dist/cli/cleanup.js +25 -5
  19. package/dist/cli/cleanupCommand.d.ts +1 -0
  20. package/dist/cli/cleanupCommand.js +24 -0
  21. package/dist/cli/dispatch.d.ts +55 -31
  22. package/dist/cli/dispatch.js +298 -241
  23. package/dist/cli/dispatchStatusCommand.d.ts +1 -0
  24. package/dist/cli/dispatchStatusCommand.js +68 -0
  25. package/dist/cli/explainTaskCommand.d.ts +1 -0
  26. package/dist/cli/explainTaskCommand.js +33 -0
  27. package/dist/cli/importExternalAnalyzerCommand.d.ts +1 -0
  28. package/dist/cli/importExternalAnalyzerCommand.js +20 -0
  29. package/dist/cli/ingestResultsCommand.d.ts +1 -0
  30. package/dist/cli/ingestResultsCommand.js +34 -0
  31. package/dist/cli/intakeCommand.d.ts +1 -0
  32. package/dist/cli/intakeCommand.js +17 -0
  33. package/dist/cli/lineIndex.js +19 -12
  34. package/dist/cli/nextStepCommand.d.ts +139 -0
  35. package/dist/cli/nextStepCommand.js +281 -234
  36. package/dist/cli/planCommand.d.ts +1 -0
  37. package/dist/cli/planCommand.js +16 -0
  38. package/dist/cli/prepareDispatchCommand.d.ts +1 -0
  39. package/dist/cli/prepareDispatchCommand.js +25 -0
  40. package/dist/cli/quotaCommand.d.ts +1 -0
  41. package/dist/cli/quotaCommand.js +56 -0
  42. package/dist/cli/requeueCommand.d.ts +1 -0
  43. package/dist/cli/requeueCommand.js +10 -0
  44. package/dist/cli/runToCompletion.js +451 -412
  45. package/dist/cli/sampleRunCommand.d.ts +1 -0
  46. package/dist/cli/sampleRunCommand.js +93 -0
  47. package/dist/cli/statusCommand.js +1 -1
  48. package/dist/cli/steps.js +4 -1
  49. package/dist/cli/submitPacketCommand.js +16 -15
  50. package/dist/cli/synthesizeCommand.d.ts +1 -0
  51. package/dist/cli/synthesizeCommand.js +15 -0
  52. package/dist/cli/updateRuntimeValidationCommand.d.ts +1 -0
  53. package/dist/cli/updateRuntimeValidationCommand.js +16 -0
  54. package/dist/cli/validateCommand.d.ts +1 -0
  55. package/dist/cli/validateCommand.js +41 -0
  56. package/dist/cli/validateResultCommand.d.ts +1 -0
  57. package/dist/cli/validateResultCommand.js +63 -0
  58. package/dist/cli/validateResultsCommand.d.ts +1 -0
  59. package/dist/cli/validateResultsCommand.js +31 -0
  60. package/dist/cli/workerRunCommand.d.ts +15 -1
  61. package/dist/cli/workerRunCommand.js +40 -4
  62. package/dist/cli.d.ts +3 -2
  63. package/dist/cli.js +21 -628
  64. package/dist/coverage.js +7 -3
  65. package/dist/extractors/analyzers/css.js +2 -2
  66. package/dist/extractors/analyzers/html.js +2 -2
  67. package/dist/extractors/analyzers/python.js +2 -2
  68. package/dist/extractors/analyzers/registry.js +17 -36
  69. package/dist/extractors/analyzers/treeSitter.d.ts +10 -1
  70. package/dist/extractors/analyzers/treeSitter.js +28 -6
  71. package/dist/extractors/analyzers/typescript.js +104 -85
  72. package/dist/extractors/browserExtension.js +4 -1
  73. package/dist/extractors/designAssessment.js +21 -21
  74. package/dist/extractors/fsIntake.js +35 -11
  75. package/dist/extractors/graph.js +17 -7
  76. package/dist/extractors/graphManifestEdges/cargo.d.ts +4 -0
  77. package/dist/extractors/graphManifestEdges/cargo.js +107 -0
  78. package/dist/extractors/graphManifestEdges/go.d.ts +5 -0
  79. package/dist/extractors/graphManifestEdges/go.js +151 -0
  80. package/dist/extractors/graphManifestEdges/index.d.ts +8 -0
  81. package/dist/extractors/graphManifestEdges/index.js +11 -0
  82. package/dist/extractors/graphManifestEdges/jsonc.d.ts +3 -0
  83. package/dist/extractors/graphManifestEdges/jsonc.js +97 -0
  84. package/dist/extractors/graphManifestEdges/maven.d.ts +3 -0
  85. package/dist/extractors/graphManifestEdges/maven.js +73 -0
  86. package/dist/extractors/graphManifestEdges/packageJson.d.ts +19 -0
  87. package/dist/extractors/graphManifestEdges/packageJson.js +204 -0
  88. package/dist/extractors/graphManifestEdges/pnpm.d.ts +2 -0
  89. package/dist/extractors/graphManifestEdges/pnpm.js +42 -0
  90. package/dist/extractors/graphManifestEdges/pyproject.d.ts +3 -0
  91. package/dist/extractors/graphManifestEdges/pyproject.js +83 -0
  92. package/dist/extractors/graphManifestEdges/toml.d.ts +4 -0
  93. package/dist/extractors/graphManifestEdges/toml.js +68 -0
  94. package/dist/extractors/graphManifestEdges/typescript.d.ts +3 -0
  95. package/dist/extractors/graphManifestEdges/typescript.js +56 -0
  96. package/dist/extractors/graphManifestEdges/workspace.d.ts +10 -0
  97. package/dist/extractors/graphManifestEdges/workspace.js +72 -0
  98. package/dist/extractors/graphManifestEdges/yaml.d.ts +3 -0
  99. package/dist/extractors/graphManifestEdges/yaml.js +59 -0
  100. package/dist/extractors/graphManifestEdges/yamlPaths.d.ts +4 -0
  101. package/dist/extractors/graphManifestEdges/yamlPaths.js +89 -0
  102. package/dist/extractors/graphPythonImports.js +4 -20
  103. package/dist/extractors/pathPatterns.js +3 -13
  104. package/dist/io/artifacts.d.ts +1 -2
  105. package/dist/io/artifacts.js +8 -4
  106. package/dist/io/runArtifacts.d.ts +8 -2
  107. package/dist/io/runArtifacts.js +103 -69
  108. package/dist/io/toolingManifest.js +2 -1
  109. package/dist/orchestrator/advance.js +36 -0
  110. package/dist/orchestrator/artifactFreshness.d.ts +1 -1
  111. package/dist/orchestrator/artifactFreshness.js +1 -1
  112. package/dist/orchestrator/artifactMetadata.js +5 -5
  113. package/dist/orchestrator/auditTaskUtils.d.ts +4 -0
  114. package/dist/orchestrator/auditTaskUtils.js +8 -12
  115. package/dist/orchestrator/autoFixExecutor.js +40 -26
  116. package/dist/orchestrator/dependencyMap.js +1 -1
  117. package/dist/orchestrator/executorResult.d.ts +33 -0
  118. package/dist/orchestrator/executors.d.ts +7 -0
  119. package/dist/orchestrator/executors.js +24 -0
  120. package/dist/orchestrator/fileAnchors.js +42 -29
  121. package/dist/orchestrator/fileIntegrity.js +6 -1
  122. package/dist/orchestrator/flowCoverage.js +1 -2
  123. package/dist/orchestrator/flowPlanning.js +8 -4
  124. package/dist/orchestrator/graphEnrichmentExecutor.js +67 -45
  125. package/dist/orchestrator/ingestionExecutors.js +9 -1
  126. package/dist/orchestrator/intakeExecutors.d.ts +0 -4
  127. package/dist/orchestrator/intakeExecutors.js +24 -14
  128. package/dist/orchestrator/localCommands.d.ts +1 -0
  129. package/dist/orchestrator/localCommands.js +10 -17
  130. package/dist/orchestrator/nextStep.js +3 -1
  131. package/dist/orchestrator/requeueCommand.js +4 -0
  132. package/dist/orchestrator/reviewPacketGraph.js +50 -18
  133. package/dist/orchestrator/reviewPackets.js +10 -8
  134. package/dist/orchestrator/runtimeCommand.js +35 -7
  135. package/dist/orchestrator/runtimeValidationUpdate.js +6 -0
  136. package/dist/orchestrator/selectiveDeepening/highRiskClean.js +3 -2
  137. package/dist/orchestrator/selectiveDeepening/lensVerification.js +44 -18
  138. package/dist/orchestrator/staleness.js +3 -3
  139. package/dist/orchestrator/state.js +1 -1
  140. package/dist/orchestrator/syntaxResolutionExecutor.js +17 -24
  141. package/dist/orchestrator/synthesisExecutors.js +1 -0
  142. package/dist/orchestrator/taskBuilder.js +5 -4
  143. package/dist/providers/claudeCodeProvider.js +5 -2
  144. package/dist/providers/opencodeProvider.js +4 -1
  145. package/dist/quota/discoveredLimits.js +3 -3
  146. package/dist/quota/headerExtraction.js +5 -2
  147. package/dist/quota/headerExtractors/claudeCodeHeaderExtractor.js +3 -0
  148. package/dist/quota/headerExtractors/index.js +3 -3
  149. package/dist/quota/index.d.ts +3 -1
  150. package/dist/quota/index.js +3 -0
  151. package/dist/reporting/findingRanks.d.ts +3 -0
  152. package/dist/reporting/findingRanks.js +24 -0
  153. package/dist/reporting/mergeFindings.js +1 -24
  154. package/dist/reporting/synthesis.d.ts +3 -1
  155. package/dist/reporting/synthesis.js +30 -6
  156. package/dist/reporting/synthesisNarrativePrompt.js +3 -0
  157. package/dist/reporting/workBlocks.js +1 -14
  158. package/dist/supervisor/operatorHandoff.js +2 -6
  159. package/dist/supervisor/runLedger.js +30 -41
  160. package/dist/types/activeDispatch.d.ts +31 -0
  161. package/dist/types/activeDispatch.js +2 -0
  162. package/dist/types.d.ts +21 -4
  163. package/dist/types.js +24 -16
  164. package/dist/validation/artifacts.js +3 -0
  165. package/dist/validation/auditResults.js +8 -2
  166. package/package.json +2 -2
  167. package/schemas/audit_findings.schema.json +5 -1
  168. package/schemas/audit_plan_metrics.schema.json +1 -1
  169. package/schemas/audit_result.schema.json +5 -6
  170. package/schemas/audit_task.schema.json +1 -4
  171. package/schemas/blind_spot_register.schema.json +1 -1
  172. package/schemas/coverage_matrix.schema.json +2 -8
  173. package/schemas/finding.schema.json +1 -16
  174. package/schemas/flow_coverage.schema.json +2 -8
  175. package/schemas/graph_bundle.schema.json +31 -0
  176. package/schemas/lens.schema.json +7 -0
  177. package/schemas/review_packets.schema.json +6 -17
  178. package/schemas/step_contract.schema.json +8 -2
  179. package/schemas/unit_manifest.schema.json +1 -4
  180. package/scripts/postinstall.mjs +4 -3
  181. package/skills/audit-code/audit-code.prompt.md +3 -4
  182. package/dist/extractors/graphManifestEdges.d.ts +0 -12
  183. package/dist/extractors/graphManifestEdges.js +0 -1135
@@ -589,7 +589,8 @@ export function validateAuditResults(results, tasks, options = {}) {
589
589
  if (!isRecord(affected) || !isNonEmptyString(affected.path)) {
590
590
  continue;
591
591
  }
592
- if (!declaredAssignedCoveragePaths.has(affected.path)) {
592
+ const affectedPathNorm = normalizeCoveragePath(affected.path);
593
+ if (!declaredAssignedCoveragePaths.has(affectedPathNorm)) {
593
594
  pushIssue(issues, {
594
595
  result_index: i,
595
596
  task_id: taskId,
@@ -605,7 +606,7 @@ export function validateAuditResults(results, tasks, options = {}) {
605
606
  const end = Number.isInteger(affected.line_end)
606
607
  ? Number(affected.line_end)
607
608
  : start;
608
- if (!coversAffectedSpan(normalizedFileCoverage, affected.path, start, end)) {
609
+ if (!coversAffectedSpan(normalizedFileCoverage, affectedPathNorm, start, end)) {
609
610
  pushIssue(issues, {
610
611
  result_index: i,
611
612
  task_id: taskId,
@@ -618,6 +619,11 @@ export function validateAuditResults(results, tasks, options = {}) {
618
619
  }
619
620
  validateVerification(result.verification, result, task, normalizedFileCoverage, taskId, i, issues);
620
621
  }
622
+ if (issues.length > 0) {
623
+ const errors = issues.filter((i) => i.severity === "error").length;
624
+ const warnings = issues.filter((i) => i.severity === "warning").length;
625
+ process.stderr.write(`[audit-results validation] ${errors} error(s), ${warnings} warning(s) across ${results.length} result(s)\n`);
626
+ }
621
627
  return issues;
622
628
  }
623
629
  export function formatAuditResultIssues(issues) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.10.3",
3
+ "version": "0.10.8",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  "dist/**",
12
12
  "audit-code.mjs",
13
- "audit-code-wrapper-lib.mjs",
13
+ "audit-code-wrapper-*.mjs",
14
14
  "dispatch/**",
15
15
  "schemas/**",
16
16
  "skills/audit-code/**",
@@ -24,6 +24,10 @@
24
24
  "type": "object",
25
25
  "additionalProperties": { "type": "integer", "minimum": 0 }
26
26
  },
27
+ "lens_breakdown": {
28
+ "type": "object",
29
+ "additionalProperties": { "type": "integer", "minimum": 0 }
30
+ },
27
31
  "audited_file_count": { "type": "integer", "minimum": 0 },
28
32
  "excluded_file_count": { "type": "integer", "minimum": 0 },
29
33
  "budget_deferred_task_count": { "type": "integer", "minimum": 0 },
@@ -58,7 +62,7 @@
58
62
  "enum": ["critical", "high", "medium", "low", "info"]
59
63
  },
60
64
  "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
61
- "lens": { "type": "string", "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"] },
65
+ "lens": { "$ref": "lens.schema.json" },
62
66
  "summary": { "type": "string" },
63
67
  "affected_files": {
64
68
  "type": "array",
@@ -341,7 +341,7 @@
341
341
  "minimum": 0
342
342
  }
343
343
  },
344
- "additionalProperties": false
344
+ "additionalProperties": { "type": "integer", "minimum": 0 }
345
345
  }
346
346
  }
347
347
  }
@@ -23,10 +23,7 @@
23
23
  "task_id": { "type": "string" },
24
24
  "unit_id": { "type": "string" },
25
25
  "pass_id": { "type": "string" },
26
- "lens": {
27
- "type": "string",
28
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
29
- },
26
+ "lens": { "$ref": "lens.schema.json" },
30
27
  "agent_role": { "type": "string" },
31
28
  "file_coverage": {
32
29
  "type": "array",
@@ -52,7 +49,7 @@
52
49
  "requires_followup": { "type": "boolean" },
53
50
  "followup_tasks": {
54
51
  "type": "array",
55
- "items": { "type": "string" }
52
+ "items": { "$ref": "#/$defs/AuditTask" }
56
53
  },
57
54
  "verification": {
58
55
  "type": "object",
@@ -78,7 +75,9 @@
78
75
  }
79
76
  },
80
77
  "additionalProperties": false
81
- }
78
+ },
79
+ "run_id": { "type": "string" },
80
+ "submitted_at": { "type": "string", "format": "date-time" }
82
81
  },
83
82
  "additionalProperties": false
84
83
  }
@@ -15,10 +15,7 @@
15
15
  "task_id": { "type": "string" },
16
16
  "unit_id": { "type": "string" },
17
17
  "pass_id": { "type": "string" },
18
- "lens": {
19
- "type": "string",
20
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
21
- },
18
+ "lens": { "$ref": "lens.schema.json" },
22
19
  "file_paths": {
23
20
  "type": "array",
24
21
  "minItems": 1,
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "suggested_lenses": {
37
37
  "type": "array",
38
- "items": { "type": "string" }
38
+ "items": { "$ref": "lens.schema.json" }
39
39
  },
40
40
  "suggested_runtime_checks": {
41
41
  "type": "array",
@@ -26,17 +26,11 @@
26
26
  },
27
27
  "required_lenses": {
28
28
  "type": "array",
29
- "items": {
30
- "type": "string",
31
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
32
- }
29
+ "items": { "$ref": "lens.schema.json" }
33
30
  },
34
31
  "completed_lenses": {
35
32
  "type": "array",
36
- "items": {
37
- "type": "string",
38
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
39
- }
33
+ "items": { "$ref": "lens.schema.json" }
40
34
  }
41
35
  },
42
36
  "additionalProperties": false
@@ -23,22 +23,7 @@
23
23
  "enum": ["critical", "high", "medium", "low", "info"]
24
24
  },
25
25
  "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
26
- "lens": {
27
- "type": "string",
28
- "enum": [
29
- "correctness",
30
- "architecture",
31
- "maintainability",
32
- "security",
33
- "reliability",
34
- "performance",
35
- "data_integrity",
36
- "tests",
37
- "operability",
38
- "config_deployment",
39
- "observability"
40
- ]
41
- },
26
+ "lens": { "$ref": "lens.schema.json" },
42
27
  "summary": { "type": "string" },
43
28
  "affected_files": {
44
29
  "type": "array",
@@ -24,17 +24,11 @@
24
24
  },
25
25
  "required_lenses": {
26
26
  "type": "array",
27
- "items": {
28
- "type": "string",
29
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
30
- }
27
+ "items": { "$ref": "lens.schema.json" }
31
28
  },
32
29
  "completed_lenses": {
33
30
  "type": "array",
34
- "items": {
35
- "type": "string",
36
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
37
- }
31
+ "items": { "$ref": "lens.schema.json" }
38
32
  },
39
33
  "status": {
40
34
  "type": "string",
@@ -113,6 +113,37 @@
113
113
  },
114
114
  "additionalProperties": false
115
115
  }
116
+ },
117
+ "heuristics": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "object",
121
+ "required": ["from", "to"],
122
+ "properties": {
123
+ "from": { "type": "string" },
124
+ "to": { "type": "string" },
125
+ "kind": {
126
+ "type": "string",
127
+ "description": "Heuristic edge kind from path/co-location analysis (e.g. 'heuristic-container-edge', 'heuristic-auth-session-link')."
128
+ },
129
+ "direction": {
130
+ "type": "string",
131
+ "enum": ["directed", "undirected"],
132
+ "description": "Whether the edge should be interpreted as directional."
133
+ },
134
+ "confidence": {
135
+ "type": "number",
136
+ "minimum": 0,
137
+ "maximum": 1,
138
+ "description": "Extractor confidence for graph-informed planning."
139
+ },
140
+ "reason": {
141
+ "type": "string",
142
+ "description": "Short explanation of why the edge exists."
143
+ }
144
+ },
145
+ "additionalProperties": false
146
+ }
116
147
  }
117
148
  },
118
149
  "additionalProperties": false
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "lens.schema.json",
4
+ "title": "Lens",
5
+ "type": "string",
6
+ "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
7
+ }
@@ -7,22 +7,6 @@
7
7
  "$ref": "#/$defs/reviewPacket"
8
8
  },
9
9
  "$defs": {
10
- "lens": {
11
- "type": "string",
12
- "enum": [
13
- "correctness",
14
- "architecture",
15
- "maintainability",
16
- "security",
17
- "reliability",
18
- "performance",
19
- "data_integrity",
20
- "tests",
21
- "operability",
22
- "config_deployment",
23
- "observability"
24
- ]
25
- },
26
10
  "priority": {
27
11
  "type": "string",
28
12
  "enum": ["high", "medium", "low"]
@@ -34,6 +18,11 @@
34
18
  "from": { "type": "string" },
35
19
  "to": { "type": "string" },
36
20
  "kind": { "type": "string" },
21
+ "direction": {
22
+ "type": "string",
23
+ "enum": ["directed", "undirected"],
24
+ "description": "Whether the edge should be interpreted as directional."
25
+ },
37
26
  "confidence": {
38
27
  "type": "number",
39
28
  "minimum": 0,
@@ -108,7 +97,7 @@
108
97
  "lenses": {
109
98
  "type": "array",
110
99
  "minItems": 1,
111
- "items": { "$ref": "#/$defs/lens" }
100
+ "items": { "$ref": "lens.schema.json" }
112
101
  },
113
102
  "file_paths": {
114
103
  "type": "array",
@@ -37,7 +37,7 @@
37
37
  "enum": ["ready", "blocked", "complete"]
38
38
  },
39
39
  "prompt_path": { "type": "string" },
40
- "run_id": { "type": ["string", "null"] },
40
+ "run_id": { "type": ["string", "null"], "description": "Identifies the active dispatch run. Null when no dispatch run is in progress (e.g., blocked, present_report, intake, synthesis, and other non-dispatch step kinds)." },
41
41
  "progress": {
42
42
  "type": "object",
43
43
  "required": ["summary"],
@@ -46,7 +46,13 @@
46
46
  "pending_packets": { "type": "integer" },
47
47
  "pending_tasks": { "type": "integer" },
48
48
  "completed_tasks": { "type": "integer" },
49
- "wave_size": { "type": "integer" }
49
+ "wave_size": { "type": "integer" },
50
+ "phase": { "type": "string", "enum": ["canary", "fan_out"] },
51
+ "canary_packet_id": { "type": ["string", "null"] },
52
+ "agent_count": { "type": "integer" },
53
+ "wave_count": { "type": "integer" },
54
+ "confirmation_recommended": { "type": "boolean" },
55
+ "dispatch_summary": { "type": "string" }
50
56
  },
51
57
  "additionalProperties": false
52
58
  },
@@ -27,10 +27,7 @@
27
27
  "required_lenses": {
28
28
  "type": "array",
29
29
  "minItems": 1,
30
- "items": {
31
- "type": "string",
32
- "enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
33
- }
30
+ "items": { "$ref": "lens.schema.json" }
34
31
  },
35
32
  "critical_flows": {
36
33
  "type": "array",
@@ -36,11 +36,12 @@ function writeGeneratedFile(path, content) {
36
36
  return action;
37
37
  }
38
38
 
39
+ const OPENCODE_AUDIT_EXTERNAL_DIRECTORY_PERMISSION = { '*': 'allow' };
40
+
39
41
  const OPENCODE_AUDIT_EDIT_PERMISSION = {
40
42
  '*': 'ask',
41
43
  '.audit-code/**': 'allow',
42
- '.audit-artifacts/**': 'allow',
43
- 'audit-report.md': 'allow',
44
+ '.audit-tools/**': 'allow',
44
45
  };
45
46
 
46
47
  const OPENCODE_AUDIT_BASH_PERMISSION = {
@@ -143,7 +144,7 @@ function mergeOpenCodePermissionConfig(existingPermission, generatedPermission)
143
144
  external_directory: mergeOpenCodePermissionRule(
144
145
  existingPermission.external_directory,
145
146
  generatedPermission.external_directory,
146
- generatedPermission.external_directory,
147
+ OPENCODE_AUDIT_EXTERNAL_DIRECTORY_PERMISSION,
147
148
  ),
148
149
  edit: mergeOpenCodePermissionRule(
149
150
  existingPermission.edit,
@@ -58,10 +58,9 @@ If the returned step is a dispatch step, before launching subagents check
58
58
  immediately.
59
59
 
60
60
  After the **first** `next-step` (the intake step) completes, confirm the audit
61
- scope before proceeding. Read `scope_summary.json` from the `.audit-artifacts/`
62
- directory (if absent, extract the JSON that follows the `SCOPE_SUMMARY:` marker
63
- at the start of the step's `progress_summary`). It contains `repo_root`,
64
- `auditable_file_count`, `git_available`, and `mis_scope_smells`. Then:
61
+ scope before proceeding. Read `scope_summary.json` from the `.audit-tools/audit/`
62
+ directory. It contains `repo_root`, `auditable_file_count`, `git_available`, and
63
+ `mis_scope_smells`. Then:
65
64
 
66
65
  - Echo one informational line to the user:
67
66
  `Auditing <repo_root>, <auditable_file_count> files, git: <yes|no>`.
@@ -1,12 +0,0 @@
1
- import type { GraphEdge } from "@audit-tools/shared";
2
- import { isCargoManifestPath, isGoWorkspaceManifestPath, isMavenPomPath, isPyprojectPath } from "./graphPathUtils.js";
3
- export { isCargoManifestPath, isGoWorkspaceManifestPath, isMavenPomPath, isPyprojectPath, };
4
- export declare function extractPackageEntrypointEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
5
- export declare function extractPackageScriptEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
6
- export declare function extractWorkspacePackageEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
7
- export declare function extractCargoWorkspaceMemberEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
8
- export declare function extractTypescriptProjectReferenceEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
9
- export declare function extractGoWorkspaceModuleEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
10
- export declare function extractMavenModuleEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
11
- export declare function extractPyprojectTestpathLinks(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];
12
- export declare function extractYamlPathReferenceEdges(fromPath: string, content: string, pathLookup: Map<string, string>): GraphEdge[];