archbyte 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/bin/archbyte.js +2 -20
- package/dist/agents/pipeline/merger.d.ts +2 -2
- package/dist/agents/pipeline/merger.js +152 -27
- package/dist/agents/pipeline/types.d.ts +29 -1
- package/dist/agents/pipeline/types.js +0 -1
- package/dist/agents/providers/claude-sdk.js +32 -8
- package/dist/agents/runtime/types.d.ts +4 -0
- package/dist/agents/runtime/types.js +2 -2
- package/dist/agents/static/component-detector.js +35 -3
- package/dist/agents/static/connection-mapper.d.ts +1 -1
- package/dist/agents/static/connection-mapper.js +74 -1
- package/dist/agents/static/index.js +5 -2
- package/dist/agents/static/types.d.ts +26 -0
- package/dist/cli/analyze.js +62 -19
- package/dist/cli/arch-diff.d.ts +38 -0
- package/dist/cli/arch-diff.js +61 -0
- package/dist/cli/patrol.d.ts +5 -3
- package/dist/cli/patrol.js +417 -65
- package/dist/cli/setup.js +2 -7
- package/dist/cli/shared.d.ts +11 -0
- package/dist/cli/shared.js +61 -0
- package/dist/cli/validate.d.ts +0 -1
- package/dist/cli/validate.js +0 -16
- package/dist/server/src/index.js +537 -17
- package/package.json +1 -1
- package/templates/archbyte.yaml +8 -0
- package/ui/dist/assets/index-DDCNauh7.css +1 -0
- package/ui/dist/assets/index-DO4t5Xu1.js +72 -0
- package/ui/dist/index.html +2 -2
- package/dist/cli/mcp-server.d.ts +0 -1
- package/dist/cli/mcp-server.js +0 -443
- package/dist/cli/mcp.d.ts +0 -1
- package/dist/cli/mcp.js +0 -98
- package/ui/dist/assets/index-0_XpUUZQ.css +0 -1
- package/ui/dist/assets/index-DmO1qYan.js +0 -70
package/dist/cli/shared.js
CHANGED
|
@@ -259,6 +259,67 @@ export function parseCustomRulesFromYaml(content) {
|
|
|
259
259
|
flushItem();
|
|
260
260
|
return rules;
|
|
261
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Parse the patrol.ignore list from archbyte.yaml.
|
|
264
|
+
* Returns user-defined glob patterns for watch mode to ignore.
|
|
265
|
+
*
|
|
266
|
+
* patrol:
|
|
267
|
+
* ignore:
|
|
268
|
+
* - "docs/"
|
|
269
|
+
* - "*.md"
|
|
270
|
+
* - "build/"
|
|
271
|
+
*/
|
|
272
|
+
export function loadPatrolIgnore(configPath) {
|
|
273
|
+
const rootDir = process.cwd();
|
|
274
|
+
const yamlPath = configPath
|
|
275
|
+
? path.resolve(rootDir, configPath)
|
|
276
|
+
: path.join(rootDir, ".archbyte", "archbyte.yaml");
|
|
277
|
+
if (!fs.existsSync(yamlPath))
|
|
278
|
+
return [];
|
|
279
|
+
try {
|
|
280
|
+
const lines = fs.readFileSync(yamlPath, "utf-8").split("\n");
|
|
281
|
+
const patterns = [];
|
|
282
|
+
let inPatrol = false;
|
|
283
|
+
let inIgnore = false;
|
|
284
|
+
for (const line of lines) {
|
|
285
|
+
const trimmed = line.trimEnd();
|
|
286
|
+
if (/^patrol:\s*$/.test(trimmed)) {
|
|
287
|
+
inPatrol = true;
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
// Another top-level section ends patrol
|
|
291
|
+
if (inPatrol && /^\S/.test(trimmed) && !trimmed.startsWith("#")) {
|
|
292
|
+
inPatrol = false;
|
|
293
|
+
inIgnore = false;
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
if (!inPatrol)
|
|
297
|
+
continue;
|
|
298
|
+
if (trimmed === "" || trimmed.trim().startsWith("#"))
|
|
299
|
+
continue;
|
|
300
|
+
if (/^ {2}ignore:\s*$/.test(trimmed)) {
|
|
301
|
+
inIgnore = true;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
// Another patrol sub-key ends ignore
|
|
305
|
+
if (inIgnore && /^ {2}\S/.test(trimmed) && !/^ {2}ignore:/.test(trimmed)) {
|
|
306
|
+
inIgnore = false;
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if (!inIgnore)
|
|
310
|
+
continue;
|
|
311
|
+
// List item: " - pattern"
|
|
312
|
+
const itemMatch = trimmed.match(/^ {4}-\s+"?([^"]+)"?\s*$/);
|
|
313
|
+
if (itemMatch) {
|
|
314
|
+
patterns.push(itemMatch[1].trim());
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return patterns;
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
return [];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
262
323
|
export function getRuleLevel(config, rule, defaultLevel) {
|
|
263
324
|
const entry = config[rule];
|
|
264
325
|
if (!entry)
|
package/dist/cli/validate.d.ts
CHANGED
package/dist/cli/validate.js
CHANGED
|
@@ -202,22 +202,6 @@ export async function handleValidate(options) {
|
|
|
202
202
|
}
|
|
203
203
|
// Human-readable output
|
|
204
204
|
printValidationReport(result);
|
|
205
|
-
// Watch mode: re-validate on file changes
|
|
206
|
-
if (options.watch) {
|
|
207
|
-
const chokidar = await import("chokidar");
|
|
208
|
-
const diagramPath = resolveArchitecturePath(options);
|
|
209
|
-
console.log(chalk.gray(` Watching ${diagramPath} for changes...`));
|
|
210
|
-
console.log(chalk.gray(" Press Ctrl+C to stop."));
|
|
211
|
-
const watcher = chokidar.watch(diagramPath, { ignoreInitial: true });
|
|
212
|
-
watcher.on("change", () => {
|
|
213
|
-
console.clear();
|
|
214
|
-
const watchResult = runValidation(options);
|
|
215
|
-
printValidationReport(watchResult);
|
|
216
|
-
console.log(chalk.gray(` Watching ${diagramPath} for changes...`));
|
|
217
|
-
console.log(chalk.gray(" Press Ctrl+C to stop."));
|
|
218
|
-
});
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
205
|
if (result.errors > 0) {
|
|
222
206
|
process.exit(1);
|
|
223
207
|
}
|