@descryy/mcp 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/driver.d.ts +51 -2
- package/dist/browser/driver.d.ts.map +1 -1
- package/dist/browser/driver.js +16 -2
- package/dist/browser/driver.js.map +1 -1
- package/dist/browser/evidence.d.ts +9 -0
- package/dist/browser/evidence.d.ts.map +1 -1
- package/dist/browser/evidence.js +10 -2
- package/dist/browser/evidence.js.map +1 -1
- package/dist/browser/fake-driver.d.ts +8 -0
- package/dist/browser/fake-driver.d.ts.map +1 -1
- package/dist/browser/fake-driver.js +22 -1
- package/dist/browser/fake-driver.js.map +1 -1
- package/dist/browser/playwright-driver.d.ts +36 -2
- package/dist/browser/playwright-driver.d.ts.map +1 -1
- package/dist/browser/playwright-driver.js +176 -19
- package/dist/browser/playwright-driver.js.map +1 -1
- package/dist/browser/scenario-runner.d.ts.map +1 -1
- package/dist/browser/scenario-runner.js +3 -1
- package/dist/browser/scenario-runner.js.map +1 -1
- package/dist/browser/tool-support.js +1 -1
- package/dist/browser/tool-support.js.map +1 -1
- package/dist/capped.d.ts +41 -0
- package/dist/capped.d.ts.map +1 -0
- package/dist/capped.js +35 -0
- package/dist/capped.js.map +1 -0
- package/dist/render.d.ts +37 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +52 -4
- package/dist/render.js.map +1 -1
- package/dist/runtime-registry.d.ts +19 -1
- package/dist/runtime-registry.d.ts.map +1 -1
- package/dist/runtime-registry.js +88 -4
- package/dist/runtime-registry.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +23 -1
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +22 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +27 -1
- package/dist/session.js.map +1 -1
- package/dist/tools/analyze.d.ts +23 -3
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +34 -2
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/browser-save-scenario.d.ts.map +1 -1
- package/dist/tools/browser-save-scenario.js +109 -3
- package/dist/tools/browser-save-scenario.js.map +1 -1
- package/dist/tools/browser-start-session.d.ts.map +1 -1
- package/dist/tools/browser-start-session.js +9 -0
- package/dist/tools/browser-start-session.js.map +1 -1
- package/dist/tools/contracts.d.ts +41 -10
- package/dist/tools/contracts.d.ts.map +1 -1
- package/dist/tools/contracts.js +117 -17
- package/dist/tools/contracts.js.map +1 -1
- package/dist/tools/cross-pr.d.ts +39 -10
- package/dist/tools/cross-pr.d.ts.map +1 -1
- package/dist/tools/cross-pr.js +113 -29
- package/dist/tools/cross-pr.js.map +1 -1
- package/dist/tools/git-diff.d.ts.map +1 -1
- package/dist/tools/git-diff.js +30 -2
- package/dist/tools/git-diff.js.map +1 -1
- package/dist/tools/observe-runtime.js +1 -1
- package/dist/tools/observe-runtime.js.map +1 -1
- package/dist/tools/observe-tests.d.ts +12 -0
- package/dist/tools/observe-tests.d.ts.map +1 -1
- package/dist/tools/observe-tests.js +59 -5
- package/dist/tools/observe-tests.js.map +1 -1
- package/dist/tools/pre-push.d.ts +40 -7
- package/dist/tools/pre-push.d.ts.map +1 -1
- package/dist/tools/pre-push.js +65 -23
- package/dist/tools/pre-push.js.map +1 -1
- package/dist/tools/scope.d.ts.map +1 -1
- package/dist/tools/scope.js +20 -4
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/validate.d.ts +40 -1
- package/dist/tools/validate.d.ts.map +1 -1
- package/dist/tools/validate.js +150 -27
- package/dist/tools/validate.js.map +1 -1
- package/package.json +20 -12
package/dist/tools/contracts.js
CHANGED
|
@@ -20,6 +20,26 @@
|
|
|
20
20
|
*
|
|
21
21
|
* The one case that *is* `refused` outright: no endpoints in the graph.
|
|
22
22
|
* Then neither half looked at anything.
|
|
23
|
+
*
|
|
24
|
+
* ## A filter matching nothing is not a clean bill of health
|
|
25
|
+
*
|
|
26
|
+
* UAT round 3, Suggestion 5. `paths: ["/reviews"]` on a repository whose
|
|
27
|
+
* `/reviews` route was never parsed as an `API_ROUTE` at all returned
|
|
28
|
+
* `state: "ok"`, `"Clean at path level."`, `findings: []` — indistinguishable
|
|
29
|
+
* from "checked `/reviews` and it is fine." Zero endpoints matched the filter,
|
|
30
|
+
* not zero problems with the endpoint it named. So a `paths` filter that
|
|
31
|
+
* matches no `API_ENDPOINT` in the graph now reports `state: "empty"` with an
|
|
32
|
+
* explicit count, before the "clean" verdict can be reached at all.
|
|
33
|
+
*
|
|
34
|
+
* ## Claim: defect versus lead
|
|
35
|
+
*
|
|
36
|
+
* UAT round 3, Suggestion 6, following `EnvFinding.claim`'s precedent
|
|
37
|
+
* (`validate`). `CALL_NOT_SERVED` and every shape mismatch are `defect` —
|
|
38
|
+
* provable from this graph (and, for a mismatch, a type checker) alone.
|
|
39
|
+
* `ROUTE_NOT_CALLED` is `lead` — a mobile client, another service, or an
|
|
40
|
+
* external consumer would not appear in this graph, so "nothing calls it" is
|
|
41
|
+
* never provable, only worth a look. This is orthogonal to `prominence`,
|
|
42
|
+
* which still orders by evidence strength alone.
|
|
23
43
|
*/
|
|
24
44
|
import { checkContracts, withProminence } from "@descryy/core";
|
|
25
45
|
import { briefNode, optionalInteger, optionalStringArray, } from "./kit.js";
|
|
@@ -30,7 +50,14 @@ const SCHEMA = {
|
|
|
30
50
|
type: "array",
|
|
31
51
|
items: { type: "string" },
|
|
32
52
|
description: "Restrict the report to endpoints whose normalised path template contains one of these " +
|
|
33
|
-
"substrings, e.g. \"/orders\".",
|
|
53
|
+
"substrings, e.g. \"/orders\". Matching zero endpoints is reported as empty, not clean.",
|
|
54
|
+
},
|
|
55
|
+
files: {
|
|
56
|
+
type: "array",
|
|
57
|
+
items: { type: "string" },
|
|
58
|
+
description: "Restrict the report to findings touching these repo-relative source files — e.g. what a " +
|
|
59
|
+
"git hook is about to push. A finding is kept when any caller, route, or (for a shape " +
|
|
60
|
+
"mismatch) reader/writer node's file is in this set.",
|
|
34
61
|
},
|
|
35
62
|
pathsOnly: {
|
|
36
63
|
type: "boolean",
|
|
@@ -45,12 +72,18 @@ const SCHEMA = {
|
|
|
45
72
|
},
|
|
46
73
|
additionalProperties: false,
|
|
47
74
|
};
|
|
75
|
+
/** True when at least one of `nodes` has a `file` in `scope`. No scope given means every node passes. */
|
|
76
|
+
function touchesFiles(nodes, scope) {
|
|
77
|
+
return scope === undefined || nodes.some((n) => n.file !== null && scope.includes(n.file));
|
|
78
|
+
}
|
|
48
79
|
async function run(args, ctx) {
|
|
49
80
|
const filters = optionalStringArray(args, "paths");
|
|
81
|
+
const fileScope = optionalStringArray(args, "files");
|
|
50
82
|
const maxFindings = optionalInteger(args, "maxFindings", 1);
|
|
51
83
|
const pathsOnly = args["pathsOnly"] === true;
|
|
84
|
+
const provider = ctx.session.provider();
|
|
52
85
|
ctx.progress("Matching callers against routes");
|
|
53
|
-
const checked = checkContracts(
|
|
86
|
+
const checked = checkContracts(provider, {
|
|
54
87
|
...(maxFindings === undefined ? {} : { maxFindings }),
|
|
55
88
|
...(pathsOnly ? { pathsOnly: true } : {}),
|
|
56
89
|
});
|
|
@@ -60,25 +93,73 @@ async function run(args, ctx) {
|
|
|
60
93
|
// reader sees — how many endpoints exist, how many joined — describe the whole
|
|
61
94
|
// graph. A denominator that silently shrinks with the filter would make a
|
|
62
95
|
// narrow query look like a healthy repository.
|
|
63
|
-
const
|
|
64
|
-
const findings = paths.findings.filter((f) =>
|
|
65
|
-
const mismatches = shapes.mismatches.filter((m) =>
|
|
96
|
+
const matchesPath = (template) => filters === undefined || filters.some((f) => template.includes(f));
|
|
97
|
+
const findings = paths.findings.filter((f) => matchesPath(f.pathTemplate) && touchesFiles([...f.callers, ...f.routes], fileScope));
|
|
98
|
+
const mismatches = shapes.mismatches.filter((m) => matchesPath(String(m.endpoint.attrs["pathTemplate"] ?? m.endpoint.name)) &&
|
|
99
|
+
touchesFiles([m.reader, m.writer], fileScope));
|
|
66
100
|
if (filters !== undefined) {
|
|
67
101
|
notes.push(`Filtered to endpoints matching ${filters.map((f) => `"${f}"`).join(", ")}. The counts ` +
|
|
68
102
|
"below describe the whole graph; the lists describe the filter.");
|
|
69
103
|
}
|
|
70
|
-
|
|
104
|
+
if (fileScope !== undefined) {
|
|
105
|
+
notes.push(`Filtered to findings touching ${fileScope.length} named file(s). The counts below describe ` +
|
|
106
|
+
"the whole graph; the lists describe the filter.");
|
|
107
|
+
}
|
|
108
|
+
// UAT round 3, Suggestion 5: a `paths` filter matching zero endpoints in the
|
|
109
|
+
// graph is not a clean result — it means the filter named something this
|
|
110
|
+
// graph never parsed as a route or endpoint at all, which is a different
|
|
111
|
+
// claim than "checked it and it is fine." Checked against the full,
|
|
112
|
+
// unfiltered endpoint set so a filter that matches one clean endpoint (a
|
|
113
|
+
// real, checked, empty result) is not confused with one that matches none.
|
|
114
|
+
//
|
|
115
|
+
// API_ROUTE is checked too, not only API_ENDPOINT: a declared-but-unmounted
|
|
116
|
+
// route (ROUTE_NOT_MOUNTED) has no API_ENDPOINT at all by construction — the
|
|
117
|
+
// route node is the only thing in this graph that ever named its path — so a
|
|
118
|
+
// filter matching only that route must still be treated as "matched
|
|
119
|
+
// something real", never collapsed into "0 endpoint(s) matched this
|
|
120
|
+
// filter." Precisely the reviews.py case: filtering to "/reviews" must reach
|
|
121
|
+
// the finding rather than fall through to this refusal.
|
|
122
|
+
let pathsMatchedNothing = false;
|
|
123
|
+
if (filters !== undefined) {
|
|
124
|
+
const endpoints = provider.nodesOfType("API_ENDPOINT");
|
|
125
|
+
const routes = provider.nodesOfType("API_ROUTE");
|
|
126
|
+
const matched = (n) => matchesPath(String(n.attrs["pathTemplate"] ?? n.name));
|
|
127
|
+
pathsMatchedNothing = !endpoints.nodes.some(matched) && !routes.nodes.some(matched);
|
|
128
|
+
}
|
|
129
|
+
const defects = findings.filter((f) => f.claim === "defect").length + mismatches.length;
|
|
130
|
+
const leads = findings.filter((f) => f.claim === "lead").length;
|
|
71
131
|
if (findings.length > 0) {
|
|
72
132
|
notes.push("findings are ranked by evidence strength — their own resolution, strongest first — not by " +
|
|
73
|
-
"
|
|
74
|
-
"
|
|
133
|
+
"claim. A call reaching no route and a route nothing calls can each rest on strong or weak " +
|
|
134
|
+
"evidence; which of them is a defect versus a lead is a separate axis (claim), not a ranking.");
|
|
75
135
|
}
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
136
|
+
// Zero API_ENDPOINT nodes usually means nothing to check — but not when the
|
|
137
|
+
// mount check found a real, independently-provable ROUTE_NOT_MOUNTED finding
|
|
138
|
+
// with no endpoint anywhere in the graph (a repo whose only declared route is
|
|
139
|
+
// an unmounted one). Refusing outright would bury that finding behind a
|
|
140
|
+
// refusal about a different question.
|
|
141
|
+
const nothingToCheck = paths.checked.endpoints === 0 && paths.findingsTotal === 0;
|
|
142
|
+
// MK-7: the leading clause, graded on the axis that actually matters —
|
|
143
|
+
// `claim`. A lead is worth a look; a defect is the thing this tool exists
|
|
144
|
+
// to catch, and every one here is provable from this graph alone —
|
|
145
|
+
// `contracts.ts`'s own header on `nearMiss` is what keeps a mere
|
|
146
|
+
// typo-shaped call out of the defect count, so a nonzero one is never a
|
|
80
147
|
// "maybe".
|
|
81
|
-
const verdict =
|
|
148
|
+
const verdict = defects > 0
|
|
149
|
+
? `${defects} defect(s) found`
|
|
150
|
+
: leads > 0
|
|
151
|
+
? `No defects; ${leads} lead(s) to review`
|
|
152
|
+
: "Clean at path level";
|
|
153
|
+
// Hand-off from Lane 2 (B6): render.ts now refuses to relay a `truncated`
|
|
154
|
+
// answer with no `truncatedDetail` rather than substituting a sentinel, so
|
|
155
|
+
// this has to be supplied whenever `checked.truncated` is set. `total`
|
|
156
|
+
// describes the whole, unfiltered graph — the same convention `checked`
|
|
157
|
+
// above already uses — which is an honest upper bound on `shown` since a
|
|
158
|
+
// `paths`/`files` filter here can only ever remove items from what core
|
|
159
|
+
// already capped, never add to them.
|
|
160
|
+
const truncatedDetail = checked.truncated
|
|
161
|
+
? { shown: findings.length, total: Math.max(paths.findingsTotal, findings.length), more: null }
|
|
162
|
+
: undefined;
|
|
82
163
|
return {
|
|
83
164
|
result: {
|
|
84
165
|
...checked,
|
|
@@ -91,6 +172,7 @@ async function run(args, ctx) {
|
|
|
91
172
|
.sort((a, b) => b.resolution - a.resolution)
|
|
92
173
|
.map((f) => ({
|
|
93
174
|
kind: f.kind,
|
|
175
|
+
claim: f.claim,
|
|
94
176
|
method: f.method,
|
|
95
177
|
path: f.pathTemplate,
|
|
96
178
|
detail: f.detail,
|
|
@@ -108,6 +190,7 @@ async function run(args, ctx) {
|
|
|
108
190
|
writer: briefNode(m.writer),
|
|
109
191
|
differences: m.differences,
|
|
110
192
|
resolution: m.resolution,
|
|
193
|
+
claim: m.claim,
|
|
111
194
|
})),
|
|
112
195
|
checked: paths.checked,
|
|
113
196
|
shapes: {
|
|
@@ -119,19 +202,36 @@ async function run(args, ctx) {
|
|
|
119
202
|
blockers: shapes.blockers,
|
|
120
203
|
},
|
|
121
204
|
unmatchedWithoutNearMiss: paths.unmatchedWithoutNearMiss,
|
|
205
|
+
defects,
|
|
206
|
+
leads,
|
|
122
207
|
},
|
|
123
|
-
notes
|
|
208
|
+
notes: pathsMatchedNothing
|
|
209
|
+
? [
|
|
210
|
+
`0 endpoint(s) matched ${(filters ?? []).map((f) => `"${f}"`).join(", ")}. Nothing in ` +
|
|
211
|
+
"this graph was parsed as a route or endpoint under that filter, so there is nothing " +
|
|
212
|
+
"for \"clean\" to describe — this is not a statement about whether the endpoint you " +
|
|
213
|
+
"meant is correct.",
|
|
214
|
+
...notes,
|
|
215
|
+
]
|
|
216
|
+
: notes,
|
|
124
217
|
},
|
|
125
218
|
// A path finding is a claim about names — this route exists, that one does
|
|
126
219
|
// not — which R2 fully supports. A shape mismatch is not, and `engine.ts`
|
|
127
220
|
// caps each one individually; this flag governs the answer's own headline
|
|
128
221
|
// claim, which is the path half.
|
|
129
222
|
nameLevel: true,
|
|
130
|
-
...(
|
|
223
|
+
...(truncatedDetail === undefined ? {} : { truncatedDetail }),
|
|
224
|
+
...(nothingToCheck
|
|
225
|
+
? { state: "refused" }
|
|
226
|
+
: pathsMatchedNothing
|
|
227
|
+
? { state: "empty" }
|
|
228
|
+
: {}),
|
|
131
229
|
headline: nothingToCheck
|
|
132
230
|
? "No API endpoints are in the graph, so there is no contract to check."
|
|
133
|
-
:
|
|
134
|
-
`
|
|
231
|
+
: pathsMatchedNothing
|
|
232
|
+
? `0 endpoint(s) matched this filter. Not checked, not clean.`
|
|
233
|
+
: `${verdict}. ${paths.checked.joined} of ${paths.checked.endpoints} endpoint(s) have both ` +
|
|
234
|
+
`a caller and a route${shapes.ran ? "" : "; request and response shapes were not compared"}.`,
|
|
135
235
|
};
|
|
136
236
|
}
|
|
137
237
|
export const contractsTool = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAY/D,OAAO,EACL,SAAS,EACT,eAAe,EACf,mBAAmB,GAIpB,MAAM,UAAU,CAAC;AA2GlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,wFAAwF;gBACxF,wFAAwF;SAC3F;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,0FAA0F;gBAC1F,uFAAuF;gBACvF,qDAAqD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jB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,sCAAsC;IAC7C,WAAW,EACT,6FAA6F;QAC7F,+FAA+F;QAC/F,+FAA+F;QAC/F,6FAA6F;QAC7F,6FAA6F;QAC7F,qCAAqC;IACvC,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
package/dist/tools/cross-pr.d.ts
CHANGED
|
@@ -2,28 +2,37 @@
|
|
|
2
2
|
* `cross-pr` — "what does this change collide with, that reading the diff alone
|
|
3
3
|
* would not show?"
|
|
4
4
|
*
|
|
5
|
-
* §14's multi-PR engine, at the protocol level. Four checks exist behind it
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* input.
|
|
5
|
+
* §14's multi-PR engine, at the protocol level. Four checks exist behind it,
|
|
6
|
+
* for a reason worth stating rather than discovering: a check is available
|
|
7
|
+
* exactly when something already produces its input.
|
|
9
8
|
*
|
|
10
9
|
* | check | § | input | today |
|
|
11
10
|
* | --- | --- | --- | --- |
|
|
12
11
|
* | hidden dependency | 14.8 | `CHANGES_WITH` edges, already in the graph | **runs** |
|
|
13
12
|
* | overlap scoring | 14.3 | stored PR scopes | **runs, over whatever is stored** |
|
|
14
13
|
* | superseded | 14.5 | git blob ids at head and at base's tip | **runs** |
|
|
15
|
-
* | migration heads | 14.6 | migration revision + parents |
|
|
14
|
+
* | migration heads | 14.6 | migration revision + parents | **runs when a producer supplies them; declared blocked otherwise** |
|
|
16
15
|
*
|
|
17
16
|
* §14.8 is first because it is the one that costs nothing: the edges already
|
|
18
17
|
* exist, it needs no per-PR storage, and it works at R0 in any language with no
|
|
19
18
|
* adapter beyond file paths. For a repository whose language has no adapter at
|
|
20
19
|
* all, this is the check that still fires.
|
|
21
20
|
*
|
|
22
|
-
*
|
|
21
|
+
* **Migration heads is the one check here independent of the diff itself** —
|
|
22
|
+
* it reads the migration revision chain the graph already carries, not a
|
|
23
|
+
* comparison of base's and head's own migration state, so it can answer even
|
|
24
|
+
* on the two early-return paths where the diff never resolves. It was
|
|
25
|
+
* declared blocked until a producer emitted `migrationRevision`/
|
|
26
|
+
* `migrationDownRevision`/`migrationDir`; now that one does, `blocked` is
|
|
27
|
+
* computed per call rather than fixed, and drops this entry the moment the
|
|
28
|
+
* input exists — the same "declared, never silently omitted" contract stays,
|
|
29
|
+
* it just stops applying to this check.
|
|
30
|
+
*
|
|
31
|
+
* ## Why a check that still cannot run is declared rather than omitted
|
|
23
32
|
*
|
|
24
33
|
* `contracts.ts` set this precedent and the reasoning transfers unchanged: a
|
|
25
|
-
* tool that silently offers three of
|
|
26
|
-
* found" as "nothing there".
|
|
34
|
+
* tool that silently offers three of four checks lets a caller read "nothing
|
|
35
|
+
* found" as "nothing there". A blocked check names the producer it is
|
|
27
36
|
* waiting for, so the gap is actionable rather than mysterious.
|
|
28
37
|
*
|
|
29
38
|
* ## Everything here is Class C and that is not a defect to be fixed
|
|
@@ -32,7 +41,12 @@
|
|
|
32
41
|
* moved together two hundred times is a stronger hint and is still a hint. The
|
|
33
42
|
* checks compute their own reliability rather than being told it, and each
|
|
34
43
|
* finding carries the sentence that must travel with it. A caller rendering
|
|
35
|
-
* these as defects has broken principle 4 at the last gate.
|
|
44
|
+
* these as defects has broken principle 4 at the last gate. Migration heads is
|
|
45
|
+
* the one exception worth naming: a genuine fork in the revision chain is
|
|
46
|
+
* closer to a defect than a hint, but it is left at Class C here too, because
|
|
47
|
+
* this check cannot yet tell a legitimate two-branch merge-in-progress from an
|
|
48
|
+
* actual conflict — that distinction is left to the migration-integrity
|
|
49
|
+
* checks in `validate`, which are provable from the graph alone.
|
|
36
50
|
*/
|
|
37
51
|
import type { DiffType, HiddenDependencyReport, IncomparablePair, NodeVerdict, OverlapFinding, SupersededReport } from "@descryy/core";
|
|
38
52
|
import type { ReliabilityClass } from "@descryy/ir";
|
|
@@ -111,9 +125,24 @@ export interface SupersededCheck {
|
|
|
111
125
|
readonly verdict: NodeVerdict;
|
|
112
126
|
}[];
|
|
113
127
|
}
|
|
114
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* §14.6 — *"would merging these changes leave more than one migration head?"*
|
|
130
|
+
* Independent of the diff succeeding: it reads the migration revision chain
|
|
131
|
+
* already in the graph, not a comparison of base's and head's own state.
|
|
132
|
+
*/
|
|
133
|
+
export interface MigrationHeadsCheck {
|
|
134
|
+
/** False when no module in the graph carried a migration revision — the producer this check waited for has not run. */
|
|
135
|
+
readonly ran: boolean;
|
|
136
|
+
/** Revisions with no other migration in this graph naming them as a parent. */
|
|
137
|
+
readonly heads: readonly string[];
|
|
138
|
+
/** True when there is more than one head — the fork a manual merge revision is needed to resolve. */
|
|
139
|
+
readonly verdict: boolean;
|
|
140
|
+
readonly disclosure: string;
|
|
141
|
+
}
|
|
142
|
+
/** git rejected the range: no diff-dependent check ran, and `blocked` is all there is to say. */
|
|
115
143
|
export interface CrossPrGitFailure {
|
|
116
144
|
readonly blocked: readonly BlockedCheck[];
|
|
145
|
+
readonly migrationHeads: MigrationHeadsCheck;
|
|
117
146
|
}
|
|
118
147
|
/** The diff is empty. A real answer: there is nothing to collide with. */
|
|
119
148
|
export interface CrossPrEmptyDiff extends CrossPrGitFailure {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-pr.d.ts","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cross-pr.d.ts","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAaH,OAAO,KAAK,EACV,QAAQ,EACR,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAML,KA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,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;CAC9C;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;IACnD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAuQ/E,eAAO,MAAM,WAAW,EAAE,cAmBzB,CAAC"}
|
package/dist/tools/cross-pr.js
CHANGED
|
@@ -2,28 +2,37 @@
|
|
|
2
2
|
* `cross-pr` — "what does this change collide with, that reading the diff alone
|
|
3
3
|
* would not show?"
|
|
4
4
|
*
|
|
5
|
-
* §14's multi-PR engine, at the protocol level. Four checks exist behind it
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* input.
|
|
5
|
+
* §14's multi-PR engine, at the protocol level. Four checks exist behind it,
|
|
6
|
+
* for a reason worth stating rather than discovering: a check is available
|
|
7
|
+
* exactly when something already produces its input.
|
|
9
8
|
*
|
|
10
9
|
* | check | § | input | today |
|
|
11
10
|
* | --- | --- | --- | --- |
|
|
12
11
|
* | hidden dependency | 14.8 | `CHANGES_WITH` edges, already in the graph | **runs** |
|
|
13
12
|
* | overlap scoring | 14.3 | stored PR scopes | **runs, over whatever is stored** |
|
|
14
13
|
* | superseded | 14.5 | git blob ids at head and at base's tip | **runs** |
|
|
15
|
-
* | migration heads | 14.6 | migration revision + parents |
|
|
14
|
+
* | migration heads | 14.6 | migration revision + parents | **runs when a producer supplies them; declared blocked otherwise** |
|
|
16
15
|
*
|
|
17
16
|
* §14.8 is first because it is the one that costs nothing: the edges already
|
|
18
17
|
* exist, it needs no per-PR storage, and it works at R0 in any language with no
|
|
19
18
|
* adapter beyond file paths. For a repository whose language has no adapter at
|
|
20
19
|
* all, this is the check that still fires.
|
|
21
20
|
*
|
|
22
|
-
*
|
|
21
|
+
* **Migration heads is the one check here independent of the diff itself** —
|
|
22
|
+
* it reads the migration revision chain the graph already carries, not a
|
|
23
|
+
* comparison of base's and head's own migration state, so it can answer even
|
|
24
|
+
* on the two early-return paths where the diff never resolves. It was
|
|
25
|
+
* declared blocked until a producer emitted `migrationRevision`/
|
|
26
|
+
* `migrationDownRevision`/`migrationDir`; now that one does, `blocked` is
|
|
27
|
+
* computed per call rather than fixed, and drops this entry the moment the
|
|
28
|
+
* input exists — the same "declared, never silently omitted" contract stays,
|
|
29
|
+
* it just stops applying to this check.
|
|
30
|
+
*
|
|
31
|
+
* ## Why a check that still cannot run is declared rather than omitted
|
|
23
32
|
*
|
|
24
33
|
* `contracts.ts` set this precedent and the reasoning transfers unchanged: a
|
|
25
|
-
* tool that silently offers three of
|
|
26
|
-
* found" as "nothing there".
|
|
34
|
+
* tool that silently offers three of four checks lets a caller read "nothing
|
|
35
|
+
* found" as "nothing there". A blocked check names the producer it is
|
|
27
36
|
* waiting for, so the gap is actionable rather than mysterious.
|
|
28
37
|
*
|
|
29
38
|
* ## Everything here is Class C and that is not a defect to be fixed
|
|
@@ -32,10 +41,16 @@
|
|
|
32
41
|
* moved together two hundred times is a stronger hint and is still a hint. The
|
|
33
42
|
* checks compute their own reliability rather than being told it, and each
|
|
34
43
|
* finding carries the sentence that must travel with it. A caller rendering
|
|
35
|
-
* these as defects has broken principle 4 at the last gate.
|
|
44
|
+
* these as defects has broken principle 4 at the last gate. Migration heads is
|
|
45
|
+
* the one exception worth naming: a genuine fork in the revision chain is
|
|
46
|
+
* closer to a defect than a hint, but it is left at Class C here too, because
|
|
47
|
+
* this check cannot yet tell a legitimate two-branch merge-in-progress from an
|
|
48
|
+
* actual conflict — that distinction is left to the migration-integrity
|
|
49
|
+
* checks in `validate`, which are provable from the graph alone.
|
|
36
50
|
*/
|
|
37
|
-
import { changedFiles, findHiddenDependencies, findOverlaps, findSuperseded, nodesInFiles, ScopeStore, supersededCandidates, } from "@descryy/core";
|
|
51
|
+
import { changedFiles, checkMigrationHeads, findHiddenDependencies, findOverlaps, findSuperseded, nodesInFiles, ScopeStore, supersededCandidates, } from "@descryy/core";
|
|
38
52
|
import { answer, briefNode, optionalInteger, optionalString, requiredString, } from "./kit.js";
|
|
53
|
+
import { capped } from "../capped.js";
|
|
39
54
|
const SCHEMA = {
|
|
40
55
|
type: "object",
|
|
41
56
|
properties: {
|
|
@@ -83,6 +98,33 @@ async function run(args, ctx) {
|
|
|
83
98
|
// carve-out that lifts a name-level fact to A begins at R2.
|
|
84
99
|
nameLevel: true,
|
|
85
100
|
};
|
|
101
|
+
// §14.6 — independent of whether the diff itself succeeds: it reads the
|
|
102
|
+
// migration revision chain already in the graph, not a comparison of
|
|
103
|
+
// base's and head's own migration state. Computed once, up front, so every
|
|
104
|
+
// return path below — including the two that never reach a diff — can
|
|
105
|
+
// report a real answer instead of "blocked" now that a producer supplies
|
|
106
|
+
// this input.
|
|
107
|
+
const migrationHeadsResult = checkMigrationHeads(session.provider());
|
|
108
|
+
const headsRan = migrationHeadsResult.data.ran;
|
|
109
|
+
const headCount = migrationHeadsResult.data.heads.length;
|
|
110
|
+
const migrationHeads = {
|
|
111
|
+
ran: headsRan,
|
|
112
|
+
heads: migrationHeadsResult.data.heads,
|
|
113
|
+
verdict: headCount > 1,
|
|
114
|
+
disclosure: !headsRan
|
|
115
|
+
? "No module in the graph carries a migration revision — a producer has not supplied this " +
|
|
116
|
+
"input yet."
|
|
117
|
+
: headCount > 1
|
|
118
|
+
? `${headCount} migration heads found (${migrationHeadsResult.data.heads.join(", ")}). ` +
|
|
119
|
+
"Merging further changes onto more than one of them needs a manual merge revision."
|
|
120
|
+
: `${migrationHeadsResult.data.examined.modulesWithRevision} migration(s) examined; the ` +
|
|
121
|
+
"chain has a single head.",
|
|
122
|
+
};
|
|
123
|
+
// Declared rather than silently omitted, the same precedent `contracts.ts`
|
|
124
|
+
// set: only the checks that genuinely still have no input stay in
|
|
125
|
+
// `blocked` on this call.
|
|
126
|
+
const blocked = headsRan ? [] : BLOCKED;
|
|
127
|
+
const migrationHeadsNotes = migrationHeadsResult.notes;
|
|
86
128
|
ctx.progress(`Diffing ${base}...${head}`, 1, 3);
|
|
87
129
|
let files;
|
|
88
130
|
try {
|
|
@@ -93,10 +135,11 @@ async function run(args, ctx) {
|
|
|
93
135
|
...envelope,
|
|
94
136
|
headline: `Could not diff ${base}...${head}.`,
|
|
95
137
|
state: "refused",
|
|
96
|
-
data: { blocked
|
|
138
|
+
data: { blocked, migrationHeads },
|
|
97
139
|
notes: [
|
|
98
140
|
`git rejected the range: ${error.message.trim()}.`,
|
|
99
141
|
"No check ran, which is not a finding that this change collides with nothing.",
|
|
142
|
+
...migrationHeadsNotes,
|
|
100
143
|
],
|
|
101
144
|
});
|
|
102
145
|
}
|
|
@@ -104,8 +147,8 @@ async function run(args, ctx) {
|
|
|
104
147
|
return answer({
|
|
105
148
|
...envelope,
|
|
106
149
|
headline: "The diff is empty.",
|
|
107
|
-
data: { changedFiles: 0, blocked
|
|
108
|
-
notes: ["An empty diff is a real answer: there is nothing to collide with."],
|
|
150
|
+
data: { changedFiles: 0, blocked, migrationHeads },
|
|
151
|
+
notes: ["An empty diff is a real answer: there is nothing to collide with.", ...migrationHeadsNotes],
|
|
109
152
|
});
|
|
110
153
|
}
|
|
111
154
|
ctx.progress(`Resolving ${files.length} changed file(s)`, 2, 3);
|
|
@@ -128,18 +171,52 @@ async function run(args, ctx) {
|
|
|
128
171
|
const superseded = findSuperseded(produced.candidates, {
|
|
129
172
|
fingerprintBasis: produced.fingerprintBasis,
|
|
130
173
|
});
|
|
131
|
-
|
|
174
|
+
// B8 — `remaining` used to be every not-already-in-base comparison, with no
|
|
175
|
+
// cap at all: one entry per changed file, so the reply scaled with the
|
|
176
|
+
// diff regardless of `limit`. Capped after the already-in-base filter, so
|
|
177
|
+
// the cap counts what would be shown rather than what was compared.
|
|
178
|
+
const remainingAll = superseded.comparisons
|
|
179
|
+
.filter((c) => c.verdict !== "already-in-base")
|
|
180
|
+
.map((c) => ({ file: c.file, diffType: c.diffType, verdict: c.verdict }));
|
|
181
|
+
const remainingCap = capped(remainingAll, limit);
|
|
182
|
+
const notes = [
|
|
183
|
+
...hidden.notes,
|
|
184
|
+
...overlaps.notes,
|
|
185
|
+
...produced.notes,
|
|
186
|
+
...superseded.notes,
|
|
187
|
+
...migrationHeadsNotes,
|
|
188
|
+
];
|
|
132
189
|
if (stamp.commitSha === null) {
|
|
133
190
|
notes.push("The graph carries no commit sha, so no stored PR scope could be matched to it. Overlap " +
|
|
134
191
|
"scoring did not run — scopes are only comparable against the graph they were computed on.");
|
|
135
192
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
193
|
+
if (remainingCap.detail !== null) {
|
|
194
|
+
notes.push(`${remainingCap.detail.total - remainingCap.detail.shown} further file(s) not yet matched to ` +
|
|
195
|
+
`base are not listed — the reply is capped at ${limit}. Raise "limit" to see them.`);
|
|
196
|
+
}
|
|
197
|
+
if (blocked.length > 0) {
|
|
198
|
+
notes.push(`${blocked.length} of the four multi-PR checks did not run because nothing produces their ` +
|
|
199
|
+
`input yet: ${blocked.map((b) => b.check).join(", ")}. Each is listed in "blocked" with ` +
|
|
200
|
+
"what it is waiting for. Their absence is not a clean result.");
|
|
201
|
+
}
|
|
139
202
|
// `refused` only when NOTHING looked at anything. One check producing a
|
|
140
203
|
// real answer is a real answer, and burying it behind a caveat about a
|
|
141
204
|
// different question is what `contracts.ts` refuses for the same reason.
|
|
142
|
-
const anythingRan = hidden.data.analysed || scopes.length >= 2 || superseded.analysed;
|
|
205
|
+
const anythingRan = hidden.data.analysed || scopes.length >= 2 || superseded.analysed || headsRan;
|
|
206
|
+
// B8 (part 2) — `truncated` used to forward only `hidden.truncated`, so
|
|
207
|
+
// capping in `overlaps` or in `remaining` (above) went undisclosed on the
|
|
208
|
+
// wire even when the prose said so. Three checks can each independently
|
|
209
|
+
// withhold rows; this merges all three into the one combined count
|
|
210
|
+
// `render.ts` puts on the envelope, rather than reporting one check's and
|
|
211
|
+
// silently dropping the other two's.
|
|
212
|
+
const truncationParts = [
|
|
213
|
+
{ shown: hidden.data.findings.length, total: hidden.data.findingsTotal },
|
|
214
|
+
{ shown: overlaps.findings.length, total: overlaps.findingsTotal },
|
|
215
|
+
{ shown: remainingCap.shown.length, total: remainingAll.length },
|
|
216
|
+
];
|
|
217
|
+
const shownAcrossChecks = truncationParts.reduce((sum, part) => sum + part.shown, 0);
|
|
218
|
+
const totalAcrossChecks = truncationParts.reduce((sum, part) => sum + part.total, 0);
|
|
219
|
+
const anyCheckTruncated = totalAcrossChecks > shownAcrossChecks;
|
|
143
220
|
// MK-7: the leading clause, worded to never read as a defect claim — this
|
|
144
221
|
// file's own header is explicit that every finding here is Class C evidence
|
|
145
222
|
// about people, not program structure, and "N found" would read exactly
|
|
@@ -178,23 +255,26 @@ async function run(args, ctx) {
|
|
|
178
255
|
counts: superseded.counts,
|
|
179
256
|
reliability: superseded.reliability,
|
|
180
257
|
disclosure: superseded.disclosure,
|
|
181
|
-
remaining:
|
|
182
|
-
.filter((c) => c.verdict !== "already-in-base")
|
|
183
|
-
.map((c) => ({ file: c.file, diffType: c.diffType, verdict: c.verdict })),
|
|
258
|
+
remaining: remainingCap.shown,
|
|
184
259
|
},
|
|
185
|
-
blocked
|
|
260
|
+
blocked,
|
|
261
|
+
migrationHeads,
|
|
186
262
|
},
|
|
187
263
|
stamp: hidden.stamp,
|
|
188
|
-
truncated:
|
|
264
|
+
truncated: anyCheckTruncated,
|
|
189
265
|
notes,
|
|
190
266
|
},
|
|
267
|
+
...(anyCheckTruncated
|
|
268
|
+
? { truncatedDetail: { shown: shownAcrossChecks, total: totalAcrossChecks, more: null } }
|
|
269
|
+
: {}),
|
|
191
270
|
...(anythingRan ? {} : { state: "refused" }),
|
|
192
271
|
nameLevel: true,
|
|
193
272
|
headline: anythingRan
|
|
194
273
|
? `${verdict}. ${hidden.data.findings.length} historically coupled file(s) were not touched; ` +
|
|
195
274
|
`${overlaps.findings.length} overlapping change pair(s) scored above the conflict ` +
|
|
196
|
-
`threshold; ${superseded.superseded ? "this change's work is already on base" : `${superseded.counts.alreadyInBase} of ${superseded.counts.total} touched file(s) already match base`}
|
|
197
|
-
`${
|
|
275
|
+
`threshold; ${superseded.superseded ? "this change's work is already on base" : `${superseded.counts.alreadyInBase} of ${superseded.counts.total} touched file(s) already match base`}; ` +
|
|
276
|
+
`${headsRan ? (migrationHeads.verdict ? `${migrationHeads.heads.length} migration heads found` : "a single migration head") : "migration heads not checked"}. ` +
|
|
277
|
+
`${blocked.length} of four checks could not run.`
|
|
198
278
|
: "No multi-PR check was able to run on this change. That is a statement about the " +
|
|
199
279
|
"evidence available, not about the change.",
|
|
200
280
|
};
|
|
@@ -207,10 +287,14 @@ export const crossPrTool = {
|
|
|
207
287
|
title: "Cross-change collisions",
|
|
208
288
|
description: "What this change collides with that reading its diff alone would not show: files it " +
|
|
209
289
|
"historically moves with and did not touch this time (§14.8), other in-flight changes " +
|
|
210
|
-
"editing the same important nodes (§14.3),
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"declared
|
|
290
|
+
"editing the same important nodes (§14.3), whether the work is already on base by another " +
|
|
291
|
+
"route (§14.5), and whether the migration revision chain has forked into more than one head " +
|
|
292
|
+
"(§14.6, from attrs.migrationRevision/migrationDownRevision — runs whenever a producer " +
|
|
293
|
+
"supplies them, declared blocked otherwise). Findings are Class C hints about how people " +
|
|
294
|
+
"edit this repository, never claims about what breaks; a migration-head fork is reported the " +
|
|
295
|
+
"same way, because this check cannot yet tell a legitimate merge-in-progress from a real " +
|
|
296
|
+
"conflict. A check with no input yet is declared with what it is waiting for rather than " +
|
|
297
|
+
"silently omitted.",
|
|
214
298
|
inputSchema: SCHEMA,
|
|
215
299
|
run,
|
|
216
300
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-pr.js","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cross-pr.js","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,UAAU,EACV,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAYvB,OAAO,EACL,MAAM,EACN,SAAS,EACT,eAAe,EACf,cAAc,EACd,cAAc,GAIf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA0HtC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0FAA0F;gBAC1F,gEAAgE;SACnE;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uCAAuC,EAAE;QAC9E,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE;KAC9F;IACD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,oBAAoB,EAAE,KAAK;CACnB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,OAAO,GAAG;IACd;QACE,KAAK,EAAE,iBAAiB;QACxB,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,iEAAiE;QAC3E,KAAK,EACH,mFAAmF;YACn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CAAgC;YACnD,CAAC,CAAC,kFAAkF;gBAClF,2CAA2C;KAChD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,sFAAsF;QACtF,uFAAuF;QACvF,2FAA2F;QAC3F,6FAA6F;QAC7F,wFAAwF;QACxF,0FAA0F;QAC1F,8FAA8F;QAC9F,0FAA0F;QAC1F,0FAA0F;QAC1F,mBAAmB;IACrB,WAAW,EAAE,MAAM;IACnB,GAAG;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-diff.d.ts","sourceRoot":"","sources":["../../src/tools/git-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AA6FlB,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"git-diff.d.ts","sourceRoot":"","sources":["../../src/tools/git-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AA6FlB,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAiKD,eAAO,MAAM,WAAW,EAAE,cAsBzB,CAAC"}
|