@mergesignal/shared 0.12.3 → 0.14.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.
Files changed (178) hide show
  1. package/dist/assessment/authoredCommunication.d.ts +30 -0
  2. package/dist/assessment/authoredCommunication.d.ts.map +1 -0
  3. package/dist/assessment/authoredCommunication.js +18 -0
  4. package/dist/assessment/index.d.ts +6 -0
  5. package/dist/assessment/index.d.ts.map +1 -0
  6. package/dist/assessment/index.js +5 -0
  7. package/dist/assessment/literals.d.ts +44 -0
  8. package/dist/assessment/literals.d.ts.map +1 -0
  9. package/dist/assessment/literals.js +140 -0
  10. package/dist/assessment/schema.d.ts +311 -0
  11. package/dist/assessment/schema.d.ts.map +1 -0
  12. package/dist/assessment/schema.js +162 -0
  13. package/dist/assessment/types.d.ts +197 -0
  14. package/dist/assessment/types.d.ts.map +1 -0
  15. package/dist/assessment/types.js +1 -0
  16. package/dist/assessment/version.d.ts +11 -0
  17. package/dist/assessment/version.d.ts.map +1 -0
  18. package/dist/assessment/version.js +9 -0
  19. package/dist/assessmentLabels.d.ts +1 -1
  20. package/dist/assessmentLabels.d.ts.map +1 -1
  21. package/dist/assessmentLabels.js +2 -2
  22. package/dist/assessmentPresentationUtils.d.ts +1 -1
  23. package/dist/assessmentPresentationUtils.d.ts.map +1 -1
  24. package/dist/assessmentProjection.d.ts +1 -1
  25. package/dist/assessmentProjection.d.ts.map +1 -1
  26. package/dist/assessmentProjection.js +2 -2
  27. package/dist/deriveScanNarrative.d.ts.map +1 -1
  28. package/dist/deriveScanNarrative.js +2 -1
  29. package/dist/fixtures/assessmentFixtures.d.ts +1 -1
  30. package/dist/fixtures/assessmentFixtures.js +12 -12
  31. package/dist/fixtures/assessmentScopeFixtures.d.ts +1 -1
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -0
  35. package/dist/lockfileEvidence.d.ts +22 -0
  36. package/dist/lockfileEvidence.d.ts.map +1 -0
  37. package/dist/lockfileEvidence.js +32 -0
  38. package/dist/presentation/dto/assessmentPresentationFields.d.ts +1 -1
  39. package/dist/presentation/dto/assessmentPresentationFields.d.ts.map +1 -1
  40. package/dist/presentation/orchestration/buildScanPresentationBundle.d.ts.map +1 -1
  41. package/dist/presentation/orchestration/buildScanPresentationBundle.js +2 -1
  42. package/dist/presentation/orchestration/scanPresentationBundle.d.ts +2 -1
  43. package/dist/presentation/orchestration/scanPresentationBundle.d.ts.map +1 -1
  44. package/dist/presentation/profile/buildProfileFromAssessment.d.ts +1 -1
  45. package/dist/presentation/profile/buildProfileFromAssessment.d.ts.map +1 -1
  46. package/dist/presentation/profile/buildProfileFromAssessment.js +14 -6
  47. package/dist/repoIntelligenceSchema.d.ts +5 -5
  48. package/dist/scanResultSchema.d.ts +8 -8
  49. package/dist/scanResultSchema.js +1 -1
  50. package/dist/scanSurfaceCopy.d.ts +1 -0
  51. package/dist/scanSurfaceCopy.d.ts.map +1 -1
  52. package/dist/scanSurfaceCopy.js +1 -0
  53. package/dist/types.d.ts +6 -2
  54. package/dist/types.d.ts.map +1 -1
  55. package/package.json +2 -3
  56. package/dist/actionsStepSummary.test.d.ts +0 -2
  57. package/dist/actionsStepSummary.test.d.ts.map +0 -1
  58. package/dist/actionsStepSummary.test.js +0 -53
  59. package/dist/assessmentProjection.verificationChannel.test.d.ts +0 -2
  60. package/dist/assessmentProjection.verificationChannel.test.d.ts.map +0 -1
  61. package/dist/assessmentProjection.verificationChannel.test.js +0 -110
  62. package/dist/deriveScanNarrative.test.d.ts +0 -2
  63. package/dist/deriveScanNarrative.test.d.ts.map +0 -1
  64. package/dist/deriveScanNarrative.test.js +0 -274
  65. package/dist/engineWireRegression.test.d.ts +0 -2
  66. package/dist/engineWireRegression.test.d.ts.map +0 -1
  67. package/dist/engineWireRegression.test.js +0 -77
  68. package/dist/fixtures/engineAbi4Fixtures.d.ts +0 -16
  69. package/dist/fixtures/engineAbi4Fixtures.d.ts.map +0 -1
  70. package/dist/fixtures/engineAbi4Fixtures.js +0 -26
  71. package/dist/fixtures/legacyEngineRepoIntelligence.d.ts +0 -28
  72. package/dist/fixtures/legacyEngineRepoIntelligence.d.ts.map +0 -1
  73. package/dist/fixtures/legacyEngineRepoIntelligence.js +0 -28
  74. package/dist/fixtures/repoIntelligenceFixtures.d.ts +0 -8
  75. package/dist/fixtures/repoIntelligenceFixtures.d.ts.map +0 -1
  76. package/dist/fixtures/repoIntelligenceFixtures.js +0 -123
  77. package/dist/fixtures/repoIntelligenceTestHelpers.d.ts +0 -5
  78. package/dist/fixtures/repoIntelligenceTestHelpers.d.ts.map +0 -1
  79. package/dist/fixtures/repoIntelligenceTestHelpers.js +0 -28
  80. package/dist/formatInsight.test.d.ts +0 -2
  81. package/dist/formatInsight.test.d.ts.map +0 -1
  82. package/dist/formatInsight.test.js +0 -102
  83. package/dist/narrativeParity.test.d.ts +0 -2
  84. package/dist/narrativeParity.test.d.ts.map +0 -1
  85. package/dist/narrativeParity.test.js +0 -35
  86. package/dist/narrativePresentation.test.d.ts +0 -2
  87. package/dist/narrativePresentation.test.d.ts.map +0 -1
  88. package/dist/narrativePresentation.test.js +0 -54
  89. package/dist/normalizeGeneratedText.test.d.ts +0 -2
  90. package/dist/normalizeGeneratedText.test.d.ts.map +0 -1
  91. package/dist/normalizeGeneratedText.test.js +0 -18
  92. package/dist/prRiskBand.test.d.ts +0 -2
  93. package/dist/prRiskBand.test.d.ts.map +0 -1
  94. package/dist/prRiskBand.test.js +0 -68
  95. package/dist/prRiskWire.test.d.ts +0 -2
  96. package/dist/prRiskWire.test.d.ts.map +0 -1
  97. package/dist/prRiskWire.test.js +0 -106
  98. package/dist/prRiskWiringRegression.test.d.ts +0 -2
  99. package/dist/prRiskWiringRegression.test.d.ts.map +0 -1
  100. package/dist/prRiskWiringRegression.test.js +0 -102
  101. package/dist/presentation/abi3Expression.test.d.ts +0 -13
  102. package/dist/presentation/abi3Expression.test.d.ts.map +0 -1
  103. package/dist/presentation/abi3Expression.test.js +0 -392
  104. package/dist/presentation/buildGitHubCheckRunOutput.test.d.ts +0 -2
  105. package/dist/presentation/buildGitHubCheckRunOutput.test.d.ts.map +0 -1
  106. package/dist/presentation/buildGitHubCheckRunOutput.test.js +0 -163
  107. package/dist/presentation/bundleAccessorParity.test.d.ts +0 -9
  108. package/dist/presentation/bundleAccessorParity.test.d.ts.map +0 -1
  109. package/dist/presentation/bundleAccessorParity.test.js +0 -126
  110. package/dist/presentation/cliParity.test.d.ts +0 -2
  111. package/dist/presentation/cliParity.test.d.ts.map +0 -1
  112. package/dist/presentation/cliParity.test.js +0 -49
  113. package/dist/presentation/compose/narrativeChannels.test.d.ts +0 -2
  114. package/dist/presentation/compose/narrativeChannels.test.d.ts.map +0 -1
  115. package/dist/presentation/compose/narrativeChannels.test.js +0 -42
  116. package/dist/presentation/decisionSurface.test.d.ts +0 -2
  117. package/dist/presentation/decisionSurface.test.d.ts.map +0 -1
  118. package/dist/presentation/decisionSurface.test.js +0 -290
  119. package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts +0 -2
  120. package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts.map +0 -1
  121. package/dist/presentation/fixtures/dashboardCardGolden.test.js +0 -38
  122. package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts +0 -11
  123. package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts.map +0 -1
  124. package/dist/presentation/fixtures/presentationPersonaFixtures.js +0 -208
  125. package/dist/presentation/fixtures/scanResultFixtures.d.ts +0 -5
  126. package/dist/presentation/fixtures/scanResultFixtures.d.ts.map +0 -1
  127. package/dist/presentation/fixtures/scanResultFixtures.js +0 -123
  128. package/dist/presentation/intent/postureVocabularyGuard.test.d.ts +0 -2
  129. package/dist/presentation/intent/postureVocabularyGuard.test.d.ts.map +0 -1
  130. package/dist/presentation/intent/postureVocabularyGuard.test.js +0 -23
  131. package/dist/presentation/orchestration/buildScanPresentationBundle.test.d.ts +0 -2
  132. package/dist/presentation/orchestration/buildScanPresentationBundle.test.d.ts.map +0 -1
  133. package/dist/presentation/orchestration/buildScanPresentationBundle.test.js +0 -99
  134. package/dist/presentation/presentation.test.d.ts +0 -2
  135. package/dist/presentation/presentation.test.d.ts.map +0 -1
  136. package/dist/presentation/presentation.test.js +0 -126
  137. package/dist/presentation/presentationPersonas.test.d.ts +0 -2
  138. package/dist/presentation/presentationPersonas.test.d.ts.map +0 -1
  139. package/dist/presentation/presentationPersonas.test.js +0 -164
  140. package/dist/presentation/surfaceParity.test.d.ts +0 -2
  141. package/dist/presentation/surfaceParity.test.d.ts.map +0 -1
  142. package/dist/presentation/surfaceParity.test.js +0 -156
  143. package/dist/presentation/verificationChannelParity.test.d.ts +0 -2
  144. package/dist/presentation/verificationChannelParity.test.d.ts.map +0 -1
  145. package/dist/presentation/verificationChannelParity.test.js +0 -57
  146. package/dist/productMessaging.test.d.ts +0 -2
  147. package/dist/productMessaging.test.d.ts.map +0 -1
  148. package/dist/productMessaging.test.js +0 -97
  149. package/dist/repoIntelligenceSchema.contract.test.d.ts +0 -2
  150. package/dist/repoIntelligenceSchema.contract.test.d.ts.map +0 -1
  151. package/dist/repoIntelligenceSchema.contract.test.js +0 -51
  152. package/dist/repoIntelligenceSemantics.test.d.ts +0 -2
  153. package/dist/repoIntelligenceSemantics.test.d.ts.map +0 -1
  154. package/dist/repoIntelligenceSemantics.test.js +0 -63
  155. package/dist/repoIntelligenceValidation.persist.test.d.ts +0 -2
  156. package/dist/repoIntelligenceValidation.persist.test.d.ts.map +0 -1
  157. package/dist/repoIntelligenceValidation.persist.test.js +0 -44
  158. package/dist/riskSignals.test.d.ts +0 -2
  159. package/dist/riskSignals.test.d.ts.map +0 -1
  160. package/dist/riskSignals.test.js +0 -32
  161. package/dist/riskVocabulary.test.d.ts +0 -2
  162. package/dist/riskVocabulary.test.d.ts.map +0 -1
  163. package/dist/riskVocabulary.test.js +0 -14
  164. package/dist/scanPresentationBundle.golden.test.d.ts +0 -2
  165. package/dist/scanPresentationBundle.golden.test.d.ts.map +0 -1
  166. package/dist/scanPresentationBundle.golden.test.js +0 -78
  167. package/dist/scanResultSchema.test.d.ts +0 -2
  168. package/dist/scanResultSchema.test.d.ts.map +0 -1
  169. package/dist/scanResultSchema.test.js +0 -162
  170. package/dist/scanSurfaceCopy.test.d.ts +0 -2
  171. package/dist/scanSurfaceCopy.test.d.ts.map +0 -1
  172. package/dist/scanSurfaceCopy.test.js +0 -14
  173. package/dist/selectTopAffectedAreas.test.d.ts +0 -2
  174. package/dist/selectTopAffectedAreas.test.d.ts.map +0 -1
  175. package/dist/selectTopAffectedAreas.test.js +0 -179
  176. package/dist/trustedScanGuards.test.d.ts +0 -2
  177. package/dist/trustedScanGuards.test.d.ts.map +0 -1
  178. package/dist/trustedScanGuards.test.js +0 -151
@@ -0,0 +1,30 @@
1
+ import type { Assessment } from "./types.js";
2
+ /**
3
+ * Canonical authored-communication accessors for Presentation Bundle transport.
4
+ *
5
+ * Both engine OutcomePresentationBundle and public ScanPresentationBundle carry
6
+ * these fields verbatim from Expression-authored Assessment fields.
7
+ */
8
+ export type AuthoredCommunicationAccessors = {
9
+ /** Q6 — assessment.confidenceRationale verbatim; always present. */
10
+ readonly trustLine: string;
11
+ /** Q7 — assessment.reviewFocalPoint.electionSummary verbatim; null when uncontested. */
12
+ readonly whyThisPackageLine: string | null;
13
+ /** Q8 — assessment.notAffectedLine verbatim; null when nothing was proven unused. */
14
+ readonly notAffectedLine: string | null;
15
+ /** Q9 — assessment.resolutionLine verbatim; null for cleared/proven_broken. */
16
+ readonly resolutionLine: string | null;
17
+ /** Q1–Q5 — assessment.reasoning[] verbatim, in order. */
18
+ readonly reasoningLines: readonly string[];
19
+ /** Q4 — assessment.verificationScope.guidance[] verbatim; empty when absent. */
20
+ readonly guidanceLines: readonly string[];
21
+ /** Quantified concern context — concerns[].context values, in concern order. */
22
+ readonly concernContextLines: readonly string[];
23
+ };
24
+ /**
25
+ * Extract authored communication from a parsed Assessment for bundle transport.
26
+ *
27
+ * Copy-only: no wording logic, no markdown assembly, no intelligence derivation.
28
+ */
29
+ export declare function extractAuthoredCommunication(assessment: Assessment): AuthoredCommunicationAccessors;
30
+ //# sourceMappingURL=authoredCommunication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoredCommunication.d.ts","sourceRoot":"","sources":["../../src/assessment/authoredCommunication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,oEAAoE;IACpE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,wFAAwF;IACxF,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,qFAAqF;IACrF,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,yDAAyD;IACzD,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,gFAAgF;IAChF,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,GACrB,8BAA8B,CAehC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Extract authored communication from a parsed Assessment for bundle transport.
3
+ *
4
+ * Copy-only: no wording logic, no markdown assembly, no intelligence derivation.
5
+ */
6
+ export function extractAuthoredCommunication(assessment) {
7
+ return {
8
+ trustLine: assessment.confidenceRationale,
9
+ whyThisPackageLine: assessment.reviewFocalPoint.electionSummary ?? null,
10
+ notAffectedLine: assessment.notAffectedLine ?? null,
11
+ resolutionLine: assessment.resolutionLine ?? null,
12
+ reasoningLines: assessment.reasoning,
13
+ guidanceLines: assessment.verificationScope.guidance ?? [],
14
+ concernContextLines: assessment.concerns
15
+ .map((concern) => concern.context)
16
+ .filter((context) => context !== undefined && context.length > 0),
17
+ };
18
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./literals.js";
2
+ export * from "./types.js";
3
+ export { assessmentSchema, parseAssessmentOrThrow, safeParseAssessment, type SafeParseAssessmentResult, } from "./schema.js";
4
+ export { ASSESSMENT_ABI, type AssessmentAbi } from "./version.js";
5
+ export { extractAuthoredCommunication, type AuthoredCommunicationAccessors, } from "./authoredCommunication.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assessment/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,yBAAyB,GAC/B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,4BAA4B,EAC5B,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./literals.js";
2
+ export * from "./types.js";
3
+ export { assessmentSchema, parseAssessmentOrThrow, safeParseAssessment, } from "./schema.js";
4
+ export { ASSESSMENT_ABI } from "./version.js";
5
+ export { extractAuthoredCommunication, } from "./authoredCommunication.js";
@@ -0,0 +1,44 @@
1
+ /** Assessment posture on the wire. */
2
+ export declare const ASSESSMENT_POSTURES: readonly ["safe", "needs_review", "risky"];
3
+ /** Engine confidence in the Assessment. */
4
+ export declare const ASSESSMENT_CONFIDENCES: readonly ["low", "medium", "high"];
5
+ /** Per-package change classification tokens. */
6
+ export declare const CHANGE_CLASSES: readonly ["tooling_maintenance", "test_infra", "runtime_patch", "runtime_upgrade", "security_advisory", "breaking_change", "ecosystem_unknown", "bulk_mixed", "removal"];
7
+ /** Structured merge concern kinds. */
8
+ export declare const MERGE_CONCERN_KINDS: readonly ["unresolved_runtime_exposure", "security_finding", "breaking_or_major", "behavioral_change", "ecosystem_risk", "insufficient_evidence", "graph_baseline_only"];
9
+ /** Presentation narrative intensity. */
10
+ export declare const NARRATIVE_INTENSITIES: readonly ["minimal", "standard", "elevated"];
11
+ /** Presentation reach visibility. */
12
+ export declare const REACH_VISIBILITIES: readonly ["hidden", "contextual", "prominent"];
13
+ /** Presentation verification intensity. */
14
+ export declare const VERIFICATION_INTENSITIES: readonly ["none", "advisory", "required"];
15
+ /** Presentation insight emission floor. */
16
+ export declare const INSIGHT_EMISSION_FLOORS: readonly ["none", "explain_only", "full"];
17
+ /** Report presentation mode on wire. */
18
+ export declare const ASSESSMENT_REPORT_MODES: readonly ["lightweight_pr_graph_baseline", "high_signal_pr"];
19
+ /** Review episode shape literals (Focal Point ABI 2). */
20
+ export declare const REVIEW_EPISODE_SHAPES: readonly ["single_anchor", "multi_anchor", "parent_supporting", "coupled_pair", "tooling_bundle", "structural"];
21
+ /** Focal election dimension literals. */
22
+ export declare const FOCAL_ELECTION_DIMENSIONS: readonly ["concern", "reach", "changeSeverity", "repository_importance", "role_salience_tiebreak"];
23
+ /** Reach bucket literals for {@link ReachScope.maxBucket}. */
24
+ export declare const REACH_BUCKETS: readonly ["very_low", "low", "moderate", "high"];
25
+ /**
26
+ * Delta dimension kinds on the public Assessment clearance-envelope wire.
27
+ * Minimal literal set required by assessmentSchema clearance validation.
28
+ */
29
+ export declare const DELTA_DIMENSION_KINDS: readonly ["manifest", "exports", "entrypoint", "peer_dependency", "engine_constraint", "type_surface", "artifact_layout", "documented_breaking"];
30
+ /** The four deterministic outcomes produced by Assessment (ABI 4). */
31
+ export declare const ASSESSMENT_OUTCOMES: readonly ["cleared", "proven_broken", "bounded_verify", "abstain"];
32
+ /** Reasons for an Abstain outcome. */
33
+ export declare const ABSTAIN_REASON_KINDS: readonly ["private_package", "opaque_mutation", "unsupported_ecosystem", "partial_monorepo_scan", "no_honest_bounded_target", "insufficient_collection"];
34
+ /** Blocker kinds for EvidenceSufficiencyVerdict. */
35
+ export declare const SUFFICIENCY_BLOCKER_KINDS: readonly ["repository_coverage_insufficient", "package_facts_missing", "opaque_mutation", "private_package", "correlation_abstained", "proof_coverage_insufficient", "proof_execution_failed", "unsupported_ecosystem", "partial_monorepo_scan", "hypothesized_breaking_unresolved", "advisory_blocking", "conflicting_proof_results"];
36
+ /** Target kinds for BoundedVerifyTarget. */
37
+ export declare const BOUNDED_VERIFY_TARGET_KINDS: readonly ["file_location", "config_path", "behavioral_scenario"];
38
+ /** Basis for a cleared delta dimension in ClearanceEnvelope. */
39
+ export declare const CLEARANCE_BASES: readonly ["proof_pass", "no_impact_proven"];
40
+ /** Reasons a delta dimension is uncleared in ClearanceEnvelope. */
41
+ export declare const UNCLEARED_REASONS: readonly ["proof_failed", "proof_inconclusive", "no_producer_available", "representative_precision_only", "architectural_precision_only", "opaque_delta", "hypothesized_breaking"];
42
+ /** Coverage class for ClearanceEnvelope. */
43
+ export declare const COVERAGE_CLASSES: readonly ["full", "representative", "none"];
44
+ //# sourceMappingURL=literals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literals.d.ts","sourceRoot":"","sources":["../../src/assessment/literals.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,4CAA6C,CAAC;AAE9E,2CAA2C;AAC3C,eAAO,MAAM,sBAAsB,oCAAqC,CAAC;AAEzE,gDAAgD;AAChD,eAAO,MAAM,cAAc,0KAUjB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,0KAQtB,CAAC;AAEX,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,8CAIxB,CAAC;AAEX,qCAAqC;AACrC,eAAO,MAAM,kBAAkB,gDAIrB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,wBAAwB,2CAI3B,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,uBAAuB,2CAI1B,CAAC;AAEX,wCAAwC;AACxC,eAAO,MAAM,uBAAuB,8DAG1B,CAAC;AAEX,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,iHAOxB,CAAC;AAEX,yCAAyC;AACzC,eAAO,MAAM,yBAAyB,oGAM5B,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,aAAa,kDAAmD,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,kJASxB,CAAC;AAIX,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,oEAKtB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,oBAAoB,0JAOvB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,yBAAyB,wUAa5B,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,kEAI9B,CAAC;AAEX,gEAAgE;AAChE,eAAO,MAAM,eAAe,6CAA8C,CAAC;AAE3E,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,oLAQpB,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,6CAA8C,CAAC"}
@@ -0,0 +1,140 @@
1
+ /** Assessment posture on the wire. */
2
+ export const ASSESSMENT_POSTURES = ["safe", "needs_review", "risky"];
3
+ /** Engine confidence in the Assessment. */
4
+ export const ASSESSMENT_CONFIDENCES = ["low", "medium", "high"];
5
+ /** Per-package change classification tokens. */
6
+ export const CHANGE_CLASSES = [
7
+ "tooling_maintenance",
8
+ "test_infra",
9
+ "runtime_patch",
10
+ "runtime_upgrade",
11
+ "security_advisory",
12
+ "breaking_change",
13
+ "ecosystem_unknown",
14
+ "bulk_mixed",
15
+ "removal",
16
+ ];
17
+ /** Structured merge concern kinds. */
18
+ export const MERGE_CONCERN_KINDS = [
19
+ "unresolved_runtime_exposure",
20
+ "security_finding",
21
+ "breaking_or_major",
22
+ "behavioral_change",
23
+ "ecosystem_risk",
24
+ "insufficient_evidence",
25
+ "graph_baseline_only",
26
+ ];
27
+ /** Presentation narrative intensity. */
28
+ export const NARRATIVE_INTENSITIES = [
29
+ "minimal",
30
+ "standard",
31
+ "elevated",
32
+ ];
33
+ /** Presentation reach visibility. */
34
+ export const REACH_VISIBILITIES = [
35
+ "hidden",
36
+ "contextual",
37
+ "prominent",
38
+ ];
39
+ /** Presentation verification intensity. */
40
+ export const VERIFICATION_INTENSITIES = [
41
+ "none",
42
+ "advisory",
43
+ "required",
44
+ ];
45
+ /** Presentation insight emission floor. */
46
+ export const INSIGHT_EMISSION_FLOORS = [
47
+ "none",
48
+ "explain_only",
49
+ "full",
50
+ ];
51
+ /** Report presentation mode on wire. */
52
+ export const ASSESSMENT_REPORT_MODES = [
53
+ "lightweight_pr_graph_baseline",
54
+ "high_signal_pr",
55
+ ];
56
+ /** Review episode shape literals (Focal Point ABI 2). */
57
+ export const REVIEW_EPISODE_SHAPES = [
58
+ "single_anchor",
59
+ "multi_anchor",
60
+ "parent_supporting",
61
+ "coupled_pair",
62
+ "tooling_bundle",
63
+ "structural",
64
+ ];
65
+ /** Focal election dimension literals. */
66
+ export const FOCAL_ELECTION_DIMENSIONS = [
67
+ "concern",
68
+ "reach",
69
+ "changeSeverity",
70
+ "repository_importance",
71
+ "role_salience_tiebreak",
72
+ ];
73
+ /** Reach bucket literals for {@link ReachScope.maxBucket}. */
74
+ export const REACH_BUCKETS = ["very_low", "low", "moderate", "high"];
75
+ /**
76
+ * Delta dimension kinds on the public Assessment clearance-envelope wire.
77
+ * Minimal literal set required by assessmentSchema clearance validation.
78
+ */
79
+ export const DELTA_DIMENSION_KINDS = [
80
+ "manifest",
81
+ "exports",
82
+ "entrypoint",
83
+ "peer_dependency",
84
+ "engine_constraint",
85
+ "type_surface",
86
+ "artifact_layout",
87
+ "documented_breaking",
88
+ ];
89
+ // --- ABI 4 outcome model literals ---
90
+ /** The four deterministic outcomes produced by Assessment (ABI 4). */
91
+ export const ASSESSMENT_OUTCOMES = [
92
+ "cleared",
93
+ "proven_broken",
94
+ "bounded_verify",
95
+ "abstain",
96
+ ];
97
+ /** Reasons for an Abstain outcome. */
98
+ export const ABSTAIN_REASON_KINDS = [
99
+ "private_package",
100
+ "opaque_mutation",
101
+ "unsupported_ecosystem",
102
+ "partial_monorepo_scan",
103
+ "no_honest_bounded_target",
104
+ "insufficient_collection",
105
+ ];
106
+ /** Blocker kinds for EvidenceSufficiencyVerdict. */
107
+ export const SUFFICIENCY_BLOCKER_KINDS = [
108
+ "repository_coverage_insufficient",
109
+ "package_facts_missing",
110
+ "opaque_mutation",
111
+ "private_package",
112
+ "correlation_abstained",
113
+ "proof_coverage_insufficient",
114
+ "proof_execution_failed",
115
+ "unsupported_ecosystem",
116
+ "partial_monorepo_scan",
117
+ "hypothesized_breaking_unresolved",
118
+ "advisory_blocking",
119
+ "conflicting_proof_results",
120
+ ];
121
+ /** Target kinds for BoundedVerifyTarget. */
122
+ export const BOUNDED_VERIFY_TARGET_KINDS = [
123
+ "file_location",
124
+ "config_path",
125
+ "behavioral_scenario",
126
+ ];
127
+ /** Basis for a cleared delta dimension in ClearanceEnvelope. */
128
+ export const CLEARANCE_BASES = ["proof_pass", "no_impact_proven"];
129
+ /** Reasons a delta dimension is uncleared in ClearanceEnvelope. */
130
+ export const UNCLEARED_REASONS = [
131
+ "proof_failed",
132
+ "proof_inconclusive",
133
+ "no_producer_available",
134
+ "representative_precision_only",
135
+ "architectural_precision_only",
136
+ "opaque_delta",
137
+ "hypothesized_breaking",
138
+ ];
139
+ /** Coverage class for ClearanceEnvelope. */
140
+ export const COVERAGE_CLASSES = ["full", "representative", "none"];
@@ -0,0 +1,311 @@
1
+ import { z } from "zod";
2
+ import type { Assessment } from "./types.js";
3
+ /** Root Assessment wire schema (ABI 4).
4
+ *
5
+ * All ABI 3 required fields are preserved. ABI 4 outcome model fields are optional,
6
+ * so ABI 3 payloads continue to parse successfully. Parsers must tolerate absent ABI 4
7
+ * fields and treat them as "shadow mode not yet active."
8
+ */
9
+ export declare const assessmentSchema: z.ZodObject<{
10
+ reviewFocalPoint: z.ZodObject<{
11
+ episodeShape: z.ZodEnum<{
12
+ single_anchor: "single_anchor";
13
+ multi_anchor: "multi_anchor";
14
+ parent_supporting: "parent_supporting";
15
+ coupled_pair: "coupled_pair";
16
+ tooling_bundle: "tooling_bundle";
17
+ structural: "structural";
18
+ }>;
19
+ anchors: z.ZodArray<z.ZodString>;
20
+ supportingPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ election: z.ZodObject<{
22
+ grounding: z.ZodArray<z.ZodObject<{
23
+ packageName: z.ZodString;
24
+ reason: z.ZodString;
25
+ decidedBy: z.ZodEnum<{
26
+ concern: "concern";
27
+ reach: "reach";
28
+ changeSeverity: "changeSeverity";
29
+ repository_importance: "repository_importance";
30
+ role_salience_tiebreak: "role_salience_tiebreak";
31
+ }>;
32
+ evidenceRefs: z.ZodArray<z.ZodString>;
33
+ }, z.core.$strip>>;
34
+ exclusions: z.ZodArray<z.ZodObject<{
35
+ packageName: z.ZodString;
36
+ reason: z.ZodString;
37
+ lostOn: z.ZodEnum<{
38
+ concern: "concern";
39
+ reach: "reach";
40
+ changeSeverity: "changeSeverity";
41
+ repository_importance: "repository_importance";
42
+ role_salience_tiebreak: "role_salience_tiebreak";
43
+ }>;
44
+ evidenceRefs: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strip>>;
46
+ }, z.core.$strip>;
47
+ electionSummary: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>;
49
+ reachScope: z.ZodObject<{
50
+ packages: z.ZodArray<z.ZodString>;
51
+ maxBucket: z.ZodEnum<{
52
+ low: "low";
53
+ high: "high";
54
+ very_low: "very_low";
55
+ moderate: "moderate";
56
+ }>;
57
+ entryPointFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ }, z.core.$strip>;
59
+ verificationScope: z.ZodObject<{
60
+ packages: z.ZodArray<z.ZodString>;
61
+ focus: z.ZodArray<z.ZodString>;
62
+ guidance: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ artifactGrounded: z.ZodOptional<z.ZodObject<{
64
+ packages: z.ZodArray<z.ZodString>;
65
+ focus: z.ZodArray<z.ZodString>;
66
+ artifactPaths: z.ZodArray<z.ZodString>;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
69
+ posture: z.ZodEnum<{
70
+ safe: "safe";
71
+ needs_review: "needs_review";
72
+ risky: "risky";
73
+ }>;
74
+ confidence: z.ZodEnum<{
75
+ low: "low";
76
+ medium: "medium";
77
+ high: "high";
78
+ }>;
79
+ primaryConcern: z.ZodNullable<z.ZodEnum<{
80
+ unresolved_runtime_exposure: "unresolved_runtime_exposure";
81
+ security_finding: "security_finding";
82
+ breaking_or_major: "breaking_or_major";
83
+ behavioral_change: "behavioral_change";
84
+ ecosystem_risk: "ecosystem_risk";
85
+ insufficient_evidence: "insufficient_evidence";
86
+ graph_baseline_only: "graph_baseline_only";
87
+ }>>;
88
+ concerns: z.ZodArray<z.ZodObject<{
89
+ kind: z.ZodEnum<{
90
+ unresolved_runtime_exposure: "unresolved_runtime_exposure";
91
+ security_finding: "security_finding";
92
+ breaking_or_major: "breaking_or_major";
93
+ behavioral_change: "behavioral_change";
94
+ ecosystem_risk: "ecosystem_risk";
95
+ insufficient_evidence: "insufficient_evidence";
96
+ graph_baseline_only: "graph_baseline_only";
97
+ }>;
98
+ rank: z.ZodNumber;
99
+ packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ evidenceRefs: z.ZodArray<z.ZodString>;
101
+ context: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>>;
103
+ factors: z.ZodArray<z.ZodString>;
104
+ changeClasses: z.ZodArray<z.ZodEnum<{
105
+ tooling_maintenance: "tooling_maintenance";
106
+ test_infra: "test_infra";
107
+ runtime_patch: "runtime_patch";
108
+ runtime_upgrade: "runtime_upgrade";
109
+ security_advisory: "security_advisory";
110
+ breaking_change: "breaking_change";
111
+ ecosystem_unknown: "ecosystem_unknown";
112
+ bulk_mixed: "bulk_mixed";
113
+ removal: "removal";
114
+ }>>;
115
+ presentation: z.ZodObject<{
116
+ narrativeIntensity: z.ZodEnum<{
117
+ minimal: "minimal";
118
+ standard: "standard";
119
+ elevated: "elevated";
120
+ }>;
121
+ reachVisibility: z.ZodEnum<{
122
+ hidden: "hidden";
123
+ contextual: "contextual";
124
+ prominent: "prominent";
125
+ }>;
126
+ verificationIntensity: z.ZodEnum<{
127
+ none: "none";
128
+ advisory: "advisory";
129
+ required: "required";
130
+ }>;
131
+ insightEmissionFloor: z.ZodEnum<{
132
+ none: "none";
133
+ explain_only: "explain_only";
134
+ full: "full";
135
+ }>;
136
+ reportMode: z.ZodEnum<{
137
+ lightweight_pr_graph_baseline: "lightweight_pr_graph_baseline";
138
+ high_signal_pr: "high_signal_pr";
139
+ }>;
140
+ }, z.core.$strip>;
141
+ reasoning: z.ZodArray<z.ZodString>;
142
+ confidenceRationale: z.ZodString;
143
+ notAffectedLine: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ resolutionLine: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ outcome: z.ZodOptional<z.ZodEnum<{
146
+ cleared: "cleared";
147
+ proven_broken: "proven_broken";
148
+ bounded_verify: "bounded_verify";
149
+ abstain: "abstain";
150
+ }>>;
151
+ perPackageOutcome: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
152
+ packageName: z.ZodString;
153
+ outcome: z.ZodEnum<{
154
+ cleared: "cleared";
155
+ proven_broken: "proven_broken";
156
+ bounded_verify: "bounded_verify";
157
+ abstain: "abstain";
158
+ }>;
159
+ proofArtifactRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
+ clearanceEnvelopeRef: z.ZodOptional<z.ZodString>;
161
+ boundedVerifyTargetRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
+ }, z.core.$strip>>>;
163
+ clearanceEnvelopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
164
+ packageName: z.ZodString;
165
+ clearedDimensions: z.ZodArray<z.ZodObject<{
166
+ kind: z.ZodEnum<{
167
+ manifest: "manifest";
168
+ exports: "exports";
169
+ entrypoint: "entrypoint";
170
+ peer_dependency: "peer_dependency";
171
+ engine_constraint: "engine_constraint";
172
+ type_surface: "type_surface";
173
+ artifact_layout: "artifact_layout";
174
+ documented_breaking: "documented_breaking";
175
+ }>;
176
+ basis: z.ZodEnum<{
177
+ proof_pass: "proof_pass";
178
+ no_impact_proven: "no_impact_proven";
179
+ }>;
180
+ proofArtifactRef: z.ZodOptional<z.ZodString>;
181
+ noImpactProofRef: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strip>>;
183
+ unclearedDimensions: z.ZodArray<z.ZodObject<{
184
+ kind: z.ZodEnum<{
185
+ manifest: "manifest";
186
+ exports: "exports";
187
+ entrypoint: "entrypoint";
188
+ peer_dependency: "peer_dependency";
189
+ engine_constraint: "engine_constraint";
190
+ type_surface: "type_surface";
191
+ artifact_layout: "artifact_layout";
192
+ documented_breaking: "documented_breaking";
193
+ }>;
194
+ reason: z.ZodEnum<{
195
+ proof_failed: "proof_failed";
196
+ proof_inconclusive: "proof_inconclusive";
197
+ no_producer_available: "no_producer_available";
198
+ representative_precision_only: "representative_precision_only";
199
+ architectural_precision_only: "architectural_precision_only";
200
+ opaque_delta: "opaque_delta";
201
+ hypothesized_breaking: "hypothesized_breaking";
202
+ }>;
203
+ boundedVerifyTarget: z.ZodOptional<z.ZodObject<{
204
+ targetId: z.ZodString;
205
+ packageName: z.ZodString;
206
+ kind: z.ZodEnum<{
207
+ file_location: "file_location";
208
+ config_path: "config_path";
209
+ behavioral_scenario: "behavioral_scenario";
210
+ }>;
211
+ file: z.ZodOptional<z.ZodString>;
212
+ line: z.ZodOptional<z.ZodNumber>;
213
+ configKey: z.ZodOptional<z.ZodString>;
214
+ scenario: z.ZodOptional<z.ZodString>;
215
+ whatToVerify: z.ZodString;
216
+ whyAutomationStopped: z.ZodString;
217
+ whatProofWouldResolveIt: z.ZodString;
218
+ }, z.core.$strip>>;
219
+ }, z.core.$strip>>;
220
+ coverageClass: z.ZodEnum<{
221
+ none: "none";
222
+ full: "full";
223
+ representative: "representative";
224
+ }>;
225
+ }, z.core.$strip>>>;
226
+ boundedVerifyTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
227
+ targetId: z.ZodString;
228
+ packageName: z.ZodString;
229
+ kind: z.ZodEnum<{
230
+ file_location: "file_location";
231
+ config_path: "config_path";
232
+ behavioral_scenario: "behavioral_scenario";
233
+ }>;
234
+ file: z.ZodOptional<z.ZodString>;
235
+ line: z.ZodOptional<z.ZodNumber>;
236
+ configKey: z.ZodOptional<z.ZodString>;
237
+ scenario: z.ZodOptional<z.ZodString>;
238
+ whatToVerify: z.ZodString;
239
+ whyAutomationStopped: z.ZodString;
240
+ whatProofWouldResolveIt: z.ZodString;
241
+ }, z.core.$strip>>>;
242
+ evidenceSufficiencyVerdict: z.ZodOptional<z.ZodObject<{
243
+ sufficient: z.ZodBoolean;
244
+ clearanceEligible: z.ZodBoolean;
245
+ provenBrokenEligible: z.ZodBoolean;
246
+ boundedVerifyEligible: z.ZodBoolean;
247
+ blockers: z.ZodArray<z.ZodObject<{
248
+ kind: z.ZodEnum<{
249
+ private_package: "private_package";
250
+ opaque_mutation: "opaque_mutation";
251
+ unsupported_ecosystem: "unsupported_ecosystem";
252
+ partial_monorepo_scan: "partial_monorepo_scan";
253
+ repository_coverage_insufficient: "repository_coverage_insufficient";
254
+ package_facts_missing: "package_facts_missing";
255
+ correlation_abstained: "correlation_abstained";
256
+ proof_coverage_insufficient: "proof_coverage_insufficient";
257
+ proof_execution_failed: "proof_execution_failed";
258
+ hypothesized_breaking_unresolved: "hypothesized_breaking_unresolved";
259
+ advisory_blocking: "advisory_blocking";
260
+ conflicting_proof_results: "conflicting_proof_results";
261
+ }>;
262
+ packageName: z.ZodOptional<z.ZodString>;
263
+ detail: z.ZodOptional<z.ZodString>;
264
+ }, z.core.$strip>>;
265
+ perPackage: z.ZodRecord<z.ZodString, z.ZodObject<{
266
+ packageName: z.ZodString;
267
+ clearanceEligible: z.ZodBoolean;
268
+ provenBrokenEligible: z.ZodBoolean;
269
+ blockers: z.ZodArray<z.ZodObject<{
270
+ kind: z.ZodEnum<{
271
+ private_package: "private_package";
272
+ opaque_mutation: "opaque_mutation";
273
+ unsupported_ecosystem: "unsupported_ecosystem";
274
+ partial_monorepo_scan: "partial_monorepo_scan";
275
+ repository_coverage_insufficient: "repository_coverage_insufficient";
276
+ package_facts_missing: "package_facts_missing";
277
+ correlation_abstained: "correlation_abstained";
278
+ proof_coverage_insufficient: "proof_coverage_insufficient";
279
+ proof_execution_failed: "proof_execution_failed";
280
+ hypothesized_breaking_unresolved: "hypothesized_breaking_unresolved";
281
+ advisory_blocking: "advisory_blocking";
282
+ conflicting_proof_results: "conflicting_proof_results";
283
+ }>;
284
+ packageName: z.ZodOptional<z.ZodString>;
285
+ detail: z.ZodOptional<z.ZodString>;
286
+ }, z.core.$strip>>;
287
+ }, z.core.$strip>>;
288
+ }, z.core.$strip>>;
289
+ abstainReasons: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
+ kind: z.ZodEnum<{
291
+ private_package: "private_package";
292
+ opaque_mutation: "opaque_mutation";
293
+ unsupported_ecosystem: "unsupported_ecosystem";
294
+ partial_monorepo_scan: "partial_monorepo_scan";
295
+ no_honest_bounded_target: "no_honest_bounded_target";
296
+ insufficient_collection: "insufficient_collection";
297
+ }>;
298
+ packageName: z.ZodOptional<z.ZodString>;
299
+ detail: z.ZodOptional<z.ZodString>;
300
+ }, z.core.$strip>>>;
301
+ }, z.core.$strip>;
302
+ export type SafeParseAssessmentResult = {
303
+ ok: true;
304
+ value: Assessment;
305
+ } | {
306
+ ok: false;
307
+ issues: string[];
308
+ };
309
+ export declare function parseAssessmentOrThrow(data: unknown): Assessment;
310
+ export declare function safeParseAssessment(data: unknown): SafeParseAssessmentResult;
311
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/assessment/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAqI7C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsB3B,CAAC;AAEH,MAAM,MAAM,yBAAyB,GACjC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEpC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAShE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,yBAAyB,CAW5E"}