@mergesignal/shared 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deriveScanNarrative.d.ts.map +1 -1
- package/dist/deriveScanNarrative.js +4 -0
- package/dist/formatInsight.d.ts +3 -3
- package/dist/formatInsight.d.ts.map +1 -1
- package/dist/formatInsight.js +0 -9
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/prRiskBand.d.ts +7 -0
- package/dist/prRiskBand.d.ts.map +1 -1
- package/dist/prRiskBand.js +12 -0
- package/dist/prRiskBand.test.js +12 -1
- package/dist/presentation/abi3Expression.test.js +46 -0
- package/dist/presentation/bundleAccessorParity.test.d.ts +9 -0
- package/dist/presentation/bundleAccessorParity.test.d.ts.map +1 -0
- package/dist/presentation/bundleAccessorParity.test.js +126 -0
- package/dist/presentation/cliParity.test.d.ts +2 -0
- package/dist/presentation/cliParity.test.d.ts.map +1 -0
- package/dist/presentation/cliParity.test.js +49 -0
- package/dist/presentation/compose/narrativeCompose.d.ts +0 -4
- package/dist/presentation/compose/narrativeCompose.d.ts.map +1 -1
- package/dist/presentation/compose/narrativeCompose.js +0 -20
- package/dist/presentation/decisionSurface.test.d.ts +2 -0
- package/dist/presentation/decisionSurface.test.d.ts.map +1 -0
- package/dist/presentation/decisionSurface.test.js +290 -0
- package/dist/presentation/dto/assessmentPresentationFields.d.ts +4 -0
- package/dist/presentation/dto/assessmentPresentationFields.d.ts.map +1 -1
- package/dist/presentation/index.d.ts +1 -1
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +1 -1
- package/dist/presentation/orchestration/buildScanPresentationBundle.d.ts +1 -0
- package/dist/presentation/orchestration/buildScanPresentationBundle.d.ts.map +1 -1
- package/dist/presentation/orchestration/buildScanPresentationBundle.js +4 -1
- package/dist/presentation/orchestration/scanPresentationBundle.d.ts +4 -4
- package/dist/presentation/orchestration/scanPresentationBundle.d.ts.map +1 -1
- package/dist/presentation/presenters/presentCliScanSummary.d.ts.map +1 -1
- package/dist/presentation/presenters/presentCliScanSummary.js +9 -7
- package/dist/presentation/presenters/presentGitHubCheckRun.d.ts.map +1 -1
- package/dist/presentation/presenters/presentGitHubCheckRun.js +11 -12
- package/dist/presentation/presenters/presentGitHubPrComment.d.ts.map +1 -1
- package/dist/presentation/presenters/presentGitHubPrComment.js +11 -10
- package/dist/presentation/presenters/presentScanDetails.d.ts.map +1 -1
- package/dist/presentation/presenters/presentScanDetails.js +8 -11
- package/dist/presentation/projectAssessmentFields.d.ts.map +1 -1
- package/dist/presentation/projectAssessmentFields.js +6 -0
- package/dist/presentation/surfaceParity.test.js +8 -0
- package/dist/scanResultSchema.d.ts +158 -0
- package/dist/scanResultSchema.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/scanDetailViewModelTypes.d.ts +0 -159
- package/dist/scanDetailViewModelTypes.d.ts.map +0 -1
- package/dist/scanDetailViewModelTypes.js +0 -4
- package/dist/truncateCardSummary.d.ts +0 -5
- package/dist/truncateCardSummary.d.ts.map +0 -1
- package/dist/truncateCardSummary.js +0 -23
|
@@ -89,6 +89,14 @@ describe("surfaceParity guardrail", () => {
|
|
|
89
89
|
expect(s.details.verificationChannel).toBe(s.fields.verificationChannel);
|
|
90
90
|
expect(s.check.verificationChannel).toBe(s.fields.verificationChannel);
|
|
91
91
|
expect(s.comment.verificationChannel).toBe(s.fields.verificationChannel);
|
|
92
|
+
expect(s.card.confidenceRationale).toBe(s.fields.confidenceRationale);
|
|
93
|
+
expect(s.details.confidenceRationale).toBe(s.fields.confidenceRationale);
|
|
94
|
+
expect(s.check.confidenceRationale).toBe(s.fields.confidenceRationale);
|
|
95
|
+
expect(s.comment.confidenceRationale).toBe(s.fields.confidenceRationale);
|
|
96
|
+
expect(s.card.electionSummary).toBe(s.fields.electionSummary);
|
|
97
|
+
expect(s.details.electionSummary).toBe(s.fields.electionSummary);
|
|
98
|
+
expect(s.check.electionSummary).toBe(s.fields.electionSummary);
|
|
99
|
+
expect(s.comment.electionSummary).toBe(s.fields.electionSummary);
|
|
92
100
|
});
|
|
93
101
|
it(`${persona.name}: headline matches across card and details`, () => {
|
|
94
102
|
const s = surfacesFor(persona.result);
|
|
@@ -245,6 +245,164 @@ export declare const engineOutputScanResultSchema: z.ZodObject<{
|
|
|
245
245
|
}, z.core.$strip>;
|
|
246
246
|
reasoning: z.ZodArray<z.ZodString>;
|
|
247
247
|
confidenceRationale: z.ZodString;
|
|
248
|
+
notAffectedLine: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
249
|
+
resolutionLine: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
cleared: "cleared";
|
|
252
|
+
proven_broken: "proven_broken";
|
|
253
|
+
bounded_verify: "bounded_verify";
|
|
254
|
+
abstain: "abstain";
|
|
255
|
+
}>>;
|
|
256
|
+
perPackageOutcome: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
257
|
+
packageName: z.ZodString;
|
|
258
|
+
outcome: z.ZodEnum<{
|
|
259
|
+
cleared: "cleared";
|
|
260
|
+
proven_broken: "proven_broken";
|
|
261
|
+
bounded_verify: "bounded_verify";
|
|
262
|
+
abstain: "abstain";
|
|
263
|
+
}>;
|
|
264
|
+
proofArtifactRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
265
|
+
clearanceEnvelopeRef: z.ZodOptional<z.ZodString>;
|
|
266
|
+
boundedVerifyTargetRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
+
}, z.core.$strip>>>;
|
|
268
|
+
clearanceEnvelopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
269
|
+
packageName: z.ZodString;
|
|
270
|
+
clearedDimensions: z.ZodArray<z.ZodObject<{
|
|
271
|
+
kind: z.ZodEnum<{
|
|
272
|
+
type_surface: "type_surface";
|
|
273
|
+
manifest: "manifest";
|
|
274
|
+
exports: "exports";
|
|
275
|
+
entrypoint: "entrypoint";
|
|
276
|
+
peer_dependency: "peer_dependency";
|
|
277
|
+
engine_constraint: "engine_constraint";
|
|
278
|
+
artifact_layout: "artifact_layout";
|
|
279
|
+
documented_breaking: "documented_breaking";
|
|
280
|
+
}>;
|
|
281
|
+
basis: z.ZodEnum<{
|
|
282
|
+
proof_pass: "proof_pass";
|
|
283
|
+
no_impact_proven: "no_impact_proven";
|
|
284
|
+
}>;
|
|
285
|
+
proofArtifactRef: z.ZodOptional<z.ZodString>;
|
|
286
|
+
noImpactProofRef: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
unclearedDimensions: z.ZodArray<z.ZodObject<{
|
|
289
|
+
kind: z.ZodEnum<{
|
|
290
|
+
type_surface: "type_surface";
|
|
291
|
+
manifest: "manifest";
|
|
292
|
+
exports: "exports";
|
|
293
|
+
entrypoint: "entrypoint";
|
|
294
|
+
peer_dependency: "peer_dependency";
|
|
295
|
+
engine_constraint: "engine_constraint";
|
|
296
|
+
artifact_layout: "artifact_layout";
|
|
297
|
+
documented_breaking: "documented_breaking";
|
|
298
|
+
}>;
|
|
299
|
+
reason: z.ZodEnum<{
|
|
300
|
+
proof_failed: "proof_failed";
|
|
301
|
+
proof_inconclusive: "proof_inconclusive";
|
|
302
|
+
no_producer_available: "no_producer_available";
|
|
303
|
+
representative_precision_only: "representative_precision_only";
|
|
304
|
+
architectural_precision_only: "architectural_precision_only";
|
|
305
|
+
opaque_delta: "opaque_delta";
|
|
306
|
+
hypothesized_breaking: "hypothesized_breaking";
|
|
307
|
+
}>;
|
|
308
|
+
boundedVerifyTarget: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
targetId: z.ZodString;
|
|
310
|
+
packageName: z.ZodString;
|
|
311
|
+
kind: z.ZodEnum<{
|
|
312
|
+
file_location: "file_location";
|
|
313
|
+
config_path: "config_path";
|
|
314
|
+
behavioral_scenario: "behavioral_scenario";
|
|
315
|
+
}>;
|
|
316
|
+
file: z.ZodOptional<z.ZodString>;
|
|
317
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
configKey: z.ZodOptional<z.ZodString>;
|
|
319
|
+
scenario: z.ZodOptional<z.ZodString>;
|
|
320
|
+
whatToVerify: z.ZodString;
|
|
321
|
+
whyAutomationStopped: z.ZodString;
|
|
322
|
+
whatProofWouldResolveIt: z.ZodString;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
coverageClass: z.ZodEnum<{
|
|
326
|
+
none: "none";
|
|
327
|
+
full: "full";
|
|
328
|
+
representative: "representative";
|
|
329
|
+
}>;
|
|
330
|
+
}, z.core.$strip>>>;
|
|
331
|
+
boundedVerifyTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
332
|
+
targetId: z.ZodString;
|
|
333
|
+
packageName: z.ZodString;
|
|
334
|
+
kind: z.ZodEnum<{
|
|
335
|
+
file_location: "file_location";
|
|
336
|
+
config_path: "config_path";
|
|
337
|
+
behavioral_scenario: "behavioral_scenario";
|
|
338
|
+
}>;
|
|
339
|
+
file: z.ZodOptional<z.ZodString>;
|
|
340
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
configKey: z.ZodOptional<z.ZodString>;
|
|
342
|
+
scenario: z.ZodOptional<z.ZodString>;
|
|
343
|
+
whatToVerify: z.ZodString;
|
|
344
|
+
whyAutomationStopped: z.ZodString;
|
|
345
|
+
whatProofWouldResolveIt: z.ZodString;
|
|
346
|
+
}, z.core.$strip>>>;
|
|
347
|
+
evidenceSufficiencyVerdict: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
sufficient: z.ZodBoolean;
|
|
349
|
+
clearanceEligible: z.ZodBoolean;
|
|
350
|
+
provenBrokenEligible: z.ZodBoolean;
|
|
351
|
+
boundedVerifyEligible: z.ZodBoolean;
|
|
352
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
353
|
+
kind: z.ZodEnum<{
|
|
354
|
+
private_package: "private_package";
|
|
355
|
+
opaque_mutation: "opaque_mutation";
|
|
356
|
+
unsupported_ecosystem: "unsupported_ecosystem";
|
|
357
|
+
partial_monorepo_scan: "partial_monorepo_scan";
|
|
358
|
+
repository_coverage_insufficient: "repository_coverage_insufficient";
|
|
359
|
+
package_facts_missing: "package_facts_missing";
|
|
360
|
+
correlation_abstained: "correlation_abstained";
|
|
361
|
+
proof_coverage_insufficient: "proof_coverage_insufficient";
|
|
362
|
+
proof_execution_failed: "proof_execution_failed";
|
|
363
|
+
hypothesized_breaking_unresolved: "hypothesized_breaking_unresolved";
|
|
364
|
+
advisory_blocking: "advisory_blocking";
|
|
365
|
+
conflicting_proof_results: "conflicting_proof_results";
|
|
366
|
+
}>;
|
|
367
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
368
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
perPackage: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
371
|
+
packageName: z.ZodString;
|
|
372
|
+
clearanceEligible: z.ZodBoolean;
|
|
373
|
+
provenBrokenEligible: z.ZodBoolean;
|
|
374
|
+
blockers: z.ZodArray<z.ZodObject<{
|
|
375
|
+
kind: z.ZodEnum<{
|
|
376
|
+
private_package: "private_package";
|
|
377
|
+
opaque_mutation: "opaque_mutation";
|
|
378
|
+
unsupported_ecosystem: "unsupported_ecosystem";
|
|
379
|
+
partial_monorepo_scan: "partial_monorepo_scan";
|
|
380
|
+
repository_coverage_insufficient: "repository_coverage_insufficient";
|
|
381
|
+
package_facts_missing: "package_facts_missing";
|
|
382
|
+
correlation_abstained: "correlation_abstained";
|
|
383
|
+
proof_coverage_insufficient: "proof_coverage_insufficient";
|
|
384
|
+
proof_execution_failed: "proof_execution_failed";
|
|
385
|
+
hypothesized_breaking_unresolved: "hypothesized_breaking_unresolved";
|
|
386
|
+
advisory_blocking: "advisory_blocking";
|
|
387
|
+
conflicting_proof_results: "conflicting_proof_results";
|
|
388
|
+
}>;
|
|
389
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
390
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
391
|
+
}, z.core.$strip>>;
|
|
392
|
+
}, z.core.$strip>>;
|
|
393
|
+
}, z.core.$strip>>;
|
|
394
|
+
abstainReasons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
395
|
+
kind: z.ZodEnum<{
|
|
396
|
+
private_package: "private_package";
|
|
397
|
+
opaque_mutation: "opaque_mutation";
|
|
398
|
+
unsupported_ecosystem: "unsupported_ecosystem";
|
|
399
|
+
partial_monorepo_scan: "partial_monorepo_scan";
|
|
400
|
+
no_honest_bounded_target: "no_honest_bounded_target";
|
|
401
|
+
insufficient_collection: "insufficient_collection";
|
|
402
|
+
}>;
|
|
403
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
404
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
405
|
+
}, z.core.$strip>>>;
|
|
248
406
|
}, z.core.$strip>;
|
|
249
407
|
prRisk: z.ZodObject<{
|
|
250
408
|
score: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanResultSchema.d.ts","sourceRoot":"","sources":["../src/scanResultSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEtE,wGAAwG;AACxG,eAAO,MAAM,eAAe,EAAG,GAAY,CAAC;AAE5C,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,EAAG,GAAY,CAAC;AAmBnD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAc/D;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,kCAAkC,GAAG;IAC/C,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,uBAAuB,CAAC;CACjC,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,OAAO,GACZ,kCAAkC,GAAG,kCAAkC,CAezE;AAED,uFAAuF;AACvF,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,OAAO,GACZ,uBAAuB,CAMzB;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,KAAK,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,GACZ,sBAAsB,GAAG,sBAAsB,CAajD;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAMhE"}
|
package/package.json
CHANGED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import type { ObservationSignalFamily } from "./cardObservationCatalog.js";
|
|
2
|
-
import type { NarrativeAvailabilityMode } from "./scanNarrativeFacts.js";
|
|
3
|
-
import type { MergePosture } from "./riskVocabulary.js";
|
|
4
|
-
import type { FindingSeverity, ScoreLayer } from "./types.js";
|
|
5
|
-
/** Max operational-impact rows before collapse on scan detail. */
|
|
6
|
-
export declare const TIER1_MAX_VISIBLE_IMPACTS = 3;
|
|
7
|
-
/** Findings list collapse threshold on scan detail evidence panel. */
|
|
8
|
-
export declare const ACT3_EVIDENCE_COLLAPSE_THRESHOLD = 10;
|
|
9
|
-
export type ScanDetailOverallRiskBand = "low" | "moderate" | "high";
|
|
10
|
-
export type ScanDetailLayerConcernLevel = "low" | "medium" | "high";
|
|
11
|
-
export type ScanDetailSignalLayer = {
|
|
12
|
-
layer: ScoreLayer;
|
|
13
|
-
label: string;
|
|
14
|
-
score: number;
|
|
15
|
-
concernLevel: ScanDetailLayerConcernLevel;
|
|
16
|
-
concernLabel: string;
|
|
17
|
-
};
|
|
18
|
-
export type RiskScoreGaugeModel = {
|
|
19
|
-
fillPercent: number;
|
|
20
|
-
band: ScanDetailOverallRiskBand;
|
|
21
|
-
ariaLabel: string;
|
|
22
|
-
};
|
|
23
|
-
export type ScanDetailSignalSummary = {
|
|
24
|
-
score: number;
|
|
25
|
-
overallBand: ScanDetailOverallRiskBand;
|
|
26
|
-
overallLabel: string;
|
|
27
|
-
gauge: RiskScoreGaugeModel;
|
|
28
|
-
layers: ScanDetailSignalLayer[];
|
|
29
|
-
};
|
|
30
|
-
export type RecommendationPriority = "high" | "medium" | "low";
|
|
31
|
-
export type GuidanceSource = "insight" | "recommendation" | "verification";
|
|
32
|
-
export type ScanDetailRecommendationDetail = {
|
|
33
|
-
why: string;
|
|
34
|
-
whyNow: string;
|
|
35
|
-
signals: string[];
|
|
36
|
-
affectedPackages?: {
|
|
37
|
-
names: string[];
|
|
38
|
-
overflowCount: number;
|
|
39
|
-
};
|
|
40
|
-
expectedBenefit: string;
|
|
41
|
-
};
|
|
42
|
-
export type ScanDetailRecommendation = {
|
|
43
|
-
id: string;
|
|
44
|
-
rank: number;
|
|
45
|
-
title: string;
|
|
46
|
-
priority: RecommendationPriority;
|
|
47
|
-
source: GuidanceSource;
|
|
48
|
-
signalFamily?: ObservationSignalFamily | null;
|
|
49
|
-
detail: ScanDetailRecommendationDetail;
|
|
50
|
-
proofRefs?: {
|
|
51
|
-
findingIds?: string[];
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export type ScanDetailRecommendationCenter = {
|
|
55
|
-
heading: string;
|
|
56
|
-
defaultSelectedId: string;
|
|
57
|
-
items: ScanDetailRecommendation[];
|
|
58
|
-
posture: MergePosture | null;
|
|
59
|
-
scanContext?: string;
|
|
60
|
-
};
|
|
61
|
-
export type ScanDetailOperationalImpactItem = {
|
|
62
|
-
message: string;
|
|
63
|
-
where?: string;
|
|
64
|
-
verify?: string;
|
|
65
|
-
affectedFiles?: string[];
|
|
66
|
-
};
|
|
67
|
-
export type ScanDetailOperationalImpact = {
|
|
68
|
-
status: "rich" | "fallback" | "hidden";
|
|
69
|
-
items: ScanDetailOperationalImpactItem[];
|
|
70
|
-
fallbackMessage?: string;
|
|
71
|
-
};
|
|
72
|
-
export type ScanDetailVerdict = {
|
|
73
|
-
posture: MergePosture | null;
|
|
74
|
-
scopeChip: string | null;
|
|
75
|
-
verdictLine: string;
|
|
76
|
-
prLabel?: string;
|
|
77
|
-
statusLabel?: string;
|
|
78
|
-
};
|
|
79
|
-
export type ScanDetailAttentionPackage = {
|
|
80
|
-
name: string;
|
|
81
|
-
version?: string;
|
|
82
|
-
direct: boolean;
|
|
83
|
-
severity?: FindingSeverity;
|
|
84
|
-
evidence?: string;
|
|
85
|
-
};
|
|
86
|
-
export type ScanDetailAttentionArea = {
|
|
87
|
-
problemLabel: string;
|
|
88
|
-
problemDescription: string;
|
|
89
|
-
packages: ScanDetailAttentionPackage[];
|
|
90
|
-
overflowCount: number;
|
|
91
|
-
};
|
|
92
|
-
export type ScanDetailFindingRow = {
|
|
93
|
-
id: string;
|
|
94
|
-
severity: FindingSeverity;
|
|
95
|
-
title: string;
|
|
96
|
-
description: string;
|
|
97
|
-
packageName: string;
|
|
98
|
-
recommendation?: string;
|
|
99
|
-
source: "dependency" | "code";
|
|
100
|
-
coveredByRecommendationRank?: number;
|
|
101
|
-
};
|
|
102
|
-
export type ScanDetailTopology = {
|
|
103
|
-
summaryLine: string;
|
|
104
|
-
deepest: Array<{
|
|
105
|
-
packageName: string;
|
|
106
|
-
depth: number;
|
|
107
|
-
direct: boolean;
|
|
108
|
-
via: string[];
|
|
109
|
-
}>;
|
|
110
|
-
};
|
|
111
|
-
export type ScanDetailNarrativeContext = {
|
|
112
|
-
mode: NarrativeAvailabilityMode;
|
|
113
|
-
codeIntelligenceAvailable: boolean;
|
|
114
|
-
changedPackagesDisplay: string | null;
|
|
115
|
-
runtimeSurfaceLabel: string | null;
|
|
116
|
-
reachabilityLabel: string | null;
|
|
117
|
-
blastRadiusLabel: string | null;
|
|
118
|
-
affectedAreas: string[];
|
|
119
|
-
structuralOnlyDisclaimer: string | null;
|
|
120
|
-
usageHighlights: string[];
|
|
121
|
-
frameworks: string[];
|
|
122
|
-
blastRadiusFactors: string[];
|
|
123
|
-
hotspotNames: string[];
|
|
124
|
-
usageContextLine: string | null;
|
|
125
|
-
upgradeContextLine: string | null;
|
|
126
|
-
};
|
|
127
|
-
export type ScanDetailViewModel = {
|
|
128
|
-
verdict: ScanDetailVerdict;
|
|
129
|
-
signalSummary: ScanDetailSignalSummary | null;
|
|
130
|
-
followUpBridgeNote: string | null;
|
|
131
|
-
recommendedActions: ScanDetailRecommendationCenter;
|
|
132
|
-
operationalImpact: ScanDetailOperationalImpact;
|
|
133
|
-
because: {
|
|
134
|
-
themes: string[];
|
|
135
|
-
confidenceCaveat?: string;
|
|
136
|
-
} | null;
|
|
137
|
-
evidence: {
|
|
138
|
-
attentionAreas: ScanDetailAttentionArea[];
|
|
139
|
-
findings: ScanDetailFindingRow[];
|
|
140
|
-
findingsOverflowCount: number;
|
|
141
|
-
topology: ScanDetailTopology | null;
|
|
142
|
-
} | null;
|
|
143
|
-
repoContext: {
|
|
144
|
-
status: "hidden";
|
|
145
|
-
} | {
|
|
146
|
-
status: "loaded";
|
|
147
|
-
comparisonLine: string;
|
|
148
|
-
};
|
|
149
|
-
narrativeContext: ScanDetailNarrativeContext;
|
|
150
|
-
metadata: {
|
|
151
|
-
scanId: string;
|
|
152
|
-
generatedAt?: string;
|
|
153
|
-
methodologyVersion?: string | null;
|
|
154
|
-
changedPackagesSummary?: string;
|
|
155
|
-
codeAnalysisTimedOut?: boolean;
|
|
156
|
-
codeIntelligenceAvailable?: boolean;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=scanDetailViewModel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B;QAAE,MAAM,EAAE,QAAQ,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,gBAAgB,EAAE,0BAA0B,CAAC;IAC7C,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;KACrC,CAAC;CACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"truncateCardSummary.d.ts","sourceRoot":"","sources":["../src/truncateCardSummary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,MAAoB,GAC3B,MAAM,CA+BR"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Semantic truncation for dashboard card summaries (~90 chars default).
|
|
3
|
-
*/
|
|
4
|
-
const DEFAULT_MAX = 90;
|
|
5
|
-
export function truncateCardSummary(text, maxLen = DEFAULT_MAX) {
|
|
6
|
-
const trimmed = text.trim();
|
|
7
|
-
if (trimmed.length <= maxLen)
|
|
8
|
-
return trimmed;
|
|
9
|
-
const slice = trimmed.slice(0, maxLen + 1);
|
|
10
|
-
const sentenceEnd = Math.max(slice.lastIndexOf(". "), slice.lastIndexOf("! "), slice.lastIndexOf("? "));
|
|
11
|
-
if (sentenceEnd >= Math.floor(maxLen * 0.45)) {
|
|
12
|
-
return trimmed.slice(0, sentenceEnd + 1).trim();
|
|
13
|
-
}
|
|
14
|
-
const clauseEnd = Math.max(slice.lastIndexOf(", "), slice.lastIndexOf("; "), slice.lastIndexOf(" — "), slice.lastIndexOf(" - "));
|
|
15
|
-
if (clauseEnd >= Math.floor(maxLen * 0.45)) {
|
|
16
|
-
return `${trimmed.slice(0, clauseEnd).trim()}…`;
|
|
17
|
-
}
|
|
18
|
-
const lastSpace = slice.lastIndexOf(" ");
|
|
19
|
-
if (lastSpace >= Math.floor(maxLen * 0.6)) {
|
|
20
|
-
return `${trimmed.slice(0, lastSpace).trim()}…`;
|
|
21
|
-
}
|
|
22
|
-
return `${trimmed.slice(0, maxLen).trim()}…`;
|
|
23
|
-
}
|