audit-tools 0.55.16 → 0.55.17
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/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +0 -1
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +22 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +164 -68
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/submitCommand.d.ts +26 -0
- package/dist/audit/cli/submitCommand.d.ts.map +1 -0
- package/dist/audit/cli/submitCommand.js +79 -0
- package/dist/audit/cli/submitCommand.js.map +1 -0
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +4 -1
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.d.ts +229 -0
- package/dist/audit/contracts/findingContractPrompt.d.ts.map +1 -1
- package/dist/audit/contracts/findingContractPrompt.js +31 -20
- package/dist/audit/contracts/findingContractPrompt.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/pathPatterns.d.ts +3 -0
- package/dist/audit/extractors/pathPatterns.d.ts.map +1 -1
- package/dist/audit/extractors/pathPatterns.js +9 -4
- package/dist/audit/extractors/pathPatterns.js.map +1 -1
- package/dist/audit/extractors/surfaces.d.ts.map +1 -1
- package/dist/audit/extractors/surfaces.js +6 -1
- package/dist/audit/extractors/surfaces.js.map +1 -1
- package/dist/audit/orchestrator/unitBuilder.d.ts.map +1 -1
- package/dist/audit/orchestrator/unitBuilder.js +29 -8
- package/dist/audit/orchestrator/unitBuilder.js.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts +6 -0
- package/dist/audit/reporting/criticalFlowFallbackPrompt.d.ts.map +1 -1
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js +55 -34
- package/dist/audit/reporting/criticalFlowFallbackPrompt.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +44 -0
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +29 -0
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +63 -4
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/submitResult.d.ts +13 -0
- package/dist/remediate/steps/submitResult.d.ts.map +1 -0
- package/dist/remediate/steps/submitResult.js +24 -0
- package/dist/remediate/steps/submitResult.js.map +1 -0
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/mcp/submitServer.d.ts +26 -0
- package/dist/shared/mcp/submitServer.d.ts.map +1 -0
- package/dist/shared/mcp/submitServer.js +74 -0
- package/dist/shared/mcp/submitServer.js.map +1 -0
- package/dist/shared/submission/hostHandoffCore.d.ts +10 -0
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
- package/dist/shared/submission/hostHandoffCore.js +19 -0
- package/dist/shared/submission/hostHandoffCore.js.map +1 -1
- package/dist/shared/submission/submissionClassifier.d.ts +7 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js +9 -0
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts +7 -0
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +6 -2
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/package.json +2 -1
- package/scripts/audit/postinstall.mjs +21 -7
- package/scripts/remediate/postinstall.mjs +44 -1
- package/scripts/shared/install-host-assets.mjs +134 -1
- package/wrapper/audit-code-wrapper-lib.mjs +9 -46
|
@@ -255,7 +255,9 @@ function printHelp({ usageName, preferredEntrypoint }) {
|
|
|
255
255
|
// per-verb help cannot disagree. They were hand-restated here and had
|
|
256
256
|
// already drifted from it on two of the four.
|
|
257
257
|
...installerVerbSummaries('/audit-code'),
|
|
258
|
-
|
|
258
|
+
// sites-pinned: none — help text; it asserts no behaviour
|
|
259
|
+
'- mcp serves the submit-only MCP tool (submit_result) over stdio',
|
|
260
|
+
'- submit --work-item ID --from FILE checks one work item result and writes it to its bound path only when it passes',
|
|
259
261
|
'- validate checks the current artifact bundle and canonical session intent and exits non-zero when issues exist',
|
|
260
262
|
'- validate-results --results FILE validates AuditResult payloads against the active task manifest without ingesting them',
|
|
261
263
|
'- explain-task <task_id> prints the resolved file coverage and current status for a task id',
|
|
@@ -307,41 +309,6 @@ async function runDistCommand(commandName, argv, { ensureArtifactsDir = false }
|
|
|
307
309
|
});
|
|
308
310
|
}
|
|
309
311
|
|
|
310
|
-
async function runDistCommandInline(commandName, argv, { ensureArtifactsDir = false } = {}) {
|
|
311
|
-
const commandArgs = [...argv];
|
|
312
|
-
// Same discovery as runDistCommand — the two paths must not answer "which
|
|
313
|
-
// repository is this?" differently.
|
|
314
|
-
const rootValue = resolveWrapperRoot(getFlag(commandArgs, '--root'));
|
|
315
|
-
const artifactsDir = resolve(getFlag(commandArgs, '--artifacts-dir') ?? join(rootValue, '.audit-tools', 'audit'));
|
|
316
|
-
|
|
317
|
-
setFlag(commandArgs, '--root', rootValue);
|
|
318
|
-
setFlag(commandArgs, '--artifacts-dir', artifactsDir);
|
|
319
|
-
|
|
320
|
-
// Gate the mkdir behind the same ensureArtifactsDir flag as runDistCommand so
|
|
321
|
-
// "the artifacts directory is created only for designated stateful commands"
|
|
322
|
-
// holds on this path too (CE-001); mcp is a designated stateful command and
|
|
323
|
-
// opts in explicitly at its call site.
|
|
324
|
-
if (ensureArtifactsDir) {
|
|
325
|
-
await mkdir(artifactsDir, { recursive: true });
|
|
326
|
-
}
|
|
327
|
-
await ensureBuilt();
|
|
328
|
-
|
|
329
|
-
// Propagate the invocation hint into this (long-lived) server process so it
|
|
330
|
-
// and the wrapper subprocesses it spawns emit continuation commands that
|
|
331
|
-
// match how the backend was launched. Safe here: this path is only the `mcp`
|
|
332
|
-
// server, not a shared/test process.
|
|
333
|
-
Object.assign(process.env, selfInvocationEnv());
|
|
334
|
-
|
|
335
|
-
// Import the module that exports runCli (dist/cli.js). dist/index.js has no
|
|
336
|
-
// exports — it is the bare entrypoint that runs `runCli(process.argv)` as an
|
|
337
|
-
// import side effect — so importing it here both fails to provide runCli and
|
|
338
|
-
// double-starts the command from this process's argv.
|
|
339
|
-
const distCliEntry = join(repoRoot, 'dist', 'cli.js');
|
|
340
|
-
const distUrl = new URL(`file:///${distCliEntry.replace(/\\/g, '/')}`);
|
|
341
|
-
const cli = await import(distUrl.href);
|
|
342
|
-
await cli.runCli([process.execPath, distCliEntry, commandName, ...commandArgs]);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
312
|
/** @param {{usageName: string, argv?: string[], preferredEntrypoint?: string}} options */
|
|
346
313
|
export async function runAuditCodeWrapper({
|
|
347
314
|
usageName,
|
|
@@ -393,19 +360,15 @@ export async function runAuditCodeWrapper({
|
|
|
393
360
|
return;
|
|
394
361
|
}
|
|
395
362
|
|
|
396
|
-
// Commands that need special wrapper handling stay explicit:
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
//
|
|
363
|
+
// Commands that need special wrapper handling stay explicit: the
|
|
364
|
+
// artifact-dir-bootstrapping commands pass { ensureArtifactsDir: true }
|
|
365
|
+
// because they may be the FIRST call in a fresh repo and must create the run
|
|
366
|
+
// directory before dist reads it. `mcp` needs no branch: the child inherits
|
|
367
|
+
// stdio and ensureBuilt writes to stderr, so the forwarded server's stdout
|
|
368
|
+
// stays the protocol stream.
|
|
402
369
|
const commandArgv = argv.slice(1);
|
|
403
370
|
// Help is informational: it must not create the artifacts directory.
|
|
404
371
|
const ensureArtifactsDir = !commandArgv.some((arg) => arg === '--help' || arg === '-h');
|
|
405
|
-
if (argv[0] === 'mcp') {
|
|
406
|
-
await runDistCommandInline('mcp', commandArgv, { ensureArtifactsDir });
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
372
|
|
|
410
373
|
if (argv[0] === 'next-step') {
|
|
411
374
|
await runDistCommand('next-step', commandArgv, { ensureArtifactsDir });
|