@ipation/specbridge 2.1.0 → 2.3.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/CHANGELOG.md +128 -0
- package/README.md +1 -1
- package/dist/cli.js +206 -5223
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +319 -548
- package/dist/index.js +1508 -5721
- package/dist/index.js.map +1 -1
- package/package.json +23 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SourceFile, Project } from 'ts-morph';
|
|
3
3
|
import { Document } from 'yaml';
|
|
4
|
+
import { Application } from 'express';
|
|
4
5
|
export { minimatch } from 'minimatch';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -328,443 +329,174 @@ interface MigrationStep {
|
|
|
328
329
|
* Zod schemas for decision YAML validation
|
|
329
330
|
*/
|
|
330
331
|
|
|
331
|
-
declare const DecisionStatusSchema: z.ZodEnum<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
declare const DecisionStatusSchema: z.ZodEnum<{
|
|
333
|
+
draft: "draft";
|
|
334
|
+
active: "active";
|
|
335
|
+
deprecated: "deprecated";
|
|
336
|
+
superseded: "superseded";
|
|
337
|
+
}>;
|
|
338
|
+
declare const ConstraintTypeSchema: z.ZodEnum<{
|
|
339
|
+
invariant: "invariant";
|
|
340
|
+
convention: "convention";
|
|
341
|
+
guideline: "guideline";
|
|
342
|
+
}>;
|
|
343
|
+
declare const SeveritySchema: z.ZodEnum<{
|
|
344
|
+
critical: "critical";
|
|
345
|
+
high: "high";
|
|
346
|
+
medium: "medium";
|
|
347
|
+
low: "low";
|
|
348
|
+
}>;
|
|
349
|
+
declare const VerificationFrequencySchema: z.ZodEnum<{
|
|
350
|
+
commit: "commit";
|
|
351
|
+
pr: "pr";
|
|
352
|
+
daily: "daily";
|
|
353
|
+
weekly: "weekly";
|
|
354
|
+
}>;
|
|
335
355
|
declare const DecisionMetadataSchema: z.ZodObject<{
|
|
336
356
|
id: z.ZodString;
|
|
337
357
|
title: z.ZodString;
|
|
338
|
-
status: z.ZodEnum<
|
|
339
|
-
|
|
358
|
+
status: z.ZodEnum<{
|
|
359
|
+
draft: "draft";
|
|
360
|
+
active: "active";
|
|
361
|
+
deprecated: "deprecated";
|
|
362
|
+
superseded: "superseded";
|
|
363
|
+
}>;
|
|
364
|
+
owners: z.ZodArray<z.ZodString>;
|
|
340
365
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
341
366
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
342
367
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
343
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString
|
|
344
|
-
},
|
|
345
|
-
id: string;
|
|
346
|
-
title: string;
|
|
347
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
348
|
-
owners: string[];
|
|
349
|
-
createdAt?: string | undefined;
|
|
350
|
-
updatedAt?: string | undefined;
|
|
351
|
-
supersededBy?: string | undefined;
|
|
352
|
-
tags?: string[] | undefined;
|
|
353
|
-
}, {
|
|
354
|
-
id: string;
|
|
355
|
-
title: string;
|
|
356
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
357
|
-
owners: string[];
|
|
358
|
-
createdAt?: string | undefined;
|
|
359
|
-
updatedAt?: string | undefined;
|
|
360
|
-
supersededBy?: string | undefined;
|
|
361
|
-
tags?: string[] | undefined;
|
|
362
|
-
}>;
|
|
368
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
}, z.core.$strip>;
|
|
363
370
|
declare const DecisionContentSchema: z.ZodObject<{
|
|
364
371
|
summary: z.ZodString;
|
|
365
372
|
rationale: z.ZodString;
|
|
366
373
|
context: z.ZodOptional<z.ZodString>;
|
|
367
|
-
consequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
368
|
-
},
|
|
369
|
-
summary: string;
|
|
370
|
-
rationale: string;
|
|
371
|
-
context?: string | undefined;
|
|
372
|
-
consequences?: string[] | undefined;
|
|
373
|
-
}, {
|
|
374
|
-
summary: string;
|
|
375
|
-
rationale: string;
|
|
376
|
-
context?: string | undefined;
|
|
377
|
-
consequences?: string[] | undefined;
|
|
378
|
-
}>;
|
|
374
|
+
consequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
}, z.core.$strip>;
|
|
379
376
|
declare const ConstraintExceptionSchema: z.ZodObject<{
|
|
380
377
|
pattern: z.ZodString;
|
|
381
378
|
reason: z.ZodString;
|
|
382
379
|
approvedBy: z.ZodOptional<z.ZodString>;
|
|
383
380
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
384
|
-
},
|
|
385
|
-
pattern: string;
|
|
386
|
-
reason: string;
|
|
387
|
-
approvedBy?: string | undefined;
|
|
388
|
-
expiresAt?: string | undefined;
|
|
389
|
-
}, {
|
|
390
|
-
pattern: string;
|
|
391
|
-
reason: string;
|
|
392
|
-
approvedBy?: string | undefined;
|
|
393
|
-
expiresAt?: string | undefined;
|
|
394
|
-
}>;
|
|
381
|
+
}, z.core.$strip>;
|
|
395
382
|
declare const ConstraintCheckSchema: z.ZodObject<{
|
|
396
383
|
verifier: z.ZodString;
|
|
397
384
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
398
|
-
},
|
|
399
|
-
verifier: string;
|
|
400
|
-
params?: Record<string, unknown> | undefined;
|
|
401
|
-
}, {
|
|
402
|
-
verifier: string;
|
|
403
|
-
params?: Record<string, unknown> | undefined;
|
|
404
|
-
}>;
|
|
385
|
+
}, z.core.$strip>;
|
|
405
386
|
declare const ConstraintSchema: z.ZodObject<{
|
|
406
387
|
id: z.ZodString;
|
|
407
|
-
type: z.ZodEnum<
|
|
388
|
+
type: z.ZodEnum<{
|
|
389
|
+
invariant: "invariant";
|
|
390
|
+
convention: "convention";
|
|
391
|
+
guideline: "guideline";
|
|
392
|
+
}>;
|
|
408
393
|
rule: z.ZodString;
|
|
409
|
-
severity: z.ZodEnum<
|
|
394
|
+
severity: z.ZodEnum<{
|
|
395
|
+
critical: "critical";
|
|
396
|
+
high: "high";
|
|
397
|
+
medium: "medium";
|
|
398
|
+
low: "low";
|
|
399
|
+
}>;
|
|
410
400
|
scope: z.ZodString;
|
|
411
401
|
verifier: z.ZodOptional<z.ZodString>;
|
|
412
402
|
check: z.ZodOptional<z.ZodObject<{
|
|
413
403
|
verifier: z.ZodString;
|
|
414
404
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
415
|
-
},
|
|
416
|
-
verifier: string;
|
|
417
|
-
params?: Record<string, unknown> | undefined;
|
|
418
|
-
}, {
|
|
419
|
-
verifier: string;
|
|
420
|
-
params?: Record<string, unknown> | undefined;
|
|
421
|
-
}>>;
|
|
405
|
+
}, z.core.$strip>>;
|
|
422
406
|
autofix: z.ZodOptional<z.ZodBoolean>;
|
|
423
407
|
exceptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
424
408
|
pattern: z.ZodString;
|
|
425
409
|
reason: z.ZodString;
|
|
426
410
|
approvedBy: z.ZodOptional<z.ZodString>;
|
|
427
411
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
reason: string;
|
|
431
|
-
approvedBy?: string | undefined;
|
|
432
|
-
expiresAt?: string | undefined;
|
|
433
|
-
}, {
|
|
434
|
-
pattern: string;
|
|
435
|
-
reason: string;
|
|
436
|
-
approvedBy?: string | undefined;
|
|
437
|
-
expiresAt?: string | undefined;
|
|
438
|
-
}>, "many">>;
|
|
439
|
-
}, "strip", z.ZodTypeAny, {
|
|
440
|
-
id: string;
|
|
441
|
-
type: "invariant" | "convention" | "guideline";
|
|
442
|
-
rule: string;
|
|
443
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
444
|
-
scope: string;
|
|
445
|
-
verifier?: string | undefined;
|
|
446
|
-
check?: {
|
|
447
|
-
verifier: string;
|
|
448
|
-
params?: Record<string, unknown> | undefined;
|
|
449
|
-
} | undefined;
|
|
450
|
-
autofix?: boolean | undefined;
|
|
451
|
-
exceptions?: {
|
|
452
|
-
pattern: string;
|
|
453
|
-
reason: string;
|
|
454
|
-
approvedBy?: string | undefined;
|
|
455
|
-
expiresAt?: string | undefined;
|
|
456
|
-
}[] | undefined;
|
|
457
|
-
}, {
|
|
458
|
-
id: string;
|
|
459
|
-
type: "invariant" | "convention" | "guideline";
|
|
460
|
-
rule: string;
|
|
461
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
462
|
-
scope: string;
|
|
463
|
-
verifier?: string | undefined;
|
|
464
|
-
check?: {
|
|
465
|
-
verifier: string;
|
|
466
|
-
params?: Record<string, unknown> | undefined;
|
|
467
|
-
} | undefined;
|
|
468
|
-
autofix?: boolean | undefined;
|
|
469
|
-
exceptions?: {
|
|
470
|
-
pattern: string;
|
|
471
|
-
reason: string;
|
|
472
|
-
approvedBy?: string | undefined;
|
|
473
|
-
expiresAt?: string | undefined;
|
|
474
|
-
}[] | undefined;
|
|
475
|
-
}>;
|
|
412
|
+
}, z.core.$strip>>>;
|
|
413
|
+
}, z.core.$strip>;
|
|
476
414
|
declare const VerificationConfigSchema: z.ZodObject<{
|
|
477
415
|
check: z.ZodString;
|
|
478
416
|
target: z.ZodString;
|
|
479
|
-
frequency: z.ZodEnum<
|
|
417
|
+
frequency: z.ZodEnum<{
|
|
418
|
+
commit: "commit";
|
|
419
|
+
pr: "pr";
|
|
420
|
+
daily: "daily";
|
|
421
|
+
weekly: "weekly";
|
|
422
|
+
}>;
|
|
480
423
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
481
|
-
},
|
|
482
|
-
check: string;
|
|
483
|
-
target: string;
|
|
484
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
485
|
-
timeout?: number | undefined;
|
|
486
|
-
}, {
|
|
487
|
-
check: string;
|
|
488
|
-
target: string;
|
|
489
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
490
|
-
timeout?: number | undefined;
|
|
491
|
-
}>;
|
|
424
|
+
}, z.core.$strip>;
|
|
492
425
|
declare const LinksSchema: z.ZodObject<{
|
|
493
|
-
related: z.ZodOptional<z.ZodArray<z.ZodString
|
|
494
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString
|
|
495
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString
|
|
496
|
-
},
|
|
497
|
-
related?: string[] | undefined;
|
|
498
|
-
supersedes?: string[] | undefined;
|
|
499
|
-
references?: string[] | undefined;
|
|
500
|
-
}, {
|
|
501
|
-
related?: string[] | undefined;
|
|
502
|
-
supersedes?: string[] | undefined;
|
|
503
|
-
references?: string[] | undefined;
|
|
504
|
-
}>;
|
|
426
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
427
|
+
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
428
|
+
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
429
|
+
}, z.core.$strip>;
|
|
505
430
|
declare const DecisionSchema: z.ZodObject<{
|
|
506
431
|
kind: z.ZodLiteral<"Decision">;
|
|
507
432
|
metadata: z.ZodObject<{
|
|
508
433
|
id: z.ZodString;
|
|
509
434
|
title: z.ZodString;
|
|
510
|
-
status: z.ZodEnum<
|
|
511
|
-
|
|
435
|
+
status: z.ZodEnum<{
|
|
436
|
+
draft: "draft";
|
|
437
|
+
active: "active";
|
|
438
|
+
deprecated: "deprecated";
|
|
439
|
+
superseded: "superseded";
|
|
440
|
+
}>;
|
|
441
|
+
owners: z.ZodArray<z.ZodString>;
|
|
512
442
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
513
443
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
514
444
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
515
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString
|
|
516
|
-
},
|
|
517
|
-
id: string;
|
|
518
|
-
title: string;
|
|
519
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
520
|
-
owners: string[];
|
|
521
|
-
createdAt?: string | undefined;
|
|
522
|
-
updatedAt?: string | undefined;
|
|
523
|
-
supersededBy?: string | undefined;
|
|
524
|
-
tags?: string[] | undefined;
|
|
525
|
-
}, {
|
|
526
|
-
id: string;
|
|
527
|
-
title: string;
|
|
528
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
529
|
-
owners: string[];
|
|
530
|
-
createdAt?: string | undefined;
|
|
531
|
-
updatedAt?: string | undefined;
|
|
532
|
-
supersededBy?: string | undefined;
|
|
533
|
-
tags?: string[] | undefined;
|
|
534
|
-
}>;
|
|
445
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
|
+
}, z.core.$strip>;
|
|
535
447
|
decision: z.ZodObject<{
|
|
536
448
|
summary: z.ZodString;
|
|
537
449
|
rationale: z.ZodString;
|
|
538
450
|
context: z.ZodOptional<z.ZodString>;
|
|
539
|
-
consequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
540
|
-
},
|
|
541
|
-
summary: string;
|
|
542
|
-
rationale: string;
|
|
543
|
-
context?: string | undefined;
|
|
544
|
-
consequences?: string[] | undefined;
|
|
545
|
-
}, {
|
|
546
|
-
summary: string;
|
|
547
|
-
rationale: string;
|
|
548
|
-
context?: string | undefined;
|
|
549
|
-
consequences?: string[] | undefined;
|
|
550
|
-
}>;
|
|
451
|
+
consequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
452
|
+
}, z.core.$strip>;
|
|
551
453
|
constraints: z.ZodArray<z.ZodObject<{
|
|
552
454
|
id: z.ZodString;
|
|
553
|
-
type: z.ZodEnum<
|
|
455
|
+
type: z.ZodEnum<{
|
|
456
|
+
invariant: "invariant";
|
|
457
|
+
convention: "convention";
|
|
458
|
+
guideline: "guideline";
|
|
459
|
+
}>;
|
|
554
460
|
rule: z.ZodString;
|
|
555
|
-
severity: z.ZodEnum<
|
|
461
|
+
severity: z.ZodEnum<{
|
|
462
|
+
critical: "critical";
|
|
463
|
+
high: "high";
|
|
464
|
+
medium: "medium";
|
|
465
|
+
low: "low";
|
|
466
|
+
}>;
|
|
556
467
|
scope: z.ZodString;
|
|
557
468
|
verifier: z.ZodOptional<z.ZodString>;
|
|
558
469
|
check: z.ZodOptional<z.ZodObject<{
|
|
559
470
|
verifier: z.ZodString;
|
|
560
471
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
561
|
-
},
|
|
562
|
-
verifier: string;
|
|
563
|
-
params?: Record<string, unknown> | undefined;
|
|
564
|
-
}, {
|
|
565
|
-
verifier: string;
|
|
566
|
-
params?: Record<string, unknown> | undefined;
|
|
567
|
-
}>>;
|
|
472
|
+
}, z.core.$strip>>;
|
|
568
473
|
autofix: z.ZodOptional<z.ZodBoolean>;
|
|
569
474
|
exceptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
570
475
|
pattern: z.ZodString;
|
|
571
476
|
reason: z.ZodString;
|
|
572
477
|
approvedBy: z.ZodOptional<z.ZodString>;
|
|
573
478
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
574
|
-
},
|
|
575
|
-
|
|
576
|
-
reason: string;
|
|
577
|
-
approvedBy?: string | undefined;
|
|
578
|
-
expiresAt?: string | undefined;
|
|
579
|
-
}, {
|
|
580
|
-
pattern: string;
|
|
581
|
-
reason: string;
|
|
582
|
-
approvedBy?: string | undefined;
|
|
583
|
-
expiresAt?: string | undefined;
|
|
584
|
-
}>, "many">>;
|
|
585
|
-
}, "strip", z.ZodTypeAny, {
|
|
586
|
-
id: string;
|
|
587
|
-
type: "invariant" | "convention" | "guideline";
|
|
588
|
-
rule: string;
|
|
589
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
590
|
-
scope: string;
|
|
591
|
-
verifier?: string | undefined;
|
|
592
|
-
check?: {
|
|
593
|
-
verifier: string;
|
|
594
|
-
params?: Record<string, unknown> | undefined;
|
|
595
|
-
} | undefined;
|
|
596
|
-
autofix?: boolean | undefined;
|
|
597
|
-
exceptions?: {
|
|
598
|
-
pattern: string;
|
|
599
|
-
reason: string;
|
|
600
|
-
approvedBy?: string | undefined;
|
|
601
|
-
expiresAt?: string | undefined;
|
|
602
|
-
}[] | undefined;
|
|
603
|
-
}, {
|
|
604
|
-
id: string;
|
|
605
|
-
type: "invariant" | "convention" | "guideline";
|
|
606
|
-
rule: string;
|
|
607
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
608
|
-
scope: string;
|
|
609
|
-
verifier?: string | undefined;
|
|
610
|
-
check?: {
|
|
611
|
-
verifier: string;
|
|
612
|
-
params?: Record<string, unknown> | undefined;
|
|
613
|
-
} | undefined;
|
|
614
|
-
autofix?: boolean | undefined;
|
|
615
|
-
exceptions?: {
|
|
616
|
-
pattern: string;
|
|
617
|
-
reason: string;
|
|
618
|
-
approvedBy?: string | undefined;
|
|
619
|
-
expiresAt?: string | undefined;
|
|
620
|
-
}[] | undefined;
|
|
621
|
-
}>, "many">;
|
|
479
|
+
}, z.core.$strip>>>;
|
|
480
|
+
}, z.core.$strip>>;
|
|
622
481
|
verification: z.ZodOptional<z.ZodObject<{
|
|
623
482
|
automated: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
624
483
|
check: z.ZodString;
|
|
625
484
|
target: z.ZodString;
|
|
626
|
-
frequency: z.ZodEnum<
|
|
485
|
+
frequency: z.ZodEnum<{
|
|
486
|
+
commit: "commit";
|
|
487
|
+
pr: "pr";
|
|
488
|
+
daily: "daily";
|
|
489
|
+
weekly: "weekly";
|
|
490
|
+
}>;
|
|
627
491
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
628
|
-
},
|
|
629
|
-
|
|
630
|
-
target: string;
|
|
631
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
632
|
-
timeout?: number | undefined;
|
|
633
|
-
}, {
|
|
634
|
-
check: string;
|
|
635
|
-
target: string;
|
|
636
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
637
|
-
timeout?: number | undefined;
|
|
638
|
-
}>, "many">>;
|
|
639
|
-
}, "strip", z.ZodTypeAny, {
|
|
640
|
-
automated?: {
|
|
641
|
-
check: string;
|
|
642
|
-
target: string;
|
|
643
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
644
|
-
timeout?: number | undefined;
|
|
645
|
-
}[] | undefined;
|
|
646
|
-
}, {
|
|
647
|
-
automated?: {
|
|
648
|
-
check: string;
|
|
649
|
-
target: string;
|
|
650
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
651
|
-
timeout?: number | undefined;
|
|
652
|
-
}[] | undefined;
|
|
653
|
-
}>>;
|
|
492
|
+
}, z.core.$strip>>>;
|
|
493
|
+
}, z.core.$strip>>;
|
|
654
494
|
links: z.ZodOptional<z.ZodObject<{
|
|
655
|
-
related: z.ZodOptional<z.ZodArray<z.ZodString
|
|
656
|
-
supersedes: z.ZodOptional<z.ZodArray<z.ZodString
|
|
657
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString
|
|
658
|
-
},
|
|
659
|
-
|
|
660
|
-
supersedes?: string[] | undefined;
|
|
661
|
-
references?: string[] | undefined;
|
|
662
|
-
}, {
|
|
663
|
-
related?: string[] | undefined;
|
|
664
|
-
supersedes?: string[] | undefined;
|
|
665
|
-
references?: string[] | undefined;
|
|
666
|
-
}>>;
|
|
667
|
-
}, "strip", z.ZodTypeAny, {
|
|
668
|
-
kind: "Decision";
|
|
669
|
-
metadata: {
|
|
670
|
-
id: string;
|
|
671
|
-
title: string;
|
|
672
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
673
|
-
owners: string[];
|
|
674
|
-
createdAt?: string | undefined;
|
|
675
|
-
updatedAt?: string | undefined;
|
|
676
|
-
supersededBy?: string | undefined;
|
|
677
|
-
tags?: string[] | undefined;
|
|
678
|
-
};
|
|
679
|
-
decision: {
|
|
680
|
-
summary: string;
|
|
681
|
-
rationale: string;
|
|
682
|
-
context?: string | undefined;
|
|
683
|
-
consequences?: string[] | undefined;
|
|
684
|
-
};
|
|
685
|
-
constraints: {
|
|
686
|
-
id: string;
|
|
687
|
-
type: "invariant" | "convention" | "guideline";
|
|
688
|
-
rule: string;
|
|
689
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
690
|
-
scope: string;
|
|
691
|
-
verifier?: string | undefined;
|
|
692
|
-
check?: {
|
|
693
|
-
verifier: string;
|
|
694
|
-
params?: Record<string, unknown> | undefined;
|
|
695
|
-
} | undefined;
|
|
696
|
-
autofix?: boolean | undefined;
|
|
697
|
-
exceptions?: {
|
|
698
|
-
pattern: string;
|
|
699
|
-
reason: string;
|
|
700
|
-
approvedBy?: string | undefined;
|
|
701
|
-
expiresAt?: string | undefined;
|
|
702
|
-
}[] | undefined;
|
|
703
|
-
}[];
|
|
704
|
-
verification?: {
|
|
705
|
-
automated?: {
|
|
706
|
-
check: string;
|
|
707
|
-
target: string;
|
|
708
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
709
|
-
timeout?: number | undefined;
|
|
710
|
-
}[] | undefined;
|
|
711
|
-
} | undefined;
|
|
712
|
-
links?: {
|
|
713
|
-
related?: string[] | undefined;
|
|
714
|
-
supersedes?: string[] | undefined;
|
|
715
|
-
references?: string[] | undefined;
|
|
716
|
-
} | undefined;
|
|
717
|
-
}, {
|
|
718
|
-
kind: "Decision";
|
|
719
|
-
metadata: {
|
|
720
|
-
id: string;
|
|
721
|
-
title: string;
|
|
722
|
-
status: "draft" | "active" | "deprecated" | "superseded";
|
|
723
|
-
owners: string[];
|
|
724
|
-
createdAt?: string | undefined;
|
|
725
|
-
updatedAt?: string | undefined;
|
|
726
|
-
supersededBy?: string | undefined;
|
|
727
|
-
tags?: string[] | undefined;
|
|
728
|
-
};
|
|
729
|
-
decision: {
|
|
730
|
-
summary: string;
|
|
731
|
-
rationale: string;
|
|
732
|
-
context?: string | undefined;
|
|
733
|
-
consequences?: string[] | undefined;
|
|
734
|
-
};
|
|
735
|
-
constraints: {
|
|
736
|
-
id: string;
|
|
737
|
-
type: "invariant" | "convention" | "guideline";
|
|
738
|
-
rule: string;
|
|
739
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
740
|
-
scope: string;
|
|
741
|
-
verifier?: string | undefined;
|
|
742
|
-
check?: {
|
|
743
|
-
verifier: string;
|
|
744
|
-
params?: Record<string, unknown> | undefined;
|
|
745
|
-
} | undefined;
|
|
746
|
-
autofix?: boolean | undefined;
|
|
747
|
-
exceptions?: {
|
|
748
|
-
pattern: string;
|
|
749
|
-
reason: string;
|
|
750
|
-
approvedBy?: string | undefined;
|
|
751
|
-
expiresAt?: string | undefined;
|
|
752
|
-
}[] | undefined;
|
|
753
|
-
}[];
|
|
754
|
-
verification?: {
|
|
755
|
-
automated?: {
|
|
756
|
-
check: string;
|
|
757
|
-
target: string;
|
|
758
|
-
frequency: "commit" | "pr" | "daily" | "weekly";
|
|
759
|
-
timeout?: number | undefined;
|
|
760
|
-
}[] | undefined;
|
|
761
|
-
} | undefined;
|
|
762
|
-
links?: {
|
|
763
|
-
related?: string[] | undefined;
|
|
764
|
-
supersedes?: string[] | undefined;
|
|
765
|
-
references?: string[] | undefined;
|
|
766
|
-
} | undefined;
|
|
767
|
-
}>;
|
|
495
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
496
|
+
supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
497
|
+
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
}, z.core.$strip>;
|
|
768
500
|
type DecisionStatusSchema_ = z.infer<typeof DecisionStatusSchema>;
|
|
769
501
|
type ConstraintTypeSchema_ = z.infer<typeof ConstraintTypeSchema>;
|
|
770
502
|
type SeveritySchema_ = z.infer<typeof SeveritySchema>;
|
|
@@ -799,190 +531,53 @@ declare const SpecBridgeConfigSchema: z.ZodObject<{
|
|
|
799
531
|
version: z.ZodString;
|
|
800
532
|
project: z.ZodObject<{
|
|
801
533
|
name: z.ZodString;
|
|
802
|
-
sourceRoots: z.ZodArray<z.ZodString
|
|
803
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString
|
|
804
|
-
},
|
|
805
|
-
name: string;
|
|
806
|
-
sourceRoots: string[];
|
|
807
|
-
exclude?: string[] | undefined;
|
|
808
|
-
}, {
|
|
809
|
-
name: string;
|
|
810
|
-
sourceRoots: string[];
|
|
811
|
-
exclude?: string[] | undefined;
|
|
812
|
-
}>;
|
|
534
|
+
sourceRoots: z.ZodArray<z.ZodString>;
|
|
535
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
536
|
+
}, z.core.$strip>;
|
|
813
537
|
inference: z.ZodOptional<z.ZodObject<{
|
|
814
538
|
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
815
|
-
analyzers: z.ZodOptional<z.ZodArray<z.ZodString
|
|
816
|
-
},
|
|
817
|
-
minConfidence?: number | undefined;
|
|
818
|
-
analyzers?: string[] | undefined;
|
|
819
|
-
}, {
|
|
820
|
-
minConfidence?: number | undefined;
|
|
821
|
-
analyzers?: string[] | undefined;
|
|
822
|
-
}>>;
|
|
539
|
+
analyzers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
540
|
+
}, z.core.$strip>>;
|
|
823
541
|
verification: z.ZodOptional<z.ZodObject<{
|
|
824
542
|
levels: z.ZodOptional<z.ZodObject<{
|
|
825
543
|
commit: z.ZodOptional<z.ZodObject<{
|
|
826
544
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
827
|
-
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
}>>;
|
|
545
|
+
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
546
|
+
critical: "critical";
|
|
547
|
+
high: "high";
|
|
548
|
+
medium: "medium";
|
|
549
|
+
low: "low";
|
|
550
|
+
}>>>;
|
|
551
|
+
}, z.core.$strip>>;
|
|
835
552
|
pr: z.ZodOptional<z.ZodObject<{
|
|
836
553
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
837
|
-
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}>>;
|
|
554
|
+
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
555
|
+
critical: "critical";
|
|
556
|
+
high: "high";
|
|
557
|
+
medium: "medium";
|
|
558
|
+
low: "low";
|
|
559
|
+
}>>>;
|
|
560
|
+
}, z.core.$strip>>;
|
|
845
561
|
full: z.ZodOptional<z.ZodObject<{
|
|
846
562
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
847
|
-
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
commit?: {
|
|
857
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
858
|
-
timeout?: number | undefined;
|
|
859
|
-
} | undefined;
|
|
860
|
-
pr?: {
|
|
861
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
862
|
-
timeout?: number | undefined;
|
|
863
|
-
} | undefined;
|
|
864
|
-
full?: {
|
|
865
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
866
|
-
timeout?: number | undefined;
|
|
867
|
-
} | undefined;
|
|
868
|
-
}, {
|
|
869
|
-
commit?: {
|
|
870
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
871
|
-
timeout?: number | undefined;
|
|
872
|
-
} | undefined;
|
|
873
|
-
pr?: {
|
|
874
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
875
|
-
timeout?: number | undefined;
|
|
876
|
-
} | undefined;
|
|
877
|
-
full?: {
|
|
878
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
879
|
-
timeout?: number | undefined;
|
|
880
|
-
} | undefined;
|
|
881
|
-
}>>;
|
|
882
|
-
}, "strip", z.ZodTypeAny, {
|
|
883
|
-
levels?: {
|
|
884
|
-
commit?: {
|
|
885
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
886
|
-
timeout?: number | undefined;
|
|
887
|
-
} | undefined;
|
|
888
|
-
pr?: {
|
|
889
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
890
|
-
timeout?: number | undefined;
|
|
891
|
-
} | undefined;
|
|
892
|
-
full?: {
|
|
893
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
894
|
-
timeout?: number | undefined;
|
|
895
|
-
} | undefined;
|
|
896
|
-
} | undefined;
|
|
897
|
-
}, {
|
|
898
|
-
levels?: {
|
|
899
|
-
commit?: {
|
|
900
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
901
|
-
timeout?: number | undefined;
|
|
902
|
-
} | undefined;
|
|
903
|
-
pr?: {
|
|
904
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
905
|
-
timeout?: number | undefined;
|
|
906
|
-
} | undefined;
|
|
907
|
-
full?: {
|
|
908
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
909
|
-
timeout?: number | undefined;
|
|
910
|
-
} | undefined;
|
|
911
|
-
} | undefined;
|
|
912
|
-
}>>;
|
|
563
|
+
severity: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
564
|
+
critical: "critical";
|
|
565
|
+
high: "high";
|
|
566
|
+
medium: "medium";
|
|
567
|
+
low: "low";
|
|
568
|
+
}>>>;
|
|
569
|
+
}, z.core.$strip>>;
|
|
570
|
+
}, z.core.$strip>>;
|
|
571
|
+
}, z.core.$strip>>;
|
|
913
572
|
agent: z.ZodOptional<z.ZodObject<{
|
|
914
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
573
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
574
|
+
markdown: "markdown";
|
|
575
|
+
json: "json";
|
|
576
|
+
mcp: "mcp";
|
|
577
|
+
}>>;
|
|
915
578
|
includeRationale: z.ZodOptional<z.ZodBoolean>;
|
|
916
|
-
},
|
|
917
|
-
|
|
918
|
-
includeRationale?: boolean | undefined;
|
|
919
|
-
}, {
|
|
920
|
-
format?: "markdown" | "json" | "mcp" | undefined;
|
|
921
|
-
includeRationale?: boolean | undefined;
|
|
922
|
-
}>>;
|
|
923
|
-
}, "strip", z.ZodTypeAny, {
|
|
924
|
-
version: string;
|
|
925
|
-
project: {
|
|
926
|
-
name: string;
|
|
927
|
-
sourceRoots: string[];
|
|
928
|
-
exclude?: string[] | undefined;
|
|
929
|
-
};
|
|
930
|
-
verification?: {
|
|
931
|
-
levels?: {
|
|
932
|
-
commit?: {
|
|
933
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
934
|
-
timeout?: number | undefined;
|
|
935
|
-
} | undefined;
|
|
936
|
-
pr?: {
|
|
937
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
938
|
-
timeout?: number | undefined;
|
|
939
|
-
} | undefined;
|
|
940
|
-
full?: {
|
|
941
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
942
|
-
timeout?: number | undefined;
|
|
943
|
-
} | undefined;
|
|
944
|
-
} | undefined;
|
|
945
|
-
} | undefined;
|
|
946
|
-
inference?: {
|
|
947
|
-
minConfidence?: number | undefined;
|
|
948
|
-
analyzers?: string[] | undefined;
|
|
949
|
-
} | undefined;
|
|
950
|
-
agent?: {
|
|
951
|
-
format?: "markdown" | "json" | "mcp" | undefined;
|
|
952
|
-
includeRationale?: boolean | undefined;
|
|
953
|
-
} | undefined;
|
|
954
|
-
}, {
|
|
955
|
-
version: string;
|
|
956
|
-
project: {
|
|
957
|
-
name: string;
|
|
958
|
-
sourceRoots: string[];
|
|
959
|
-
exclude?: string[] | undefined;
|
|
960
|
-
};
|
|
961
|
-
verification?: {
|
|
962
|
-
levels?: {
|
|
963
|
-
commit?: {
|
|
964
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
965
|
-
timeout?: number | undefined;
|
|
966
|
-
} | undefined;
|
|
967
|
-
pr?: {
|
|
968
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
969
|
-
timeout?: number | undefined;
|
|
970
|
-
} | undefined;
|
|
971
|
-
full?: {
|
|
972
|
-
severity?: ("critical" | "high" | "medium" | "low")[] | undefined;
|
|
973
|
-
timeout?: number | undefined;
|
|
974
|
-
} | undefined;
|
|
975
|
-
} | undefined;
|
|
976
|
-
} | undefined;
|
|
977
|
-
inference?: {
|
|
978
|
-
minConfidence?: number | undefined;
|
|
979
|
-
analyzers?: string[] | undefined;
|
|
980
|
-
} | undefined;
|
|
981
|
-
agent?: {
|
|
982
|
-
format?: "markdown" | "json" | "mcp" | undefined;
|
|
983
|
-
includeRationale?: boolean | undefined;
|
|
984
|
-
} | undefined;
|
|
985
|
-
}>;
|
|
579
|
+
}, z.core.$strip>>;
|
|
580
|
+
}, z.core.$strip>;
|
|
986
581
|
type SpecBridgeConfigType = z.infer<typeof SpecBridgeConfigSchema>;
|
|
987
582
|
/**
|
|
988
583
|
* Validate configuration
|
|
@@ -1822,10 +1417,13 @@ interface DependencyGraph {
|
|
|
1822
1417
|
decisionToFiles: Map<string, Set<string>>;
|
|
1823
1418
|
fileToDecisions: Map<string, Set<string>>;
|
|
1824
1419
|
}
|
|
1420
|
+
interface BuildDependencyGraphOptions {
|
|
1421
|
+
cwd?: string;
|
|
1422
|
+
}
|
|
1825
1423
|
/**
|
|
1826
1424
|
* Build dependency graph from decisions and file list
|
|
1827
1425
|
*/
|
|
1828
|
-
declare function buildDependencyGraph(decisions: Decision[], files: string[]): Promise<DependencyGraph>;
|
|
1426
|
+
declare function buildDependencyGraph(decisions: Decision[], files: string[], options?: BuildDependencyGraphOptions): Promise<DependencyGraph>;
|
|
1829
1427
|
/**
|
|
1830
1428
|
* Get files affected by a decision
|
|
1831
1429
|
*/
|
|
@@ -1885,6 +1483,23 @@ interface ReportOptions {
|
|
|
1885
1483
|
/** Use v1.3 compliance formula instead of v2.0 severity-weighted formula */
|
|
1886
1484
|
legacyCompliance?: boolean;
|
|
1887
1485
|
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Generic verification result shape for Reporter class
|
|
1488
|
+
* Supports various result formats from different verification engines
|
|
1489
|
+
*/
|
|
1490
|
+
interface ReporterResult {
|
|
1491
|
+
violations?: Violation[];
|
|
1492
|
+
summary?: {
|
|
1493
|
+
totalViolations?: number;
|
|
1494
|
+
decisionsChecked?: number;
|
|
1495
|
+
filesChecked?: number;
|
|
1496
|
+
critical?: number;
|
|
1497
|
+
high?: number;
|
|
1498
|
+
medium?: number;
|
|
1499
|
+
low?: number;
|
|
1500
|
+
duration?: number;
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1888
1503
|
/**
|
|
1889
1504
|
* Generate a compliance report
|
|
1890
1505
|
*/
|
|
@@ -1903,7 +1518,7 @@ declare class Reporter {
|
|
|
1903
1518
|
/**
|
|
1904
1519
|
* Generate formatted report from verification result
|
|
1905
1520
|
*/
|
|
1906
|
-
generate(result:
|
|
1521
|
+
generate(result: ReporterResult, options?: {
|
|
1907
1522
|
format?: 'table' | 'json' | 'markdown';
|
|
1908
1523
|
includePassedChecks?: boolean;
|
|
1909
1524
|
groupBy?: 'severity' | 'file';
|
|
@@ -1912,7 +1527,7 @@ declare class Reporter {
|
|
|
1912
1527
|
/**
|
|
1913
1528
|
* Generate compliance overview from multiple results
|
|
1914
1529
|
*/
|
|
1915
|
-
generateComplianceReport(results:
|
|
1530
|
+
generateComplianceReport(results: ReporterResult[]): string;
|
|
1916
1531
|
private formatAsTable;
|
|
1917
1532
|
private formatAsTableGrouped;
|
|
1918
1533
|
private formatAsMarkdown;
|
|
@@ -2085,7 +1700,7 @@ declare class AgentContextGenerator {
|
|
|
2085
1700
|
* Generate context from decisions
|
|
2086
1701
|
*/
|
|
2087
1702
|
generateContext(options: {
|
|
2088
|
-
decisions:
|
|
1703
|
+
decisions: Decision[];
|
|
2089
1704
|
filePattern?: string;
|
|
2090
1705
|
format?: 'markdown' | 'plain' | 'json';
|
|
2091
1706
|
concise?: boolean;
|
|
@@ -2096,15 +1711,15 @@ declare class AgentContextGenerator {
|
|
|
2096
1711
|
* Generate prompt suffix for AI agents
|
|
2097
1712
|
*/
|
|
2098
1713
|
generatePromptSuffix(options: {
|
|
2099
|
-
decisions:
|
|
1714
|
+
decisions: Decision[];
|
|
2100
1715
|
}): string;
|
|
2101
1716
|
/**
|
|
2102
1717
|
* Extract relevant decisions for a specific file
|
|
2103
1718
|
*/
|
|
2104
1719
|
extractRelevantDecisions(options: {
|
|
2105
|
-
decisions:
|
|
1720
|
+
decisions: Decision[];
|
|
2106
1721
|
filePath: string;
|
|
2107
|
-
}):
|
|
1722
|
+
}): Decision[];
|
|
2108
1723
|
}
|
|
2109
1724
|
|
|
2110
1725
|
/**
|
|
@@ -2235,4 +1850,160 @@ declare function matchesAnyPattern(filePath: string, patterns: string[], options
|
|
|
2235
1850
|
cwd?: string;
|
|
2236
1851
|
}): boolean;
|
|
2237
1852
|
|
|
2238
|
-
|
|
1853
|
+
/**
|
|
1854
|
+
* Analytics engine - Provide insights into compliance trends and decision impact
|
|
1855
|
+
*/
|
|
1856
|
+
|
|
1857
|
+
interface DecisionMetrics {
|
|
1858
|
+
decisionId: string;
|
|
1859
|
+
title: string;
|
|
1860
|
+
totalViolations: number;
|
|
1861
|
+
violationsByFile: Map<string, number>;
|
|
1862
|
+
violationsBySeverity: Record<Severity, number>;
|
|
1863
|
+
mostViolatedConstraint: {
|
|
1864
|
+
id: string;
|
|
1865
|
+
count: number;
|
|
1866
|
+
} | null;
|
|
1867
|
+
averageComplianceScore: number;
|
|
1868
|
+
trendDirection: 'up' | 'down' | 'stable';
|
|
1869
|
+
history: Array<{
|
|
1870
|
+
date: string;
|
|
1871
|
+
compliance: number;
|
|
1872
|
+
violations: number;
|
|
1873
|
+
}>;
|
|
1874
|
+
}
|
|
1875
|
+
interface Insight {
|
|
1876
|
+
type: 'warning' | 'info' | 'success';
|
|
1877
|
+
category: 'compliance' | 'trend' | 'hotspot' | 'suggestion';
|
|
1878
|
+
message: string;
|
|
1879
|
+
details?: string;
|
|
1880
|
+
decisionId?: string;
|
|
1881
|
+
}
|
|
1882
|
+
interface AnalyticsSummary {
|
|
1883
|
+
totalDecisions: number;
|
|
1884
|
+
averageCompliance: number;
|
|
1885
|
+
overallTrend: 'up' | 'down' | 'stable';
|
|
1886
|
+
criticalIssues: number;
|
|
1887
|
+
topDecisions: Array<{
|
|
1888
|
+
decisionId: string;
|
|
1889
|
+
title: string;
|
|
1890
|
+
compliance: number;
|
|
1891
|
+
}>;
|
|
1892
|
+
bottomDecisions: Array<{
|
|
1893
|
+
decisionId: string;
|
|
1894
|
+
title: string;
|
|
1895
|
+
compliance: number;
|
|
1896
|
+
}>;
|
|
1897
|
+
insights: Insight[];
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Analytics engine for compliance data
|
|
1901
|
+
*/
|
|
1902
|
+
declare class AnalyticsEngine {
|
|
1903
|
+
/**
|
|
1904
|
+
* Analyze a specific decision across historical reports
|
|
1905
|
+
*/
|
|
1906
|
+
analyzeDecision(decisionId: string, history: StoredReport[]): Promise<DecisionMetrics>;
|
|
1907
|
+
/**
|
|
1908
|
+
* Generate insights from historical data
|
|
1909
|
+
*/
|
|
1910
|
+
generateInsights(history: StoredReport[]): Promise<Insight[]>;
|
|
1911
|
+
/**
|
|
1912
|
+
* Generate analytics summary
|
|
1913
|
+
*/
|
|
1914
|
+
generateSummary(history: StoredReport[]): Promise<AnalyticsSummary>;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Dashboard server - Compliance dashboard backend with REST API
|
|
1919
|
+
*/
|
|
1920
|
+
|
|
1921
|
+
interface DashboardOptions {
|
|
1922
|
+
cwd: string;
|
|
1923
|
+
config: SpecBridgeConfig;
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* Dashboard Server with caching
|
|
1927
|
+
*/
|
|
1928
|
+
declare class DashboardServer {
|
|
1929
|
+
private app;
|
|
1930
|
+
private cwd;
|
|
1931
|
+
private config;
|
|
1932
|
+
private registry;
|
|
1933
|
+
private reportStorage;
|
|
1934
|
+
private cachedReport;
|
|
1935
|
+
private cacheTimestamp;
|
|
1936
|
+
private readonly CACHE_TTL;
|
|
1937
|
+
private refreshInterval;
|
|
1938
|
+
constructor(options: DashboardOptions);
|
|
1939
|
+
/**
|
|
1940
|
+
* Start the server with background cache refresh
|
|
1941
|
+
*/
|
|
1942
|
+
start(): Promise<void>;
|
|
1943
|
+
/**
|
|
1944
|
+
* Stop the server and clear intervals
|
|
1945
|
+
*/
|
|
1946
|
+
stop(): void;
|
|
1947
|
+
/**
|
|
1948
|
+
* Refresh the cached report
|
|
1949
|
+
*/
|
|
1950
|
+
private refreshCache;
|
|
1951
|
+
/**
|
|
1952
|
+
* Get the Express app instance
|
|
1953
|
+
*/
|
|
1954
|
+
getApp(): Application;
|
|
1955
|
+
/**
|
|
1956
|
+
* Setup middleware
|
|
1957
|
+
*/
|
|
1958
|
+
private setupMiddleware;
|
|
1959
|
+
/**
|
|
1960
|
+
* Setup all routes
|
|
1961
|
+
*/
|
|
1962
|
+
private setupRoutes;
|
|
1963
|
+
/**
|
|
1964
|
+
* Setup report-related routes
|
|
1965
|
+
*/
|
|
1966
|
+
private setupReportRoutes;
|
|
1967
|
+
/**
|
|
1968
|
+
* Setup decision-related routes
|
|
1969
|
+
*/
|
|
1970
|
+
private setupDecisionRoutes;
|
|
1971
|
+
/**
|
|
1972
|
+
* Setup analytics-related routes
|
|
1973
|
+
*/
|
|
1974
|
+
private setupAnalyticsRoutes;
|
|
1975
|
+
/**
|
|
1976
|
+
* Setup health check route
|
|
1977
|
+
*/
|
|
1978
|
+
private setupHealthRoute;
|
|
1979
|
+
/**
|
|
1980
|
+
* Setup static file serving
|
|
1981
|
+
*/
|
|
1982
|
+
private setupStaticFiles;
|
|
1983
|
+
}
|
|
1984
|
+
/**
|
|
1985
|
+
* Create and configure the dashboard server (factory function)
|
|
1986
|
+
* @returns DashboardServer instance
|
|
1987
|
+
*/
|
|
1988
|
+
declare function createDashboardServer(options: DashboardOptions): DashboardServer;
|
|
1989
|
+
|
|
1990
|
+
interface LspServerOptions {
|
|
1991
|
+
cwd: string;
|
|
1992
|
+
verbose?: boolean;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
declare function startLspServer(options: LspServerOptions): Promise<void>;
|
|
1996
|
+
|
|
1997
|
+
/**
|
|
1998
|
+
* GitHub integration helpers (optional)
|
|
1999
|
+
*/
|
|
2000
|
+
|
|
2001
|
+
interface GitHubPrCommentOptions {
|
|
2002
|
+
repo: string;
|
|
2003
|
+
pr: number;
|
|
2004
|
+
token: string;
|
|
2005
|
+
}
|
|
2006
|
+
declare function formatViolationsForGitHub(violations: Violation[], limit?: number): string;
|
|
2007
|
+
declare function postPrComment(violations: Violation[], options: GitHubPrCommentOptions): Promise<void>;
|
|
2008
|
+
|
|
2009
|
+
export { type AffectedFile, type AgentContext, AgentContextGenerator, AlreadyInitializedError, AnalyticsEngine, type AnalyticsSummary, type Analyzer, AnalyzerNotFoundError, ApiVerifier, type ApplicableConstraint, type ApplicableDecision, AstCache, AutofixEngine, type AutofixPatch, type AutofixResult, type BuildDependencyGraphOptions, CodeScanner, ComplexityVerifier, type ComplianceReport, ConfigError, type Constraint, type ConstraintCheck, ConstraintCheckSchema, type ConstraintCheckSchema_, type ConstraintException, ConstraintExceptionSchema, type ConstraintExceptionSchema_, ConstraintSchema, type ConstraintSchema_, type ConstraintType, ConstraintTypeSchema, type ConstraintTypeSchema_, type ContextOptions, DashboardServer, type Decision, type DecisionCompliance, type DecisionContent, DecisionContentSchema, type DecisionContentSchema_, type DecisionFilter, type DecisionMetadata, DecisionMetadataSchema, type DecisionMetadataSchema_, type DecisionMetrics, DecisionNotFoundError, DecisionSchema, type DecisionStatus, DecisionStatusSchema, type DecisionStatusSchema_, type DecisionTypeSchema, DecisionValidationError, type DependencyGraph, DependencyVerifier, type DriftAnalysis, ErrorsAnalyzer, ErrorsVerifier, FileSystemError, type GitHubPrCommentOptions, type GlobOptions, type GraphNode, HookError, type ImpactAnalysis, ImportsAnalyzer, ImportsVerifier, InferenceEngine, InferenceError, type InferenceOptions, type InferenceResult, type Insight, type LevelConfig, LinksSchema, type LoadError, type LoadResult, type LoadedDecision, type McpServerOptions, type MigrationStep, NamingAnalyzer, NamingVerifier, NotInitializedError, type OverallDrift, type Pattern, type PatternExample, type PromptTemplate, PropagationEngine, type PropagationOptions, RegexVerifier, Registry, type RegistryConstraintMatch, RegistryError, type RegistryOptions, type ReportOptions, ReportStorage, Reporter, type ReporterResult, type ScanOptions, type ScanResult, type ScannedFile, SecurityVerifier, type Severity, SeveritySchema, type SeveritySchema_, type SpecBridgeConfig, SpecBridgeConfigSchema, type SpecBridgeConfigType, SpecBridgeError, SpecBridgeMcpServer, type StoredReport, StructureAnalyzer, type TextEdit, type TrendAnalysis, type TrendData, type TrendDirection, type VerificationConfig, VerificationConfigSchema, type VerificationConfigSchema_, type VerificationContext, VerificationEngine, VerificationError, type VerificationFrequency, VerificationFrequencySchema, type VerificationFrequencySchema_, type VerificationIssue, type VerificationLevel, type VerificationOptions, type VerificationResult, type VerificationWarning, type Verifier, VerifierNotFoundError, type VerifierPlugin, type VerifierPluginMetadata, type Violation, type ViolationFix, analyzeTrend, buildDependencyGraph, builtinAnalyzers, builtinVerifiers, calculateConfidence, checkDegradation, clearVerifierPool, createDashboardServer, createInferenceEngine, createPattern, createPropagationEngine, createRegistry, createScannerFromConfig, createVerificationEngine, createViolation, defaultConfig, defineVerifierPlugin, detectDrift, ensureDir, extractSnippet, formatConsoleReport, formatContextAsJson, formatContextAsMarkdown, formatContextAsMcp, formatError, formatMarkdownReport, formatValidationErrors, formatViolationsForGitHub, generateContext, generateFormattedContext, generateReport, getAffectedFiles, getAffectingDecisions, getAnalyzer, getAnalyzerIds, getChangedFiles, getConfigPath, getDecisionsDir, getInferredDir, getReportsDir, getSpecBridgeDir, getTransitiveDependencies, getVerifier, getVerifierIds, getVerifiersDir, glob, isConstraintExcepted, isDirectory, loadConfig, loadDecisionFile, loadDecisionsFromDir, matchesAnyPattern, matchesPattern, mergeWithDefaults, normalizePath, parseYaml, parseYamlDocument, pathExists, postPrComment, readFilesInDir, readTextFile, runInference, selectVerifierForConstraint, shouldApplyConstraintToFile, startLspServer, stringifyYaml, templates, updateYamlDocument, validateConfig, validateDecision, validateDecisionFile, writeTextFile };
|