@mergesignal/shared 0.6.0 → 0.7.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 (49) hide show
  1. package/dist/assessmentLabels.d.ts +1 -1
  2. package/dist/assessmentLabels.d.ts.map +1 -1
  3. package/dist/assessmentPresentationUtils.d.ts +6 -0
  4. package/dist/assessmentPresentationUtils.d.ts.map +1 -0
  5. package/dist/assessmentPresentationUtils.js +17 -0
  6. package/dist/assessmentProjection.d.ts +2 -2
  7. package/dist/assessmentProjection.d.ts.map +1 -1
  8. package/dist/assessmentProjection.js +42 -13
  9. package/dist/deriveScanNarrative.d.ts.map +1 -1
  10. package/dist/deriveScanNarrative.js +20 -1
  11. package/dist/deriveScanNarrative.test.js +13 -0
  12. package/dist/engineWireRegression.test.js +1 -1
  13. package/dist/fixtures/assessmentFixtures.d.ts +2 -1
  14. package/dist/fixtures/assessmentFixtures.d.ts.map +1 -1
  15. package/dist/fixtures/assessmentFixtures.js +78 -23
  16. package/dist/fixtures/assessmentScopeFixtures.d.ts +17 -0
  17. package/dist/fixtures/assessmentScopeFixtures.d.ts.map +1 -0
  18. package/dist/fixtures/assessmentScopeFixtures.js +42 -0
  19. package/dist/index.d.ts +2 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2 -1
  22. package/dist/presentation/buildGitHubCheckRunOutput.test.js +16 -41
  23. package/dist/presentation/compose/narrativeChannels.js +1 -1
  24. package/dist/presentation/dto/assessmentPresentationFields.d.ts +1 -2
  25. package/dist/presentation/dto/assessmentPresentationFields.d.ts.map +1 -1
  26. package/dist/presentation/orchestration/buildScanPresentationBundle.d.ts.map +1 -1
  27. package/dist/presentation/orchestration/buildScanPresentationBundle.js +12 -5
  28. package/dist/presentation/orchestration/buildScanPresentationBundle.test.d.ts +2 -0
  29. package/dist/presentation/orchestration/buildScanPresentationBundle.test.d.ts.map +1 -0
  30. package/dist/presentation/orchestration/buildScanPresentationBundle.test.js +99 -0
  31. package/dist/presentation/orchestration/scanPresentationBundle.d.ts +1 -1
  32. package/dist/presentation/orchestration/scanPresentationBundle.d.ts.map +1 -1
  33. package/dist/presentation/presentation.test.js +1 -1
  34. package/dist/presentation/presentationPersonas.test.js +0 -5
  35. package/dist/presentation/profile/buildProfileFromAssessment.d.ts +1 -1
  36. package/dist/presentation/profile/buildProfileFromAssessment.d.ts.map +1 -1
  37. package/dist/presentation/profile/buildProfileFromAssessment.js +13 -2
  38. package/dist/presentation/surfaceParity.test.js +73 -5
  39. package/dist/repoIntelligenceSchema.d.ts +3 -3
  40. package/dist/scanResultSchema.d.ts +53 -4
  41. package/dist/scanResultSchema.d.ts.map +1 -1
  42. package/dist/scanResultSchema.js +1 -1
  43. package/dist/scanResultSchema.test.js +26 -0
  44. package/dist/types.d.ts +1 -1
  45. package/dist/types.d.ts.map +1 -1
  46. package/package.json +4 -2
  47. package/dist/assessmentSchema.d.ts +0 -155
  48. package/dist/assessmentSchema.d.ts.map +0 -1
  49. package/dist/assessmentSchema.js +0 -110
@@ -1,4 +1,4 @@
1
- import type { MergeConcernKind } from "./assessmentSchema.js";
1
+ import type { MergeConcernKind } from "@mergesignal/contracts";
2
2
  /** Display labels for factor tokens (mirrors engine factor-registry labels). */
3
3
  export declare const ASSESSMENT_FACTOR_LABELS: Record<string, string>;
4
4
  export declare const MERGE_CONCERN_LABELS: Record<MergeConcernKind, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"assessmentLabels.d.ts","sourceRoot":"","sources":["../src/assessmentLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmB3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAcjE,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
1
+ {"version":3,"file":"assessmentLabels.d.ts","sourceRoot":"","sources":["../src/assessmentLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmB3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAcjE,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
@@ -0,0 +1,6 @@
1
+ import type { AssessmentPresentationPublic, AssessmentPresentationWire, NarrativeIntensity } from "@mergesignal/contracts";
2
+ /** Public presentation subset — excludes engine policy fields. */
3
+ export declare function toPublicPresentation(wire: AssessmentPresentationWire): AssessmentPresentationPublic;
4
+ /** Map engine narrative intensity to presentation density (formatting only). */
5
+ export declare function narrativeIntensityToDensity(intensity: NarrativeIntensity): "minimal" | "standard" | "rich";
6
+ //# sourceMappingURL=assessmentPresentationUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessmentPresentationUtils.d.ts","sourceRoot":"","sources":["../src/assessmentPresentationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAEhC,kEAAkE;AAClE,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,0BAA0B,GAC/B,4BAA4B,CAO9B;AAED,gFAAgF;AAChF,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,kBAAkB,GAC5B,SAAS,GAAG,UAAU,GAAG,MAAM,CAIjC"}
@@ -0,0 +1,17 @@
1
+ /** Public presentation subset — excludes engine policy fields. */
2
+ export function toPublicPresentation(wire) {
3
+ return {
4
+ narrativeIntensity: wire.narrativeIntensity,
5
+ reachVisibility: wire.reachVisibility,
6
+ verificationIntensity: wire.verificationIntensity,
7
+ reportMode: wire.reportMode,
8
+ };
9
+ }
10
+ /** Map engine narrative intensity to presentation density (formatting only). */
11
+ export function narrativeIntensityToDensity(intensity) {
12
+ if (intensity === "minimal")
13
+ return "minimal";
14
+ if (intensity === "elevated")
15
+ return "rich";
16
+ return "standard";
17
+ }
@@ -1,10 +1,10 @@
1
1
  import type { ScanResult } from "./types.js";
2
2
  import { type RepoIntelligence } from "./repoIntelligenceSchema.js";
3
- import type { Assessment, AssessmentPresentationPublic, ReachVisibility } from "./assessmentSchema.js";
3
+ import type { Assessment, AssessmentPresentationPublic, ReachVisibility } from "@mergesignal/contracts";
4
4
  import type { PresentationStatus } from "./presentation/dto/types.js";
5
5
  export declare function collectVerificationFocus(result: ScanResult): string[];
6
6
  export declare function reachVisibilityLabel(visibility: ReachVisibility): string | undefined;
7
- export declare function formatAssessmentHeadline(assessment: Assessment, result: ScanResult, status: PresentationStatus): string;
7
+ export declare function formatAssessmentHeadline(assessment: Assessment, status: PresentationStatus): string;
8
8
  export declare function projectReasoningLines(result: ScanResult): string[];
9
9
  export declare function projectInsightLines(assessment: Assessment, result: ScanResult): string[];
10
10
  export declare function projectVerificationActions(assessment: Assessment, presentation: AssessmentPresentationPublic, result: ScanResult, max: number): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"assessmentProjection.d.ts","sourceRoot":"","sources":["../src/assessmentProjection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,UAAU,EACV,4BAA4B,EAC5B,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAgBrE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,eAAe,GAC1B,MAAM,GAAG,SAAS,CAWpB;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,kBAAkB,GACzB,MAAM,CAqDR;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAIlE;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,GACjB,MAAM,EAAE,CAaV;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,4BAA4B,EAC1C,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,MAAM,GACV,MAAM,EAAE,CAIV;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI,GAAG,MAAM,EAAE,CAI3E"}
1
+ {"version":3,"file":"assessmentProjection.d.ts","sourceRoot":"","sources":["../src/assessmentProjection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,UAAU,EACV,4BAA4B,EAC5B,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAgCtE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAkBrE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,eAAe,GAC1B,MAAM,GAAG,SAAS,CAWpB;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,kBAAkB,GACzB,MAAM,CAiDR;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAIlE;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,GACjB,MAAM,EAAE,CAaV;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,4BAA4B,EAC1C,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,MAAM,GACV,MAAM,EAAE,CAIV;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI,GAAG,MAAM,EAAE,CAI3E"}
@@ -2,14 +2,47 @@ import { safeParseRepoIntelligence, } from "./repoIntelligenceSchema.js";
2
2
  import { labelAssessmentFactor, MERGE_CONCERN_LABELS, } from "./assessmentLabels.js";
3
3
  import { scanSurfaceCopy } from "./scanSurfaceCopy.js";
4
4
  import { applyPostureVocabularyGuardHeadline } from "./presentation/intent/applyPostureVocabularyGuard.js";
5
+ function focalDisplayPackage(assessment) {
6
+ const anchors = assessment.reviewFocalPoint.anchors;
7
+ if (anchors.length === 0)
8
+ return "dependency";
9
+ const token = anchors[0];
10
+ if (token === "dependency_graph")
11
+ return "dependencies";
12
+ if (token.includes("+"))
13
+ return token.split("+")[0];
14
+ return token;
15
+ }
16
+ function focalHeadlinePackages(assessment) {
17
+ const focal = assessment.reviewFocalPoint;
18
+ if (focal.episodeShape === "multi_anchor") {
19
+ return focal.anchors.join(", ");
20
+ }
21
+ return focalDisplayPackage(assessment);
22
+ }
23
+ /** Copy-formatting only — fills {surface} in runtime headline template. */
24
+ function surfaceHintFromAssessment(assessment) {
25
+ const factors = assessment.factors;
26
+ const anchor = focalDisplayPackage(assessment);
27
+ if (anchor === "bullmq" || factors.includes("queue_infrastructure")) {
28
+ return "workers and queues";
29
+ }
30
+ if (anchor === "next-auth" || factors.includes("auth_infrastructure")) {
31
+ return "authentication flows";
32
+ }
33
+ return "application code";
34
+ }
5
35
  export function collectVerificationFocus(result) {
36
+ const scope = result.assessment?.verificationScope;
37
+ if (scope?.focus?.length)
38
+ return [...scope.focus];
39
+ const packages = scope?.packages ?? [];
6
40
  const parsed = safeParseRepoIntelligence(result.repoIntelligence);
7
41
  if (!parsed.ok)
8
42
  return [];
9
- const changed = new Set(result.changedPackages ?? []);
10
43
  const labels = [];
11
44
  const seen = new Set();
12
- for (const pkg of changed) {
45
+ for (const pkg of packages) {
13
46
  const row = parsed.value.packages[pkg];
14
47
  for (const focus of row?.verificationFocus ?? []) {
15
48
  const t = focus.trim();
@@ -33,13 +66,13 @@ export function reachVisibilityLabel(visibility) {
33
66
  return undefined;
34
67
  }
35
68
  }
36
- export function formatAssessmentHeadline(assessment, result, status) {
69
+ export function formatAssessmentHeadline(assessment, status) {
37
70
  const copy = scanSurfaceCopy.presentation;
38
- const runtimePkg = assessment.concerns.find((c) => c.kind === "confirmed_runtime_usage")?.packages?.[0];
39
- const primaryPkg = runtimePkg ??
40
- result.changedPackages?.[0] ??
41
- assessment.concerns.find((c) => c.packages?.length)?.packages?.[0] ??
42
- "dependency";
71
+ const primaryPkg = focalHeadlinePackages(assessment);
72
+ if (assessment.reviewFocalPoint.episodeShape === "structural") {
73
+ const headline = copy.defaultUpgradeHeadline.replace("{package}", "dependencies");
74
+ return applyPostureVocabularyGuardHeadline(headline, status, null);
75
+ }
43
76
  if (assessment.primaryConcern === "insufficient_evidence") {
44
77
  return applyPostureVocabularyGuardHeadline(copy.limitedContextHeadline, status, primaryPkg);
45
78
  }
@@ -50,11 +83,7 @@ export function formatAssessmentHeadline(assessment, result, status) {
50
83
  return applyPostureVocabularyGuardHeadline(headline, status, primaryPkg);
51
84
  }
52
85
  if (assessment.primaryConcern === "confirmed_runtime_usage") {
53
- const surface = assessment.factors.includes("queue_infrastructure")
54
- ? "workers and queues"
55
- : assessment.factors.includes("auth_infrastructure")
56
- ? "authentication flows"
57
- : "application code";
86
+ const surface = surfaceHintFromAssessment(assessment);
58
87
  const headline = copy.runtimeUpgradeHeadline
59
88
  .replace("{package}", primaryPkg)
60
89
  .replace("{surface}", surface);
@@ -1 +1 @@
1
- {"version":3,"file":"deriveScanNarrative.d.ts","sourceRoot":"","sources":["../src/deriveScanNarrative.ts"],"names":[],"mappings":"AAOA,OAAO,EAeL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAKV,UAAU,EACX,MAAM,YAAY,CAAC;AA+dpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACpC,kBAAkB,CAwGpB"}
1
+ {"version":3,"file":"deriveScanNarrative.d.ts","sourceRoot":"","sources":["../src/deriveScanNarrative.ts"],"names":[],"mappings":"AAOA,OAAO,EAeL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAKV,UAAU,EACX,MAAM,YAAY,CAAC;AAqfpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACpC,kBAAkB,CAwGpB"}
@@ -14,6 +14,25 @@ function parseChangedPackages(changed) {
14
14
  all,
15
15
  };
16
16
  }
17
+ function changedPackagesFromAssessment(result) {
18
+ const assessment = result.assessment;
19
+ const focal = assessment?.reviewFocalPoint;
20
+ // Follow-up: remove parseChangedPackages fallback after historical scan re-scan window.
21
+ if (focal?.anchors?.length && focal.anchors[0] !== "dependency_graph") {
22
+ const token = focal.anchors[0];
23
+ const primary = token.includes("+") ? token.split("+")[0] : token;
24
+ const supporting = focal.supportingPackages ?? [];
25
+ const all = [
26
+ ...new Set([primary, ...supporting, ...(result.changedPackages ?? [])]),
27
+ ].sort((a, b) => a.localeCompare(b));
28
+ return {
29
+ primary,
30
+ others: all.filter((p) => p !== primary),
31
+ all,
32
+ };
33
+ }
34
+ return parseChangedPackages(result.changedPackages);
35
+ }
17
36
  function blastLevelFromChangedCount(count) {
18
37
  if (count >= 8)
19
38
  return "wide";
@@ -356,7 +375,7 @@ export function deriveScanNarrative(result) {
356
375
  if (!result) {
357
376
  return { ...EMPTY_SCAN_NARRATIVE_FACTS };
358
377
  }
359
- const changedPackages = parseChangedPackages(result.changedPackages);
378
+ const changedPackages = changedPackagesFromAssessment(result);
360
379
  const mergePosture = mergePostureFromDecision(result.decision?.recommendation) ?? null;
361
380
  const riskIndex = typeof result.totalScore === "number" && Number.isFinite(result.totalScore)
362
381
  ? result.totalScore
@@ -3,6 +3,7 @@ import { deriveScanNarrative } from "./deriveScanNarrative.js";
3
3
  import { legacyEngineRepoIntelligenceJwt } from "./fixtures/legacyEngineRepoIntelligence.js";
4
4
  import { fixtureRepoIntelligenceFastify, fixtureRepoIntelligenceMultiPackage, fixtureRepoIntelligenceTypescript, } from "./fixtures/repoIntelligenceFixtures.js";
5
5
  import { analysisPreparationWithInvalidRepoIntel, analysisPreparationWithValidRepoIntel, } from "./fixtures/repoIntelligenceTestHelpers.js";
6
+ import { assessmentFastifyRuntime } from "./fixtures/assessmentFixtures.js";
6
7
  const baseResult = {
7
8
  totalScore: 10,
8
9
  layerScores: {
@@ -64,6 +65,18 @@ describe("deriveScanNarrative", () => {
64
65
  expect(facts.affectedAreas.map((a) => a.id)).toContain("api");
65
66
  expect(facts.hotspots[0]?.source).toBe("code");
66
67
  });
68
+ it("changedPackages.primary follows reviewFocalPoint anchor, not changedPackages order", () => {
69
+ const result = {
70
+ ...baseResult,
71
+ changedPackages: ["typescript", "fastify"],
72
+ assessment: assessmentFastifyRuntime,
73
+ analysisPreparation: analysisPreparationWithValidRepoIntel(),
74
+ repoIntelligence: fixtureRepoIntelligenceFastify,
75
+ };
76
+ const facts = deriveScanNarrative(result);
77
+ expect(facts.changedPackages.primary).toBe("fastify");
78
+ expect(result.changedPackages?.[0]).toBe("typescript");
79
+ });
67
80
  it("prefers changed-scope insights for reviewer guidance ordering", () => {
68
81
  const result = {
69
82
  ...baseResult,
@@ -70,8 +70,8 @@ describe("engine wire regression (canonical fixtures)", () => {
70
70
  const facts = deriveScanNarrative(result);
71
71
  expect(facts.availability.mode).toBe("pr_intelligence");
72
72
  expect(facts.packageUsage.map((u) => u.packageName)).toEqual([
73
- "lodash",
74
73
  "axios",
74
+ "lodash",
75
75
  ]);
76
76
  });
77
77
  });
@@ -1,4 +1,4 @@
1
- import type { Assessment } from "../assessmentSchema.js";
1
+ import type { Assessment } from "@mergesignal/contracts";
2
2
  export declare const assessmentTypescriptPatch: Assessment;
3
3
  export declare const assessmentPrettier: Assessment;
4
4
  export declare const assessmentEslint: Assessment;
@@ -6,6 +6,7 @@ export declare const assessmentVitest: Assessment;
6
6
  export declare const assessmentFastifyRuntime: Assessment;
7
7
  export declare const assessmentBullmq: Assessment;
8
8
  export declare const assessmentNextAuth: Assessment;
9
+ /** PR #26 — focal fastify despite typescript in changedPackages order. */
9
10
  export declare const assessmentMixedTypescriptFastify: Assessment;
10
11
  export declare const assessmentLimitedContext: Assessment;
11
12
  export declare const assessmentStub: Assessment;
@@ -1 +1 @@
1
- {"version":3,"file":"assessmentFixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/assessmentFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAkBzD,eAAO,MAAM,yBAAyB,EAAE,UAQvC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAGhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAE9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAQ9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,UAetC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAmB9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAehC,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,UAe9C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,UAoBtC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAoB5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAcnC,CAAC"}
1
+ {"version":3,"file":"assessmentFixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/assessmentFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA0BzD,eAAO,MAAM,yBAAyB,EAAE,UAevC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAUhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAS9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAe9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,UAyBtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UA6B9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAyBhC,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,gCAAgC,EAAE,UAgC9C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,UA2BtC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UA6B5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAqBnC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { emptyReachScope, emptyVerificationScope, minimalReviewFocalPoint, reachScopeFor, verificationScopeFor, withAssessmentScope, } from "./assessmentScopeFixtures.js";
1
2
  const safeToolingPresentation = {
2
3
  narrativeIntensity: "minimal",
3
4
  reachVisibility: "hidden",
@@ -12,7 +13,7 @@ const runtimeReviewPresentation = {
12
13
  insightEmissionFloor: "full",
13
14
  reportMode: "high_signal_pr",
14
15
  };
15
- export const assessmentTypescriptPatch = {
16
+ export const assessmentTypescriptPatch = withAssessmentScope({
16
17
  posture: "safe",
17
18
  confidence: "high",
18
19
  primaryConcern: null,
@@ -20,15 +21,27 @@ export const assessmentTypescriptPatch = {
20
21
  factors: ["tooling_maintenance"],
21
22
  changeClasses: ["tooling_maintenance"],
22
23
  presentation: safeToolingPresentation,
23
- };
24
- export const assessmentPrettier = {
24
+ }, {
25
+ reviewFocalPoint: minimalReviewFocalPoint(["typescript"]),
26
+ reachScope: emptyReachScope(),
27
+ verificationScope: emptyVerificationScope(),
28
+ });
29
+ export const assessmentPrettier = withAssessmentScope({
25
30
  ...assessmentTypescriptPatch,
26
31
  factors: ["tooling_maintenance"],
27
- };
28
- export const assessmentEslint = {
32
+ }, {
33
+ reviewFocalPoint: minimalReviewFocalPoint(["prettier"]),
34
+ reachScope: emptyReachScope(),
35
+ verificationScope: emptyVerificationScope(),
36
+ });
37
+ export const assessmentEslint = withAssessmentScope({
29
38
  ...assessmentTypescriptPatch,
30
- };
31
- export const assessmentVitest = {
39
+ }, {
40
+ reviewFocalPoint: minimalReviewFocalPoint(["eslint"]),
41
+ reachScope: emptyReachScope(),
42
+ verificationScope: emptyVerificationScope(),
43
+ });
44
+ export const assessmentVitest = withAssessmentScope({
32
45
  posture: "safe",
33
46
  confidence: "high",
34
47
  primaryConcern: null,
@@ -36,8 +49,12 @@ export const assessmentVitest = {
36
49
  factors: ["test_infra_change"],
37
50
  changeClasses: ["test_infra"],
38
51
  presentation: safeToolingPresentation,
39
- };
40
- export const assessmentFastifyRuntime = {
52
+ }, {
53
+ reviewFocalPoint: minimalReviewFocalPoint(["vitest"]),
54
+ reachScope: emptyReachScope(),
55
+ verificationScope: emptyVerificationScope(),
56
+ });
57
+ export const assessmentFastifyRuntime = withAssessmentScope({
41
58
  posture: "needs_review",
42
59
  confidence: "medium",
43
60
  primaryConcern: "confirmed_runtime_usage",
@@ -52,8 +69,12 @@ export const assessmentFastifyRuntime = {
52
69
  factors: ["confirmed_runtime_usage", "http_framework_infrastructure"],
53
70
  changeClasses: ["runtime_upgrade"],
54
71
  presentation: runtimeReviewPresentation,
55
- };
56
- export const assessmentBullmq = {
72
+ }, {
73
+ reviewFocalPoint: minimalReviewFocalPoint(["fastify"]),
74
+ reachScope: reachScopeFor(["fastify"]),
75
+ verificationScope: verificationScopeFor(["fastify"], ["routes", "middleware"]),
76
+ });
77
+ export const assessmentBullmq = withAssessmentScope({
57
78
  posture: "needs_review",
58
79
  confidence: "medium",
59
80
  primaryConcern: "confirmed_runtime_usage",
@@ -72,8 +93,12 @@ export const assessmentBullmq = {
72
93
  ],
73
94
  changeClasses: ["runtime_upgrade"],
74
95
  presentation: runtimeReviewPresentation,
75
- };
76
- export const assessmentNextAuth = {
96
+ }, {
97
+ reviewFocalPoint: minimalReviewFocalPoint(["bullmq"]),
98
+ reachScope: reachScopeFor(["bullmq"]),
99
+ verificationScope: verificationScopeFor(["bullmq"], ["workers", "queue", "serialization"]),
100
+ });
101
+ export const assessmentNextAuth = withAssessmentScope({
77
102
  posture: "needs_review",
78
103
  confidence: "medium",
79
104
  primaryConcern: "confirmed_runtime_usage",
@@ -88,8 +113,13 @@ export const assessmentNextAuth = {
88
113
  factors: ["confirmed_runtime_usage", "auth_infrastructure"],
89
114
  changeClasses: ["runtime_upgrade"],
90
115
  presentation: runtimeReviewPresentation,
91
- };
92
- export const assessmentMixedTypescriptFastify = {
116
+ }, {
117
+ reviewFocalPoint: minimalReviewFocalPoint(["next-auth"]),
118
+ reachScope: reachScopeFor(["next-auth"]),
119
+ verificationScope: verificationScopeFor(["next-auth"], ["auth_flow", "session", "routes"]),
120
+ });
121
+ /** PR #26 — focal fastify despite typescript in changedPackages order. */
122
+ export const assessmentMixedTypescriptFastify = withAssessmentScope({
93
123
  posture: "needs_review",
94
124
  confidence: "medium",
95
125
  primaryConcern: "confirmed_runtime_usage",
@@ -101,11 +131,22 @@ export const assessmentMixedTypescriptFastify = {
101
131
  evidenceRefs: ["fixture:fastify"],
102
132
  },
103
133
  ],
104
- factors: ["confirmed_runtime_usage", "http_framework_infrastructure"],
134
+ factors: [
135
+ "confirmed_runtime_usage",
136
+ "queue_infrastructure",
137
+ "http_framework_infrastructure",
138
+ ],
105
139
  changeClasses: ["runtime_upgrade", "tooling_maintenance"],
106
140
  presentation: runtimeReviewPresentation,
107
- };
108
- export const assessmentLimitedContext = {
141
+ }, {
142
+ reviewFocalPoint: minimalReviewFocalPoint(["fastify"], {
143
+ episodeShape: "parent_supporting",
144
+ supportingPackages: ["bullmq", "next-auth"],
145
+ }),
146
+ reachScope: reachScopeFor(["bullmq", "fastify", "next-auth"]),
147
+ verificationScope: verificationScopeFor(["bullmq", "fastify", "next-auth"], ["workers", "queue", "routes", "middleware"]),
148
+ });
149
+ export const assessmentLimitedContext = withAssessmentScope({
109
150
  posture: "needs_review",
110
151
  confidence: "low",
111
152
  primaryConcern: "insufficient_evidence",
@@ -125,8 +166,12 @@ export const assessmentLimitedContext = {
125
166
  insightEmissionFloor: "none",
126
167
  reportMode: "high_signal_pr",
127
168
  },
128
- };
129
- export const assessmentStub = {
169
+ }, {
170
+ reviewFocalPoint: minimalReviewFocalPoint(["lodash"]),
171
+ reachScope: emptyReachScope(),
172
+ verificationScope: emptyVerificationScope(),
173
+ });
174
+ export const assessmentStub = withAssessmentScope({
130
175
  posture: "needs_review",
131
176
  confidence: "low",
132
177
  primaryConcern: "insufficient_evidence",
@@ -146,8 +191,14 @@ export const assessmentStub = {
146
191
  insightEmissionFloor: "none",
147
192
  reportMode: "high_signal_pr",
148
193
  },
149
- };
150
- export const assessmentUnknownSafe = {
194
+ }, {
195
+ reviewFocalPoint: minimalReviewFocalPoint(["dependency_graph"], {
196
+ episodeShape: "structural",
197
+ }),
198
+ reachScope: emptyReachScope(),
199
+ verificationScope: emptyVerificationScope(),
200
+ });
201
+ export const assessmentUnknownSafe = withAssessmentScope({
151
202
  posture: "safe",
152
203
  confidence: "medium",
153
204
  primaryConcern: null,
@@ -161,4 +212,8 @@ export const assessmentUnknownSafe = {
161
212
  insightEmissionFloor: "explain_only",
162
213
  reportMode: "high_signal_pr",
163
214
  },
164
- };
215
+ }, {
216
+ reviewFocalPoint: minimalReviewFocalPoint(["opaque-pkg"]),
217
+ reachScope: emptyReachScope(),
218
+ verificationScope: emptyVerificationScope(),
219
+ });
@@ -0,0 +1,17 @@
1
+ import type { Assessment, FocalElectionDimension, ReachScope, ReviewEpisodeShape, ReviewFocalPoint, VerificationScope } from "@mergesignal/contracts";
2
+ export declare function minimalReviewFocalPoint(anchors: string[], opts?: {
3
+ episodeShape?: ReviewEpisodeShape;
4
+ supportingPackages?: string[];
5
+ decidedBy?: FocalElectionDimension;
6
+ }): ReviewFocalPoint;
7
+ export declare function emptyReachScope(): ReachScope;
8
+ export declare function reachScopeFor(packages: string[], maxBucket?: ReachScope["maxBucket"]): ReachScope;
9
+ export declare function emptyVerificationScope(): VerificationScope;
10
+ export declare function verificationScopeFor(packages: string[], focus?: string[]): VerificationScope;
11
+ /** Attach focal/scope fields required by assessmentSchema ABI 2. */
12
+ export declare function withAssessmentScope(assessment: Omit<Assessment, "reviewFocalPoint" | "reachScope" | "verificationScope">, scope: {
13
+ reviewFocalPoint: ReviewFocalPoint;
14
+ reachScope?: ReachScope;
15
+ verificationScope?: VerificationScope;
16
+ }): Assessment;
17
+ //# sourceMappingURL=assessmentScopeFixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessmentScopeFixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/assessmentScopeFixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,CAAC,EAAE;IACL,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC,GACA,gBAAgB,CAoBlB;AAED,wBAAgB,eAAe,IAAI,UAAU,CAE5C;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,GAAE,UAAU,CAAC,WAAW,CAAc,GAC9C,UAAU,CAEZ;AAED,wBAAgB,sBAAsB,IAAI,iBAAiB,CAE1D;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,GAAE,MAAM,EAAO,GACnB,iBAAiB,CAEnB;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,IAAI,CACd,UAAU,EACV,kBAAkB,GAAG,YAAY,GAAG,mBAAmB,CACxD,EACD,KAAK,EAAE;IACL,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC,GACA,UAAU,CAOZ"}
@@ -0,0 +1,42 @@
1
+ export function minimalReviewFocalPoint(anchors, opts) {
2
+ const episodeShape = opts?.episodeShape ?? "single_anchor";
3
+ const decidedBy = opts?.decidedBy ?? "reach";
4
+ const primary = anchors[0] ?? "dependency";
5
+ return {
6
+ episodeShape,
7
+ anchors,
8
+ supportingPackages: opts?.supportingPackages,
9
+ election: {
10
+ grounding: [
11
+ {
12
+ packageName: primary,
13
+ reason: "fixture",
14
+ decidedBy,
15
+ evidenceRefs: ["fixture:focal"],
16
+ },
17
+ ],
18
+ exclusions: [],
19
+ },
20
+ };
21
+ }
22
+ export function emptyReachScope() {
23
+ return { packages: [], maxBucket: "very_low" };
24
+ }
25
+ export function reachScopeFor(packages, maxBucket = "moderate") {
26
+ return { packages, maxBucket };
27
+ }
28
+ export function emptyVerificationScope() {
29
+ return { packages: [], focus: [] };
30
+ }
31
+ export function verificationScopeFor(packages, focus = []) {
32
+ return { packages, focus };
33
+ }
34
+ /** Attach focal/scope fields required by assessmentSchema ABI 2. */
35
+ export function withAssessmentScope(assessment, scope) {
36
+ return {
37
+ ...assessment,
38
+ reviewFocalPoint: scope.reviewFocalPoint,
39
+ reachScope: scope.reachScope ?? emptyReachScope(),
40
+ verificationScope: scope.verificationScope ?? emptyVerificationScope(),
41
+ };
42
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from "./types.js";
2
- export * from "./assessmentSchema.js";
3
2
  export * from "./assessmentLabels.js";
4
3
  export * from "./assessmentProjection.js";
5
4
  export * from "./formatInsight.js";
@@ -29,4 +28,6 @@ export * from "./trustedScanGuards.js";
29
28
  export * from "./actionsStepSummary.js";
30
29
  export * from "./productMessaging.js";
31
30
  export * from "./presentation/index.js";
31
+ export { emptyReachScope, emptyVerificationScope, minimalReviewFocalPoint, reachScopeFor, verificationScopeFor, withAssessmentScope, } from "./fixtures/assessmentScopeFixtures.js";
32
+ export { assessmentStub, assessmentTypescriptPatch, } from "./fixtures/assessmentFixtures.js";
32
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,wCAAwC,EAAE,MAAM,6BAA6B,CAAC;AACvF,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,wCAAwC,EAAE,MAAM,6BAA6B,CAAC;AACvF,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from "./types.js";
2
- export * from "./assessmentSchema.js";
3
2
  export * from "./assessmentLabels.js";
4
3
  export * from "./assessmentProjection.js";
5
4
  export * from "./formatInsight.js";
@@ -29,3 +28,5 @@ export * from "./trustedScanGuards.js";
29
28
  export * from "./actionsStepSummary.js";
30
29
  export * from "./productMessaging.js";
31
30
  export * from "./presentation/index.js";
31
+ export { emptyReachScope, emptyVerificationScope, minimalReviewFocalPoint, reachScopeFor, verificationScopeFor, withAssessmentScope, } from "./fixtures/assessmentScopeFixtures.js";
32
+ export { assessmentStub, assessmentTypescriptPatch, } from "./fixtures/assessmentFixtures.js";
@@ -1,22 +1,10 @@
1
1
  import { describe, expect, it } from "vitest";
2
+ import { assessmentFastifyRuntime, assessmentTypescriptPatch, } from "../fixtures/assessmentFixtures.js";
3
+ import { withAssessmentScope, minimalReviewFocalPoint, emptyReachScope, emptyVerificationScope, reachScopeFor, } from "../fixtures/assessmentScopeFixtures.js";
2
4
  import { buildScanPresentationBundle, presentDashboardCard } from "./index.js";
3
5
  import { buildGitHubCheckRunOutput } from "./buildGitHubCheckRunOutput.js";
4
- const safeAssessment = {
5
- posture: "safe",
6
- confidence: "high",
7
- primaryConcern: null,
8
- concerns: [],
9
- factors: ["tooling_maintenance"],
10
- changeClasses: ["tooling_maintenance"],
11
- presentation: {
12
- narrativeIntensity: "minimal",
13
- reachVisibility: "hidden",
14
- verificationIntensity: "advisory",
15
- insightEmissionFloor: "none",
16
- reportMode: "high_signal_pr",
17
- },
18
- };
19
- const baselineAssessment = {
6
+ const safeAssessment = assessmentTypescriptPatch;
7
+ const baselineAssessment = withAssessmentScope({
20
8
  posture: "safe",
21
9
  confidence: "medium",
22
10
  primaryConcern: "graph_baseline_only",
@@ -36,30 +24,13 @@ const baselineAssessment = {
36
24
  insightEmissionFloor: "none",
37
25
  reportMode: "lightweight_pr_graph_baseline",
38
26
  },
39
- };
40
- const needsReviewAssessment = {
41
- posture: "needs_review",
42
- confidence: "medium",
43
- primaryConcern: "confirmed_runtime_usage",
44
- concerns: [
45
- {
46
- kind: "confirmed_runtime_usage",
47
- rank: 1,
48
- packages: ["fastify"],
49
- evidenceRefs: ["fixture:fastify"],
50
- },
51
- ],
52
- factors: ["confirmed_runtime_usage", "http_framework_infrastructure"],
53
- changeClasses: ["runtime_upgrade"],
54
- presentation: {
55
- narrativeIntensity: "elevated",
56
- reachVisibility: "prominent",
57
- verificationIntensity: "required",
58
- insightEmissionFloor: "full",
59
- reportMode: "high_signal_pr",
60
- },
61
- };
62
- const riskyAssessment = {
27
+ }, {
28
+ reviewFocalPoint: minimalReviewFocalPoint(["@types/minimist"]),
29
+ reachScope: emptyReachScope(),
30
+ verificationScope: emptyVerificationScope(),
31
+ });
32
+ const needsReviewAssessment = assessmentFastifyRuntime;
33
+ const riskyAssessment = withAssessmentScope({
63
34
  posture: "risky",
64
35
  confidence: "high",
65
36
  primaryConcern: "breaking_or_major",
@@ -80,7 +51,11 @@ const riskyAssessment = {
80
51
  insightEmissionFloor: "full",
81
52
  reportMode: "high_signal_pr",
82
53
  },
83
- };
54
+ }, {
55
+ reviewFocalPoint: minimalReviewFocalPoint(["react"]),
56
+ reachScope: reachScopeFor(["react"], "high"),
57
+ verificationScope: emptyVerificationScope(),
58
+ });
84
59
  function assertNoLegacyCheckRunMarkers(summary) {
85
60
  expect(summary).not.toContain("Risk index");
86
61
  expect(summary).not.toContain("Layer scores");
@@ -19,7 +19,7 @@ export function buildNarrativeChannels(bundle) {
19
19
  const { assessment, presentation, profile, result } = bundle;
20
20
  const reachLabel = reachVisibilityLabel(presentation.reachVisibility);
21
21
  return {
22
- headline: formatAssessmentHeadline(assessment, result, profile.status),
22
+ headline: formatAssessmentHeadline(assessment, profile.status),
23
23
  limitedContextMessage: profile.degradedMessage ?? undefined,
24
24
  reachLabel,
25
25
  insights: projectInsightLines(assessment, result),
@@ -1,5 +1,4 @@
1
- import type { MergeConcernKind } from "../../assessmentSchema.js";
2
- import type { NarrativeIntensity, ReachVisibility } from "../../assessmentSchema.js";
1
+ import type { MergeConcernKind, NarrativeIntensity, ReachVisibility } from "@mergesignal/contracts";
3
2
  /** Assessment-aligned fields projected identically across surfaces. */
4
3
  export type AssessmentPresentationFields = {
5
4
  posture: "safe" | "needs_review" | "risky";
@@ -1 +1 @@
1
- {"version":3,"file":"assessmentPresentationFields.d.ts","sourceRoot":"","sources":["../../../src/presentation/dto/assessmentPresentationFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAEhB,MAAM,2BAA2B,CAAC;AAEnC,uEAAuE;AACvE,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;IAC3C,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"assessmentPresentationFields.d.ts","sourceRoot":"","sources":["../../../src/presentation/dto/assessmentPresentationFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAEhC,uEAAuE;AACvE,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;IAC3C,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildScanPresentationBundle.d.ts","sourceRoot":"","sources":["../../../src/presentation/orchestration/buildScanPresentationBundle.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,sBAAsB,GAAG,IAAI,CAsB/B"}
1
+ {"version":3,"file":"buildScanPresentationBundle.d.ts","sourceRoot":"","sources":["../../../src/presentation/orchestration/buildScanPresentationBundle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,MAAM,gCAAgC,GAAG;IAC7C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,sBAAsB,GAAG,IAAI,CA4B/B"}