@mergesignal/shared 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deriveScanNarrative.d.ts.map +1 -1
- package/dist/deriveScanNarrative.js +41 -8
- package/dist/deriveScanNarrative.test.js +4 -0
- package/dist/engineWireRegression.test.js +2 -2
- package/dist/fixtures/repoIntelligenceFixtures.d.ts.map +1 -1
- package/dist/fixtures/repoIntelligenceFixtures.js +8 -1
- package/dist/narrativeParity.test.js +3 -4
- package/dist/presentation/compose/narrativeChannels.d.ts +17 -0
- package/dist/presentation/compose/narrativeChannels.d.ts.map +1 -0
- package/dist/presentation/compose/narrativeChannels.js +75 -0
- package/dist/presentation/compose/narrativeChannels.test.d.ts +2 -0
- package/dist/presentation/compose/narrativeChannels.test.d.ts.map +1 -0
- package/dist/presentation/compose/narrativeChannels.test.js +42 -0
- package/dist/presentation/compose/narrativeCompose.d.ts +1 -0
- package/dist/presentation/compose/narrativeCompose.d.ts.map +1 -1
- package/dist/presentation/compose/narrativeCompose.js +17 -102
- package/dist/presentation/dto/dashboardCardPresentation.d.ts +29 -0
- package/dist/presentation/dto/dashboardCardPresentation.d.ts.map +1 -0
- package/dist/presentation/dto/scanDetailsPresentation.d.ts +2 -0
- package/dist/presentation/dto/scanDetailsPresentation.d.ts.map +1 -1
- package/dist/presentation/dto/types.d.ts +0 -9
- package/dist/presentation/dto/types.d.ts.map +1 -1
- package/dist/presentation/dto/types.js +1 -22
- package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts +2 -0
- package/dist/presentation/fixtures/dashboardCardGolden.test.d.ts.map +1 -0
- package/dist/presentation/fixtures/dashboardCardGolden.test.js +31 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts +11 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.d.ts.map +1 -0
- package/dist/presentation/fixtures/presentationPersonaFixtures.js +197 -0
- package/dist/presentation/index.d.ts +8 -5
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +3 -3
- package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts +5 -0
- package/dist/presentation/intent/applyPostureVocabularyGuard.d.ts.map +1 -0
- package/dist/presentation/intent/applyPostureVocabularyGuard.js +44 -0
- package/dist/presentation/intent/derivePresentationInterpretation.d.ts +4 -0
- package/dist/presentation/intent/derivePresentationInterpretation.d.ts.map +1 -0
- package/dist/presentation/intent/derivePresentationInterpretation.js +202 -0
- package/dist/presentation/intent/formatPresentationCopy.d.ts +8 -0
- package/dist/presentation/intent/formatPresentationCopy.d.ts.map +1 -0
- package/dist/presentation/intent/formatPresentationCopy.js +140 -0
- package/dist/presentation/intent/packageDisplayName.d.ts +4 -0
- package/dist/presentation/intent/packageDisplayName.d.ts.map +1 -0
- package/dist/presentation/intent/packageDisplayName.js +17 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.d.ts +2 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.d.ts.map +1 -0
- package/dist/presentation/intent/postureVocabularyGuard.test.js +23 -0
- package/dist/presentation/intent/presentationIntent.d.ts +14 -0
- package/dist/presentation/intent/presentationIntent.d.ts.map +1 -0
- package/dist/presentation/intent/presentationIntent.js +1 -0
- package/dist/presentation/intent/presentationIntent.test.d.ts +2 -0
- package/dist/presentation/intent/presentationIntent.test.d.ts.map +1 -0
- package/dist/presentation/intent/presentationIntent.test.js +29 -0
- package/dist/presentation/intent/verificationFocusLabels.d.ts +2 -0
- package/dist/presentation/intent/verificationFocusLabels.d.ts.map +1 -0
- package/dist/presentation/intent/verificationFocusLabels.js +45 -0
- package/dist/presentation/orchestration/buildScanCardPresentation.d.ts +2 -2
- package/dist/presentation/orchestration/buildScanCardPresentation.d.ts.map +1 -1
- package/dist/presentation/orchestration/buildScanCardPresentation.js +5 -6
- package/dist/presentation/presentation.test.js +18 -17
- package/dist/presentation/presentationPersonas.test.d.ts +2 -0
- package/dist/presentation/presentationPersonas.test.d.ts.map +1 -0
- package/dist/presentation/presentationPersonas.test.js +167 -0
- package/dist/presentation/presenters/presentCliScanSummary.d.ts.map +1 -1
- package/dist/presentation/presenters/presentCliScanSummary.js +2 -2
- package/dist/presentation/presenters/presentDashboardCard.d.ts +5 -0
- package/dist/presentation/presenters/presentDashboardCard.d.ts.map +1 -0
- package/dist/presentation/presenters/presentDashboardCard.js +117 -0
- package/dist/presentation/presenters/presentGitHubCheckRun.d.ts.map +1 -1
- package/dist/presentation/presenters/presentGitHubCheckRun.js +2 -2
- package/dist/presentation/presenters/presentScanDetails.d.ts.map +1 -1
- package/dist/presentation/presenters/presentScanDetails.js +13 -4
- package/dist/presentation/profile/derivePresentationProfile.d.ts.map +1 -1
- package/dist/presentation/profile/derivePresentationProfile.js +18 -27
- package/dist/presentation/profile/presentationProfile.d.ts +2 -0
- package/dist/presentation/profile/presentationProfile.d.ts.map +1 -1
- package/dist/repoIntelligenceSchema.d.ts +1 -1
- package/dist/scanCardSummary.d.ts +3 -4
- package/dist/scanCardSummary.d.ts.map +1 -1
- package/dist/scanCardSummary.test.js +16 -16
- package/dist/scanNarrativeFacts.d.ts +31 -7
- package/dist/scanNarrativeFacts.d.ts.map +1 -1
- package/dist/scanNarrativeFacts.js +1 -0
- package/dist/scanSurfaceCopy.d.ts +8 -0
- package/dist/scanSurfaceCopy.d.ts.map +1 -1
- package/dist/scanSurfaceCopy.js +8 -0
- package/package.json +1 -1
- package/dist/presentation/dto/scanCardPresentation.d.ts +0 -25
- package/dist/presentation/dto/scanCardPresentation.d.ts.map +0 -1
- package/dist/presentation/presenters/presentPipelineScanCard.d.ts +0 -3
- package/dist/presentation/presenters/presentPipelineScanCard.d.ts.map +0 -1
- package/dist/presentation/presenters/presentPipelineScanCard.js +0 -23
- package/dist/presentation/presenters/presentScanCard.d.ts +0 -7
- package/dist/presentation/presenters/presentScanCard.d.ts.map +0 -1
- package/dist/presentation/presenters/presentScanCard.js +0 -43
- /package/dist/presentation/dto/{scanCardPresentation.js → dashboardCardPresentation.js} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DashboardCardPresentation } from "../dto/dashboardCardPresentation.js";
|
|
2
|
+
import type { ScanPresentationBundle } from "../orchestration/scanPresentationBundle.js";
|
|
3
|
+
export declare function presentDashboardCard(bundle: ScanPresentationBundle): DashboardCardPresentation;
|
|
4
|
+
export declare function presentPipelineDashboardCard(pipelineStatus: "queued" | "running" | "failed"): DashboardCardPresentation;
|
|
5
|
+
//# sourceMappingURL=presentDashboardCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentDashboardCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentDashboardCard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAErF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAmEzF,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,sBAAsB,GAC7B,yBAAyB,CA6C3B;AAED,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAC9C,yBAAyB,CAqB3B"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { MERGE_POSTURE_LABEL, MERGE_POSTURE_SORT_ORDER, } from "../../riskVocabulary.js";
|
|
2
|
+
import { normalizeGeneratedText, normalizeGeneratedTextNullable, } from "../../normalizeGeneratedText.js";
|
|
3
|
+
import { scanSurfaceCopy } from "../../scanSurfaceCopy.js";
|
|
4
|
+
import { buildNarrativeChannels } from "../compose/narrativeChannels.js";
|
|
5
|
+
const INSIGHTS_CAP = 3;
|
|
6
|
+
const SCOPE_AREAS_CAP = 2;
|
|
7
|
+
const EVIDENCE_CAP = 2;
|
|
8
|
+
const VERIFICATION_CAP = 2;
|
|
9
|
+
function formatVerificationLine(action) {
|
|
10
|
+
const trimmed = action.trim();
|
|
11
|
+
if (/^verify\b/i.test(trimmed))
|
|
12
|
+
return trimmed;
|
|
13
|
+
return `Verify ${trimmed}`;
|
|
14
|
+
}
|
|
15
|
+
function deriveLayout(channels, profile) {
|
|
16
|
+
const bodyCount = channels.insights.length +
|
|
17
|
+
channels.scopeAreas.length +
|
|
18
|
+
channels.evidence.length +
|
|
19
|
+
channels.verification.length;
|
|
20
|
+
if (profile.status === "safe" &&
|
|
21
|
+
profile.density === "minimal" &&
|
|
22
|
+
bodyCount === 0 &&
|
|
23
|
+
!channels.limitedContextMessage) {
|
|
24
|
+
return "quiet";
|
|
25
|
+
}
|
|
26
|
+
if (profile.density === "rich") {
|
|
27
|
+
return "expanded";
|
|
28
|
+
}
|
|
29
|
+
return "standard";
|
|
30
|
+
}
|
|
31
|
+
function normalizeDashboardCard(card) {
|
|
32
|
+
return {
|
|
33
|
+
...card,
|
|
34
|
+
headline: normalizeGeneratedText(card.headline),
|
|
35
|
+
limitedContext: card.limitedContext
|
|
36
|
+
? {
|
|
37
|
+
message: normalizeGeneratedText(card.limitedContext.message),
|
|
38
|
+
}
|
|
39
|
+
: undefined,
|
|
40
|
+
insights: card.insights.map((i) => normalizeGeneratedText(i)),
|
|
41
|
+
scopeAreas: card.scopeAreas?.map((a) => normalizeGeneratedText(a)),
|
|
42
|
+
verification: card.verification.map((v) => normalizeGeneratedText(v)),
|
|
43
|
+
evidenceChips: card.evidenceChips?.map((e) => ({
|
|
44
|
+
label: normalizeGeneratedText(e.label),
|
|
45
|
+
value: normalizeGeneratedText(e.value),
|
|
46
|
+
})),
|
|
47
|
+
pipeline: card.pipeline
|
|
48
|
+
? {
|
|
49
|
+
...card.pipeline,
|
|
50
|
+
headline: normalizeGeneratedText(card.pipeline.headline),
|
|
51
|
+
subheadline: normalizeGeneratedTextNullable(card.pipeline.subheadline) ??
|
|
52
|
+
undefined,
|
|
53
|
+
}
|
|
54
|
+
: undefined,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function presentDashboardCard(bundle) {
|
|
58
|
+
const { facts, profile } = bundle;
|
|
59
|
+
const channels = buildNarrativeChannels(bundle);
|
|
60
|
+
const posture = profile.status;
|
|
61
|
+
const riskIndex = facts.riskIndex != null && Number.isFinite(facts.riskIndex)
|
|
62
|
+
? facts.riskIndex
|
|
63
|
+
: -1;
|
|
64
|
+
const insights = channels.insights.slice(0, INSIGHTS_CAP);
|
|
65
|
+
const scopeAreas = channels.scopeAreas.length > 0
|
|
66
|
+
? channels.scopeAreas.slice(0, SCOPE_AREAS_CAP)
|
|
67
|
+
: undefined;
|
|
68
|
+
const evidenceChips = channels.evidence.length > 0
|
|
69
|
+
? channels.evidence.slice(0, EVIDENCE_CAP)
|
|
70
|
+
: undefined;
|
|
71
|
+
const verification = channels.verification
|
|
72
|
+
.slice(0, VERIFICATION_CAP)
|
|
73
|
+
.map(formatVerificationLine);
|
|
74
|
+
const card = {
|
|
75
|
+
verdict: {
|
|
76
|
+
posture,
|
|
77
|
+
postureLabel: MERGE_POSTURE_LABEL[posture],
|
|
78
|
+
scopeLabel: channels.reachLabel,
|
|
79
|
+
},
|
|
80
|
+
headline: channels.headline,
|
|
81
|
+
limitedContext: channels.limitedContextMessage
|
|
82
|
+
? { message: channels.limitedContextMessage }
|
|
83
|
+
: undefined,
|
|
84
|
+
insights,
|
|
85
|
+
scopeAreas,
|
|
86
|
+
verification,
|
|
87
|
+
evidenceChips,
|
|
88
|
+
layout: deriveLayout(channels, profile),
|
|
89
|
+
detailActionLabel: scanSurfaceCopy.presentation.actionLabelReview,
|
|
90
|
+
sortKey: {
|
|
91
|
+
postureRank: MERGE_POSTURE_SORT_ORDER[posture],
|
|
92
|
+
riskIndex,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
return normalizeDashboardCard(card);
|
|
96
|
+
}
|
|
97
|
+
export function presentPipelineDashboardCard(pipelineStatus) {
|
|
98
|
+
const isRunning = pipelineStatus === "queued" || pipelineStatus === "running";
|
|
99
|
+
const headline = isRunning
|
|
100
|
+
? scanSurfaceCopy.pipeline.scanRunning
|
|
101
|
+
: scanSurfaceCopy.pipeline.analysisIncomplete;
|
|
102
|
+
return normalizeDashboardCard({
|
|
103
|
+
pipeline: {
|
|
104
|
+
status: pipelineStatus,
|
|
105
|
+
headline,
|
|
106
|
+
subheadline: isRunning
|
|
107
|
+
? scanSurfaceCopy.pipeline.scanIncomplete
|
|
108
|
+
: undefined,
|
|
109
|
+
},
|
|
110
|
+
headline,
|
|
111
|
+
insights: [],
|
|
112
|
+
verification: [],
|
|
113
|
+
layout: "standard",
|
|
114
|
+
detailActionLabel: scanSurfaceCopy.presentation.actionLabelReview,
|
|
115
|
+
sortKey: { postureRank: -1, riskIndex: -1 },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentGitHubCheckRun.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentGitHubCheckRun.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentGitHubCheckRun.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentGitHubCheckRun.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,sBAAsB,EAC9B,GAAG,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAChE,0BAA0B,CAkC5B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildNarrativeChannels, composeHeadline, composeSubheadline, composeVerificationActions, evidenceContextFromProfile, projectCompactKeyPoints, } from "../compose/narrativeCompose.js";
|
|
2
2
|
export function presentGitHubCheckRun(bundle, ctx) {
|
|
3
3
|
const { profile } = bundle;
|
|
4
4
|
const headline = composeHeadline(bundle);
|
|
5
|
-
const keyPoints =
|
|
5
|
+
const keyPoints = projectCompactKeyPoints(buildNarrativeChannels(bundle), 3);
|
|
6
6
|
const actions = composeVerificationActions(bundle, 3);
|
|
7
7
|
const detailsUrl = `${ctx.webAppOrigin.replace(/\/$/, "")}/scan/${ctx.scanId}`;
|
|
8
8
|
const conclusion = profile.status === "safe"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentScanDetails.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanDetails.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentScanDetails.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanDetails.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAoHF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,sBAAsB,EAC9B,GAAG,EAAE,yBAAyB,GAC7B,uBAAuB,CA6FzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deriveDetailReachChip } from "../../formatCardExposureDisplay.js";
|
|
2
2
|
import { MERGE_POSTURE_LABEL } from "../../riskVocabulary.js";
|
|
3
3
|
import { deriveVerdictLineFromFacts, presentScanDetailViewModel, } from "../../scanDetailViewModel.js";
|
|
4
|
-
import {
|
|
4
|
+
import { buildNarrativeChannels, composeHeadline, composeSubheadline, composeSupportingContext, composeVerificationActions, evidenceContextFromProfile, projectCompactKeyPoints, } from "../compose/narrativeCompose.js";
|
|
5
5
|
import { normalizeGeneratedText, normalizeGeneratedTextNullable, } from "../../normalizeGeneratedText.js";
|
|
6
6
|
import { scanSurfaceCopy } from "../../scanSurfaceCopy.js";
|
|
7
7
|
function mapOperationalImpact(vm) {
|
|
@@ -112,7 +112,8 @@ export function presentScanDetails(bundle, ctx) {
|
|
|
112
112
|
});
|
|
113
113
|
const headline = composeHeadline(bundle);
|
|
114
114
|
const subheadline = composeSubheadline(bundle);
|
|
115
|
-
const
|
|
115
|
+
const channels = buildNarrativeChannels(bundle);
|
|
116
|
+
const keyPoints = projectCompactKeyPoints(channels, 6);
|
|
116
117
|
const verificationTitles = composeVerificationActions(bundle, 6);
|
|
117
118
|
const supportingLines = composeSupportingContext(bundle);
|
|
118
119
|
const supportingContext = supportingLines
|
|
@@ -123,16 +124,24 @@ export function presentScanDetails(bundle, ctx) {
|
|
|
123
124
|
: undefined;
|
|
124
125
|
const posture = profile.status;
|
|
125
126
|
const postureLabel = MERGE_POSTURE_LABEL[posture];
|
|
127
|
+
const toolingIntent = profile.interpretation.intent === "tooling_patch" ||
|
|
128
|
+
profile.interpretation.intent === "tooling_upgrade";
|
|
129
|
+
const verdictLine = profile.priority === "pr_intelligence" && toolingIntent && keyPoints[0]
|
|
130
|
+
? keyPoints[0]
|
|
131
|
+
: deriveVerdictLineFromFacts(facts, result);
|
|
126
132
|
return {
|
|
127
133
|
evidenceContext: evidenceContextFromProfile(bundle),
|
|
128
134
|
status: profile.status,
|
|
129
135
|
density: profile.density,
|
|
130
136
|
confidence: profile.confidence,
|
|
137
|
+
presentationIntent: profile.interpretation.intent,
|
|
131
138
|
hero: {
|
|
132
139
|
headline: normalizeGeneratedText(headline),
|
|
133
140
|
subheadline: normalizeGeneratedTextNullable(subheadline) ?? undefined,
|
|
134
|
-
verdictLine:
|
|
135
|
-
scopeChip:
|
|
141
|
+
verdictLine: normalizeGeneratedText(verdictLine),
|
|
142
|
+
scopeChip: channels.reachLabel ??
|
|
143
|
+
deriveDetailReachChip(result.totalScore) ??
|
|
144
|
+
undefined,
|
|
136
145
|
postureLabel,
|
|
137
146
|
riskIndex: facts.riskIndex,
|
|
138
147
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivePresentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/derivePresentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"derivePresentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/derivePresentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKtE,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,KAAK,gCAAgC,GAAG;IACtC,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAwFF,8DAA8D;AAC9D,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,gCAAgC,GACpC,mBAAmB,GAAG,IAAI,CAwB5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mergePostureFromDecision } from "../../riskVocabulary.js";
|
|
2
2
|
import { scanSurfaceCopy } from "../../scanSurfaceCopy.js";
|
|
3
|
+
import { derivePresentationInterpretation } from "../intent/derivePresentationInterpretation.js";
|
|
3
4
|
function statusFromScore(totalScore) {
|
|
4
5
|
if (totalScore == null || !Number.isFinite(totalScore))
|
|
5
6
|
return "needs_review";
|
|
@@ -26,36 +27,24 @@ function hasHighSeverityFindings(facts) {
|
|
|
26
27
|
return facts.reviewerGuidance.some((g) => g.kind === "finding" &&
|
|
27
28
|
(g.priority === "critical" || g.priority === "high"));
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
if (facts.runtimeSurface?.kind === "runtime")
|
|
31
|
-
return true;
|
|
32
|
-
return facts.packageUsage.some((u) => u.paths.length > 0 || u.criticalPaths.length > 0);
|
|
33
|
-
}
|
|
34
|
-
function deriveDensity(facts, priority) {
|
|
30
|
+
function deriveDensity(facts, priority, interpretation) {
|
|
35
31
|
if (priority === "limited") {
|
|
36
32
|
return hasHighSeverityFindings(facts) ? "standard" : "minimal";
|
|
37
33
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
facts.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return "rich";
|
|
34
|
+
if (interpretation.allowRuntimeNarrative) {
|
|
35
|
+
const wideOrModerate = facts.blastRadius?.level === "wide" ||
|
|
36
|
+
facts.blastRadius?.level === "moderate";
|
|
37
|
+
const hasAreas = facts.affectedAreas.length > 0;
|
|
38
|
+
const hasPaths = facts.packageUsage.some((u) => u.paths.length > 0 || u.criticalPaths.length > 0);
|
|
39
|
+
if (wideOrModerate || hasAreas || hasPaths) {
|
|
40
|
+
return "rich";
|
|
41
|
+
}
|
|
47
42
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
toolingImpact ||
|
|
54
|
-
facts.runtimeSurface?.kind === "build" ||
|
|
55
|
-
facts.reachability?.kind === "build_only";
|
|
56
|
-
const narrowBlast = !facts.blastRadius || facts.blastRadius.level === "narrow";
|
|
57
|
-
if (buildOnly && narrowBlast && !hasAreas) {
|
|
58
|
-
return "minimal";
|
|
43
|
+
if (interpretation.suppressRuntimeNarrative) {
|
|
44
|
+
const narrow = !facts.blastRadius || facts.blastRadius.level === "narrow";
|
|
45
|
+
if (narrow && facts.affectedAreas.length === 0) {
|
|
46
|
+
return "minimal";
|
|
47
|
+
}
|
|
59
48
|
}
|
|
60
49
|
return "standard";
|
|
61
50
|
}
|
|
@@ -75,11 +64,12 @@ function deriveConfidence(facts, priority) {
|
|
|
75
64
|
export function derivePresentationProfile(facts, ctx) {
|
|
76
65
|
if (ctx.pipelineStatus !== "done")
|
|
77
66
|
return null;
|
|
67
|
+
const interpretation = derivePresentationInterpretation(facts);
|
|
78
68
|
const priority = hasStrongPrIntelligence(facts)
|
|
79
69
|
? "pr_intelligence"
|
|
80
70
|
: "limited";
|
|
81
71
|
const status = resolveStatus(facts, ctx);
|
|
82
|
-
const density = deriveDensity(facts, priority);
|
|
72
|
+
const density = deriveDensity(facts, priority, interpretation);
|
|
83
73
|
const confidence = deriveConfidence(facts, priority);
|
|
84
74
|
const degradedMessage = priority === "limited"
|
|
85
75
|
? scanSurfaceCopy.presentation.limitedContextMessage
|
|
@@ -90,5 +80,6 @@ export function derivePresentationProfile(facts, ctx) {
|
|
|
90
80
|
confidence,
|
|
91
81
|
priority,
|
|
92
82
|
degradedMessage,
|
|
83
|
+
interpretation,
|
|
93
84
|
};
|
|
94
85
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { PresentationConfidence, PresentationDensity, PresentationPriority, PresentationStatus } from "../dto/types.js";
|
|
2
|
+
import type { PresentationInterpretation } from "../intent/presentationIntent.js";
|
|
2
3
|
export type PresentationProfile = {
|
|
3
4
|
status: PresentationStatus;
|
|
4
5
|
density: PresentationDensity;
|
|
5
6
|
confidence: PresentationConfidence;
|
|
6
7
|
priority: PresentationPriority;
|
|
7
8
|
degradedMessage?: string;
|
|
9
|
+
interpretation: PresentationInterpretation;
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=presentationProfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/presentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"presentationProfile.d.ts","sourceRoot":"","sources":["../../../src/presentation/profile/presentationProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,sBAAsB,CAAC;IACnC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,0BAA0B,CAAC;CAC5C,CAAC"}
|
|
@@ -39,9 +39,9 @@ export declare const repoIntelligenceWireSchema: z.ZodObject<{
|
|
|
39
39
|
runtime: "runtime";
|
|
40
40
|
build: "build";
|
|
41
41
|
test: "test";
|
|
42
|
-
format: "format";
|
|
43
42
|
tooling: "tooling";
|
|
44
43
|
lint: "lint";
|
|
44
|
+
format: "format";
|
|
45
45
|
ci: "ci";
|
|
46
46
|
}>>;
|
|
47
47
|
packageRole: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DashboardCardPresentation } from "./presentation/dto/dashboardCardPresentation.js";
|
|
2
2
|
import type { Finding, ScanResult } from "./types.js";
|
|
3
3
|
export type ScanPipelineStatus = "queued" | "running" | "done" | "failed";
|
|
4
4
|
export type ScanCardPresentationState = "not_scanned" | "scanning" | "analysis_failed" | "ready" | "stale";
|
|
@@ -9,9 +9,8 @@ export type FindingCountSummary = {
|
|
|
9
9
|
medium: number;
|
|
10
10
|
low: number;
|
|
11
11
|
};
|
|
12
|
-
/** @deprecated Use
|
|
13
|
-
export type ScanCardSummary =
|
|
14
|
-
export { ScanCardPresentation };
|
|
12
|
+
/** @deprecated Use DashboardCardPresentation */
|
|
13
|
+
export type ScanCardSummary = DashboardCardPresentation;
|
|
15
14
|
export declare const SCAN_CARD_SCANNING_SUMMARY = "Waiting for results...";
|
|
16
15
|
export type PipelineCompletionEvidence = {
|
|
17
16
|
scannedAt?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanCardSummary.d.ts","sourceRoot":"","sources":["../src/scanCardSummary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"scanCardSummary.d.ts","sourceRoot":"","sources":["../src/scanCardSummary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAMjG,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1E,MAAM,MAAM,yBAAyB,GACjC,aAAa,GACb,UAAU,GACV,iBAAiB,GACjB,OAAO,GACP,OAAO,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAGxD,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AAEnE,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACr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1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,sBAAsB,GAC5B,eAAe,CAcjB"}
|
|
@@ -20,11 +20,11 @@ function pipelineCard(overrides = {}) {
|
|
|
20
20
|
subheadline: scanSurfaceCopy.pipeline.scanIncomplete,
|
|
21
21
|
},
|
|
22
22
|
headline: scanSurfaceCopy.pipeline.scanRunning,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
insights: [],
|
|
24
|
+
verification: [],
|
|
25
|
+
layout: "standard",
|
|
26
|
+
detailActionLabel: scanSurfaceCopy.presentation.actionLabelReview,
|
|
27
|
+
sortKey: { postureRank: -1, riskIndex: -1 },
|
|
28
28
|
...overrides,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -70,7 +70,7 @@ describe("deriveScanCardSummary", () => {
|
|
|
70
70
|
const queued = deriveScanCardSummary(null, "queued");
|
|
71
71
|
expect(queued.headline).toBe(scanSurfaceCopy.pipeline.scanRunning);
|
|
72
72
|
expect(queued.pipeline?.status).toBe("queued");
|
|
73
|
-
expect(queued.
|
|
73
|
+
expect(queued.verdict).toBeUndefined();
|
|
74
74
|
const running = deriveScanCardSummary(null, "running");
|
|
75
75
|
expect(running.headline).toBe(scanSurfaceCopy.pipeline.scanRunning);
|
|
76
76
|
expect(running.pipeline?.status).toBe("running");
|
|
@@ -101,9 +101,9 @@ describe("deriveScanCardSummary", () => {
|
|
|
101
101
|
},
|
|
102
102
|
};
|
|
103
103
|
const summary = deriveScanCardSummary(r, "done");
|
|
104
|
-
expect(summary.
|
|
104
|
+
expect(summary.verdict?.posture).toBe("risky");
|
|
105
105
|
expect(summary.headline).toBe(scanSurfaceCopy.presentation.limitedContextHeadline);
|
|
106
|
-
expect(summary.riskIndex).toBe(72);
|
|
106
|
+
expect(summary.sortKey.riskIndex).toBe(72);
|
|
107
107
|
});
|
|
108
108
|
it("keeps quiet safe cards minimal without extra key points beyond defaults", () => {
|
|
109
109
|
const r = {
|
|
@@ -116,8 +116,8 @@ describe("deriveScanCardSummary", () => {
|
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
118
|
const summary = deriveScanCardSummary(r, "done");
|
|
119
|
-
expect(summary.
|
|
120
|
-
expect(summary.
|
|
119
|
+
expect(summary.verdict?.posture).toBe("safe");
|
|
120
|
+
expect(summary.insights.length).toBeGreaterThan(0);
|
|
121
121
|
});
|
|
122
122
|
it("surfaces catalog key points from explain signals", () => {
|
|
123
123
|
const r = {
|
|
@@ -146,7 +146,7 @@ describe("deriveScanCardSummary", () => {
|
|
|
146
146
|
},
|
|
147
147
|
};
|
|
148
148
|
const summary = deriveScanCardSummary(r, "done");
|
|
149
|
-
expect(summary.
|
|
149
|
+
expect(summary.insights.length).toBeGreaterThan(0);
|
|
150
150
|
});
|
|
151
151
|
it("exports stale subline constant", () => {
|
|
152
152
|
expect(staleScanSubline()).toBe("Based on earlier commit");
|
|
@@ -204,18 +204,18 @@ describe("isPipelinePlaceholderCopy", () => {
|
|
|
204
204
|
describe("deriveScanCardSummaryFromDenormalized", () => {
|
|
205
205
|
it("builds risky summary from denormalized columns", () => {
|
|
206
206
|
const summary = deriveScanCardSummaryFromDenormalized("risky", 72, "Auth boundary change", "done");
|
|
207
|
-
expect(summary.
|
|
208
|
-
expect(summary.riskIndex).toBe(72);
|
|
207
|
+
expect(summary.verdict?.posture).toBe("risky");
|
|
208
|
+
expect(summary.sortKey.riskIndex).toBe(72);
|
|
209
209
|
expect(summary.pipeline).toBeUndefined();
|
|
210
210
|
});
|
|
211
211
|
it("does not inject pipeline placeholder summaryText", () => {
|
|
212
212
|
const summary = deriveScanCardSummaryFromDenormalized("risky", 72, "Waiting for results...", "done");
|
|
213
|
-
expect(summary.
|
|
213
|
+
expect(summary.verdict?.posture).toBe("risky");
|
|
214
214
|
expect(summary.pipeline).toBeUndefined();
|
|
215
215
|
});
|
|
216
216
|
it("does not inject raw generic summaryText on quiet safe cards", () => {
|
|
217
217
|
const summary = deriveScanCardSummaryFromDenormalized("safe", 12, "No high-confidence merge risks from this PR dependency change", "done");
|
|
218
|
-
expect(summary.
|
|
218
|
+
expect(summary.verdict?.posture).toBe("safe");
|
|
219
219
|
expect(summary.pipeline).toBeUndefined();
|
|
220
220
|
});
|
|
221
221
|
});
|
|
@@ -228,7 +228,7 @@ describe("resolvePrScanCardSummary", () => {
|
|
|
228
228
|
summaryText: "Waiting for results...",
|
|
229
229
|
result: null,
|
|
230
230
|
});
|
|
231
|
-
expect(summary.
|
|
231
|
+
expect(summary.verdict?.posture).toBe("risky");
|
|
232
232
|
expect(summary.pipeline).toBeUndefined();
|
|
233
233
|
});
|
|
234
234
|
});
|
|
@@ -15,6 +15,33 @@ export type NarrativePackageUsage = {
|
|
|
15
15
|
areas: string[];
|
|
16
16
|
};
|
|
17
17
|
export type RepoIntelligenceParseStatus = "ok" | "invalid" | "absent" | "untrusted";
|
|
18
|
+
export type PackageDependencyClass = "runtime" | "tooling" | "test" | "lint" | "format" | "build" | "ci" | "unknown";
|
|
19
|
+
export type PackageRoleKind = "typechecker" | "compiler" | "bundler" | "linter" | "formatter" | "test_runner" | "http_framework" | "auth" | "queue" | "orm" | "unknown";
|
|
20
|
+
export type PackageRuntimeImpact = "none" | "possible" | "confirmed" | "unknown";
|
|
21
|
+
export type PackageExpectedImpact = "runtime" | "build_time" | "typecheck" | "test_time" | "development_only" | "unknown";
|
|
22
|
+
export type PackageEvidenceStrength = "high" | "medium" | "low";
|
|
23
|
+
/** Engine semantic projection for one changed package (wire copy only). */
|
|
24
|
+
export type ChangedPackageSemantics = {
|
|
25
|
+
packageName: string;
|
|
26
|
+
dependencyClass: PackageDependencyClass | null;
|
|
27
|
+
packageRole: PackageRoleKind | null;
|
|
28
|
+
runtimeImpact: PackageRuntimeImpact | null;
|
|
29
|
+
expectedImpact: PackageExpectedImpact | null;
|
|
30
|
+
suppressRuntimeNarrative: boolean;
|
|
31
|
+
evidenceStrength: PackageEvidenceStrength | null;
|
|
32
|
+
verificationFocus: string[];
|
|
33
|
+
usagePathCount: number;
|
|
34
|
+
usageAreaCount: number;
|
|
35
|
+
};
|
|
36
|
+
export type PackageSemanticsSummary = {
|
|
37
|
+
dependencyClass: PackageDependencyClass | null;
|
|
38
|
+
packageRole: PackageRoleKind | null;
|
|
39
|
+
runtimeImpact: PackageRuntimeImpact | null;
|
|
40
|
+
expectedImpact: PackageExpectedImpact | null;
|
|
41
|
+
suppressRuntimeNarrative: boolean;
|
|
42
|
+
evidenceStrength: PackageEvidenceStrength | null;
|
|
43
|
+
verificationFocus: string[];
|
|
44
|
+
};
|
|
18
45
|
export type ScanNarrativeFacts = {
|
|
19
46
|
availability: {
|
|
20
47
|
mode: NarrativeAvailabilityMode;
|
|
@@ -47,13 +74,10 @@ export type ScanNarrativeFacts = {
|
|
|
47
74
|
frameworks: string[];
|
|
48
75
|
};
|
|
49
76
|
} | null;
|
|
50
|
-
/**
|
|
51
|
-
packageSemantics:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
suppressRuntimeNarrative: boolean;
|
|
55
|
-
verificationFocus: string[];
|
|
56
|
-
} | null;
|
|
77
|
+
/** Primary changed package semantics (ABI 2 wire projection). */
|
|
78
|
+
packageSemantics: PackageSemanticsSummary | null;
|
|
79
|
+
/** Per changed package semantics for mixed-PR precedence (wire projection). */
|
|
80
|
+
changedPackageSemantics: ChangedPackageSemantics[];
|
|
57
81
|
blastRadius: {
|
|
58
82
|
level: BlastRadiusLevel;
|
|
59
83
|
changedPackageCount?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanNarrativeFacts.d.ts","sourceRoot":"","sources":["../src/scanNarrativeFacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC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CAAC;KACrE,CAAC,CAAC;IAEH,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAsBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,2BAA2B,KAAK,CAAC"}
|
|
@@ -297,11 +297,19 @@ export declare const scanSurfaceCopy: {
|
|
|
297
297
|
readonly multiRuntimeHeadline: "Multiple runtime dependency upgrades need review";
|
|
298
298
|
readonly buildOnlyHeadline: "{package} patch upgrade with limited application impact";
|
|
299
299
|
readonly runtimeHeadline: "{package} upgrade affects {surface}";
|
|
300
|
+
readonly toolingPatchHeadline: "{package} patch upgrade";
|
|
301
|
+
readonly toolingUpgradeHeadline: "{package} tooling upgrade";
|
|
302
|
+
readonly runtimeUpgradeHeadline: "{package} runtime upgrade affects {surface}";
|
|
303
|
+
readonly safeNeutralHeadline: "{package} dependency upgrade";
|
|
300
304
|
readonly defaultUpgradeHeadline: "{package} dependency upgrade needs review";
|
|
301
305
|
readonly changedPackageKeyPoint: "Changed package: {package}";
|
|
302
306
|
readonly usedInPathsSingle: "Used across application code ({path})";
|
|
303
307
|
readonly usedInPathsMultiple: "Used across {count} code paths";
|
|
304
308
|
readonly noRuntimePathsKeyPoint: "No runtime usage paths detected";
|
|
309
|
+
readonly expectedImpactLimitedKeyPoint: "Expected impact is limited to {workflows}";
|
|
310
|
+
readonly limitedEvidenceKeyPoint: "Evidence for this upgrade is limited";
|
|
311
|
+
readonly usedInRuntimePathsKeyPoint: "Used in runtime application paths";
|
|
312
|
+
readonly runtimeUsageKeyPoint: "Used in runtime application paths";
|
|
305
313
|
readonly blastRadiusWideKeyPoint: "Blast radius is wide";
|
|
306
314
|
readonly blastRadiusLevelKeyPoint: "Blast radius is {level}";
|
|
307
315
|
readonly noAffectedAreasKeyPoint: "No affected application areas identified";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanSurfaceCopy.d.ts","sourceRoot":"","sources":["../src/scanSurfaceCopy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;QAgBxB,8EAA8E;;QAG9E,6DAA6D;;;;QAO7D,qDAAqD;;;;;QASrD,mEAAmE;;;;QAOnE,yFAAyF;;QAGzF,mFAAmF;;QAGnF,4EAA4E;;QAE5E,8FAA8F;;QAE9F,+DAA+D;;;QAI/D,6EAA6E;;;;;QAK7E,2CAA2C;;;QAK3C,2EAA2E;;QAE3E,4EAA4E;;;QAI5E,sEAAsE;;;IAGxE,2EAA2E;;;;;;;;;;;;;;QAiBzE,oEAAoE;;;IAGtE,wEAAwE;;;;;;QAOtE,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkCzC,yDAAyD;;YAGzD,mDAAmD;;YAGnD,8BAA8B;;YAE9B,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4CtD,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsI/C,uFAAuF;;;;;;;;;;;;;;;;;;;;;;;;IAwBvF,kFAAkF
|
|
1
|
+
{"version":3,"file":"scanSurfaceCopy.d.ts","sourceRoot":"","sources":["../src/scanSurfaceCopy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;QAgBxB,8EAA8E;;QAG9E,6DAA6D;;;;QAO7D,qDAAqD;;;;;QASrD,mEAAmE;;;;QAOnE,yFAAyF;;QAGzF,mFAAmF;;QAGnF,4EAA4E;;QAE5E,8FAA8F;;QAE9F,+DAA+D;;;QAI/D,6EAA6E;;;;;QAK7E,2CAA2C;;;QAK3C,2EAA2E;;QAE3E,4EAA4E;;;QAI5E,sEAAsE;;;IAGxE,2EAA2E;;;;;;;;;;;;;;QAiBzE,oEAAoE;;;IAGtE,wEAAwE;;;;;;QAOtE,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkCzC,yDAAyD;;YAGzD,mDAAmD;;YAGnD,8BAA8B;;YAE9B,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4CtD,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsI/C,uFAAuF;;;;;;;;;;;;;;;;;;;;;;;;IAwBvF,kFAAkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuClF,sEAAsE;;;;;CAO9D,CAAC;AAEX,iEAAiE;AACjE,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa5D"}
|
package/dist/scanSurfaceCopy.js
CHANGED
|
@@ -300,11 +300,19 @@ export const scanSurfaceCopy = {
|
|
|
300
300
|
multiRuntimeHeadline: "Multiple runtime dependency upgrades need review",
|
|
301
301
|
buildOnlyHeadline: "{package} patch upgrade with limited application impact",
|
|
302
302
|
runtimeHeadline: "{package} upgrade affects {surface}",
|
|
303
|
+
toolingPatchHeadline: "{package} patch upgrade",
|
|
304
|
+
toolingUpgradeHeadline: "{package} tooling upgrade",
|
|
305
|
+
runtimeUpgradeHeadline: "{package} runtime upgrade affects {surface}",
|
|
306
|
+
safeNeutralHeadline: "{package} dependency upgrade",
|
|
303
307
|
defaultUpgradeHeadline: "{package} dependency upgrade needs review",
|
|
304
308
|
changedPackageKeyPoint: "Changed package: {package}",
|
|
305
309
|
usedInPathsSingle: "Used across application code ({path})",
|
|
306
310
|
usedInPathsMultiple: "Used across {count} code paths",
|
|
307
311
|
noRuntimePathsKeyPoint: "No runtime usage paths detected",
|
|
312
|
+
expectedImpactLimitedKeyPoint: "Expected impact is limited to {workflows}",
|
|
313
|
+
limitedEvidenceKeyPoint: "Evidence for this upgrade is limited",
|
|
314
|
+
usedInRuntimePathsKeyPoint: "Used in runtime application paths",
|
|
315
|
+
runtimeUsageKeyPoint: "Used in runtime application paths",
|
|
308
316
|
blastRadiusWideKeyPoint: "Blast radius is wide",
|
|
309
317
|
blastRadiusLevelKeyPoint: "Blast radius is {level}",
|
|
310
318
|
noAffectedAreasKeyPoint: "No affected application areas identified",
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { FindingCountSummary, PresentationConfidence, PresentationDensity, PresentationEvidenceContext, PresentationEvidenceRow, PresentationStatus } from "./types.js";
|
|
2
|
-
export type ScanCardPresentation = {
|
|
3
|
-
pipeline?: {
|
|
4
|
-
status: "queued" | "running" | "failed";
|
|
5
|
-
headline: string;
|
|
6
|
-
subheadline?: string;
|
|
7
|
-
};
|
|
8
|
-
status?: PresentationStatus;
|
|
9
|
-
density?: PresentationDensity;
|
|
10
|
-
confidence?: PresentationConfidence;
|
|
11
|
-
evidenceContext?: PresentationEvidenceContext;
|
|
12
|
-
headline: string;
|
|
13
|
-
subheadline?: string;
|
|
14
|
-
changedPackages: string[];
|
|
15
|
-
primaryPackage?: string;
|
|
16
|
-
keyPoints: string[];
|
|
17
|
-
affectedAreas: string[];
|
|
18
|
-
verificationActions: string[];
|
|
19
|
-
evidence: PresentationEvidenceRow[];
|
|
20
|
-
supportingContext?: string[];
|
|
21
|
-
riskIndex?: number | null;
|
|
22
|
-
findingCounts?: FindingCountSummary | null;
|
|
23
|
-
actionLabel?: string;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=scanCardPresentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scanCardPresentation.d.ts","sourceRoot":"","sources":["../../../src/presentation/dto/scanCardPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;QACxC,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,eAAe,CAAC,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IAEpC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presentPipelineScanCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentPipelineScanCard.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,QAAQ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