@ddtcorex/dsh-maestro-review 0.12.1 → 0.15.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/README.md +37 -58
- package/cordis.patch.yml +13 -18
- package/lib/config-store.d.ts +9 -1
- package/lib/config-store.d.ts.map +1 -1
- package/lib/config-store.js +1 -1
- package/lib/config-store.js.map +1 -1
- package/lib/events.d.ts +8 -45
- package/lib/events.d.ts.map +1 -1
- package/lib/host-orchestrator.d.ts +128 -0
- package/lib/host-orchestrator.d.ts.map +1 -0
- package/lib/host-orchestrator.js +500 -0
- package/lib/host-orchestrator.js.map +1 -0
- package/lib/index.d.ts +7 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -43
- package/lib/index.js.map +1 -1
- package/lib/providers/gitlab.d.ts.map +1 -1
- package/lib/providers/gitlab.js +8 -1
- package/lib/providers/gitlab.js.map +1 -1
- package/lib/review-intake.d.ts +8 -1
- package/lib/review-intake.d.ts.map +1 -1
- package/lib/review-intake.js +22 -0
- package/lib/review-intake.js.map +1 -1
- package/lib/settings-rpc.js +1 -1
- package/lib/settings-rpc.js.map +1 -1
- package/package.json +19 -36
- package/src/client/index.tsx +1 -1
- package/src/host/augment.d.ts +3 -1
- package/src/host/config-store.ts +2 -2
- package/src/host/events.ts +8 -45
- package/src/host/host-orchestrator.ts +549 -0
- package/src/host/index.ts +7 -35
- package/src/host/providers/gitlab.ts +8 -2
- package/src/host/review-intake.ts +20 -1
- package/src/host/settings-rpc.ts +1 -1
- package/lib/ci-clone.d.ts +0 -21
- package/lib/ci-clone.d.ts.map +0 -1
- package/lib/ci-clone.js +0 -35
- package/lib/ci-clone.js.map +0 -1
- package/lib/ci-coexist.d.ts +0 -11
- package/lib/ci-coexist.d.ts.map +0 -1
- package/lib/ci-coexist.js +0 -38
- package/lib/ci-coexist.js.map +0 -1
- package/lib/gitlab-auth.d.ts +0 -11
- package/lib/gitlab-auth.d.ts.map +0 -1
- package/lib/gitlab-auth.js +0 -15
- package/lib/gitlab-auth.js.map +0 -1
- package/lib/gitlab-client.d.ts +0 -78
- package/lib/gitlab-client.d.ts.map +0 -1
- package/lib/gitlab-client.js +0 -270
- package/lib/gitlab-client.js.map +0 -1
- package/lib/govard-lint-detection.d.ts +0 -20
- package/lib/govard-lint-detection.d.ts.map +0 -1
- package/lib/govard-lint-detection.js +0 -48
- package/lib/govard-lint-detection.js.map +0 -1
- package/lib/hyva-csp-scan-tool.d.ts +0 -11
- package/lib/hyva-csp-scan-tool.d.ts.map +0 -1
- package/lib/hyva-csp-scan-tool.js +0 -193
- package/lib/hyva-csp-scan-tool.js.map +0 -1
- package/lib/hyva-theme-inspect-tool.d.ts +0 -10
- package/lib/hyva-theme-inspect-tool.d.ts.map +0 -1
- package/lib/hyva-theme-inspect-tool.js +0 -299
- package/lib/hyva-theme-inspect-tool.js.map +0 -1
- package/lib/incremental.d.ts +0 -28
- package/lib/incremental.d.ts.map +0 -1
- package/lib/incremental.js +0 -62
- package/lib/incremental.js.map +0 -1
- package/lib/layout-xml-tool.d.ts +0 -11
- package/lib/layout-xml-tool.d.ts.map +0 -1
- package/lib/layout-xml-tool.js +0 -239
- package/lib/layout-xml-tool.js.map +0 -1
- package/lib/module-check-tool.d.ts +0 -11
- package/lib/module-check-tool.d.ts.map +0 -1
- package/lib/module-check-tool.js +0 -303
- package/lib/module-check-tool.js.map +0 -1
- package/lib/orchestrator.d.ts +0 -357
- package/lib/orchestrator.d.ts.map +0 -1
- package/lib/orchestrator.js +0 -1497
- package/lib/orchestrator.js.map +0 -1
- package/lib/perf-log-stats-tool.d.ts +0 -13
- package/lib/perf-log-stats-tool.d.ts.map +0 -1
- package/lib/perf-log-stats-tool.js +0 -245
- package/lib/perf-log-stats-tool.js.map +0 -1
- package/lib/phtml-escape-scan-tool.d.ts +0 -11
- package/lib/phtml-escape-scan-tool.d.ts.map +0 -1
- package/lib/phtml-escape-scan-tool.js +0 -166
- package/lib/phtml-escape-scan-tool.js.map +0 -1
- package/lib/providers/ci-trigger.d.ts +0 -44
- package/lib/providers/ci-trigger.d.ts.map +0 -1
- package/lib/providers/ci-trigger.js +0 -150
- package/lib/providers/ci-trigger.js.map +0 -1
- package/lib/review-findings-tool.d.ts +0 -20
- package/lib/review-findings-tool.d.ts.map +0 -1
- package/lib/review-findings-tool.js +0 -39
- package/lib/review-findings-tool.js.map +0 -1
- package/lib/review-history.d.ts +0 -40
- package/lib/review-history.d.ts.map +0 -1
- package/lib/review-history.js +0 -136
- package/lib/review-history.js.map +0 -1
- package/lib/review-marker.d.ts +0 -17
- package/lib/review-marker.d.ts.map +0 -1
- package/lib/review-marker.js +0 -23
- package/lib/review-marker.js.map +0 -1
- package/lib/review-signals.d.ts +0 -17
- package/lib/review-signals.d.ts.map +0 -1
- package/lib/review-signals.js +0 -79
- package/lib/review-signals.js.map +0 -1
- package/lib/scope-split-tool.d.ts +0 -42
- package/lib/scope-split-tool.d.ts.map +0 -1
- package/lib/scope-split-tool.js +0 -108
- package/lib/scope-split-tool.js.map +0 -1
- package/lib/search-tool.d.ts +0 -15
- package/lib/search-tool.d.ts.map +0 -1
- package/lib/search-tool.js +0 -144
- package/lib/search-tool.js.map +0 -1
- package/lib/skill-provider.d.ts +0 -19
- package/lib/skill-provider.d.ts.map +0 -1
- package/lib/skill-provider.js +0 -101
- package/lib/skill-provider.js.map +0 -1
- package/lib/skills-tool.d.ts +0 -29
- package/lib/skills-tool.d.ts.map +0 -1
- package/lib/skills-tool.js +0 -185
- package/lib/skills-tool.js.map +0 -1
- package/lib/source.d.ts +0 -23
- package/lib/source.d.ts.map +0 -1
- package/lib/source.js +0 -16
- package/lib/source.js.map +0 -1
- package/lib/tool-policy.d.ts +0 -20
- package/lib/tool-policy.d.ts.map +0 -1
- package/lib/tool-policy.js +0 -42
- package/lib/tool-policy.js.map +0 -1
- package/presets/maestro-auditor.patch.yml +0 -54
- package/presets/maestro-coder/agent.cordis.yml +0 -223
- package/presets/maestro-coder/preset.yml +0 -2
- package/presets/maestro-reviewer.patch.yml +0 -55
- package/profiles/reviewer-ci/cordis.patch.yml +0 -78
- package/profiles/reviewer-ci/package.json +0 -19
- package/profiles/reviewer-ci/pnpm-lock.yaml +0 -8201
- package/profiles/reviewer-ci/pnpm-workspace.yaml +0 -36
- package/skills/dsh-native-tools/SKILL.md +0 -80
- package/src/host/ci-clone.ts +0 -54
- package/src/host/ci-coexist.ts +0 -45
- package/src/host/dsh-skill.d.ts +0 -72
- package/src/host/gitlab-auth.ts +0 -13
- package/src/host/gitlab-client.ts +0 -332
- package/src/host/govard-lint-detection.ts +0 -47
- package/src/host/hyva-csp-scan-tool.ts +0 -165
- package/src/host/hyva-theme-inspect-tool.ts +0 -258
- package/src/host/incremental.ts +0 -86
- package/src/host/layout-xml-tool.ts +0 -190
- package/src/host/module-check-tool.ts +0 -187
- package/src/host/orchestrator.ts +0 -1641
- package/src/host/perf-log-stats-tool.ts +0 -224
- package/src/host/phtml-escape-scan-tool.ts +0 -112
- package/src/host/providers/ci-trigger.ts +0 -168
- package/src/host/review-findings-tool.ts +0 -59
- package/src/host/review-history.ts +0 -168
- package/src/host/review-marker.ts +0 -25
- package/src/host/review-signals.ts +0 -83
- package/src/host/scope-split-tool.ts +0 -109
- package/src/host/search-tool.ts +0 -152
- package/src/host/skill-provider.ts +0 -94
- package/src/host/skills-tool.ts +0 -218
- package/src/host/source.ts +0 -26
- package/src/host/tool-policy.ts +0 -49
- package/templates/reviewer-project.gitlab-ci.yml +0 -93
- package/templates/source-project.gitlab-ci.yml +0 -48
package/lib/layout-xml-tool.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import z from '@deepseek-ai/schemastery';
|
|
3
|
-
export declare const name = "maestro-layout-xml-tool";
|
|
4
|
-
export declare const inject: string[];
|
|
5
|
-
export declare const Config: z<{
|
|
6
|
-
rootPath?: string;
|
|
7
|
-
}>;
|
|
8
|
-
export declare function apply(ctx: Context, config?: {
|
|
9
|
-
rootPath?: string;
|
|
10
|
-
}): void;
|
|
11
|
-
//# sourceMappingURL=layout-xml-tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-xml-tool.d.ts","sourceRoot":"","sources":["../src/host/layout-xml-tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAGxC,eAAO,MAAM,IAAI,4BAA4B,CAAA;AAC7C,eAAO,MAAM,MAAM,UAAY,CAAA;AAC/B,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAsC,CAAA;AA6ClF,wBAAgB,KAAK,CAAC,GAAG,EAAC,OAAO,EAAE,MAAM,GAAC;IAAC,QAAQ,CAAC,EAAC,MAAM,CAAA;CAAI,GAAE,IAAI,CAwIpE"}
|
package/lib/layout-xml-tool.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { join, resolve, sep, basename } from 'node:path';
|
|
2
|
-
import { readFile, readdir, realpath, stat } from 'node:fs/promises';
|
|
3
|
-
import z from '@deepseek-ai/schemastery';
|
|
4
|
-
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
5
|
-
export const name = 'maestro-layout-xml-tool';
|
|
6
|
-
export const inject = ['tools'];
|
|
7
|
-
export const Config = z.object({ rootPath: z.string() });
|
|
8
|
-
function workspaceRootFor(c, exec) {
|
|
9
|
-
if (c !== undefined)
|
|
10
|
-
return c;
|
|
11
|
-
const cwd = exec?.agent?.session?.header?.cwd;
|
|
12
|
-
return typeof cwd === 'string' && cwd !== '' ? cwd : process.cwd();
|
|
13
|
-
}
|
|
14
|
-
async function isInsideRoot(root, target) {
|
|
15
|
-
const ar = resolve(root);
|
|
16
|
-
const rs = resolve(ar, target);
|
|
17
|
-
if (rs !== ar && !rs.startsWith(ar + sep))
|
|
18
|
-
return false;
|
|
19
|
-
try {
|
|
20
|
-
const rr = await realpath(ar);
|
|
21
|
-
const rt = await realpath(rs);
|
|
22
|
-
return rt === rr || rt.startsWith(rr + sep);
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const MAX_FILE_BYTES = 1024 * 1024;
|
|
29
|
-
const MAX_FILES = 2000;
|
|
30
|
-
const SKIP_DIRS = new Set(['.git', 'node_modules', 'vendor', 'pub/static']);
|
|
31
|
-
// tiny helpers
|
|
32
|
-
function parseAttrs(s) {
|
|
33
|
-
const out = {};
|
|
34
|
-
let m;
|
|
35
|
-
const re = /(\w+)="([^"]*)"/g;
|
|
36
|
-
while ((m = re.exec(s)) !== null)
|
|
37
|
-
out[m[1]] = m[2];
|
|
38
|
-
return out;
|
|
39
|
-
}
|
|
40
|
-
async function exists(p) { try {
|
|
41
|
-
await stat(p);
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return false;
|
|
46
|
-
} }
|
|
47
|
-
async function* walkLayout(dir, root, budget) {
|
|
48
|
-
if (budget.files <= 0)
|
|
49
|
-
return;
|
|
50
|
-
let entries;
|
|
51
|
-
try {
|
|
52
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
for (const e of entries) {
|
|
58
|
-
if (budget.files <= 0)
|
|
59
|
-
return;
|
|
60
|
-
if (e.isDirectory()) {
|
|
61
|
-
if (SKIP_DIRS.has(e.name))
|
|
62
|
-
continue;
|
|
63
|
-
yield* walkLayout(join(dir, e.name), root, budget);
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
if (!e.isFile())
|
|
67
|
-
continue;
|
|
68
|
-
if (!e.name.endsWith('.xml'))
|
|
69
|
-
continue;
|
|
70
|
-
if (!join(dir, e.name).includes('/layout/'))
|
|
71
|
-
continue;
|
|
72
|
-
budget.files -= 1;
|
|
73
|
-
yield join(dir, e.name);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export function apply(ctx, config = {}) {
|
|
77
|
-
const configuredRoot = config.rootPath;
|
|
78
|
-
ctx.effect(() => ctx.tools.register(defineTool({
|
|
79
|
-
name: 'layout_xml_extract',
|
|
80
|
-
description: 'Extract Magento layout handles/blocks/moves/head from layout XML under workspace. Use before claiming layout is correct.',
|
|
81
|
-
parameters: {
|
|
82
|
-
root: { type: 'string' },
|
|
83
|
-
changedFiles: { type: 'array', items: { type: 'string' } },
|
|
84
|
-
},
|
|
85
|
-
output: {
|
|
86
|
-
schema: {
|
|
87
|
-
type: 'object', additionalProperties: false,
|
|
88
|
-
properties: {
|
|
89
|
-
handles: { type: 'array', required: true },
|
|
90
|
-
handleCount: { type: 'number', required: true },
|
|
91
|
-
blockCount: { type: 'number', required: true },
|
|
92
|
-
scannedFiles: { type: 'number', required: true },
|
|
93
|
-
truncated: { type: 'boolean', required: true },
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
render: (_args, v) => [{ type: 'text', text: JSON.stringify(v, null, 2) }],
|
|
97
|
-
},
|
|
98
|
-
async execute(args, exec) {
|
|
99
|
-
const rawRoot = args.root ?? '';
|
|
100
|
-
const root = workspaceRootFor(configuredRoot, exec);
|
|
101
|
-
if (rawRoot !== '' && !(await isInsideRoot(root, rawRoot)))
|
|
102
|
-
return { text: `Path "${rawRoot}" escapes the workspace root.`, truncated: false };
|
|
103
|
-
const effectiveRoot = rawRoot === '' ? root : resolve(root, rawRoot);
|
|
104
|
-
const changedFiles = args.changedFiles;
|
|
105
|
-
if (changedFiles) {
|
|
106
|
-
for (const p of changedFiles) {
|
|
107
|
-
if (!(await isInsideRoot(effectiveRoot, p)))
|
|
108
|
-
return { text: `Path "${p}" escapes the workspace root.`, truncated: false };
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// collect files
|
|
112
|
-
const budget = { files: MAX_FILES };
|
|
113
|
-
const all = [];
|
|
114
|
-
for await (const f of walkLayout(effectiveRoot, effectiveRoot, budget)) {
|
|
115
|
-
const rel = f.startsWith(effectiveRoot + sep) ? f.slice(effectiveRoot.length + 1) : basename(f);
|
|
116
|
-
all.push(rel);
|
|
117
|
-
}
|
|
118
|
-
let files = all;
|
|
119
|
-
if (changedFiles && changedFiles.length > 0) {
|
|
120
|
-
const set = new Set(changedFiles.map(p => p.endsWith('.xml') ? p : p));
|
|
121
|
-
files = all.filter(p => set.has(p) || changedFiles.some(cf => p.endsWith(basename(cf))));
|
|
122
|
-
// also if allow-list contains files not discovered via walk (e.g., outside layout but still layout), include them if they exist and are layout
|
|
123
|
-
for (const cf of changedFiles) {
|
|
124
|
-
if (!files.includes(cf)) {
|
|
125
|
-
const abs = resolve(effectiveRoot, cf);
|
|
126
|
-
if (await exists(abs) && cf.includes('/layout/') && cf.endsWith('.xml') && !(all.includes(cf)))
|
|
127
|
-
files.push(cf);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const truncated = budget.files <= 0;
|
|
132
|
-
const handles = [];
|
|
133
|
-
let blockCount = 0;
|
|
134
|
-
for (const rel of files) {
|
|
135
|
-
const abs = resolve(effectiveRoot, rel);
|
|
136
|
-
let text;
|
|
137
|
-
try {
|
|
138
|
-
const buf = await readFile(abs);
|
|
139
|
-
if (buf.byteLength > MAX_FILE_BYTES)
|
|
140
|
-
continue;
|
|
141
|
-
text = buf.toString('utf-8');
|
|
142
|
-
}
|
|
143
|
-
catch {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
const handle = basename(rel, '.xml');
|
|
147
|
-
const layoutType = /<page\b/.test(text) ? 'page' : 'generic';
|
|
148
|
-
// quick parseError heuristic: mismatched < vs > or unclosed tag
|
|
149
|
-
let parseError = null;
|
|
150
|
-
const openCount = (text.match(/</g) || []).length;
|
|
151
|
-
const closeCount = (text.match(/>/g) || []).length;
|
|
152
|
-
if (openCount !== closeCount)
|
|
153
|
-
parseError = `mismatched < (${openCount}) vs > (${closeCount})`;
|
|
154
|
-
// also detect block tag without closing >
|
|
155
|
-
if (/<block[^>]*$/m.test(text) || /<block[^>]*<\/body/.test(text))
|
|
156
|
-
parseError = parseError ?? 'malformed block tag';
|
|
157
|
-
if (parseError) {
|
|
158
|
-
handles.push({ file: rel, handle, layoutType, blocks: [], moves: [], references: [], head: { scripts: [], css: [], metas: [], removes: [] }, parseError });
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
const blocks = [];
|
|
162
|
-
const moves = [];
|
|
163
|
-
const references = [];
|
|
164
|
-
const head = { scripts: [], css: [], metas: [], removes: [] };
|
|
165
|
-
// blocks/containers (only concrete)
|
|
166
|
-
const tagRe = /<(block|container)\b([^>]*?)(?:\/>|>)/g;
|
|
167
|
-
let m;
|
|
168
|
-
while ((m = tagRe.exec(text)) !== null) {
|
|
169
|
-
const type = m[1];
|
|
170
|
-
const attrStr = m[2];
|
|
171
|
-
const attrs = parseAttrs(attrStr);
|
|
172
|
-
const name = attrs.name ?? null;
|
|
173
|
-
const klass = attrs.class ?? null;
|
|
174
|
-
const template = attrs.template ?? null;
|
|
175
|
-
let templateExists = null;
|
|
176
|
-
if (template !== null) {
|
|
177
|
-
if (template.includes('::')) {
|
|
178
|
-
const [modPart, filePart] = template.split('::');
|
|
179
|
-
const [vendor, mod] = modPart.split('_');
|
|
180
|
-
if (vendor && mod && filePart) {
|
|
181
|
-
const cand = join(effectiveRoot, `app/code/${vendor}/${mod}/view/frontend/templates/${filePart}`);
|
|
182
|
-
templateExists = await exists(cand);
|
|
183
|
-
if (!templateExists) {
|
|
184
|
-
templateExists = false;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
else
|
|
188
|
-
templateExists = false;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
templateExists = await exists(join(effectiveRoot, template));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
const as = attrs.as ?? null;
|
|
195
|
-
const cacheable = attrs.cacheable ? attrs.cacheable === 'true' : null;
|
|
196
|
-
const remove = attrs.remove === 'true';
|
|
197
|
-
blocks.push({ name, type, class: klass, template, templateExists, as, cacheable, remove, refs: [] });
|
|
198
|
-
}
|
|
199
|
-
// references
|
|
200
|
-
const refRe = /(<(referenceBlock|referenceContainer)\b([^>]*?)(?:\/>|>))/g;
|
|
201
|
-
while ((m = refRe.exec(text)) !== null) {
|
|
202
|
-
const type = m[2];
|
|
203
|
-
const attrs = parseAttrs(m[3]);
|
|
204
|
-
references.push({ kind: type, name: attrs.name ?? '', attrs });
|
|
205
|
-
}
|
|
206
|
-
// moves
|
|
207
|
-
const moveRe = /<move\b([^>]*?)\/>/g;
|
|
208
|
-
while ((m = moveRe.exec(text)) !== null) {
|
|
209
|
-
const attrs = parseAttrs(m[1]);
|
|
210
|
-
moves.push({ element: attrs.element ?? '', destination: attrs.destination ?? null, as: attrs.as ?? null, before: attrs.before ?? null, after: attrs.after ?? null });
|
|
211
|
-
}
|
|
212
|
-
// head css/scripts
|
|
213
|
-
const cssRe = /<css\b([^>]*?)\/>/g;
|
|
214
|
-
while ((m = cssRe.exec(text)) !== null) {
|
|
215
|
-
const a = parseAttrs(m[1]);
|
|
216
|
-
if (a.src)
|
|
217
|
-
head.css.push({ src: a.src });
|
|
218
|
-
}
|
|
219
|
-
const scriptRe = /<script\b([^>]*?)\/>/g;
|
|
220
|
-
while ((m = scriptRe.exec(text)) !== null) {
|
|
221
|
-
const a = parseAttrs(m[1]);
|
|
222
|
-
if (a.src)
|
|
223
|
-
head.scripts.push({ src: a.src });
|
|
224
|
-
}
|
|
225
|
-
// also <remove src=>
|
|
226
|
-
const removeRe = /<remove\b([^>]*?)\/>/g;
|
|
227
|
-
while ((m = removeRe.exec(text)) !== null) {
|
|
228
|
-
const a = parseAttrs(m[1]);
|
|
229
|
-
if (a.src)
|
|
230
|
-
head.removes.push(a.src);
|
|
231
|
-
}
|
|
232
|
-
blockCount += blocks.length;
|
|
233
|
-
handles.push({ file: rel, handle, layoutType, blocks, moves, references, head, parseError: null });
|
|
234
|
-
}
|
|
235
|
-
return { handles, handleCount: handles.length, blockCount, scannedFiles: files.length, truncated };
|
|
236
|
-
},
|
|
237
|
-
}), 'layout xml'));
|
|
238
|
-
}
|
|
239
|
-
//# sourceMappingURL=layout-xml-tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-xml-tool.js","sourceRoot":"","sources":["../src/host/layout-xml-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEpE,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAG,yBAAyB,CAAA;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,CAAA;AAC/B,MAAM,CAAC,MAAM,MAAM,GAA6B,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAGlF,SAAS,gBAAgB,CAAC,CAAkB,EAAE,IAAY;IACxD,IAAG,CAAC,KAAG,SAAS;QAAE,OAAO,CAAC,CAAA;IAC1B,MAAM,GAAG,GAAE,IAAmC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAA;IAC3E,OAAO,OAAO,GAAG,KAAG,QAAQ,IAAI,GAAG,KAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAA;AAChE,CAAC;AACD,KAAK,UAAU,YAAY,CAAC,IA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AAqB;gBACrB,MAAM,QAAQ,GAAC,uBAAuB,CAAA;gBACtC,OAAM,CAAC,CAAC,GAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAG,IAAI,EAAC,CAAC;oBAAC,MAAM,CAAC,GAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAAC,IAAG,CAAC,CAAC,GAAG;wBAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;gBAAC,CAAC;gBAErG,UAAU,IAAE,MAAM,CAAC,MAAM,CAAA;gBACzB,OAAO,CAAC,IAAI,CAAC,EAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,CAAC,CAAA;YACzF,CAAC;YACD,OAAO,EAAC,OAAO,EAAE,WAAW,EAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAU,CAAA;QACzG,CAAC;KACF,CAAC,EAAE,YAAY,CAAC,CAAC,CAAA;AACpB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import z from '@deepseek-ai/schemastery';
|
|
3
|
-
export declare const name = "maestro-module-check-tool";
|
|
4
|
-
export declare const inject: string[];
|
|
5
|
-
export declare const Config: z<{
|
|
6
|
-
rootPath?: string;
|
|
7
|
-
}>;
|
|
8
|
-
export declare function apply(ctx: Context, config?: {
|
|
9
|
-
rootPath?: string;
|
|
10
|
-
}): void;
|
|
11
|
-
//# sourceMappingURL=module-check-tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-check-tool.d.ts","sourceRoot":"","sources":["../src/host/module-check-tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAGxC,eAAO,MAAM,IAAI,8BAA4B,CAAA;AAC7C,eAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,eAAO,MAAM,MAAM,EAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAC,MAAM,CAAA;CAAC,CAAiC,CAAA;AAgCzE,wBAAgB,KAAK,CAAC,GAAG,EAAC,OAAO,EAAE,MAAM,GAAC;IAAC,QAAQ,CAAC,EAAC,MAAM,CAAA;CAAI,GAAE,IAAI,CAkJpE"}
|
package/lib/module-check-tool.js
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { join, resolve, sep } from 'node:path';
|
|
2
|
-
import { readFile, readdir, realpath, stat } from 'node:fs/promises';
|
|
3
|
-
import z from '@deepseek-ai/schemastery';
|
|
4
|
-
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
5
|
-
export const name = 'maestro-module-check-tool';
|
|
6
|
-
export const inject = ['tools'];
|
|
7
|
-
export const Config = z.object({ rootPath: z.string() });
|
|
8
|
-
function workspaceRootFor(c, e) {
|
|
9
|
-
if (c !== undefined)
|
|
10
|
-
return c;
|
|
11
|
-
const cwd = e?.agent?.session?.header?.cwd;
|
|
12
|
-
return typeof cwd === 'string' && cwd !== '' ? cwd : process.cwd();
|
|
13
|
-
}
|
|
14
|
-
async function isInsideRoot(r, t) {
|
|
15
|
-
const ar = resolve(r);
|
|
16
|
-
const rs = resolve(ar, t);
|
|
17
|
-
if (rs !== ar && !rs.startsWith(ar + sep))
|
|
18
|
-
return false;
|
|
19
|
-
try {
|
|
20
|
-
const rr = await realpath(ar);
|
|
21
|
-
const rt = await realpath(rs);
|
|
22
|
-
return rt === rr || rt.startsWith(rr + sep);
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const MAX_FILE_BYTES = 1024 * 1024;
|
|
29
|
-
const MAX_MODULES = 100;
|
|
30
|
-
async function exists(p) { try {
|
|
31
|
-
await stat(p);
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return false;
|
|
36
|
-
} }
|
|
37
|
-
async function boundedRead(p) {
|
|
38
|
-
try {
|
|
39
|
-
const b = await readFile(p);
|
|
40
|
-
if (b.byteLength > MAX_FILE_BYTES)
|
|
41
|
-
return null;
|
|
42
|
-
return b.toString('utf-8');
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function parseRegistrationName(text) {
|
|
49
|
-
const re = /(?:\\?[\w\\]*ComponentRegistrar)::register\s*\(\s*(?:\\?[\w\\]*ComponentRegistrar::)?MODULE\s*,\s*['"]([^'"]+)['"]/;
|
|
50
|
-
const m = re.exec(text);
|
|
51
|
-
return m ? m[1] : null;
|
|
52
|
-
}
|
|
53
|
-
function parseModuleXml(text) {
|
|
54
|
-
const nameRe = /<module\b[^>]*name="([^"]+)"/;
|
|
55
|
-
const nm = nameRe.exec(text);
|
|
56
|
-
const name = nm ? nm[1] : null;
|
|
57
|
-
const seq = [];
|
|
58
|
-
const seqRe = /<module\s+name="([^"]+)"\s*\/>/g;
|
|
59
|
-
let m;
|
|
60
|
-
// only inside <sequence> block
|
|
61
|
-
const seqBlock = /<sequence>([\s\S]*?)<\/sequence>/.exec(text);
|
|
62
|
-
if (seqBlock) {
|
|
63
|
-
const inner = seqBlock[1];
|
|
64
|
-
while ((m = seqRe.exec(inner)) !== null)
|
|
65
|
-
seq.push(m[1]);
|
|
66
|
-
}
|
|
67
|
-
return { name, sequence: seq };
|
|
68
|
-
}
|
|
69
|
-
export function apply(ctx, config = {}) {
|
|
70
|
-
const configuredRoot = config.rootPath;
|
|
71
|
-
ctx.effect(() => ctx.tools.register(defineTool({
|
|
72
|
-
name: 'magento_module_check',
|
|
73
|
-
description: 'Validate Magento 2 module structure (registration, module.xml, composer, db_schema, acl, routes, Hyva compat).',
|
|
74
|
-
parameters: {
|
|
75
|
-
modulePath: { type: 'string' },
|
|
76
|
-
},
|
|
77
|
-
output: {
|
|
78
|
-
schema: {
|
|
79
|
-
type: 'object', additionalProperties: false,
|
|
80
|
-
properties: {
|
|
81
|
-
modules: { type: 'array', required: true },
|
|
82
|
-
scannedModules: { type: 'number', required: true },
|
|
83
|
-
truncated: { type: 'boolean', required: true },
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
render: (_a, v) => [{ type: 'text', text: JSON.stringify(v, null, 2) }],
|
|
87
|
-
},
|
|
88
|
-
async execute(args, exec) {
|
|
89
|
-
const rawPath = args.modulePath;
|
|
90
|
-
const root = workspaceRootFor(configuredRoot, exec);
|
|
91
|
-
if (rawPath !== undefined && !(await isInsideRoot(root, rawPath)))
|
|
92
|
-
return { text: `Path "${rawPath}" escapes the workspace root.`, truncated: false };
|
|
93
|
-
let candidates = [];
|
|
94
|
-
if (rawPath !== undefined) {
|
|
95
|
-
// must contain registration.php or etc/module.xml to be considered a module; otherwise empty
|
|
96
|
-
candidates = [rawPath];
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const base = join(root, 'app/code');
|
|
100
|
-
let vendors = [];
|
|
101
|
-
try {
|
|
102
|
-
vendors = await readdir(base);
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
vendors = [];
|
|
106
|
-
}
|
|
107
|
-
for (const vendor of vendors) {
|
|
108
|
-
if (vendor.startsWith('.'))
|
|
109
|
-
continue;
|
|
110
|
-
let mods = [];
|
|
111
|
-
try {
|
|
112
|
-
mods = await readdir(join(base, vendor));
|
|
113
|
-
}
|
|
114
|
-
catch {
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
for (const mod of mods) {
|
|
118
|
-
if (mod.startsWith('.'))
|
|
119
|
-
continue;
|
|
120
|
-
candidates.push(join('app/code', vendor, mod));
|
|
121
|
-
if (candidates.length >= MAX_MODULES)
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
if (candidates.length >= MAX_MODULES)
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const truncated = candidates.length >= MAX_MODULES;
|
|
129
|
-
const modules = [];
|
|
130
|
-
for (const rel of candidates.slice(0, MAX_MODULES)) {
|
|
131
|
-
const abs = resolve(root, rel);
|
|
132
|
-
let isDir = false;
|
|
133
|
-
try {
|
|
134
|
-
const s = await stat(abs);
|
|
135
|
-
isDir = s.isDirectory();
|
|
136
|
-
}
|
|
137
|
-
catch {
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
if (!isDir)
|
|
141
|
-
continue;
|
|
142
|
-
const issues = [];
|
|
143
|
-
const regText = await boundedRead(join(abs, 'registration.php'));
|
|
144
|
-
const hasRegistration = regText !== null;
|
|
145
|
-
let regName = null;
|
|
146
|
-
let registrationValid = null;
|
|
147
|
-
if (hasRegistration) {
|
|
148
|
-
regName = parseRegistrationName(regText);
|
|
149
|
-
registrationValid = regName !== null;
|
|
150
|
-
if (!registrationValid)
|
|
151
|
-
issues.push({ severity: 'high', rule: 'registration-invalid', message: 'registration.php does not contain ComponentRegistrar::register for MODULE', file: join(rel, 'registration.php'), line: null });
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
issues.push({ severity: 'critical', rule: 'registration-missing', message: 'registration.php missing', file: join(rel, 'registration.php'), line: null });
|
|
155
|
-
}
|
|
156
|
-
const modXmlText = await boundedRead(join(abs, 'etc/module.xml'));
|
|
157
|
-
const hasEtcModuleXml = modXmlText !== null;
|
|
158
|
-
let modName = null;
|
|
159
|
-
let sequence = [];
|
|
160
|
-
if (hasEtcModuleXml) {
|
|
161
|
-
const parsed = parseModuleXml(modXmlText);
|
|
162
|
-
modName = parsed.name;
|
|
163
|
-
sequence = parsed.sequence;
|
|
164
|
-
if (!modName)
|
|
165
|
-
issues.push({ severity: 'critical', rule: 'module-xml-missing-name', message: 'etc/module.xml missing module name', file: join(rel, 'etc/module.xml'), line: null });
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
issues.push({ severity: 'high', rule: 'module-xml-missing', message: 'etc/module.xml missing', file: join(rel, 'etc/module.xml'), line: null });
|
|
169
|
-
}
|
|
170
|
-
if (regName && modName && regName !== modName) {
|
|
171
|
-
issues.push({ severity: 'high', rule: 'name-mismatch', message: `registration name ${regName} != module.xml ${modName}`, file: join(rel, 'etc/module.xml'), line: null });
|
|
172
|
-
}
|
|
173
|
-
// composer
|
|
174
|
-
const composerText = await boundedRead(join(abs, 'composer.json'));
|
|
175
|
-
let composerName = null;
|
|
176
|
-
let psr4 = null;
|
|
177
|
-
if (composerText) {
|
|
178
|
-
try {
|
|
179
|
-
const j = JSON.parse(composerText);
|
|
180
|
-
composerName = j.name ?? null;
|
|
181
|
-
psr4 = j.autoload?.['psr-4'] ?? null;
|
|
182
|
-
}
|
|
183
|
-
catch { }
|
|
184
|
-
if (composerName && modName) {
|
|
185
|
-
// psr-4 cross-check not strict for test
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// db_schema
|
|
189
|
-
const hasDbSchema = await exists(join(abs, 'etc/db_schema.xml'));
|
|
190
|
-
let dbSchemaTables = [];
|
|
191
|
-
if (hasDbSchema) {
|
|
192
|
-
const dbText = await boundedRead(join(abs, 'etc/db_schema.xml'));
|
|
193
|
-
if (dbText) {
|
|
194
|
-
const re = /<table\s+name="([^"]+)"/g;
|
|
195
|
-
let m;
|
|
196
|
-
while ((m = re.exec(dbText)) !== null)
|
|
197
|
-
dbSchemaTables.push(m[1]);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// acl
|
|
201
|
-
const hasAcl = await exists(join(abs, 'etc/acl.xml'));
|
|
202
|
-
let aclResources = [];
|
|
203
|
-
if (hasAcl) {
|
|
204
|
-
const t = await boundedRead(join(abs, 'etc/acl.xml'));
|
|
205
|
-
if (t) {
|
|
206
|
-
const re = /<resource\s+id="([^"]+)"/g;
|
|
207
|
-
let m;
|
|
208
|
-
while ((m = re.exec(t)) !== null)
|
|
209
|
-
aclResources.push(m[1]);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// routes
|
|
213
|
-
let hasRoutes = false;
|
|
214
|
-
const routes = [];
|
|
215
|
-
for (const area of ['frontend', 'adminhtml']) {
|
|
216
|
-
const rp = join(abs, `etc/${area}/routes.xml`);
|
|
217
|
-
if (await exists(rp)) {
|
|
218
|
-
hasRoutes = true;
|
|
219
|
-
const rt = await boundedRead(rp);
|
|
220
|
-
if (rt) {
|
|
221
|
-
const re = /<route\s+[^>]*frontName="([^"]+)"/g;
|
|
222
|
-
let m;
|
|
223
|
-
while ((m = re.exec(rt)) !== null)
|
|
224
|
-
routes.push({ area, frontName: m[1] });
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
if (await exists(join(abs, 'etc/routes.xml'))) {
|
|
229
|
-
hasRoutes = true;
|
|
230
|
-
}
|
|
231
|
-
// events
|
|
232
|
-
let hasObserverEvents = [];
|
|
233
|
-
const evText = await boundedRead(join(abs, 'etc/events.xml'));
|
|
234
|
-
if (evText) {
|
|
235
|
-
const re = /<event\s+name="([^"]+)"/g;
|
|
236
|
-
let m;
|
|
237
|
-
while ((m = re.exec(evText)) !== null)
|
|
238
|
-
hasObserverEvents.push(m[1]);
|
|
239
|
-
}
|
|
240
|
-
// cron/webapi
|
|
241
|
-
const hasCron = await exists(join(abs, 'etc/crontab.xml')) || await exists(join(abs, 'etc/cron_groups.xml'));
|
|
242
|
-
const hasWebapi = await exists(join(abs, 'etc/webapi.xml'));
|
|
243
|
-
let apiInterfaces = [];
|
|
244
|
-
if (hasWebapi) {
|
|
245
|
-
const t = await boundedRead(join(abs, 'etc/webapi.xml'));
|
|
246
|
-
if (t) {
|
|
247
|
-
const re = /<service\s+class="([^"]+)"/g;
|
|
248
|
-
let m;
|
|
249
|
-
while ((m = re.exec(t)) !== null)
|
|
250
|
-
apiInterfaces.push(m[1]);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// Hyva compat: scan phtml for data-bind vs x-data
|
|
254
|
-
let isHyvaCompatible = null;
|
|
255
|
-
const compatNotes = [];
|
|
256
|
-
let hasPhtml = false;
|
|
257
|
-
let hasDataBind = false;
|
|
258
|
-
let hasXData = false;
|
|
259
|
-
async function scanPhtml(dir) {
|
|
260
|
-
let entries;
|
|
261
|
-
try {
|
|
262
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
263
|
-
}
|
|
264
|
-
catch {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
for (const e of entries) {
|
|
268
|
-
if (e.isDirectory())
|
|
269
|
-
await scanPhtml(join(dir, e.name));
|
|
270
|
-
else if (e.isFile() && e.name.endsWith('.phtml')) {
|
|
271
|
-
hasPhtml = true;
|
|
272
|
-
const txt = await boundedRead(join(dir, e.name));
|
|
273
|
-
if (!txt)
|
|
274
|
-
continue;
|
|
275
|
-
if (/data-bind\s*=/.test(txt))
|
|
276
|
-
hasDataBind = true;
|
|
277
|
-
if (/x-data\s*=/.test(txt))
|
|
278
|
-
hasXData = true;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
await scanPhtml(join(abs, 'view/frontend/templates'));
|
|
283
|
-
if (hasPhtml) {
|
|
284
|
-
if (hasDataBind) {
|
|
285
|
-
isHyvaCompatible = false;
|
|
286
|
-
compatNotes.push('knockout data-bind found — not Hyva compatible');
|
|
287
|
-
}
|
|
288
|
-
else if (hasXData) {
|
|
289
|
-
isHyvaCompatible = true;
|
|
290
|
-
compatNotes.push('Alpine x-data found — Hyva compatible');
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
isHyvaCompatible = null;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
const moduleInfo = { name: modName ?? regName, sequence, hasRegistration, registrationValid, hasEtcModuleXml, hasDbSchema, dbSchemaTables, hasAcl, aclResources, hasRoutes, routes, hasObserverEvents, hasCron, hasWebapi, apiInterfaces, composerName, psr4 };
|
|
297
|
-
modules.push({ path: rel, module: moduleInfo, issues, isHyvaCompatible, compatNotes });
|
|
298
|
-
}
|
|
299
|
-
return { modules, scannedModules: modules.length, truncated };
|
|
300
|
-
},
|
|
301
|
-
}), 'module check'));
|
|
302
|
-
}
|
|
303
|
-
//# sourceMappingURL=module-check-tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-check-tool.js","sourceRoot":"","sources":["../src/host/module-check-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEpE,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAC,2BAA2B,CAAA;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAC,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,CAAC,MAAM,MAAM,GAAuB,CAAC,CAAC,MAAM,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAA;AAEzE,SAAS,gBAAgB,CAAC,CAAkB,EAAC,CAAS;IACpD,IAAG,CAAC,KAAG,SAAS;QAAE,OAAO,CAAC,CAAA;IAC1B,MAAM,GAAG,GAAE,CAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAA;IAC1D,OAAO,OAAO,GAAG,KAAG,QAAQ,IAAE,GAAG,KAAG,EAAE,CAAA,CAAC,CAAA,GAAG,CAAA,CAAC,CAAA,OAAO,CAAC,GAAG,EAAE,CAAA;AAC1D,CAAC;AACD,KAAK,UAAU,YAAY,CAAC,CAA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