auditor-lambda 0.3.13 → 0.3.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.
- package/README.md +18 -22
- package/audit-code-wrapper-lib.mjs +1 -1
- package/dist/cli.js +41 -4
- package/dist/coverage.js +3 -1
- package/dist/extractors/disposition.js +8 -1
- package/dist/extractors/graph.d.ts +3 -1
- package/dist/extractors/graph.js +1147 -67
- package/dist/extractors/graphManifestEdges.d.ts +14 -0
- package/dist/extractors/graphManifestEdges.js +1158 -0
- package/dist/extractors/graphPathUtils.d.ts +5 -0
- package/dist/extractors/graphPathUtils.js +75 -0
- package/dist/extractors/pathPatterns.d.ts +1 -0
- package/dist/extractors/pathPatterns.js +3 -0
- package/dist/io/artifacts.d.ts +10 -1
- package/dist/io/artifacts.js +23 -3
- package/dist/orchestrator/internalExecutors.d.ts +4 -0
- package/dist/orchestrator/internalExecutors.js +35 -6
- package/dist/orchestrator/reviewPackets.js +1003 -31
- package/dist/orchestrator/syntaxResolutionExecutor.js +34 -0
- package/dist/types/externalAnalyzer.d.ts +9 -0
- package/dist/types/graph.d.ts +3 -0
- package/dist/types/reviewPlanning.d.ts +39 -0
- package/docs/contracts.md +215 -0
- package/docs/development.md +210 -0
- package/docs/handoff.md +204 -0
- package/docs/history.md +40 -0
- package/docs/operator-guide.md +189 -0
- package/docs/product.md +185 -0
- package/docs/release.md +131 -0
- package/package.json +1 -1
- package/schemas/audit_plan_metrics.schema.json +347 -0
- package/schemas/external_analyzer_results.schema.json +35 -0
- package/schemas/graph_bundle.schema.json +47 -2
- package/schemas/review_packets.schema.json +160 -0
- package/docs/agent-integrations.md +0 -318
- package/docs/agent-roles.md +0 -69
- package/docs/architecture.md +0 -90
- package/docs/artifacts.md +0 -36
- package/docs/bootstrap-install.md +0 -136
- package/docs/contract.md +0 -54
- package/docs/dispatch-implementation-plan.md +0 -302
- package/docs/field-trial-bug-report.md +0 -237
- package/docs/github-copilot.md +0 -66
- package/docs/model-selection.md +0 -97
- package/docs/next-steps.md +0 -202
- package/docs/packaging.md +0 -120
- package/docs/pipeline.md +0 -152
- package/docs/product-direction.md +0 -154
- package/docs/production-launch-bar.md +0 -92
- package/docs/production-readiness.md +0 -58
- package/docs/releasing.md +0 -145
- package/docs/remediation-baseline.md +0 -75
- package/docs/repo-layout.md +0 -30
- package/docs/run-flow.md +0 -56
- package/docs/session-config.md +0 -319
- package/docs/supervisor.md +0 -100
- package/docs/usage.md +0 -215
- package/docs/windows-setup.md +0 -146
- package/docs/workflow-refactor-brief.md +0 -124
package/README.md
CHANGED
|
@@ -190,20 +190,25 @@ Optional backend config:
|
|
|
190
190
|
- use `provider: "auto"` only when you want best-effort routing across installed backends
|
|
191
191
|
- treat explicit provider bridges as compatibility fallback, not as the intended owner of semantic review
|
|
192
192
|
|
|
193
|
-
##
|
|
193
|
+
## Current Development Focus
|
|
194
194
|
|
|
195
195
|
The next implementation work is tracked in:
|
|
196
196
|
|
|
197
|
-
- `docs/
|
|
197
|
+
- `docs/product.md`
|
|
198
|
+
- `docs/development.md`
|
|
199
|
+
- `docs/handoff.md`
|
|
198
200
|
|
|
199
201
|
The short version is:
|
|
200
202
|
|
|
201
203
|
- keep the packet dispatch workflow verified in real host environments
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
+
- make graph-informed packetization observable before adding more ecosystem-specific parsers
|
|
205
|
+
- consolidate graph extraction and exercise generic ownership hints for analyzer-supplied module roots
|
|
206
|
+
- add deterministic Python import, package, and test/source graph support as a core language path
|
|
207
|
+
- use semantic/NLP-style affinity only as low-authority context unless deterministic graph evidence supports it
|
|
208
|
+
- keep generated Codex, Claude Desktop, OpenCode, VS Code, and Antigravity guidance aligned with real host behavior
|
|
204
209
|
- tighten the repo-local MCP-first bootstrap where host smoke tests expose friction
|
|
205
210
|
- polish provider-assisted continuation and failure guidance
|
|
206
|
-
-
|
|
211
|
+
- keep schema contracts and examples easy for workers and host integrations to validate
|
|
207
212
|
|
|
208
213
|
## Build And Test
|
|
209
214
|
|
|
@@ -214,24 +219,15 @@ npm run release:patch
|
|
|
214
219
|
npm run release:patch:publish
|
|
215
220
|
```
|
|
216
221
|
|
|
217
|
-
For GitHub Actions publication and npm Trusted Publishing setup, see `docs/
|
|
222
|
+
For GitHub Actions publication and npm Trusted Publishing setup, see `docs/release.md`.
|
|
218
223
|
|
|
219
224
|
## Key Docs
|
|
220
225
|
|
|
221
|
-
- `docs/product
|
|
222
|
-
- `docs/
|
|
223
|
-
- `docs/
|
|
224
|
-
- `docs/
|
|
225
|
-
- `docs/
|
|
226
|
-
- `docs/
|
|
227
|
-
- `docs/
|
|
226
|
+
- `docs/product.md`
|
|
227
|
+
- `docs/operator-guide.md`
|
|
228
|
+
- `docs/contracts.md`
|
|
229
|
+
- `docs/release.md`
|
|
230
|
+
- `docs/development.md`
|
|
231
|
+
- `docs/handoff.md`
|
|
232
|
+
- `docs/history.md`
|
|
228
233
|
- `skills/audit-code/SKILL.md`
|
|
229
|
-
- `docs/bootstrap-install.md`
|
|
230
|
-
- `docs/agent-integrations.md`
|
|
231
|
-
- `docs/github-copilot.md`
|
|
232
|
-
- `docs/contract.md`
|
|
233
|
-
- `docs/model-selection.md`
|
|
234
|
-
- `docs/packaging.md`
|
|
235
|
-
- `docs/session-config.md`
|
|
236
|
-
- `docs/supervisor.md`
|
|
237
|
-
- `docs/windows-setup.md`
|
|
@@ -645,7 +645,7 @@ function renderClaudeDesktopProjectTemplate() {
|
|
|
645
645
|
'',
|
|
646
646
|
'- `.audit-code/install/audit-code.import.md`',
|
|
647
647
|
'- `.audit-code/install/GETTING-STARTED.md`',
|
|
648
|
-
'- `docs/
|
|
648
|
+
'- `docs/operator-guide.md` when you want host-specific operator context',
|
|
649
649
|
'',
|
|
650
650
|
'Starter prompt:',
|
|
651
651
|
'',
|
package/dist/cli.js
CHANGED
|
@@ -1559,6 +1559,42 @@ function renderAnchorPreview(summary, anchorPath) {
|
|
|
1559
1559
|
"",
|
|
1560
1560
|
];
|
|
1561
1561
|
}
|
|
1562
|
+
function formatPacketConfidence(value) {
|
|
1563
|
+
return typeof value === "number" && Number.isFinite(value)
|
|
1564
|
+
? value.toFixed(2)
|
|
1565
|
+
: "n/a";
|
|
1566
|
+
}
|
|
1567
|
+
function renderPacketGraphContext(packet) {
|
|
1568
|
+
const hasContext = (packet.entrypoints?.length ?? 0) > 0 ||
|
|
1569
|
+
(packet.key_edges?.length ?? 0) > 0 ||
|
|
1570
|
+
(packet.boundary_files?.length ?? 0) > 0 ||
|
|
1571
|
+
packet.quality !== undefined;
|
|
1572
|
+
if (!hasContext) {
|
|
1573
|
+
return [];
|
|
1574
|
+
}
|
|
1575
|
+
const lines = ["## Packet graph context"];
|
|
1576
|
+
if (packet.entrypoints?.length) {
|
|
1577
|
+
lines.push("Entrypoints:");
|
|
1578
|
+
lines.push(...packet.entrypoints.map((entrypoint) => `- ${entrypoint}`));
|
|
1579
|
+
}
|
|
1580
|
+
if (packet.key_edges?.length) {
|
|
1581
|
+
lines.push("Key internal edges:");
|
|
1582
|
+
lines.push(...packet.key_edges.map((edge) => {
|
|
1583
|
+
const kind = edge.kind ? ` [${edge.kind}]` : "";
|
|
1584
|
+
const reason = edge.reason ? ` - ${edge.reason}` : "";
|
|
1585
|
+
return `- ${edge.from} -> ${edge.to}${kind} confidence=${formatPacketConfidence(edge.confidence)}${reason}`;
|
|
1586
|
+
}));
|
|
1587
|
+
}
|
|
1588
|
+
if (packet.boundary_files?.length) {
|
|
1589
|
+
lines.push("Boundary files to check only when evidence crosses the packet:");
|
|
1590
|
+
lines.push(...packet.boundary_files.map((path) => `- ${path}`));
|
|
1591
|
+
}
|
|
1592
|
+
if (packet.quality) {
|
|
1593
|
+
lines.push(`Quality: cohesion=${packet.quality.cohesion_score}, internal_edges=${packet.quality.internal_edge_count}, boundary_edges=${packet.quality.boundary_edge_count}, unexplained_files=${packet.quality.unexplained_file_count}`);
|
|
1594
|
+
}
|
|
1595
|
+
lines.push("");
|
|
1596
|
+
return lines;
|
|
1597
|
+
}
|
|
1562
1598
|
async function cmdPrepareDispatch(argv) {
|
|
1563
1599
|
const runId = getFlag(argv, "--run-id");
|
|
1564
1600
|
if (!runId)
|
|
@@ -1738,6 +1774,7 @@ async function cmdPrepareDispatch(argv) {
|
|
|
1738
1774
|
: "Use your Read tool. Paths are repo-relative from the current working directory.",
|
|
1739
1775
|
fileList,
|
|
1740
1776
|
"",
|
|
1777
|
+
...renderPacketGraphContext(packet),
|
|
1741
1778
|
...largeFileSection,
|
|
1742
1779
|
"## Tasks",
|
|
1743
1780
|
...taskSections,
|
|
@@ -1961,13 +1998,12 @@ async function cmdMergeAndIngest(argv) {
|
|
|
1961
1998
|
const passing = [];
|
|
1962
1999
|
const failing = [];
|
|
1963
2000
|
const seenTaskIds = new Set();
|
|
2001
|
+
let spuriousFileCount = 0;
|
|
1964
2002
|
for (const filename of files) {
|
|
1965
2003
|
const filePath = resolve(join(taskResultsDir, filename));
|
|
1966
2004
|
if (!expectedPaths.has(filePath)) {
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
errors: ["Unexpected task result file; only backend-assigned result paths may be ingested."],
|
|
1970
|
-
});
|
|
2005
|
+
spuriousFileCount++;
|
|
2006
|
+
process.stderr.write(`[merge-and-ingest] Warning: ignoring unexpected file in task-results/: ${filename}\n`);
|
|
1971
2007
|
}
|
|
1972
2008
|
}
|
|
1973
2009
|
for (const task of allTasks) {
|
|
@@ -2054,6 +2090,7 @@ async function cmdMergeAndIngest(argv) {
|
|
|
2054
2090
|
status: workerResult.status,
|
|
2055
2091
|
accepted_count: passing.length,
|
|
2056
2092
|
rejected_count: 0,
|
|
2093
|
+
spurious_file_count: spuriousFileCount,
|
|
2057
2094
|
finding_count: findingCount,
|
|
2058
2095
|
audit_results_path: auditResultsPath,
|
|
2059
2096
|
selected_executor: workerResult.selected_executor,
|
package/dist/coverage.js
CHANGED
|
@@ -37,7 +37,9 @@ export function applyFileCoverage(matrix, fileCoverage) {
|
|
|
37
37
|
const record = matrix.files.find((file) => file.path === coverage.path);
|
|
38
38
|
if (!record || record.audit_status === "excluded")
|
|
39
39
|
continue;
|
|
40
|
-
if (coverage.lens &&
|
|
40
|
+
if (coverage.lens &&
|
|
41
|
+
record.required_lenses.includes(coverage.lens) &&
|
|
42
|
+
!record.completed_lenses.includes(coverage.lens)) {
|
|
41
43
|
record.completed_lenses.push(coverage.lens);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNodeModulesOrGit, isBuildOutput, isVendorPath, isBinaryArtifact, isLicensePath, isLockfilePath, isLogPath, isDocPath, isAuditArtifactPath, isGeneratedInstallArtifactPath, isExamplesOrFixturesPath, normalizeExtractorPath, } from "./pathPatterns.js";
|
|
1
|
+
import { isNodeModulesOrGit, isBuildOutput, isVendorPath, isBinaryArtifact, isLicensePath, isLockfilePath, isLogPath, isDocPath, isAuditArtifactPath, isGeneratedTestArtifactPath, isGeneratedInstallArtifactPath, isExamplesOrFixturesPath, normalizeExtractorPath, } from "./pathPatterns.js";
|
|
2
2
|
function inferDisposition(path) {
|
|
3
3
|
const normalized = normalizeExtractorPath(path);
|
|
4
4
|
if (isNodeModulesOrGit(normalized)) {
|
|
@@ -33,6 +33,13 @@ function inferDisposition(path) {
|
|
|
33
33
|
reason: "Generated audit artifact.",
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
if (isGeneratedTestArtifactPath(normalized)) {
|
|
37
|
+
return {
|
|
38
|
+
path,
|
|
39
|
+
status: "generated",
|
|
40
|
+
reason: "Generated test artifact.",
|
|
41
|
+
};
|
|
42
|
+
}
|
|
36
43
|
if (isDocPath(normalized)) {
|
|
37
44
|
return { path, status: "doc_only", reason: "Documentation artifact." };
|
|
38
45
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { RepoManifest } from "../types.js";
|
|
2
2
|
import type { FileDisposition } from "../types/disposition.js";
|
|
3
|
+
import type { ExternalAnalyzerResults } from "../types/externalAnalyzer.js";
|
|
3
4
|
import type { GraphBundle } from "../types/graph.js";
|
|
4
5
|
export interface BuildGraphBundleOptions {
|
|
5
6
|
fileContents?: Record<string, string>;
|
|
7
|
+
externalAnalyzerResults?: ExternalAnalyzerResults;
|
|
6
8
|
}
|
|
7
|
-
export declare function buildGraphBundleFromFs(repoManifest: RepoManifest, root: string, disposition?: FileDisposition): Promise<GraphBundle>;
|
|
9
|
+
export declare function buildGraphBundleFromFs(repoManifest: RepoManifest, root: string, disposition?: FileDisposition, options?: Pick<BuildGraphBundleOptions, "externalAnalyzerResults">): Promise<GraphBundle>;
|
|
8
10
|
export declare function buildGraphBundle(repoManifest: RepoManifest, disposition?: FileDisposition, options?: BuildGraphBundleOptions): GraphBundle;
|