audit-tools 0.45.0 → 0.46.0
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 +15 -2
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +11 -1
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanupCommand.d.ts +25 -0
- package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
- package/dist/audit/cli/cleanupCommand.js +69 -0
- package/dist/audit/cli/cleanupCommand.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +52 -76
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +6 -1
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +13 -0
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +38 -27
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +8 -6
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +3 -2
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +37 -35
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +1 -1
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +2 -9
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
- package/dist/audit/cli/sampleRunCommand.js +12 -1
- package/dist/audit/cli/sampleRunCommand.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +9 -1
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +6 -6
- package/dist/audit/contracts/workerSchemas.d.ts +36 -26
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +11 -1
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +52 -28
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +8 -5
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/decompose/sources.d.ts.map +1 -1
- package/dist/audit/decompose/sources.js +21 -5
- package/dist/audit/decompose/sources.js.map +1 -1
- package/dist/audit/extractors/analyzers/registry.d.ts +8 -5
- package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/registry.js +28 -7
- package/dist/audit/extractors/analyzers/registry.js.map +1 -1
- package/dist/audit/extractors/designAssessment.js +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +1 -1
- package/dist/audit/extractors/gitHistory.js +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.js +1 -1
- package/dist/audit/extractors/risk.d.ts +1 -1
- package/dist/audit/extractors/risk.js +1 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +5 -5
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts +11 -6
- package/dist/audit/orchestrator/acquisitionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js +1 -1
- package/dist/audit/orchestrator/acquisitionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +14 -10
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +49 -24
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +14 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +20 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +77 -15
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +1 -1
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +18 -4
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts +54 -0
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +352 -0
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +20 -11
- package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +17 -11
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/localCommands.d.ts +24 -1
- package/dist/audit/orchestrator/localCommands.d.ts.map +1 -1
- package/dist/audit/orchestrator/localCommands.js +44 -9
- package/dist/audit/orchestrator/localCommands.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +13 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +13 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts +32 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +90 -3
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +1 -1
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +11 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +25 -9
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +0 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +2 -1
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/types.d.ts +18 -18
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +1 -0
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +5 -4
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/semanticProjection.js +34 -19
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +3 -2
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +37 -2
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +100 -31
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +2 -2
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +61 -19
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +13 -0
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +82 -3
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +297 -139
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +37 -7
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/types/options.d.ts +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +61 -28
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +83 -24
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts +8 -2
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +4 -4
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/constitutionalDocPaths.d.ts.map +1 -1
- package/dist/shared/constitutionalDocPaths.js +7 -0
- package/dist/shared/constitutionalDocPaths.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +44 -3
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
- package/dist/shared/engine/obligationEngine.js +53 -7
- package/dist/shared/engine/obligationEngine.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +8 -0
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts +42 -2
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +111 -3
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +15 -0
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +33 -2
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/index.d.ts +13 -9
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +14 -7
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -1
- package/dist/shared/io/fileLock.js +22 -3
- package/dist/shared/io/fileLock.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +73 -19
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +21 -30
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/lockedJsonStore.d.ts +24 -3
- package/dist/shared/io/lockedJsonStore.d.ts.map +1 -1
- package/dist/shared/io/lockedJsonStore.js +35 -7
- package/dist/shared/io/lockedJsonStore.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +3 -3
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +97 -13
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/submission/expectedSubmissions.d.ts +18 -0
- package/dist/shared/submission/expectedSubmissions.d.ts.map +1 -1
- package/dist/shared/submission/expectedSubmissions.js +17 -0
- package/dist/shared/submission/expectedSubmissions.js.map +1 -1
- package/dist/shared/submission/handRecovery.d.ts.map +1 -1
- package/dist/shared/submission/handRecovery.js +9 -11
- package/dist/shared/submission/handRecovery.js.map +1 -1
- package/dist/shared/submission/hostHandoffCore.d.ts +155 -0
- package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -0
- package/dist/shared/submission/hostHandoffCore.js +210 -0
- package/dist/shared/submission/hostHandoffCore.js.map +1 -0
- package/dist/shared/submission/submissionLedger.d.ts +5 -1
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +33 -3
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/commandShape.d.ts +29 -0
- package/dist/shared/tooling/commandShape.d.ts.map +1 -1
- package/dist/shared/tooling/commandShape.js +82 -10
- package/dist/shared/tooling/commandShape.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +32 -0
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +189 -0
- package/dist/shared/tooling/exec.js.map +1 -1
- package/docs/audit-pkg/contracts.md +2 -1
- package/docs/audit-pkg/operator-guide.md +5 -2
- package/docs/audit-pkg/product.md +22 -6
- package/package.json +10 -6
- package/schemas/audit-code-v1alpha1.schema.json +297 -0
- package/schemas/audit_result.schema.json +4 -0
- package/schemas/audit_results.schema.json +4 -0
- package/scripts/shared/install-host-assets.mjs +8 -5
- package/skills/audit-code/SKILL.md +4 -2
- package/skills/audit-code/audit-code.prompt.md +5 -2
- package/skills/audit-code/opencode-command-template.txt +1 -1
- package/wrapper/audit-code-wrapper-lib.mjs +81 -16
- package/wrapper/installer-verb-help.mjs +14 -4
- package/docs/audit-pkg/development.md +0 -113
- package/docs/audit-pkg/release.md +0 -140
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandShape.d.ts","sourceRoot":"","sources":["../../../src/shared/tooling/commandShape.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commandShape.d.ts","sourceRoot":"","sources":["../../../src/shared/tooling/commandShape.ts"],"names":[],"mappings":"AAgFA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CA6BnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,EAAE,OAAO,KAAK,MAAM,GACxE;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAgB5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAyB5D"}
|
|
@@ -2,18 +2,34 @@ import { scanStringAware } from "../parsing/stringAwareScanner.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* THE declared single-invocation command shape — one rule, every boundary.
|
|
4
4
|
*
|
|
5
|
-
* A declared command (a block's `targeted_commands`) is
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* refuse the
|
|
5
|
+
* A declared command (a block's `targeted_commands`) is a string an operator
|
|
6
|
+
* wrote and this tool then RUNS. The rule exists because such a string must
|
|
7
|
+
* denote exactly ONE invocation: anything that chains, redirects, substitutes
|
|
8
|
+
* or subshells turns one declared test into arbitrary execution. A flat regex
|
|
9
|
+
* cannot decide this: `node -e "process.exit(0)"` is an ordinary test
|
|
10
|
+
* invocation whose parens are inside quotes, and refusing it would refuse the
|
|
11
|
+
* normal case.
|
|
12
|
+
*
|
|
13
|
+
* WHAT THE RULE IS *NOT*: an escaping scheme for one particular spawn. The
|
|
14
|
+
* consumers no longer agree on how they spawn — the closing suites and the
|
|
15
|
+
* required-test rerun split the string with {@link parseCommandString} and
|
|
16
|
+
* spawn `shell: false`, while the triage re-verification path still hands it to
|
|
17
|
+
* a shell — and the rule is identical for all of them. That is the point of
|
|
18
|
+
* stating it once here: the property enforced belongs to the DECLARATION, not
|
|
19
|
+
* to the spawner. A string carrying `&&` or a redirect declares work this
|
|
20
|
+
* contract cannot faithfully run as ONE invocation, and must be refused up
|
|
21
|
+
* front — whether the consumer would have let a shell act on it or would have
|
|
22
|
+
* silently reduced it to literal argv bytes. Enforcing the same rule at every
|
|
23
|
+
* boundary is also what keeps producer and consumer agreeing about which
|
|
24
|
+
* declarations are admissible at all.
|
|
11
25
|
*
|
|
12
26
|
* So the scan is QUOTE-AWARE — a tiny, fully-owned grammar, not a shell parser.
|
|
13
|
-
* It is deliberately narrower than EITHER shell's grammar, because
|
|
14
|
-
*
|
|
15
|
-
* -c` on posix, `cmd.exe /d /s /c` on
|
|
16
|
-
* under one of them MIS-CLASSIFIES
|
|
27
|
+
* It is deliberately narrower than EITHER shell's grammar, because a declared
|
|
28
|
+
* command historically reached `shell: true` — TWO grammars, and no per-grammar
|
|
29
|
+
* state machine is sound for both: `/bin/sh -c` on posix, `cmd.exe /d /s /c` on
|
|
30
|
+
* win32. Where they disagree, tracking state under one of them MIS-CLASSIFIES
|
|
31
|
+
* the other, and keeping the union-of-both-grammars refusal is what lets the
|
|
32
|
+
* same admission decision hold on every platform:
|
|
17
33
|
*
|
|
18
34
|
* - `'` quotes on sh and is an ORDINARY CHARACTER on cmd.exe, so crediting it
|
|
19
35
|
* reads `echo '& evil.exe'` as fully quoted while cmd.exe reads `&` as a
|
|
@@ -117,4 +133,60 @@ export function partitionCommandsByDeclaredShape(commands, describeRefusal) {
|
|
|
117
133
|
}
|
|
118
134
|
return { commands: admitted, refusals };
|
|
119
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Split a command string into an argv array, so it can be spawned with
|
|
138
|
+
* `shell: false`.
|
|
139
|
+
*
|
|
140
|
+
* TOTAL, and its guarantee is stated in terms of `shell: false` — not in terms
|
|
141
|
+
* of a precondition a caller has to remember. Exactly two characters are
|
|
142
|
+
* special: an unquoted space ENDS a token, and a double quote toggles grouping
|
|
143
|
+
* and is dropped. EVERY other byte — including `' \ ^ % $` and backtick, and
|
|
144
|
+
* including `& | ; < > ( )` — is copied into the token literally, which under
|
|
145
|
+
* `shell: false` is precisely what the child receives, because no shell ever
|
|
146
|
+
* parses the result. So for any input this produces the argv that a shell-free
|
|
147
|
+
* spawn will actually deliver; it never silently drops meaning.
|
|
148
|
+
*
|
|
149
|
+
* What it does NOT do is decide whether a command was ADMISSIBLE. A string that
|
|
150
|
+
* fails {@link commandLeavesDeclaredShape} still splits — `a && b` becomes
|
|
151
|
+
* `["a", "&&", "b"]`, three literal argv tokens — and that argv is a faithful
|
|
152
|
+
* rendering of what `shell: false` would run, not an execution of the chain the
|
|
153
|
+
* author wrote. That is a declaration the contract cannot honour, so it must be
|
|
154
|
+
* REFUSED by the gate before it reaches a spawn; this function is not the place
|
|
155
|
+
* that decision is made, and it is not a shell parser standing in for one.
|
|
156
|
+
*
|
|
157
|
+
* Windows note: because `\` is an ordinary byte here, an absolute Windows path
|
|
158
|
+
* survives intact through the split (`C:\Program Files\nodejs\node.exe` stays
|
|
159
|
+
* one token when double-quoted). The declared-shape gate refuses `\` in every
|
|
160
|
+
* position, so such a path can only reach this function from a caller that did
|
|
161
|
+
* not gate — see {@link commandLeavesDeclaredShape}'s header for why the
|
|
162
|
+
* refusal is about the declaration rather than the spawn.
|
|
163
|
+
*/
|
|
164
|
+
export function parseCommandString(command) {
|
|
165
|
+
const argv = [];
|
|
166
|
+
let current = "";
|
|
167
|
+
let quoted = false;
|
|
168
|
+
let started = false;
|
|
169
|
+
for (const char of command) {
|
|
170
|
+
if (char === '"') {
|
|
171
|
+
// A quote both toggles the state and MARKS the token as started, so an
|
|
172
|
+
// explicit empty argument (`""`) survives as an empty string rather than
|
|
173
|
+
// vanishing at the length check below.
|
|
174
|
+
quoted = !quoted;
|
|
175
|
+
started = true;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (char === " " && !quoted) {
|
|
179
|
+
if (started)
|
|
180
|
+
argv.push(current);
|
|
181
|
+
current = "";
|
|
182
|
+
started = false;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
current += char;
|
|
186
|
+
started = true;
|
|
187
|
+
}
|
|
188
|
+
if (started)
|
|
189
|
+
argv.push(current);
|
|
190
|
+
return argv;
|
|
191
|
+
}
|
|
120
192
|
//# sourceMappingURL=commandShape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandShape.js","sourceRoot":"","sources":["../../../src/shared/tooling/commandShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"commandShape.js","sourceRoot":"","sources":["../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AC;YAChB,SAAS;QACX,CAAC;QACD,OAAO,IAAI,IAAI,CAAC;QAChB,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IACD,IAAI,OAAO;QAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -22,6 +22,16 @@ export interface RunTrackedResult {
|
|
|
22
22
|
/** Elapsed wall-clock time in milliseconds for the spawned command. */
|
|
23
23
|
duration_ms: number;
|
|
24
24
|
error?: Error;
|
|
25
|
+
/**
|
|
26
|
+
* The signal that killed the child, or `null` when it exited on its own.
|
|
27
|
+
*
|
|
28
|
+
* Reported, never DISCRIMINATED on by callers that need to know WHY a child
|
|
29
|
+
* died: a deadline miss, a `maxBuffer` overflow and an external `kill` all
|
|
30
|
+
* set it. The `error.code` (`ETIMEDOUT` / `ENOBUFS`) is what separates those
|
|
31
|
+
* three; `signal` is the residue that names an external kill once they are
|
|
32
|
+
* ruled out.
|
|
33
|
+
*/
|
|
34
|
+
signal?: string | null;
|
|
25
35
|
}
|
|
26
36
|
/**
|
|
27
37
|
* Quote a single argv token for embedding into the `cmd.exe /d /s /c "..."`
|
|
@@ -134,6 +144,28 @@ export declare function resolveExecArgv(argv: string[], options?: {
|
|
|
134
144
|
export declare function stripAuditToolsControlEnv(base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
135
145
|
/** Run a command synchronously. argv[0] is the command, the rest are args. */
|
|
136
146
|
export declare function runTracked(argv: string[], options?: RunTrackedOptions): RunTrackedResult;
|
|
147
|
+
/**
|
|
148
|
+
* Async twin of {@link runTracked}: same argv resolution, control-env scrub, and
|
|
149
|
+
* result shape, driven by {@link spawnHidden} instead of `spawnSync`. Analyzer
|
|
150
|
+
* acquisition runs HERE rather than on the synchronous runner because a
|
|
151
|
+
* synchronous child blocks the event loop for the whole spawn — which starves
|
|
152
|
+
* every `setInterval` liveness heartbeat in the process (the advance
|
|
153
|
+
* heartbeat, and each held file lock's mtime heartbeat), so one stalled
|
|
154
|
+
* `npx --version` probe classified a LIVE lock stale and stole it mid-flight.
|
|
155
|
+
* Awaited by the acquisition engine, the binary resolver, and every closing /
|
|
156
|
+
* required-test spawn; never mixed with {@link runTracked} in one call path.
|
|
157
|
+
*
|
|
158
|
+
* DEADLINE AND OVERFLOW ARE CLASSIFIED, not left as a bare signal. `spawnSync`
|
|
159
|
+
* reports an over-deadline child as `ETIMEDOUT` and an over-`maxBuffer` child
|
|
160
|
+
* as `ENOBUFS`, and callers discriminate on those codes precisely because
|
|
161
|
+
* `signal` conflates them with an external `kill`. Node's own `timeout` option
|
|
162
|
+
* on the async path would surface both as an ordinary SIGTERM close and throw
|
|
163
|
+
* that distinction away, so this runner enforces BOTH bounds itself and stamps
|
|
164
|
+
* the same two codes — one classification serves both twins, and the bounds
|
|
165
|
+
* themselves are measured the same way (`maxBuffer` PER STREAM, as `spawnSync`
|
|
166
|
+
* measures it) so the two twins cannot disagree about which children overflow.
|
|
167
|
+
*/
|
|
168
|
+
export declare function runTrackedAsync(argv: string[], options?: RunTrackedOptions): Promise<RunTrackedResult>;
|
|
137
169
|
/**
|
|
138
170
|
* `child_process.spawnSync` with `windowsHide` forced on. A windowless parent
|
|
139
171
|
* (node launched by an IDE/agent) spawning a console child (git, sqlite3, …) pops
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../src/shared/tooling/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,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AIG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,GACvB,MAAM,CAAC,UAAU,CAWnB;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,iBAAsB,GAC9B,gBAAgB,CAqClB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CA+K3B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAQnB,OAAO,SAAS,CAAC;AAE1B;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAQf,OAAO,KAAK,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { spawn, spawnSync } from "node:child_process";
|
|
2
2
|
const SHELL_SHIM_COMMANDS = new Set(["npm", "npx", "pnpm", "yarn"]);
|
|
3
|
+
/**
|
|
4
|
+
* How long {@link runTrackedAsync} waits after SIGTERM before escalating to an
|
|
5
|
+
* unignorable SIGKILL for a child it killed on its own deadline/overflow bound.
|
|
6
|
+
* Long enough for an ordinary child to flush and exit, short enough that a
|
|
7
|
+
* child which ignores SIGTERM cannot hang the awaiting caller.
|
|
8
|
+
*/
|
|
9
|
+
const KILL_ESCALATION_GRACE_MS = 2_000;
|
|
3
10
|
// --- cmd.exe quoting helpers ---
|
|
4
11
|
//
|
|
5
12
|
// There are two distinct contexts in which a token must be quoted for cmd.exe,
|
|
@@ -293,8 +300,190 @@ export function runTracked(argv, options = {}) {
|
|
|
293
300
|
cwd: options.cwd,
|
|
294
301
|
duration_ms: Date.now() - start,
|
|
295
302
|
error: result.error,
|
|
303
|
+
signal: result.signal ?? null,
|
|
296
304
|
};
|
|
297
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Async twin of {@link runTracked}: same argv resolution, control-env scrub, and
|
|
308
|
+
* result shape, driven by {@link spawnHidden} instead of `spawnSync`. Analyzer
|
|
309
|
+
* acquisition runs HERE rather than on the synchronous runner because a
|
|
310
|
+
* synchronous child blocks the event loop for the whole spawn — which starves
|
|
311
|
+
* every `setInterval` liveness heartbeat in the process (the advance
|
|
312
|
+
* heartbeat, and each held file lock's mtime heartbeat), so one stalled
|
|
313
|
+
* `npx --version` probe classified a LIVE lock stale and stole it mid-flight.
|
|
314
|
+
* Awaited by the acquisition engine, the binary resolver, and every closing /
|
|
315
|
+
* required-test spawn; never mixed with {@link runTracked} in one call path.
|
|
316
|
+
*
|
|
317
|
+
* DEADLINE AND OVERFLOW ARE CLASSIFIED, not left as a bare signal. `spawnSync`
|
|
318
|
+
* reports an over-deadline child as `ETIMEDOUT` and an over-`maxBuffer` child
|
|
319
|
+
* as `ENOBUFS`, and callers discriminate on those codes precisely because
|
|
320
|
+
* `signal` conflates them with an external `kill`. Node's own `timeout` option
|
|
321
|
+
* on the async path would surface both as an ordinary SIGTERM close and throw
|
|
322
|
+
* that distinction away, so this runner enforces BOTH bounds itself and stamps
|
|
323
|
+
* the same two codes — one classification serves both twins, and the bounds
|
|
324
|
+
* themselves are measured the same way (`maxBuffer` PER STREAM, as `spawnSync`
|
|
325
|
+
* measures it) so the two twins cannot disagree about which children overflow.
|
|
326
|
+
*/
|
|
327
|
+
export async function runTrackedAsync(argv, options = {}) {
|
|
328
|
+
if (argv.length === 0) {
|
|
329
|
+
return {
|
|
330
|
+
status: null,
|
|
331
|
+
stdout: "",
|
|
332
|
+
stderr: "",
|
|
333
|
+
argv: [],
|
|
334
|
+
cwd: options.cwd,
|
|
335
|
+
duration_ms: 0,
|
|
336
|
+
error: new Error("runTrackedAsync requires a non-empty argv"),
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
const resolved = resolveExecArgv(argv, {
|
|
340
|
+
platform: options.platform,
|
|
341
|
+
});
|
|
342
|
+
const start = Date.now();
|
|
343
|
+
return await new Promise((resolve) => {
|
|
344
|
+
const child = spawnHidden(resolved[0], resolved.slice(1), {
|
|
345
|
+
cwd: options.cwd,
|
|
346
|
+
env: stripAuditToolsControlEnv(options.env),
|
|
347
|
+
windowsHide: true,
|
|
348
|
+
shell: false,
|
|
349
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
350
|
+
});
|
|
351
|
+
let stdout = "";
|
|
352
|
+
let stderr = "";
|
|
353
|
+
// Bytes SEEN on each pipe, which is not the same as bytes kept: the counters
|
|
354
|
+
// keep rising after MAX_CAPTURE stops appending. See `capture`.
|
|
355
|
+
let stdoutBytes = 0;
|
|
356
|
+
let stderrBytes = 0;
|
|
357
|
+
let settled = false;
|
|
358
|
+
// Which bound killed the child, when one did. Read on `close` to stamp the
|
|
359
|
+
// matching `spawnSync` error code.
|
|
360
|
+
let killedBy = null;
|
|
361
|
+
// Bounded: a hostile/oversized emitter cannot grow the heap without limit.
|
|
362
|
+
// An explicit `maxBuffer` is the caller's stricter bound and is REPORTED as
|
|
363
|
+
// an overflow; the 10MiB default is the silent backstop.
|
|
364
|
+
const MAX_CAPTURE = 10 * 1024 * 1024;
|
|
365
|
+
const overflowLimit = options.maxBuffer;
|
|
366
|
+
let killTimer = null;
|
|
367
|
+
/**
|
|
368
|
+
* Terminate the child for a bound this runner owns, and make the
|
|
369
|
+
* termination ACTUALLY terminal.
|
|
370
|
+
*
|
|
371
|
+
* `child.kill()` sends SIGTERM, which is a request: a child that installs a
|
|
372
|
+
* handler and ignores it never emits `close`, so the promise would never
|
|
373
|
+
* settle and the deadline this runner advertises would be a deadline in
|
|
374
|
+
* name only (`spawnSync`'s `timeout` had no such hole — it kills from the
|
|
375
|
+
* runtime). So the SIGTERM is followed by an unignorable SIGKILL after a
|
|
376
|
+
* short grace period. The timer is `unref`d so a settled call never holds
|
|
377
|
+
* the event loop open.
|
|
378
|
+
*/
|
|
379
|
+
const killForBound = () => {
|
|
380
|
+
child.kill();
|
|
381
|
+
if (killTimer)
|
|
382
|
+
return;
|
|
383
|
+
killTimer = setTimeout(() => {
|
|
384
|
+
if (!settled)
|
|
385
|
+
child.kill("SIGKILL");
|
|
386
|
+
}, KILL_ESCALATION_GRACE_MS);
|
|
387
|
+
killTimer.unref?.();
|
|
388
|
+
};
|
|
389
|
+
const timer = options.timeout !== undefined && options.timeout > 0
|
|
390
|
+
? setTimeout(() => {
|
|
391
|
+
killedBy = "timeout";
|
|
392
|
+
killForBound();
|
|
393
|
+
}, options.timeout)
|
|
394
|
+
: null;
|
|
395
|
+
const finish = (result) => {
|
|
396
|
+
if (settled)
|
|
397
|
+
return;
|
|
398
|
+
settled = true;
|
|
399
|
+
if (timer)
|
|
400
|
+
clearTimeout(timer);
|
|
401
|
+
if (killTimer)
|
|
402
|
+
clearTimeout(killTimer);
|
|
403
|
+
resolve(result);
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Accumulate one chunk and enforce the overflow bound.
|
|
407
|
+
*
|
|
408
|
+
* The bound is checked PER STREAM and against bytes SEEN, not against what
|
|
409
|
+
* was kept — both deliberate:
|
|
410
|
+
*
|
|
411
|
+
* - per stream, because `spawnSync`'s `maxBuffer`, which the sync twin
|
|
412
|
+
* {@link runTracked} still enforces, is per stream. A combined bound
|
|
413
|
+
* would classify a child emitting 5MiB on each pipe under an 8MiB limit
|
|
414
|
+
* as an overflow that the sync twin admits verbatim, and this module's
|
|
415
|
+
* claim that one classification serves both twins would be false.
|
|
416
|
+
* - against bytes seen, because the MAX_CAPTURE backstop stops APPENDING
|
|
417
|
+
* at 10MiB. Counting kept characters instead would make ENOBUFS
|
|
418
|
+
* unreachable for any caller whose `maxBuffer` exceeds MAX_CAPTURE — the
|
|
419
|
+
* output would silently truncate where the contract says it refuses.
|
|
420
|
+
*/
|
|
421
|
+
const capture = (chunk, append, seen, kept) => {
|
|
422
|
+
if (kept() < MAX_CAPTURE) {
|
|
423
|
+
append(chunk.toString(options.encoding ?? "utf8"));
|
|
424
|
+
}
|
|
425
|
+
if (overflowLimit !== undefined &&
|
|
426
|
+
seen() > overflowLimit &&
|
|
427
|
+
killedBy === null) {
|
|
428
|
+
killedBy = "overflow";
|
|
429
|
+
killForBound();
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
child.stdout?.on("data", (chunk) => {
|
|
433
|
+
stdoutBytes += chunk.length;
|
|
434
|
+
capture(chunk, (text) => {
|
|
435
|
+
stdout += text;
|
|
436
|
+
}, () => stdoutBytes, () => stdout.length);
|
|
437
|
+
});
|
|
438
|
+
child.stderr?.on("data", (chunk) => {
|
|
439
|
+
stderrBytes += chunk.length;
|
|
440
|
+
capture(chunk, (text) => {
|
|
441
|
+
stderr += text;
|
|
442
|
+
}, () => stderrBytes, () => stderr.length);
|
|
443
|
+
});
|
|
444
|
+
// stdin is CLOSED (optionally after `input`), never left open: a command
|
|
445
|
+
// that reads stdin would otherwise block forever on a pipe nothing writes,
|
|
446
|
+
// turning an ordinary test invocation into a hang.
|
|
447
|
+
if (options.input !== undefined)
|
|
448
|
+
child.stdin?.write(options.input);
|
|
449
|
+
child.stdin?.end();
|
|
450
|
+
child.on("error", (error) => {
|
|
451
|
+
finish({
|
|
452
|
+
status: null,
|
|
453
|
+
stdout,
|
|
454
|
+
stderr,
|
|
455
|
+
argv: resolved,
|
|
456
|
+
cwd: options.cwd,
|
|
457
|
+
duration_ms: Date.now() - start,
|
|
458
|
+
error,
|
|
459
|
+
signal: null,
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
child.on("close", (code, signal) => {
|
|
463
|
+
let error;
|
|
464
|
+
if (killedBy !== null) {
|
|
465
|
+
const bound = new Error(killedBy === "timeout"
|
|
466
|
+
? `child exceeded the ${String(options.timeout)}ms deadline`
|
|
467
|
+
: `child exceeded the ${String(overflowLimit)}-byte output bound`);
|
|
468
|
+
bound.code = killedBy === "timeout" ? "ETIMEDOUT" : "ENOBUFS";
|
|
469
|
+
error = bound;
|
|
470
|
+
}
|
|
471
|
+
else if (signal !== null && signal !== undefined) {
|
|
472
|
+
error = new Error(`child terminated by signal ${signal}`);
|
|
473
|
+
}
|
|
474
|
+
finish({
|
|
475
|
+
status: code,
|
|
476
|
+
stdout,
|
|
477
|
+
stderr,
|
|
478
|
+
argv: resolved,
|
|
479
|
+
cwd: options.cwd,
|
|
480
|
+
duration_ms: Date.now() - start,
|
|
481
|
+
...(error ? { error } : {}),
|
|
482
|
+
signal: signal ?? null,
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
}
|
|
298
487
|
/**
|
|
299
488
|
* `child_process.spawnSync` with `windowsHide` forced on. A windowless parent
|
|
300
489
|
* (node launched by an IDE/agent) spawning a console child (git, sqlite3, …) pops
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../src/shared/tooling/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAqB,MAAM,oBAAoB,CAAC;AAmCzE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEpE,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,yDAAyD;AACzD,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,sEAAsE;AACtE,uEAAuE;AACvE,6EAA6E;AAC7E,4EAA4E;AAC5E,iEAAiE;AACjE,yEAAyE;AACzE,4EAA4E;AAC5E,uEAAuE;AACvE,yEAAyE;AACzE,uEAAuE;AACvE,wDAAwD;AACxD,2EAA2E;AAC3E,EAAE;AACF,gEAAgE;AAChE,uEAAuE;AACvE,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,2EAA2E;AAC3E,qEAAqE;AACrE,wEAAwE;AACxE,sEAAsE;AACtE,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,EAAE;AACF,4EAA4E;AAC5E,4DAA4D;A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,IAAI,IAAI;aACvB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAC9B,OAAe,EACf,IAAwB,EACxB,OAAyC,EACzC,EAAE,CACF,SAAS,CAAC,OAAO,EAAE,IAAgB,EAAE;IACnC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;IAClB,WAAW,EAAE,IAAI;CAClB,CAAC,CAAqB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAC1B,OAAe,EACf,IAAwB,EACxB,OAAqC,EACrC,EAAE,CACF,KAAK,CAAC,OAAO,EAAE,IAAgB,EAAE;IAC/B,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;IAClB,WAAW,EAAE,IAAI;CAClB,CAAC,CAAiB,CAAC"}
|
|
@@ -86,7 +86,8 @@ audit-code validate-results --results /path/to/results.json
|
|
|
86
86
|
## Artifact bundle
|
|
87
87
|
|
|
88
88
|
Resumable state lives under `.audit-tools/audit/`. The registry-backed contract
|
|
89
|
-
in [`artifact-contract.md`](
|
|
89
|
+
in [`spec/audit/artifact-contract.md`](https://github.com/OhOkThisIsFine/audit-tools/blob/HEAD/spec/audit/artifact-contract.md)
|
|
90
|
+
(repository-only, so the link is absolute) covers the
|
|
90
91
|
complete set. Representative artifacts include repository and unit manifests,
|
|
91
92
|
file disposition, graph and critical-flow data, coverage, risk, audit tasks,
|
|
92
93
|
runtime validation, accepted host results, synthesis narrative, and the final
|
|
@@ -15,8 +15,11 @@ bootstraps the current repository with:
|
|
|
15
15
|
audit-code ensure --quiet
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
For setup repair or inspection, use
|
|
19
|
-
`audit-code
|
|
18
|
+
For setup repair or inspection, use the installer verbs, plus the
|
|
19
|
+
`audit-code prompt-path` helper. Their one home is
|
|
20
|
+
[`product.md`](product.md#supported-surfaces): the installer-verb block there is
|
|
21
|
+
generated from the module both bins read, and `audit-code <verb> --help` prints
|
|
22
|
+
the same summary plus its options.
|
|
20
23
|
|
|
21
24
|
The install surface includes the repo-local import prompt, getting-started
|
|
22
25
|
guide, manifest, and the host-specific command or skill files supported by the
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Product
|
|
2
2
|
|
|
3
|
-
> Normative definition:
|
|
4
|
-
>
|
|
5
|
-
>
|
|
3
|
+
> Normative definition:
|
|
4
|
+
> [`spec/audit/audit-goals.md`](https://github.com/OhOkThisIsFine/audit-tools/blob/HEAD/spec/audit/audit-goals.md)
|
|
5
|
+
> — product identity, invariants, deterministic/LLM boundaries, and completion.
|
|
6
|
+
> This page is the product overview. (The `spec/` corpus is repository-only and
|
|
7
|
+
> is not part of the published package, so the link is absolute.)
|
|
6
8
|
|
|
7
9
|
## Canonical surface
|
|
8
10
|
|
|
@@ -26,9 +28,23 @@ The supported user-facing surfaces are:
|
|
|
26
28
|
1. `/audit-code` in conversation
|
|
27
29
|
2. `npm install -g audit-tools` as the one-time package install
|
|
28
30
|
3. `audit-code prompt-path` to locate the packaged prompt asset
|
|
29
|
-
4.
|
|
30
|
-
5. `audit-code
|
|
31
|
-
|
|
31
|
+
4. the installer verbs below, for bootstrap, repair, and post-install verification
|
|
32
|
+
5. `audit-code` as the repo-local backend fallback
|
|
33
|
+
|
|
34
|
+
<!-- BEGIN GENERATED CLI SURFACE — scripts/shared/generate-cli-surface.mjs — DO NOT EDIT BY HAND -->
|
|
35
|
+
|
|
36
|
+
> Rendered from `wrapper/installer-verb-help.mjs` — the module both shipped bins read to answer
|
|
37
|
+
> `<verb> --help`. Add a verb there and this list follows.
|
|
38
|
+
|
|
39
|
+
- `audit-code ensure` — lazily bootstraps repo-local /audit-code assets when they are missing or stale
|
|
40
|
+
- `audit-code install` — bootstraps /audit-code into supported repo-local host surfaces
|
|
41
|
+
- `audit-code install-host` — installs /audit-code into ONE named host surface (--host <name>)
|
|
42
|
+
- `audit-code verify-install` — smoke-tests the generated /audit-code host assets after an install
|
|
43
|
+
|
|
44
|
+
<!-- END GENERATED CLI SURFACE -->
|
|
45
|
+
|
|
46
|
+
This is the one home for that list — `operator-guide.md` points here rather than
|
|
47
|
+
restating it.
|
|
32
48
|
|
|
33
49
|
Anything below `dist/` is backend or development interface.
|
|
34
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audit-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Provider-neutral code auditing and remediation workflows for arbitrary repositories.",
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"scripts/shared/install-host-assets.mjs",
|
|
35
35
|
"opencode.json",
|
|
36
36
|
"README.md",
|
|
37
|
-
"docs/audit-pkg
|
|
37
|
+
"docs/audit-pkg/product.md",
|
|
38
|
+
"docs/audit-pkg/operator-guide.md",
|
|
39
|
+
"docs/audit-pkg/contracts.md"
|
|
38
40
|
],
|
|
39
41
|
"scripts": {
|
|
40
42
|
"postinstall": "node scripts/postinstall.mjs",
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"test": "npm run build && node scripts/shared/run-vitest-gate.mjs",
|
|
49
51
|
"test:single": "npm run build && node scripts/shared/run-vitest-gate.mjs",
|
|
50
52
|
"verify:guards": "node scripts/shared/run-vitest-gate.mjs --retry=2 --exclude \"**/audit-code-completion-*.test.ts\" --exclude \"**/audit-code-wrapper-*.test.ts\" --exclude \"**/audit/next-step-core-*.test.ts\" --exclude \"**/seam-host-only-next-step.test.ts\" --exclude \"**/*-e2e.test.*\" --exclude \"**/next-step-implement-dispatch.test.ts\" --exclude \"**/next-step-pipeline-dispatch.test.ts\"",
|
|
51
|
-
"verify:checks": "node scripts/shared/profile-run.mjs verify-checks check:control-bytes check:version-gates check:guard-reach check:ci-trigger-paths check:offload-lanes check:loop-core-patterns check:constitutional-doc-paths check:runtime-artifact-names check:deadcode check:lint check:dup check:depgraph check:doc-manifest check:doc-links check:doc-code-citations check:gate-enumeration check:philosophy-brief check:nightly-routine-prompt check:handoff-roadmap check:backlog-index check:memory-citations check:backlog-budget check:backlog-status check:backlog-line-numbers check:tests build verify:hosts verify:remediate-hosts pack:smoke smoke:packaged-audit-code smoke:packaged-remediate-code",
|
|
53
|
+
"verify:checks": "node scripts/shared/profile-run.mjs verify-checks check:control-bytes check:version-gates check:guard-reach check:ci-trigger-paths check:offload-lanes check:loop-core-patterns check:constitutional-doc-paths check:runtime-artifact-names check:executor-producers check:cli-surface check:deadcode check:lint check:dup check:depgraph check:doc-manifest check:doc-links check:doc-code-citations check:gate-enumeration check:philosophy-brief check:nightly-routine-prompt check:handoff-roadmap check:backlog-index check:memory-citations check:backlog-budget check:backlog-status check:backlog-line-numbers check:tests build verify:hosts verify:remediate-hosts pack:smoke smoke:packaged-audit-code smoke:packaged-remediate-code",
|
|
52
54
|
"verify:release": "npm run verify:checks && node scripts/shared/run-vitest-gate.mjs && npm run smoke:linked-audit-code && npm run smoke:linked-remediate-code",
|
|
53
55
|
"check:control-bytes": "node scripts/check-control-bytes.mjs",
|
|
54
56
|
"check:guard-reach": "node scripts/check-guard-reach.mjs",
|
|
@@ -94,6 +96,8 @@
|
|
|
94
96
|
"check:offload-lanes": "node scripts/check-offload-lanes.mjs",
|
|
95
97
|
"check:backlog-line-numbers": "node scripts/check-backlog-line-numbers.mjs",
|
|
96
98
|
"check:runtime-artifact-names": "node scripts/shared/generate-runtime-artifact-names.mjs --check",
|
|
99
|
+
"check:executor-producers": "node scripts/shared/generate-executor-producers.mjs --check",
|
|
100
|
+
"check:cli-surface": "node scripts/shared/generate-cli-surface.mjs --check",
|
|
97
101
|
"generate:shard-baseline": "node scripts/shared/generate-vitest-shard-baseline.mjs"
|
|
98
102
|
},
|
|
99
103
|
"engines": {
|
|
@@ -102,6 +106,8 @@
|
|
|
102
106
|
"dependencies": {
|
|
103
107
|
"commander": "^13.0.0",
|
|
104
108
|
"smol-toml": "^1.6.1",
|
|
109
|
+
"tree-sitter-wasms": "^0.1.13",
|
|
110
|
+
"web-tree-sitter": "^0.25.10",
|
|
105
111
|
"yaml": "^2.9.0",
|
|
106
112
|
"zod": "^3.25.76",
|
|
107
113
|
"zod-to-json-schema": "^3.24.6"
|
|
@@ -117,11 +123,9 @@
|
|
|
117
123
|
"jscpd": "^5.0.14",
|
|
118
124
|
"knip": "^6.23.0",
|
|
119
125
|
"linguist-languages": "^9.3.2",
|
|
120
|
-
"tree-sitter-wasms": "^0.1.13",
|
|
121
126
|
"tsx": "^4.19.0",
|
|
122
127
|
"typescript": "^5.9.2",
|
|
123
|
-
"vitest": "^3.0.0"
|
|
124
|
-
"web-tree-sitter": "^0.25.10"
|
|
128
|
+
"vitest": "^3.0.0"
|
|
125
129
|
},
|
|
126
130
|
"repository": {
|
|
127
131
|
"type": "git",
|