@mergesignal/shared 0.4.0 → 0.4.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 +52 -2
- package/dist/deriveScanNarrative.test.js +10 -3
- package/dist/fixtures/repoIntelligenceFixtures.d.ts.map +1 -1
- package/dist/fixtures/repoIntelligenceFixtures.js +21 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/narrativePresentation.d.ts.map +1 -1
- package/dist/narrativePresentation.js +6 -3
- package/dist/presentation/compose/narrativeCompose.d.ts.map +1 -1
- package/dist/presentation/compose/narrativeCompose.js +15 -101
- package/dist/presentation/dto/scanCardPresentation.d.ts +2 -0
- package/dist/presentation/dto/scanCardPresentation.d.ts.map +1 -1
- package/dist/presentation/dto/scanDetailsPresentation.d.ts +2 -0
- package/dist/presentation/dto/scanDetailsPresentation.d.ts.map +1 -1
- 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 +2 -0
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +1 -0
- 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 +7 -0
- package/dist/presentation/intent/formatPresentationCopy.d.ts.map +1 -0
- package/dist/presentation/intent/formatPresentationCopy.js +153 -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/presentation.test.js +3 -0
- 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 +166 -0
- package/dist/presentation/presenters/presentScanCard.d.ts.map +1 -1
- package/dist/presentation/presenters/presentScanCard.js +1 -0
- package/dist/presentation/presenters/presentScanDetails.d.ts.map +1 -1
- package/dist/presentation/presenters/presentScanDetails.js +7 -1
- package/dist/presentation/profile/derivePresentationProfile.d.ts.map +1 -1
- package/dist/presentation/profile/derivePresentationProfile.js +18 -19
- package/dist/presentation/profile/presentationProfile.d.ts +2 -0
- package/dist/presentation/profile/presentationProfile.d.ts.map +1 -1
- package/dist/repoIntelligenceMappers.d.ts.map +1 -1
- package/dist/repoIntelligenceMappers.js +8 -1
- package/dist/repoIntelligenceSchema.d.ts +75 -1
- package/dist/repoIntelligenceSchema.d.ts.map +1 -1
- package/dist/repoIntelligenceSchema.js +74 -1
- package/dist/repoIntelligenceSemantics.d.ts +29 -0
- package/dist/repoIntelligenceSemantics.d.ts.map +1 -0
- package/dist/repoIntelligenceSemantics.js +146 -0
- package/dist/repoIntelligenceSemantics.test.d.ts +2 -0
- package/dist/repoIntelligenceSemantics.test.d.ts.map +1 -0
- package/dist/repoIntelligenceSemantics.test.js +63 -0
- package/dist/scanNarrativeFacts.d.ts +31 -0
- package/dist/scanNarrativeFacts.d.ts.map +1 -1
- package/dist/scanNarrativeFacts.js +2 -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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const ROLE_DISPLAY = {
|
|
2
|
+
typechecker: "TypeScript",
|
|
3
|
+
linter: "ESLint",
|
|
4
|
+
formatter: "Prettier",
|
|
5
|
+
test_runner: "Test runner",
|
|
6
|
+
};
|
|
7
|
+
/** Display name from package role when engine classified it; else title-case package name. */
|
|
8
|
+
export function formatPackageDisplayName(packageName, packageRole) {
|
|
9
|
+
if (packageRole && ROLE_DISPLAY[packageRole]) {
|
|
10
|
+
return ROLE_DISPLAY[packageRole];
|
|
11
|
+
}
|
|
12
|
+
if (!packageName)
|
|
13
|
+
return packageName;
|
|
14
|
+
if (packageName.length <= 3)
|
|
15
|
+
return packageName.toUpperCase();
|
|
16
|
+
return packageName.charAt(0).toUpperCase() + packageName.slice(1);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postureVocabularyGuard.test.d.ts","sourceRoot":"","sources":["../../../src/presentation/intent/postureVocabularyGuard.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { applyPostureVocabularyGuardHeadline, applyPostureVocabularyGuardLines, guardHeadlineForPosture, } from "./applyPostureVocabularyGuard.js";
|
|
3
|
+
describe("applyPostureVocabularyGuard", () => {
|
|
4
|
+
it("substitutes safe headline when review language present", () => {
|
|
5
|
+
const out = guardHeadlineForPosture("typescript dependency upgrade needs review", "safe", "typescript");
|
|
6
|
+
expect(out.toLowerCase()).not.toContain("needs review");
|
|
7
|
+
expect(out.toLowerCase()).toContain("typescript");
|
|
8
|
+
});
|
|
9
|
+
it("filters safe-forbidden key points", () => {
|
|
10
|
+
const lines = applyPostureVocabularyGuardLines(["No runtime usage paths detected", "High risk upgrade path"], "safe");
|
|
11
|
+
expect(lines).toContain("No runtime usage paths detected");
|
|
12
|
+
expect(lines.some((l) => /high risk/i.test(l))).toBe(false);
|
|
13
|
+
});
|
|
14
|
+
it("filters needs_review forbidden verification", () => {
|
|
15
|
+
const lines = applyPostureVocabularyGuardLines(["Confirm CI passes", "No action required"], "needs_review");
|
|
16
|
+
expect(lines).toContain("Confirm CI passes");
|
|
17
|
+
expect(lines.some((l) => /no action required/i.test(l))).toBe(false);
|
|
18
|
+
});
|
|
19
|
+
it("allows review headline for needs_review posture", () => {
|
|
20
|
+
const out = applyPostureVocabularyGuardHeadline("lodash dependency upgrade needs review", "needs_review", "lodash");
|
|
21
|
+
expect(out).toContain("needs review");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PackageExpectedImpact } from "../../scanNarrativeFacts.js";
|
|
2
|
+
export type PresentationIntent = "limited_context" | "no_changed_packages" | "tooling_patch" | "tooling_upgrade" | "runtime_upgrade" | "auth_runtime_upgrade" | "queue_runtime_upgrade" | "multi_runtime_upgrade" | "unknown_upgrade";
|
|
3
|
+
export type PresentationInterpretation = {
|
|
4
|
+
intent: PresentationIntent;
|
|
5
|
+
anchorPackage: string | null;
|
|
6
|
+
suppressRuntimeNarrative: boolean;
|
|
7
|
+
allowRuntimeNarrative: boolean;
|
|
8
|
+
showLimitedEvidence: boolean;
|
|
9
|
+
expectedImpactKey: PackageExpectedImpact | null;
|
|
10
|
+
verificationLabels: string[];
|
|
11
|
+
runtimeSurfaceLabel: string | null;
|
|
12
|
+
runtimePackages: string[];
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=presentationIntent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentationIntent.d.ts","sourceRoot":"","sources":["../../../src/presentation/intent/presentationIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B,iBAAiB,GACjB,qBAAqB,GACrB,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,sBAAsB,GACtB,uBAAuB,GACvB,uBAAuB,GACvB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,iBAAiB,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentationIntent.test.d.ts","sourceRoot":"","sources":["../../../src/presentation/intent/presentationIntent.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { deriveScanNarrative } from "../../deriveScanNarrative.js";
|
|
3
|
+
import { scanResultMixedTypescriptFastify, scanResultTypescriptPatch, scanResultFastifyRuntime, } from "../fixtures/presentationPersonaFixtures.js";
|
|
4
|
+
import { derivePresentationInterpretation } from "./derivePresentationInterpretation.js";
|
|
5
|
+
describe("derivePresentationInterpretation", () => {
|
|
6
|
+
it("typescript patch: tooling_patch intent from engine semantics", () => {
|
|
7
|
+
const facts = deriveScanNarrative(scanResultTypescriptPatch);
|
|
8
|
+
const interp = derivePresentationInterpretation(facts);
|
|
9
|
+
// Engine: suppressRuntimeNarrative=true, expectedImpact=typecheck, dependencyClass=tooling
|
|
10
|
+
expect(interp.intent).toBe("tooling_patch");
|
|
11
|
+
expect(interp.anchorPackage).toBe("typescript");
|
|
12
|
+
expect(interp.suppressRuntimeNarrative).toBe(true);
|
|
13
|
+
});
|
|
14
|
+
it("fastify: runtime_upgrade from runtimeImpact=confirmed", () => {
|
|
15
|
+
const facts = deriveScanNarrative(scanResultFastifyRuntime);
|
|
16
|
+
const interp = derivePresentationInterpretation(facts);
|
|
17
|
+
expect(interp.intent).toBe("runtime_upgrade");
|
|
18
|
+
expect(interp.anchorPackage).toBe("fastify");
|
|
19
|
+
expect(interp.allowRuntimeNarrative).toBe(true);
|
|
20
|
+
});
|
|
21
|
+
it("mixed typescript+fastify: runtime dominates tooling (anchor fastify)", () => {
|
|
22
|
+
const facts = deriveScanNarrative(scanResultMixedTypescriptFastify);
|
|
23
|
+
const interp = derivePresentationInterpretation(facts);
|
|
24
|
+
expect(interp.intent).toBe("runtime_upgrade");
|
|
25
|
+
expect(interp.anchorPackage).toBe("fastify");
|
|
26
|
+
expect(interp.runtimePackages).toContain("fastify");
|
|
27
|
+
expect(interp.runtimePackages).not.toContain("typescript");
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verificationFocusLabels.d.ts","sourceRoot":"","sources":["../../../src/presentation/intent/verificationFocusLabels.ts"],"names":[],"mappings":"AA2BA,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAAE,EAAE,EACtB,GAAG,SAAI,GACN,MAAM,EAAE,CAeV"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const FOCUS_LABELS = {
|
|
2
|
+
ci: "CI",
|
|
3
|
+
typecheck: "typecheck",
|
|
4
|
+
build: "build",
|
|
5
|
+
routes: "routes",
|
|
6
|
+
middleware: "middleware/hooks",
|
|
7
|
+
hooks: "middleware/hooks",
|
|
8
|
+
auth_flow: "auth flow",
|
|
9
|
+
auth: "auth flow",
|
|
10
|
+
serialization: "serialization",
|
|
11
|
+
error_handling: "error handling",
|
|
12
|
+
handlers: "handlers",
|
|
13
|
+
plugins: "plugins",
|
|
14
|
+
session: "session",
|
|
15
|
+
workers: "workers",
|
|
16
|
+
queue: "queue",
|
|
17
|
+
test_suite: "test suite",
|
|
18
|
+
lint: "lint",
|
|
19
|
+
format: "format",
|
|
20
|
+
};
|
|
21
|
+
function labelVerificationFocus(focus) {
|
|
22
|
+
const key = focus.trim().toLowerCase();
|
|
23
|
+
if (!key)
|
|
24
|
+
return "";
|
|
25
|
+
return FOCUS_LABELS[key] ?? focus.replace(/_/g, " ");
|
|
26
|
+
}
|
|
27
|
+
export function mergeVerificationFocusLabels(focusLists, max = 6) {
|
|
28
|
+
const seen = new Set();
|
|
29
|
+
const out = [];
|
|
30
|
+
for (const list of focusLists) {
|
|
31
|
+
for (const f of list) {
|
|
32
|
+
const label = labelVerificationFocus(f);
|
|
33
|
+
if (!label)
|
|
34
|
+
continue;
|
|
35
|
+
const norm = label.toLowerCase();
|
|
36
|
+
if (seen.has(norm))
|
|
37
|
+
continue;
|
|
38
|
+
seen.add(norm);
|
|
39
|
+
out.push(label);
|
|
40
|
+
if (out.length >= max)
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
@@ -64,6 +64,9 @@ describe("presentScanCard personas", () => {
|
|
|
64
64
|
const card = presentScanCard(bundle);
|
|
65
65
|
expect(card.density).toBe("minimal");
|
|
66
66
|
expect(card.status).toBe("safe");
|
|
67
|
+
expect(card.presentationIntent).toBe("tooling_patch");
|
|
68
|
+
expect(card.headline).toMatch(/patch upgrade/i);
|
|
69
|
+
expect(card.headline).not.toMatch(/needs review/i);
|
|
67
70
|
expect(card.changedPackages).toContain("typescript");
|
|
68
71
|
expect(card.verificationActions.length).toBeGreaterThan(0);
|
|
69
72
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentationPersonas.test.d.ts","sourceRoot":"","sources":["../../src/presentation/presentationPersonas.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { buildScanPresentationBundle } from "./orchestration/buildScanPresentationBundle.js";
|
|
3
|
+
import { presentScanCard } from "./presenters/presentScanCard.js";
|
|
4
|
+
import { presentScanDetails } from "./presenters/presentScanDetails.js";
|
|
5
|
+
import { presentCliScanSummary } from "./presenters/presentCliScanSummary.js";
|
|
6
|
+
import { scanResultBullmq, scanResultEslint, scanResultFastifyRuntime, scanResultLimitedContext, scanResultMixedTypescriptFastify, scanResultNextAuth, scanResultPrettier, scanResultTypescriptPatch, scanResultUnknownSafe, scanResultVitest, } from "./fixtures/presentationPersonaFixtures.js";
|
|
7
|
+
const SCAN_ID = "22222222-2222-4222-8222-222222222222";
|
|
8
|
+
const SAFE_FORBIDDEN = /needs review|high risk|critical concern/i;
|
|
9
|
+
const REVIEW_FORBIDDEN = /no action required|no verification required/i;
|
|
10
|
+
const personas = [
|
|
11
|
+
{
|
|
12
|
+
name: "typescript patch",
|
|
13
|
+
result: scanResultTypescriptPatch,
|
|
14
|
+
intent: "tooling_patch",
|
|
15
|
+
status: "safe",
|
|
16
|
+
density: "minimal",
|
|
17
|
+
headlineMatch: /patch upgrade/i,
|
|
18
|
+
headlineMustNot: /needs review/i,
|
|
19
|
+
verificationIncludes: ["CI", "typecheck"],
|
|
20
|
+
verificationMustNot: /auth flow/i,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "eslint",
|
|
24
|
+
result: scanResultEslint,
|
|
25
|
+
intent: "tooling_upgrade",
|
|
26
|
+
status: "safe",
|
|
27
|
+
density: "minimal",
|
|
28
|
+
headlineMatch: /tooling upgrade/i,
|
|
29
|
+
headlineMustNot: /needs review/i,
|
|
30
|
+
verificationIncludes: ["CI", "lint"],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "prettier",
|
|
34
|
+
result: scanResultPrettier,
|
|
35
|
+
intent: "tooling_upgrade",
|
|
36
|
+
status: "safe",
|
|
37
|
+
density: "minimal",
|
|
38
|
+
headlineMatch: /tooling upgrade/i,
|
|
39
|
+
headlineMustNot: /needs review/i,
|
|
40
|
+
verificationIncludes: ["format"],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "vitest",
|
|
44
|
+
result: scanResultVitest,
|
|
45
|
+
intent: "tooling_upgrade",
|
|
46
|
+
status: "safe",
|
|
47
|
+
density: "minimal",
|
|
48
|
+
headlineMatch: /tooling upgrade/i,
|
|
49
|
+
headlineMustNot: /needs review/i,
|
|
50
|
+
verificationIncludes: ["test suite"],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "fastify runtime",
|
|
54
|
+
result: scanResultFastifyRuntime,
|
|
55
|
+
intent: "runtime_upgrade",
|
|
56
|
+
status: "needs_review",
|
|
57
|
+
density: "rich",
|
|
58
|
+
headlineMatch: /runtime upgrade affects/i,
|
|
59
|
+
verificationIncludes: ["routes", "middleware"],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "nextauth runtime",
|
|
63
|
+
result: scanResultNextAuth,
|
|
64
|
+
intent: "auth_runtime_upgrade",
|
|
65
|
+
status: "needs_review",
|
|
66
|
+
density: "rich",
|
|
67
|
+
headlineMatch: /runtime upgrade affects/i,
|
|
68
|
+
verificationIncludes: ["auth flow"],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "bullmq runtime",
|
|
72
|
+
result: scanResultBullmq,
|
|
73
|
+
intent: "queue_runtime_upgrade",
|
|
74
|
+
status: "needs_review",
|
|
75
|
+
density: "rich",
|
|
76
|
+
headlineMatch: /runtime upgrade affects/i,
|
|
77
|
+
verificationIncludes: ["workers", "queue"],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "limited context",
|
|
81
|
+
result: scanResultLimitedContext,
|
|
82
|
+
intent: "limited_context",
|
|
83
|
+
status: "needs_review",
|
|
84
|
+
density: "minimal",
|
|
85
|
+
headlineMatch: /limited scan context/i,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "unknown safe",
|
|
89
|
+
result: scanResultUnknownSafe,
|
|
90
|
+
intent: "unknown_upgrade",
|
|
91
|
+
status: "safe",
|
|
92
|
+
density: "standard",
|
|
93
|
+
headlineMatch: /dependency upgrade/i,
|
|
94
|
+
headlineMustNot: /needs review/i,
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
function cardFor(result) {
|
|
98
|
+
const bundle = buildScanPresentationBundle({
|
|
99
|
+
result,
|
|
100
|
+
pipelineStatus: "done",
|
|
101
|
+
});
|
|
102
|
+
return presentScanCard(bundle);
|
|
103
|
+
}
|
|
104
|
+
describe("presentation personas", () => {
|
|
105
|
+
for (const persona of personas) {
|
|
106
|
+
it(`${persona.name}: intent, posture alignment, headline`, () => {
|
|
107
|
+
const card = cardFor(persona.result);
|
|
108
|
+
expect(card.presentationIntent).toBe(persona.intent);
|
|
109
|
+
expect(card.status).toBe(persona.status);
|
|
110
|
+
expect(card.density).toBe(persona.density);
|
|
111
|
+
expect(card.headline).toMatch(persona.headlineMatch);
|
|
112
|
+
if (persona.headlineMustNot) {
|
|
113
|
+
expect(card.headline).not.toMatch(persona.headlineMustNot);
|
|
114
|
+
}
|
|
115
|
+
if (persona.status === "safe") {
|
|
116
|
+
const combined = [
|
|
117
|
+
card.headline,
|
|
118
|
+
...card.keyPoints,
|
|
119
|
+
...card.verificationActions,
|
|
120
|
+
].join(" ");
|
|
121
|
+
expect(combined).not.toMatch(SAFE_FORBIDDEN);
|
|
122
|
+
}
|
|
123
|
+
if (persona.status === "needs_review") {
|
|
124
|
+
const combined = card.verificationActions.join(" ");
|
|
125
|
+
expect(combined).not.toMatch(REVIEW_FORBIDDEN);
|
|
126
|
+
}
|
|
127
|
+
if (persona.verificationIncludes) {
|
|
128
|
+
for (const v of persona.verificationIncludes) {
|
|
129
|
+
expect(card.verificationActions.some((a) => a.toLowerCase().includes(v.toLowerCase()))).toBe(true);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (persona.verificationMustNot) {
|
|
133
|
+
expect(card.verificationActions.join(" ")).not.toMatch(persona.verificationMustNot);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
it("mixed typescript+fastify: runtime intent, fastify in headline", () => {
|
|
138
|
+
const card = cardFor(scanResultMixedTypescriptFastify);
|
|
139
|
+
expect(card.presentationIntent).toBe("runtime_upgrade");
|
|
140
|
+
expect(card.headline.toLowerCase()).toContain("fastify");
|
|
141
|
+
expect(card.headline).not.toMatch(/patch upgrade/i);
|
|
142
|
+
});
|
|
143
|
+
it("cross-surface parity: fastify headline matches card, details, CLI", () => {
|
|
144
|
+
const bundle = buildScanPresentationBundle({
|
|
145
|
+
result: scanResultFastifyRuntime,
|
|
146
|
+
pipelineStatus: "done",
|
|
147
|
+
});
|
|
148
|
+
const card = presentScanCard(bundle);
|
|
149
|
+
const details = presentScanDetails(bundle, { scanId: SCAN_ID });
|
|
150
|
+
const cli = presentCliScanSummary(bundle, { repoLabel: "acme/api" });
|
|
151
|
+
expect(details.hero.headline).toBe(card.headline);
|
|
152
|
+
expect(cli.headline).toBe(card.headline);
|
|
153
|
+
});
|
|
154
|
+
it("cross-surface parity: typescript headline matches card, details, CLI", () => {
|
|
155
|
+
const bundle = buildScanPresentationBundle({
|
|
156
|
+
result: scanResultTypescriptPatch,
|
|
157
|
+
pipelineStatus: "done",
|
|
158
|
+
});
|
|
159
|
+
const card = presentScanCard(bundle);
|
|
160
|
+
const details = presentScanDetails(bundle, { scanId: SCAN_ID });
|
|
161
|
+
const cli = presentCliScanSummary(bundle, { repoLabel: "acme/api" });
|
|
162
|
+
expect(details.hero.headline).toBe(card.headline);
|
|
163
|
+
expect(cli.headline).toBe(card.headline);
|
|
164
|
+
expect(card.headline).not.toMatch(/needs review/i);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentScanCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanCard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAgB3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,sBAAsB,GAAG;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAsBF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,EAC9B,GAAG,GAAE,sBAA2B,GAC/B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"presentScanCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanCard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAgB3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,sBAAsB,GAAG;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAsBF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,EAC9B,GAAG,GAAE,sBAA2B,GAC/B,oBAAoB,CA0BtB"}
|
|
@@ -38,6 +38,7 @@ export function presentScanCard(bundle, ctx = {}) {
|
|
|
38
38
|
? aggregateFindingCounts(result.findings)
|
|
39
39
|
: null,
|
|
40
40
|
actionLabel: scanSurfaceCopy.presentation.actionLabelReview,
|
|
41
|
+
presentationIntent: profile.interpretation.intent,
|
|
41
42
|
};
|
|
42
43
|
return normalizeCard(presentation);
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentScanDetails.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanDetails.ts"],"names":[],"mappings":"AAoBA,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,
|
|
1
|
+
{"version":3,"file":"presentScanDetails.d.ts","sourceRoot":"","sources":["../../../src/presentation/presenters/presentScanDetails.ts"],"names":[],"mappings":"AAoBA,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,CAyFzB"}
|
|
@@ -123,15 +123,21 @@ export function presentScanDetails(bundle, ctx) {
|
|
|
123
123
|
: undefined;
|
|
124
124
|
const posture = profile.status;
|
|
125
125
|
const postureLabel = MERGE_POSTURE_LABEL[posture];
|
|
126
|
+
const toolingIntent = profile.interpretation.intent === "tooling_patch" ||
|
|
127
|
+
profile.interpretation.intent === "tooling_upgrade";
|
|
128
|
+
const verdictLine = profile.priority === "pr_intelligence" && toolingIntent && keyPoints[0]
|
|
129
|
+
? keyPoints[0]
|
|
130
|
+
: deriveVerdictLineFromFacts(facts, result);
|
|
126
131
|
return {
|
|
127
132
|
evidenceContext: evidenceContextFromProfile(bundle),
|
|
128
133
|
status: profile.status,
|
|
129
134
|
density: profile.density,
|
|
130
135
|
confidence: profile.confidence,
|
|
136
|
+
presentationIntent: profile.interpretation.intent,
|
|
131
137
|
hero: {
|
|
132
138
|
headline: normalizeGeneratedText(headline),
|
|
133
139
|
subheadline: normalizeGeneratedTextNullable(subheadline) ?? undefined,
|
|
134
|
-
verdictLine:
|
|
140
|
+
verdictLine: normalizeGeneratedText(verdictLine),
|
|
135
141
|
scopeChip: deriveDetailReachChip(result.totalScore) ?? undefined,
|
|
136
142
|
postureLabel,
|
|
137
143
|
riskIndex: facts.riskIndex,
|
|
@@ -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,28 +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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
+
}
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
facts.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
if (interpretation.suppressRuntimeNarrative) {
|
|
44
|
+
const narrow = !facts.blastRadius || facts.blastRadius.level === "narrow";
|
|
45
|
+
if (narrow && facts.affectedAreas.length === 0) {
|
|
46
|
+
return "minimal";
|
|
47
|
+
}
|
|
51
48
|
}
|
|
52
49
|
return "standard";
|
|
53
50
|
}
|
|
@@ -67,11 +64,12 @@ function deriveConfidence(facts, priority) {
|
|
|
67
64
|
export function derivePresentationProfile(facts, ctx) {
|
|
68
65
|
if (ctx.pipelineStatus !== "done")
|
|
69
66
|
return null;
|
|
67
|
+
const interpretation = derivePresentationInterpretation(facts);
|
|
70
68
|
const priority = hasStrongPrIntelligence(facts)
|
|
71
69
|
? "pr_intelligence"
|
|
72
70
|
: "limited";
|
|
73
71
|
const status = resolveStatus(facts, ctx);
|
|
74
|
-
const density = deriveDensity(facts, priority);
|
|
72
|
+
const density = deriveDensity(facts, priority, interpretation);
|
|
75
73
|
const confidence = deriveConfidence(facts, priority);
|
|
76
74
|
const degradedMessage = priority === "limited"
|
|
77
75
|
? scanSurfaceCopy.presentation.limitedContextMessage
|
|
@@ -82,5 +80,6 @@ export function derivePresentationProfile(facts, ctx) {
|
|
|
82
80
|
confidence,
|
|
83
81
|
priority,
|
|
84
82
|
degradedMessage,
|
|
83
|
+
interpretation,
|
|
85
84
|
};
|
|
86
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repoIntelligenceMappers.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceMappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE/E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,sBAAsB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,CAapB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,MAAM,EAAE,wBAAwB,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,oBAAoB,CAAC;CACvC,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"repoIntelligenceMappers.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceMappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,gEAAgE;AAChE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhF,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE/E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,sBAAsB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAC5B,kBAAkB,CAapB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,MAAM,EAAE,wBAAwB,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,oBAAoB,CAAC;CACvC,GAAG,gBAAgB,CAgCnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD"}
|
|
@@ -48,7 +48,14 @@ export function mapReachabilityKind(input) {
|
|
|
48
48
|
return "unreachable";
|
|
49
49
|
}
|
|
50
50
|
if (bucket === "moderate" || bucket === "high") {
|
|
51
|
-
|
|
51
|
+
if (dominantSurface === "test")
|
|
52
|
+
return "test_only";
|
|
53
|
+
if (dominantSurface === "build" ||
|
|
54
|
+
dominantSurface === "dev" ||
|
|
55
|
+
dominantSurface === "ci") {
|
|
56
|
+
return "build_only";
|
|
57
|
+
}
|
|
58
|
+
return "unknown";
|
|
52
59
|
}
|
|
53
60
|
return "unknown";
|
|
54
61
|
}
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
import type { ScanResult } from "./types.js";
|
|
10
10
|
import type { BlastRadiusLevel } from "./scanNarrativeFacts.js";
|
|
11
11
|
/** Bump when wire schema changes incompatibly. */
|
|
12
|
-
export declare const REPO_INTELLIGENCE_ABI: "
|
|
12
|
+
export declare const REPO_INTELLIGENCE_ABI: "2";
|
|
13
13
|
/** Strict canonical wire schema — single source of truth. */
|
|
14
14
|
export declare const repoIntelligenceWireSchema: z.ZodObject<{
|
|
15
15
|
packages: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -34,6 +34,73 @@ export declare const repoIntelligenceWireSchema: z.ZodObject<{
|
|
|
34
34
|
areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
35
|
}, z.core.$strip>;
|
|
36
36
|
areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
dependencyClass: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
unknown: "unknown";
|
|
39
|
+
runtime: "runtime";
|
|
40
|
+
build: "build";
|
|
41
|
+
test: "test";
|
|
42
|
+
tooling: "tooling";
|
|
43
|
+
lint: "lint";
|
|
44
|
+
format: "format";
|
|
45
|
+
ci: "ci";
|
|
46
|
+
}>>;
|
|
47
|
+
packageRole: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
unknown: "unknown";
|
|
49
|
+
typechecker: "typechecker";
|
|
50
|
+
compiler: "compiler";
|
|
51
|
+
bundler: "bundler";
|
|
52
|
+
linter: "linter";
|
|
53
|
+
formatter: "formatter";
|
|
54
|
+
test_runner: "test_runner";
|
|
55
|
+
http_framework: "http_framework";
|
|
56
|
+
auth: "auth";
|
|
57
|
+
queue: "queue";
|
|
58
|
+
orm: "orm";
|
|
59
|
+
}>>;
|
|
60
|
+
lockfileKind: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
unknown: "unknown";
|
|
62
|
+
optional: "optional";
|
|
63
|
+
production: "production";
|
|
64
|
+
development: "development";
|
|
65
|
+
}>>;
|
|
66
|
+
runtimeImpact: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
unknown: "unknown";
|
|
68
|
+
confirmed: "confirmed";
|
|
69
|
+
none: "none";
|
|
70
|
+
possible: "possible";
|
|
71
|
+
}>>;
|
|
72
|
+
expectedImpact: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
unknown: "unknown";
|
|
74
|
+
runtime: "runtime";
|
|
75
|
+
build_time: "build_time";
|
|
76
|
+
typecheck: "typecheck";
|
|
77
|
+
test_time: "test_time";
|
|
78
|
+
development_only: "development_only";
|
|
79
|
+
}>>;
|
|
80
|
+
evidenceStrength: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
low: "low";
|
|
82
|
+
medium: "medium";
|
|
83
|
+
high: "high";
|
|
84
|
+
}>>;
|
|
85
|
+
confidenceReason: z.ZodOptional<z.ZodString>;
|
|
86
|
+
verificationFocus: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
suppressRuntimeNarrative: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
classificationProvenance: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
dependencyClass: z.ZodEnum<{
|
|
90
|
+
unknown: "unknown";
|
|
91
|
+
graph: "graph";
|
|
92
|
+
registry: "registry";
|
|
93
|
+
lockfile: "lockfile";
|
|
94
|
+
heuristic: "heuristic";
|
|
95
|
+
}>;
|
|
96
|
+
packageRole: z.ZodEnum<{
|
|
97
|
+
unknown: "unknown";
|
|
98
|
+
graph: "graph";
|
|
99
|
+
registry: "registry";
|
|
100
|
+
heuristic: "heuristic";
|
|
101
|
+
}>;
|
|
102
|
+
registryEntryId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
37
104
|
}, z.core.$strip>>;
|
|
38
105
|
packageUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
106
|
packageName: z.ZodString;
|
|
@@ -69,6 +136,13 @@ export declare const repoIntelligenceWireSchema: z.ZodObject<{
|
|
|
69
136
|
paths: z.ZodArray<z.ZodString>;
|
|
70
137
|
}, z.core.$strip>>>;
|
|
71
138
|
frameworks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
semanticDiagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
+
packageName: z.ZodString;
|
|
141
|
+
ruleId: z.ZodString;
|
|
142
|
+
before: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
143
|
+
after: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
144
|
+
reason: z.ZodString;
|
|
145
|
+
}, z.core.$strip>>>;
|
|
72
146
|
}, z.core.$strip>;
|
|
73
147
|
export type RepoIntelligence = z.infer<typeof repoIntelligenceWireSchema>;
|
|
74
148
|
export type ParseRepoIntelligenceSuccess = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repoIntelligenceSchema.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceSchema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,EAAG,GAAY,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"repoIntelligenceSchema.d.ts","sourceRoot":"","sources":["../src/repoIntelligenceSchema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,EAAG,GAAY,CAAC;AA+HlD,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASrC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE1E,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,EAAE,IAAI,CAAC;IACT,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GACnC,4BAA4B,GAC5B,4BAA4B,CAAC;AAQjC,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAUlE;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,GACX,2BAA2B,CAyC7B;AAED,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAM3E;AAED,mFAAmF;AACnF,wBAAgB,uCAAuC,CACrD,IAAI,EAAE,UAAU,GACf,IAAI,CAGN;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,gBAAgB,GAAG,SAAS,GAClC,gBAAgB,GAAG,IAAI,CAKzB"}
|