audit-tools 0.51.0 → 0.51.2
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 +1 -1
- package/dist/audit/cli/cleanup.d.ts +0 -1
- package/dist/audit/cli/cleanup.d.ts.map +1 -1
- package/dist/audit/cli/cleanup.js +32 -20
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +38 -20
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +2 -14
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
- package/dist/audit/cli/intakeCommand.js +3 -13
- package/dist/audit/cli/intakeCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +4 -30
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +2 -95
- 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 +105 -92
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +6 -43
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +5 -2
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/sampleRunCommand.d.ts +1 -1
- package/dist/audit/cli/stepScaffold.d.ts +21 -0
- package/dist/audit/cli/stepScaffold.d.ts.map +1 -0
- package/dist/audit/cli/stepScaffold.js +50 -0
- package/dist/audit/cli/stepScaffold.js.map +1 -0
- package/dist/audit/cli/steps.d.ts +6 -6
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/synthesizeCommand.js +2 -14
- package/dist/audit/cli/synthesizeCommand.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +4 -4
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/merge.js +2 -7
- package/dist/audit/extractors/analyzers/merge.js.map +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +34 -22
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +1 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +2 -6
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/cargo.js +4 -4
- package/dist/audit/extractors/graphManifestEdges/cargo.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pnpm.js +3 -3
- package/dist/audit/extractors/graphManifestEdges/pnpm.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/pyproject.js +3 -2
- package/dist/audit/extractors/graphManifestEdges/pyproject.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts +0 -6
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/toml.js +0 -13
- package/dist/audit/extractors/graphManifestEdges/toml.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts +9 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/workspace.js +16 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts +0 -2
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/yaml.js +0 -9
- package/dist/audit/extractors/graphManifestEdges/yaml.js.map +1 -1
- package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
- package/dist/audit/extractors/graphSignals.js +16 -2
- package/dist/audit/extractors/graphSignals.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +19 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +44 -2
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +0 -22
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +1 -43
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts +2 -2
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +79 -230
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.js +4 -9
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +11 -2
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/lineCounts.d.ts +44 -0
- package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -0
- package/dist/audit/orchestrator/lineCounts.js +61 -0
- package/dist/audit/orchestrator/lineCounts.js.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts +35 -0
- package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -0
- package/dist/audit/orchestrator/obligationDerive.js +50 -0
- package/dist/audit/orchestrator/obligationDerive.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.js +3 -2
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.js +0 -4
- package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +3 -2
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +3 -2
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +4 -3
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +2 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +0 -27
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +10 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +1 -2
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +7 -0
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/types/conceptualAdjudication.d.ts +12 -12
- package/dist/audit/types.d.ts +2 -2
- package/dist/remediate/droppedFindingsRecord.d.ts +13 -0
- package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -0
- package/dist/remediate/droppedFindingsRecord.js +113 -0
- package/dist/remediate/droppedFindingsRecord.js.map +1 -0
- package/dist/remediate/intake.d.ts +17 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +23 -0
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +1 -1
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +68 -6
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/state/types.d.ts +12 -6
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +3 -1
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +10 -4
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +10 -2
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +56 -12
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +277 -146
- 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 +253 -75
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +14 -0
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +52 -4
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +0 -34
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +181 -143
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/agentReflections.d.ts +44 -3
- package/dist/shared/agentReflections.d.ts.map +1 -1
- package/dist/shared/agentReflections.js +63 -4
- package/dist/shared/agentReflections.js.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts +20 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/acquisitionEngine.js +17 -3
- package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
- package/dist/shared/analyzers/candidates.d.ts.map +1 -1
- package/dist/shared/analyzers/candidates.js +13 -4
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +111 -9
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +32 -1
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +5 -1
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +6 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +8 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/graph/edgeConfidence.d.ts +12 -0
- package/dist/shared/graph/edgeConfidence.d.ts.map +1 -0
- package/dist/shared/graph/edgeConfidence.js +15 -0
- package/dist/shared/graph/edgeConfidence.js.map +1 -0
- package/dist/shared/index.d.ts +12 -3
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +8 -3
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +4 -0
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +42 -0
- package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -0
- package/dist/shared/submission/hostResultOutcomes.js +129 -0
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -0
- package/dist/shared/submission/ingestionChecks.d.ts +146 -0
- package/dist/shared/submission/ingestionChecks.d.ts.map +1 -0
- package/dist/shared/submission/ingestionChecks.js +157 -0
- package/dist/shared/submission/ingestionChecks.js.map +1 -0
- package/dist/shared/submission/submissionClassifier.d.ts +8 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionScan.d.ts +2 -0
- package/dist/shared/submission/submissionScan.d.ts.map +1 -1
- package/dist/shared/submission/submissionScan.js +4 -0
- package/dist/shared/submission/submissionScan.js.map +1 -1
- package/dist/shared/tooling/projectFacts.d.ts +71 -0
- package/dist/shared/tooling/projectFacts.d.ts.map +1 -0
- package/dist/shared/tooling/projectFacts.js +153 -0
- package/dist/shared/tooling/projectFacts.js.map +1 -0
- package/dist/shared/tooling/projectTestAdmission.d.ts +5 -15
- package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.js +14 -5
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/types/charterPacket.d.ts +18 -17
- package/dist/shared/types/charterPacket.d.ts.map +1 -1
- package/dist/shared/types/charterPacket.js.map +1 -1
- package/dist/shared/types/closingActions.d.ts +16 -0
- package/dist/shared/types/closingActions.d.ts.map +1 -0
- package/dist/shared/types/closingActions.js +25 -0
- package/dist/shared/types/closingActions.js.map +1 -0
- package/dist/shared/types/intentCheckpoint.d.ts +50 -0
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +31 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/docs/audit-pkg/contracts.md +34 -12
- package/docs/audit-pkg/operator-guide.md +10 -7
- package/package.json +6 -2
- package/scripts/postinstall.mjs +42 -0
- package/skills/audit-code/audit-code.prompt.md +5 -3
- package/dist/remediate/state/closingActions.d.ts +0 -3
- package/dist/remediate/state/closingActions.d.ts.map +0 -1
- package/dist/remediate/state/closingActions.js +0 -10
- package/dist/remediate/state/closingActions.js.map +0 -1
|
@@ -33,14 +33,18 @@ export declare const EVIDENCE_CLASSES: readonly EvidenceClass[];
|
|
|
33
33
|
* top-level declarations used to appear in neither the delivered nor the omitted
|
|
34
34
|
* list, so `delivered + omitted === named` could not be reconciled at all.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
36
|
+
* There are exactly TWO reasons, because the packet carries no character limit
|
|
37
|
+
* (owner, 2026-09-04): a file is either read and delivered WHOLE, or it is named
|
|
38
|
+
* here. `unreadable_or_oversized` is the read-safety guard — a file too large to
|
|
39
|
+
* read at all, recorded with its byte count — and never a budget verdict; the
|
|
40
|
+
* `total_budget` reason died with the ceiling, the per-file clamp and the
|
|
41
|
+
* allocator that produced it.
|
|
42
|
+
*
|
|
43
|
+
* EVERY value here has a producer, and a contract test pins that: a vocabulary
|
|
44
|
+
* value with no producer is a claim the data can never make, so it would only
|
|
45
|
+
* ever mislead a reader of the coverage record.
|
|
42
46
|
*/
|
|
43
|
-
export type OmissionReason = "
|
|
47
|
+
export type OmissionReason = "unreadable_or_oversized" | "no_content";
|
|
44
48
|
/** One delivered source line, carrying its TRUE 1-based number in its own file. */
|
|
45
49
|
export interface PacketExcerptLine {
|
|
46
50
|
line: number;
|
|
@@ -69,8 +73,6 @@ export interface PacketExcerpt {
|
|
|
69
73
|
source_path: string;
|
|
70
74
|
line_runs: PacketLineRun[];
|
|
71
75
|
lines: PacketExcerptLine[];
|
|
72
|
-
/** True when content existed beyond what is delivered. */
|
|
73
|
-
truncated: boolean;
|
|
74
76
|
prefix_width: number;
|
|
75
77
|
}
|
|
76
78
|
/** Per-class delivery figures. `delivered + omitted.length === named` is an invariant. */
|
|
@@ -78,14 +80,17 @@ export interface CharterPacketCoverageClass {
|
|
|
78
80
|
evidence_class: EvidenceClass;
|
|
79
81
|
/** Every candidate file considered for this class. */
|
|
80
82
|
named: number;
|
|
81
|
-
/** Excerpts delivered
|
|
83
|
+
/** Excerpts delivered — in full, which is the only way they are delivered. */
|
|
82
84
|
delivered: number;
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Path-sorted; every named candidate that did not make it, with its reason.
|
|
87
|
+
* `bytes` is the file's size, stated on the read-safety omission so the record
|
|
88
|
+
* says WHY rather than leaving a reader to guess between missing and huge.
|
|
89
|
+
*/
|
|
86
90
|
omitted: {
|
|
87
91
|
path: string;
|
|
88
92
|
reason: OmissionReason;
|
|
93
|
+
bytes?: number;
|
|
89
94
|
}[];
|
|
90
95
|
}
|
|
91
96
|
/**
|
|
@@ -99,9 +104,6 @@ export interface CharterPacketCoverage {
|
|
|
99
104
|
kind: CharterKind;
|
|
100
105
|
/** One entry per class this kind emits, sorted by canonical class order. */
|
|
101
106
|
classes: CharterPacketCoverageClass[];
|
|
102
|
-
/** The content budget after packet metadata was charged against the ceiling. */
|
|
103
|
-
budget_chars: number;
|
|
104
|
-
spent_chars: number;
|
|
105
107
|
}
|
|
106
108
|
export declare const CHARTER_PACKET_MANIFEST_SCHEMA_VERSION = "charter-packet-manifest/v1";
|
|
107
109
|
/** A manifest row: an excerpt's coordinates without its text. */
|
|
@@ -111,7 +113,6 @@ export interface CharterPacketManifestExcerpt {
|
|
|
111
113
|
evidence_class: EvidenceClass;
|
|
112
114
|
line_runs: PacketLineRun[];
|
|
113
115
|
line_count: number;
|
|
114
|
-
truncated: boolean;
|
|
115
116
|
prefix_width: number;
|
|
116
117
|
}
|
|
117
118
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterPacket.d.ts","sourceRoot":"","sources":["../../../src/shared/types/charterPacket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,aAAa,GACb,iBAAiB,CAAC;AAEtB,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAKpD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"charterPacket.d.ts","sourceRoot":"","sources":["../../../src/shared/types/charterPacket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,aAAa,GACb,iBAAiB,CAAC;AAEtB,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAKpD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,cAAc,GAAG,yBAAyB,GAAG,YAAY,CAAC;AAEtE,mFAAmF;AACnF,M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pC,cAAc,EAAE,OAAO,sCAAsC,CAAC;IAC9D,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,4BAA4B,EAAE,CAAC;IACzC,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IAC/C,4BAA4B;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,0BAA0B,EAAE,OAAO,CAAC;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charterPacket.js","sourceRoot":"","sources":["../../../src/shared/types/charterPacket.ts"],"names":[],"mappings":"AAiCA,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,SAAS;IACT,aAAa;IACb,KAAK;IACL,iBAAiB;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"charterPacket.js","sourceRoot":"","sources":["../../../src/shared/types/charterPacket.ts"],"names":[],"mappings":"AAiCA,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,SAAS;IACT,aAAa;IACb,KAAK;IACL,iBAAiB;CAClB,CAAC;AAkFF,MAAM,CAAC,MAAM,sCAAsC,GACjD,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closing-action vocabulary shared by the remediation plan
|
|
3
|
+
* (`candidate_closing_actions`), the closing plan (`action`), and the intent
|
|
4
|
+
* checkpoint the host confirms (`closing_action`). It lives in `src/shared`
|
|
5
|
+
* because the checkpoint schema is shared by both orchestrators and the base
|
|
6
|
+
* layer never imports an orchestrator (dependency-cruiser
|
|
7
|
+
* `shared-imports-no-orchestrator`).
|
|
8
|
+
*
|
|
9
|
+
* Order is canonical: candidate lists are emitted in this order so a rendered
|
|
10
|
+
* choice never churns.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CLOSING_ACTIONS: readonly ["commit", "push", "open-pr", "publish", "tag", "none", "custom"];
|
|
13
|
+
export type ClosingAction = (typeof CLOSING_ACTIONS)[number];
|
|
14
|
+
/** True when `value` is one of the closing actions the tool knows. */
|
|
15
|
+
export declare function isClosingAction(value: unknown): value is ClosingAction;
|
|
16
|
+
//# sourceMappingURL=closingActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closingActions.d.ts","sourceRoot":"","sources":["../../../src/shared/types/closingActions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,4EAQlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closing-action vocabulary shared by the remediation plan
|
|
3
|
+
* (`candidate_closing_actions`), the closing plan (`action`), and the intent
|
|
4
|
+
* checkpoint the host confirms (`closing_action`). It lives in `src/shared`
|
|
5
|
+
* because the checkpoint schema is shared by both orchestrators and the base
|
|
6
|
+
* layer never imports an orchestrator (dependency-cruiser
|
|
7
|
+
* `shared-imports-no-orchestrator`).
|
|
8
|
+
*
|
|
9
|
+
* Order is canonical: candidate lists are emitted in this order so a rendered
|
|
10
|
+
* choice never churns.
|
|
11
|
+
*/
|
|
12
|
+
export const CLOSING_ACTIONS = [
|
|
13
|
+
"commit",
|
|
14
|
+
"push",
|
|
15
|
+
"open-pr",
|
|
16
|
+
"publish",
|
|
17
|
+
"tag",
|
|
18
|
+
"none",
|
|
19
|
+
"custom",
|
|
20
|
+
];
|
|
21
|
+
/** True when `value` is one of the closing actions the tool knows. */
|
|
22
|
+
export function isClosingAction(value) {
|
|
23
|
+
return typeof value === "string" && CLOSING_ACTIONS.includes(value);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=closingActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closingActions.js","sourceRoot":"","sources":["../../../src/shared/types/closingActions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,KAAK;IACL,MAAM;IACN,QAAQ;CACA,CAAC;AAIX,sEAAsE;AACtE,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,eAAqC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -56,6 +56,40 @@ export declare const IntentCheckpointSchema: z.ZodObject<{
|
|
|
56
56
|
themes?: string[] | undefined;
|
|
57
57
|
packages?: string[] | undefined;
|
|
58
58
|
}>>;
|
|
59
|
+
/**
|
|
60
|
+
* Remediate-only: the closing action the HOST chose at confirmation, from
|
|
61
|
+
* the candidates the tool detected and presented (owner decision
|
|
62
|
+
* 92b0e2dd7cfdc06d — the tool never selects one). Absent means `none`:
|
|
63
|
+
* no closing side effect is ever inferred. audit-code ignores it.
|
|
64
|
+
*/
|
|
65
|
+
closing_action: z.ZodOptional<z.ZodEnum<["commit", "push", "open-pr", "publish", "tag", "none", "custom"]>>;
|
|
66
|
+
/**
|
|
67
|
+
* Remediate-only: the argv the close phase runs when `closing_action` is
|
|
68
|
+
* `custom`. Required with `custom` (the confirm step refuses a `custom`
|
|
69
|
+
* without it) and meaningless otherwise. Host-authored: writing it is the
|
|
70
|
+
* authorization, so `custom` needs no second preview at close.
|
|
71
|
+
*/
|
|
72
|
+
closing_custom_command: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
/**
|
|
74
|
+
* Remediate-only, draft checkpoints: the intake worker's open questions,
|
|
75
|
+
* carried into the confirmation prompt. `blocking: true` alone blocks
|
|
76
|
+
* (INV-remediate-state-06).
|
|
77
|
+
*/
|
|
78
|
+
pre_draft_questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
question: z.ZodString;
|
|
81
|
+
blocking: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
id: string;
|
|
84
|
+
question: string;
|
|
85
|
+
blocking?: boolean | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
id: string;
|
|
88
|
+
question: string;
|
|
89
|
+
blocking?: boolean | undefined;
|
|
90
|
+
}>, "many">>;
|
|
91
|
+
/** Remediate-only, draft checkpoints: how free-form intent was read. */
|
|
92
|
+
intent_interpretation: z.ZodOptional<z.ZodString>;
|
|
59
93
|
/**
|
|
60
94
|
* Clauses from free_form_intent that could not be encoded as lens-weight,
|
|
61
95
|
* priority, or scope signals. Each entry carries the original clause text,
|
|
@@ -206,6 +240,14 @@ export declare const IntentCheckpointSchema: z.ZodObject<{
|
|
|
206
240
|
themes?: string[] | undefined;
|
|
207
241
|
packages?: string[] | undefined;
|
|
208
242
|
} | undefined;
|
|
243
|
+
closing_action?: "push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none" | undefined;
|
|
244
|
+
closing_custom_command?: string[] | undefined;
|
|
245
|
+
pre_draft_questions?: {
|
|
246
|
+
id: string;
|
|
247
|
+
question: string;
|
|
248
|
+
blocking?: boolean | undefined;
|
|
249
|
+
}[] | undefined;
|
|
250
|
+
intent_interpretation?: string | undefined;
|
|
209
251
|
constraint_clauses?: {
|
|
210
252
|
text: string;
|
|
211
253
|
checkpoint_question: string;
|
|
@@ -248,6 +290,14 @@ export declare const IntentCheckpointSchema: z.ZodObject<{
|
|
|
248
290
|
themes?: string[] | undefined;
|
|
249
291
|
packages?: string[] | undefined;
|
|
250
292
|
} | undefined;
|
|
293
|
+
closing_action?: "push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none" | undefined;
|
|
294
|
+
closing_custom_command?: string[] | undefined;
|
|
295
|
+
pre_draft_questions?: {
|
|
296
|
+
id: string;
|
|
297
|
+
question: string;
|
|
298
|
+
blocking?: boolean | undefined;
|
|
299
|
+
}[] | undefined;
|
|
300
|
+
intent_interpretation?: string | undefined;
|
|
251
301
|
constraint_clauses?: {
|
|
252
302
|
text: string;
|
|
253
303
|
checkpoint_question: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intentCheckpoint.d.ts","sourceRoot":"","sources":["../../../src/shared/types/intentCheckpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"intentCheckpoint.d.ts","sourceRoot":"","sources":["../../../src/shared/types/intentCheckpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;IAI/B;;;;OAIG;;IAEH,yDAAyD;;IAEzD,wEAAwE;;IAExE;;;;OAIG;;IAEH,qEAAqE;;;;;;;;;;;IAIrE,gDAAgD;;IAEhD,gEAAgE;;;;;;;;;;;;;;;;;IAUhE;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;;;;;;;;;;;;IAYH,wEAAwE;;IAExE;;;;;;OAMG;;QAKK;;;;;;;;WAQG;;QAEH,4CAA4C;;QAE5C,kEAAkE;;QAElE,kEAAkE;;;;;;;;;;;;;IAM1E;;;;;OAKG;;;;;;;;;;;;;;IAYH;;;;OAIG;;;;;;;;;;;IAQH;;;;;;;;;;OAUG;;;;QAKC;;;;;;;;;;WAUG;;;;;;;;;;;QAEH;;;;;;;;;WASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { FileDispositionStatusSchema } from "./disposition.js";
|
|
3
3
|
import { CeilingSchema } from "./charter.js";
|
|
4
|
+
import { CLOSING_ACTIONS } from "./closingActions.js";
|
|
4
5
|
/**
|
|
5
6
|
* The accepted scope and intent for a run, confirmed by the host before
|
|
6
7
|
* planning. Single-sourced so both orchestrators share one shape: audit-code
|
|
@@ -45,6 +46,36 @@ export const IntentCheckpointSchema = z
|
|
|
45
46
|
})
|
|
46
47
|
.strict()
|
|
47
48
|
.optional(),
|
|
49
|
+
/**
|
|
50
|
+
* Remediate-only: the closing action the HOST chose at confirmation, from
|
|
51
|
+
* the candidates the tool detected and presented (owner decision
|
|
52
|
+
* 92b0e2dd7cfdc06d — the tool never selects one). Absent means `none`:
|
|
53
|
+
* no closing side effect is ever inferred. audit-code ignores it.
|
|
54
|
+
*/
|
|
55
|
+
closing_action: z.enum(CLOSING_ACTIONS).optional(),
|
|
56
|
+
/**
|
|
57
|
+
* Remediate-only: the argv the close phase runs when `closing_action` is
|
|
58
|
+
* `custom`. Required with `custom` (the confirm step refuses a `custom`
|
|
59
|
+
* without it) and meaningless otherwise. Host-authored: writing it is the
|
|
60
|
+
* authorization, so `custom` needs no second preview at close.
|
|
61
|
+
*/
|
|
62
|
+
closing_custom_command: z.array(z.string().min(1)).min(1).optional(),
|
|
63
|
+
/**
|
|
64
|
+
* Remediate-only, draft checkpoints: the intake worker's open questions,
|
|
65
|
+
* carried into the confirmation prompt. `blocking: true` alone blocks
|
|
66
|
+
* (INV-remediate-state-06).
|
|
67
|
+
*/
|
|
68
|
+
pre_draft_questions: z
|
|
69
|
+
.array(z
|
|
70
|
+
.object({
|
|
71
|
+
id: z.string(),
|
|
72
|
+
question: z.string(),
|
|
73
|
+
blocking: z.boolean().optional(),
|
|
74
|
+
})
|
|
75
|
+
.strict())
|
|
76
|
+
.optional(),
|
|
77
|
+
/** Remediate-only, draft checkpoints: how free-form intent was read. */
|
|
78
|
+
intent_interpretation: z.string().optional(),
|
|
48
79
|
/**
|
|
49
80
|
* Clauses from free_form_intent that could not be encoded as lens-weight,
|
|
50
81
|
* priority, or scope signals. Each entry carries the original clause text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intentCheckpoint.js","sourceRoot":"","sources":["../../../src/shared/types/intentCheckpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"intentCheckpoint.js","sourceRoot":"","sources":["../../../src/shared/types/intentCheckpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC;IACjD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB;;;;OAIG;IACH,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,yDAAyD;IACzD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,wEAAw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,EAAE;IACb;;;;;;;;;;OAUG;IACH,aAAa,EAAE,CAAC;SACb,MAAM,CAAC;QACN,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;QACxD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAChD;;;;;;;;;;WAUG;QACH,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;QACjC;;;;;;;;;WASG;QACH,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3E,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -18,7 +18,7 @@ The JSON contract is authoritative; Markdown is its render.
|
|
|
18
18
|
|
|
19
19
|
## Step artifacts
|
|
20
20
|
|
|
21
|
-
`audit-code next-step` advances one bounded
|
|
21
|
+
`audit-code next-step` advances one bounded, fold-aware drain of the deterministic frontier and writes:
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
24
|
<artifacts_dir>/steps/current-step.json
|
|
@@ -45,18 +45,40 @@ A companion `audit-host-result-map/v1alpha1` binds each work-item id, prompt
|
|
|
45
45
|
digest, and result path. No backend, model, routing, quota, transport, launch
|
|
46
46
|
command, or worker identity is part of either contract.
|
|
47
47
|
|
|
48
|
-
The host writes `audit-host-result/v1alpha1` records. Ingestion
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- run id, work-item id, prompt digest, and result path against tool-owned
|
|
52
|
-
bindings
|
|
53
|
-
- assigned file coverage only, with current total-line counts
|
|
54
|
-
- finding and lens consistency through the normal `AuditResult` schema
|
|
55
|
-
- repository containment for every artifact path
|
|
56
|
-
- append-time idempotency through the accepted-results ledger
|
|
57
|
-
|
|
48
|
+
The host writes `audit-host-result/v1alpha1` records. Ingestion verifies every
|
|
49
|
+
result before it accepts it; the check set below is the one list, rendered from
|
|
50
|
+
the registry both the audit and the remediation ingest cite on every refusal.
|
|
58
51
|
Malformed, fabricated, stale, or replayed-with-different-bytes records do not
|
|
59
|
-
advance the run.
|
|
52
|
+
advance the run.
|
|
53
|
+
|
|
54
|
+
<!-- BEGIN GENERATED INGESTION CHECKS — scripts/shared/generate-ingestion-checks.mjs — DO NOT EDIT BY HAND -->
|
|
55
|
+
|
|
56
|
+
> Rendered from `src/shared/submission/ingestionChecks.ts` — the registry both host-handoff twins cite on every
|
|
57
|
+
> refusal they emit. Add a check there and this table follows; the drift test refuses a
|
|
58
|
+
> row nothing cites.
|
|
59
|
+
|
|
60
|
+
| Check | What must hold for the result to be accepted | Draws |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `result_path` | The submission is read only from the tool-derived bound path (`<run dir>/<sha256(work item id)>.json`) inside the run's artifacts directory; a result written anywhere else is never consulted. | `audit`, `remediate` |
|
|
63
|
+
| `result_json` | The bytes at the bound path parse as JSON. | `audit`, `remediate` |
|
|
64
|
+
| `result_envelope` | The top-level key set is exactly the draw's result contract and `contract_version` is the version the workload was issued under. | `audit`, `remediate` |
|
|
65
|
+
| `identity_binding` | `run_id` is the run that emitted the workload, `work_item_id` is the work item the result was read for, and `prompt_sha256` is the digest of the prompt that work item was issued with — an answer to another run, item or a stale prompt is refused. | `audit`, `remediate` |
|
|
66
|
+
| `workload_binding` | The persisted workload, result map and task bindings still derive from this run (versions, bound paths, prompt digests, scopes); a result cannot be accepted against a binding the tool cannot re-derive. | `audit`, `remediate` |
|
|
67
|
+
| `file_coverage` | `file_coverage` names exactly the assigned files, each fully reviewed, with `total_lines` equal to the line count bound at dispatch. | `audit` |
|
|
68
|
+
| `findings_contract` | Every finding satisfies the audit finding contract (lens, ids, evidence shape). | `audit` |
|
|
69
|
+
| `result_schema` | The bound result converts to the persisted `AuditResult` schema (`schemas/audit_result.schema.json`). | `audit` |
|
|
70
|
+
| `result_validation` | The per-result content rules hold before acceptance (evidence present, line spans inside the file, line counts matching disk); warnings ride an advisory channel and never refuse. | `audit` |
|
|
71
|
+
| `outcome_shape` | A decision result's `outcome` carries exactly the fields its status requires (`resolved_no_change` evidence, `blocked` failure reason, `needs_clarification` question). | `remediate` |
|
|
72
|
+
| `write_scope` | `changed_files` is non-empty, sorted, unique and normalized, lies within the prompt-bound `allowed_files`, and equals the files the landed commit actually changed. | `remediate` |
|
|
73
|
+
| `commit_evidence` | `commit_evidence` binds the workload baseline to a distinct landed commit; both exist, the baseline is an ancestor of the landed commit (waived only under a genuinely orphaned baseline in recovery), and the landed commit is reachable from HEAD. | `remediate` |
|
|
74
|
+
| `test_evidence` | `test_evidence` carries exactly one passed entry per required test echoing the bound command, and the tool's own mechanical rerun of those tests passes. | `remediate` |
|
|
75
|
+
| `obligation_evidence` | `obligation_evidence` cites non-empty evidence for every prompt-bound obligation, none twice, and none the work item does not bind. | `remediate` |
|
|
76
|
+
| `worktree_evidence` | `worktree_evidence` binds the workload baseline and the same changed-file list, and no landed file overlaps dirt that pre-dated the run. | `remediate` |
|
|
77
|
+
| `landing_attestation` | `acceptance` and `merge` both attest a completed landing. | `remediate` |
|
|
78
|
+
| `no_change_corroboration` | A `resolved_no_change` claim is corroborated against git and the persisted write-scope binding; attestation-only acceptance is refused. | `remediate` |
|
|
79
|
+
| `duplicate_result` | `result_id` has not already been accepted this run: a byte-identical replay is a no-op, a different body under an accepted id is refused. | `audit`, `remediate` |
|
|
80
|
+
|
|
81
|
+
<!-- END GENERATED INGESTION CHECKS -->
|
|
60
82
|
|
|
61
83
|
Per-result audit-results validation runs at acceptance, before the accepted
|
|
62
84
|
pair is written: a failing result is classified-rejected (warnings ride a
|
|
@@ -42,10 +42,10 @@ Each `next-step` invocation writes:
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Follow only the returned prompt. A review handoff also writes a versioned host
|
|
45
|
-
workload and result-map path under `.audit-tools/audit/`. Result ingestion
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
no-op.
|
|
45
|
+
workload and result-map path under `.audit-tools/audit/`. Result ingestion binds
|
|
46
|
+
every result to its run, work item and prompt and verifies it before state
|
|
47
|
+
advances; the full check set is the generated block in
|
|
48
|
+
[`contracts.md`](contracts.md). Replaying an already accepted result is a no-op.
|
|
49
49
|
|
|
50
50
|
There are no provider, model, routing, quota, context-window, worker-command, or
|
|
51
51
|
headless-launch settings in audit-tools. Parallelism and concrete execution
|
|
@@ -86,9 +86,12 @@ pair it cannot validate, records each removal so a repaired run stays
|
|
|
86
86
|
distinguishable from a clean one, invalidates the persisted step contract, and
|
|
87
87
|
the next `next-step` re-reads the bound result files for the dropped items.
|
|
88
88
|
|
|
89
|
-
`audit-code cleanup` removes `.audit-tools/audit/` only when
|
|
90
|
-
is
|
|
91
|
-
|
|
89
|
+
`audit-code cleanup` removes `.audit-tools/audit/` only when nothing in the
|
|
90
|
+
directory is still owed to the host: the persisted run is `not_started`, or it
|
|
91
|
+
is `complete` and every artifact promotion archives is already one level up.
|
|
92
|
+
Active or blocked runs are refused, and so is a complete run whose report is not
|
|
93
|
+
fully promoted — that directory holds the only copy. All three refusals are
|
|
94
|
+
waived by `--force`. A directory with no `audit_state.json`
|
|
92
95
|
marker is refused whether or not `--force` is supplied: `--force` waives the
|
|
93
96
|
evidence about a run's STATUS, never the evidence about its IDENTITY, and the
|
|
94
97
|
verb will not delete a directory it cannot prove is an audit run. `--dry-run`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audit-tools",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Provider-neutral code auditing and remediation workflows for arbitrary repositories.",
|
|
@@ -51,11 +51,14 @@
|
|
|
51
51
|
"test": "npm run build && node scripts/shared/run-vitest-gate.mjs",
|
|
52
52
|
"test:single": "npm run build && node scripts/shared/run-vitest-gate.mjs",
|
|
53
53
|
"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\"",
|
|
54
|
-
"verify:checks": "node scripts/shared/profile-run.mjs verify-checks check:control-bytes check:shared-primitives check:version-gates check:guard-reach check:ci-trigger-paths check:loop-core-patterns check:loop-core-closure check:constitutional-doc-paths check:runtime-artifact-names check:friction-categories check:executor-producers check:spec-mirrors check:cli-surface check:deadcode check:orphan-modules check:lint check:dup check:depgraph check:doc-manifest check:doc-links check:doc-code-citations check:gate-enumeration check:philosophy-brief check:readme-sample-report check:proposal-red-at check:handoff-roadmap check:backlog-index check:memory-citations check:backlog-budget check:backlog-status check:backlog-line-numbers check:tests build check:scripts verify:hosts verify:remediate-hosts pack:smoke smoke:packaged-audit-code smoke:packaged-remediate-code",
|
|
54
|
+
"verify:checks": "node scripts/shared/profile-run.mjs verify-checks check:control-bytes check:shared-primitives check:version-gates check:guard-reach check:generated-artifacts check:invariant-glossary check:nightly-inbox check:ci-trigger-paths check:loop-core-patterns check:loop-core-closure check:constitutional-doc-paths check:runtime-artifact-names check:friction-categories check:executor-producers check:spec-mirrors check:cli-surface check:ingestion-checks check:deadcode check:orphan-modules check:lint check:dup check:depgraph check:doc-manifest check:doc-links check:doc-code-citations check:gate-enumeration check:philosophy-brief check:readme-sample-report check:proposal-red-at check:handoff-roadmap check:backlog-index check:memory-citations check:backlog-budget check:backlog-status check:backlog-line-numbers check:tests build check:scripts verify:hosts verify:remediate-hosts pack:smoke smoke:packaged-audit-code smoke:packaged-remediate-code",
|
|
55
55
|
"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",
|
|
56
56
|
"check:control-bytes": "node scripts/check-control-bytes.mjs",
|
|
57
57
|
"check:shared-primitives": "node scripts/check-shared-primitives.mjs",
|
|
58
58
|
"check:guard-reach": "node scripts/check-guard-reach.mjs",
|
|
59
|
+
"check:generated-artifacts": "node scripts/check-generated-artifacts.mjs",
|
|
60
|
+
"check:invariant-glossary": "node scripts/check-invariant-glossary.mjs",
|
|
61
|
+
"check:nightly-inbox": "node scripts/nightly/render-inbox.mjs --check",
|
|
59
62
|
"closeout": "node scripts/render-closeout.mjs",
|
|
60
63
|
"check:ci-trigger-paths": "node scripts/shared/generate-ci-trigger-paths.mjs --check",
|
|
61
64
|
"check:deadcode": "knip --no-config-hints",
|
|
@@ -102,6 +105,7 @@
|
|
|
102
105
|
"check:executor-producers": "node scripts/shared/generate-executor-producers.mjs --check",
|
|
103
106
|
"check:spec-mirrors": "node scripts/shared/generate-spec-mirrors.mjs --check",
|
|
104
107
|
"check:cli-surface": "node scripts/shared/generate-cli-surface.mjs --check",
|
|
108
|
+
"check:ingestion-checks": "node scripts/shared/generate-ingestion-checks.mjs --check",
|
|
105
109
|
"generate:shard-baseline": "node scripts/shared/generate-vitest-shard-baseline.mjs",
|
|
106
110
|
"check:orphan-modules": "node scripts/check-orphan-modules.mjs",
|
|
107
111
|
"check:loop-core-closure": "node scripts/check-loop-core-closure.mjs"
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -8,9 +8,20 @@
|
|
|
8
8
|
// corrupts the other's, and surface a non-zero exit if EITHER reports a failure
|
|
9
9
|
// (INV-remediate-infra-08: a partial deploy must not report success).
|
|
10
10
|
import { spawnSync } from "node:child_process";
|
|
11
|
+
import { existsSync } from "node:fs";
|
|
11
12
|
import { fileURLToPath } from "node:url";
|
|
12
13
|
|
|
14
|
+
const packageRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
13
15
|
let failed = false;
|
|
16
|
+
|
|
17
|
+
// A published tarball already carries dist/. A source checkout does not, and
|
|
18
|
+
// npm's postinstall runs only after dependencies are present, so this is the
|
|
19
|
+
// first reliable point at which it can build the shared export. Without this
|
|
20
|
+
// bootstrap a fresh checkout partially deployed host assets and skipped both
|
|
21
|
+
// OpenCode config and artifact .gitignore management until a human happened to
|
|
22
|
+
// rerun postinstall after the first build.
|
|
23
|
+
if (!ensureSourceCheckoutBuilt()) failed = true;
|
|
24
|
+
|
|
14
25
|
for (const script of ["./audit/postinstall.mjs", "./remediate/postinstall.mjs"]) {
|
|
15
26
|
const scriptPath = fileURLToPath(new URL(script, import.meta.url));
|
|
16
27
|
const result = spawnSync(process.execPath, [scriptPath], { stdio: "inherit", windowsHide: true });
|
|
@@ -32,6 +43,37 @@ await manageArtifactGitignore();
|
|
|
32
43
|
|
|
33
44
|
process.exit(failed ? 1 : 0);
|
|
34
45
|
|
|
46
|
+
function ensureSourceCheckoutBuilt() {
|
|
47
|
+
const sharedEntry = fileURLToPath(new URL("../dist/shared/index.js", import.meta.url));
|
|
48
|
+
if (existsSync(sharedEntry)) return true;
|
|
49
|
+
|
|
50
|
+
const sourceTree = fileURLToPath(new URL("../src", import.meta.url));
|
|
51
|
+
const tsconfig = fileURLToPath(new URL("../tsconfig.json", import.meta.url));
|
|
52
|
+
if (!existsSync(sourceTree) || !existsSync(tsconfig)) return true;
|
|
53
|
+
|
|
54
|
+
const npmCli = process.env.npm_execpath;
|
|
55
|
+
if (!npmCli) {
|
|
56
|
+
console.warn(
|
|
57
|
+
"[audit-tools] postinstall: source checkout needs a shared build, but npm_execpath is unavailable.",
|
|
58
|
+
);
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log("[audit-tools] postinstall: building shared output for this source checkout...");
|
|
63
|
+
const result = spawnSync(process.execPath, [npmCli, "run", "build"], {
|
|
64
|
+
cwd: packageRoot,
|
|
65
|
+
stdio: "inherit",
|
|
66
|
+
windowsHide: true,
|
|
67
|
+
});
|
|
68
|
+
if (result.error || (result.status ?? 0) !== 0 || result.signal) {
|
|
69
|
+
console.warn(
|
|
70
|
+
`[audit-tools] postinstall: source-checkout build failed (${result.error?.message ?? result.signal ?? `exit ${result.status}`}).`,
|
|
71
|
+
);
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return existsSync(sharedEntry);
|
|
75
|
+
}
|
|
76
|
+
|
|
35
77
|
async function manageArtifactGitignore() {
|
|
36
78
|
try {
|
|
37
79
|
const shared = await import("audit-tools/shared");
|
|
@@ -48,9 +48,11 @@ confirm the host can inspect the structural graph/relationships and source
|
|
|
48
48
|
structure required by the workload. This is a host capability check, not an
|
|
49
49
|
audit-tools MCP/provider or lane-selection step. If capability is degraded but
|
|
50
50
|
you proceed, record one reserved AgentReflection with task_id exactly
|
|
51
|
-
`audit-capability-preflight
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
`audit-capability-preflight`. Every reflection requires all three of `task_id`,
|
|
52
|
+
`instruction_clarity` (one of `clear`, `mostly_clear`, `ambiguous`, `unclear`)
|
|
53
|
+
and `severity`; a line missing any of the three is discarded whole. Use severity
|
|
54
|
+
`high` or `critical` when material to claimed coverage, with concrete
|
|
55
|
+
`tool_friction`, `ambiguities`, and `suggestions` details. A structurally incapable run must not be labelled comprehensive. Keep
|
|
54
56
|
the conversation-first flow and loader contract; do not add provider, routing,
|
|
55
57
|
model, or machine-capability fields to audit-tools. Write the
|
|
56
58
|
prompt-bound result artifacts exactly where requested and let the next backend
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"closingActions.d.ts","sourceRoot":"","sources":["../../../src/remediate/state/closingActions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,4EAQlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"closingActions.js","sourceRoot":"","sources":["../../../src/remediate/state/closingActions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,KAAK;IACL,MAAM;IACN,QAAQ;CACA,CAAC"}
|