@harness-engineering/core 0.10.1 → 0.12.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/index.d.mts CHANGED
@@ -1,41 +1,94 @@
1
1
  import { Result, WorkflowStep, WorkflowStepResult, Workflow, WorkflowResult, SkillLifecycleHooks, SkillContext, SkillResult, TurnContext, CICheckName, CIFailOnSeverity, CICheckReport, Roadmap, FeatureStatus } from '@harness-engineering/types';
2
2
  export * from '@harness-engineering/types';
3
3
  import { z } from 'zod';
4
+ import { C as Collector, A as ArchConfig, a as ConstraintRule, M as MetricResult, b as ArchMetricCategory, c as ArchBaseline, d as ArchDiffResult, T as ThresholdConfig } from './matchers-D20x48U9.mjs';
5
+ export { e as ArchBaselineSchema, f as ArchConfigSchema, g as ArchDiffResultSchema, h as ArchHandle, i as ArchMetricCategorySchema, j as ArchitectureOptions, k as CategoryBaseline, l as CategoryBaselineSchema, m as CategoryRegression, n as CategoryRegressionSchema, o as ConstraintRuleSchema, p as MetricResultSchema, q as ThresholdConfigSchema, V as Violation, r as ViolationSchema, s as archMatchers, t as archModule, u as architecture } from './matchers-D20x48U9.mjs';
4
6
 
7
+ /**
8
+ * Represents an error code for identifying specific error types.
9
+ */
5
10
  type ErrorCode = string;
11
+ /**
12
+ * Base interface for all Harness Engineering errors.
13
+ * Provides a standardized structure for error reporting and suggestions.
14
+ */
6
15
  interface BaseError {
16
+ /** A unique code identifying the type of error. */
7
17
  code: ErrorCode;
18
+ /** A human-readable message describing the error. */
8
19
  message: string;
20
+ /** Additional structured data providing context about the error. */
9
21
  details: Record<string, unknown>;
22
+ /** A list of suggested actions to resolve the error. */
10
23
  suggestions: string[];
11
24
  }
25
+ /**
26
+ * Error type for validation failures.
27
+ */
12
28
  interface ValidationError extends BaseError {
29
+ /** Validation-specific error codes. */
13
30
  code: 'INVALID_TYPE' | 'MISSING_FIELD' | 'VALIDATION_FAILED' | 'PARSE_ERROR';
14
31
  }
32
+ /**
33
+ * Error type for context-related issues.
34
+ */
15
35
  interface ContextError extends BaseError {
36
+ /** Context-specific error codes. */
16
37
  code: 'PARSE_ERROR' | 'SCHEMA_VIOLATION' | 'MISSING_SECTION' | 'BROKEN_LINK';
17
38
  }
39
+ /**
40
+ * Error type for architectural constraint violations.
41
+ */
18
42
  interface ConstraintError extends BaseError {
43
+ /** Constraint-specific error codes. */
19
44
  code: 'WRONG_LAYER' | 'CIRCULAR_DEP' | 'FORBIDDEN_IMPORT' | 'BOUNDARY_ERROR' | 'PARSER_UNAVAILABLE';
20
45
  }
46
+ /**
47
+ * Error type for entropy and drift-related issues.
48
+ */
21
49
  interface EntropyError extends BaseError {
50
+ /** Entropy-specific error codes. */
22
51
  code: 'SNAPSHOT_BUILD_FAILED' | 'PARSE_ERROR' | 'ENTRY_POINT_NOT_FOUND' | 'INVALID_CONFIG' | 'CONFIG_VALIDATION_ERROR' | 'FIX_FAILED' | 'BACKUP_FAILED';
52
+ /** Entropy-specific error details. */
23
53
  details: {
54
+ /** Path to the file where the error occurred. */
24
55
  file?: string;
56
+ /** Reason for the error. */
25
57
  reason?: string;
58
+ /** List of issues detected. */
26
59
  issues?: unknown[];
60
+ /** The original Error object, if any. */
27
61
  originalError?: Error;
28
62
  };
29
63
  }
64
+ /**
65
+ * Error type for agent feedback and review issues.
66
+ */
30
67
  interface FeedbackError$1 extends BaseError {
68
+ /** Feedback-specific error codes. */
31
69
  code: 'AGENT_SPAWN_ERROR' | 'AGENT_TIMEOUT' | 'TELEMETRY_ERROR' | 'TELEMETRY_UNAVAILABLE' | 'REVIEW_ERROR' | 'DIFF_PARSE_ERROR' | 'SINK_ERROR';
70
+ /** Feedback-specific error details. */
32
71
  details: {
72
+ /** ID of the agent involved. */
33
73
  agentId?: string;
74
+ /** Name of the service where the error occurred. */
34
75
  service?: string;
76
+ /** Reason for the error. */
35
77
  reason?: string;
78
+ /** The original Error object, if any. */
36
79
  originalError?: Error;
37
80
  };
38
81
  }
82
+ /**
83
+ * Creates a standardized error object.
84
+ *
85
+ * @template T - The specific error type to create.
86
+ * @param code - The error code identifying the type of error.
87
+ * @param message - A human-readable message describing the error.
88
+ * @param details - Additional structured data providing context (default: empty record).
89
+ * @param suggestions - A list of suggested actions to resolve the error (default: empty array).
90
+ * @returns A new error object of the specified type.
91
+ */
39
92
  declare function createError<T extends BaseError>(code: T['code'], message: string, details?: Record<string, unknown>, suggestions?: string[]): T;
40
93
 
41
94
  interface Convention {
@@ -444,6 +497,597 @@ declare function createBoundaryValidator<T>(schema: z.ZodSchema<T>, name: string
444
497
  */
445
498
  declare function validateBoundaries(boundaries: BoundaryDefinition[], data: Map<string, unknown>): Result<BoundaryValidation, ConstraintError>;
446
499
 
500
+ declare const ManifestSchema: z.ZodObject<{
501
+ name: z.ZodString;
502
+ version: z.ZodString;
503
+ description: z.ZodOptional<z.ZodString>;
504
+ include: z.ZodArray<z.ZodString, "many">;
505
+ minHarnessVersion: z.ZodOptional<z.ZodString>;
506
+ keywords: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
507
+ layers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
508
+ boundaries: z.ZodOptional<z.ZodArray<z.ZodObject<{
509
+ name: z.ZodString;
510
+ layer: z.ZodString;
511
+ direction: z.ZodEnum<["input", "output"]>;
512
+ schema: z.ZodString;
513
+ }, "strip", z.ZodTypeAny, {
514
+ name: string;
515
+ layer: string;
516
+ direction: "input" | "output";
517
+ schema: string;
518
+ }, {
519
+ name: string;
520
+ layer: string;
521
+ direction: "input" | "output";
522
+ schema: string;
523
+ }>, "many">>;
524
+ }, "strip", z.ZodTypeAny, {
525
+ name: string;
526
+ version: string;
527
+ include: string[];
528
+ keywords: string[];
529
+ layers?: Record<string, string[]> | undefined;
530
+ description?: string | undefined;
531
+ minHarnessVersion?: string | undefined;
532
+ boundaries?: {
533
+ name: string;
534
+ layer: string;
535
+ direction: "input" | "output";
536
+ schema: string;
537
+ }[] | undefined;
538
+ }, {
539
+ name: string;
540
+ version: string;
541
+ include: string[];
542
+ layers?: Record<string, string[]> | undefined;
543
+ description?: string | undefined;
544
+ minHarnessVersion?: string | undefined;
545
+ keywords?: string[] | undefined;
546
+ boundaries?: {
547
+ name: string;
548
+ layer: string;
549
+ direction: "input" | "output";
550
+ schema: string;
551
+ }[] | undefined;
552
+ }>;
553
+ type Manifest = z.infer<typeof ManifestSchema>;
554
+ declare const BundleConstraintsSchema: z.ZodObject<{
555
+ layers: z.ZodOptional<z.ZodArray<z.ZodObject<{
556
+ name: z.ZodString;
557
+ pattern: z.ZodString;
558
+ allowedDependencies: z.ZodArray<z.ZodString, "many">;
559
+ }, "strip", z.ZodTypeAny, {
560
+ name: string;
561
+ pattern: string;
562
+ allowedDependencies: string[];
563
+ }, {
564
+ name: string;
565
+ pattern: string;
566
+ allowedDependencies: string[];
567
+ }>, "many">>;
568
+ forbiddenImports: z.ZodOptional<z.ZodArray<z.ZodObject<{
569
+ from: z.ZodString;
570
+ disallow: z.ZodArray<z.ZodString, "many">;
571
+ message: z.ZodOptional<z.ZodString>;
572
+ }, "strip", z.ZodTypeAny, {
573
+ from: string;
574
+ disallow: string[];
575
+ message?: string | undefined;
576
+ }, {
577
+ from: string;
578
+ disallow: string[];
579
+ message?: string | undefined;
580
+ }>, "many">>;
581
+ boundaries: z.ZodOptional<z.ZodObject<{
582
+ requireSchema: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ requireSchema?: string[] | undefined;
585
+ }, {
586
+ requireSchema?: string[] | undefined;
587
+ }>>;
588
+ architecture: z.ZodOptional<z.ZodObject<{
589
+ thresholds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
590
+ modules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
591
+ }, "strip", z.ZodTypeAny, {
592
+ thresholds?: Record<string, unknown> | undefined;
593
+ modules?: Record<string, Record<string, unknown>> | undefined;
594
+ }, {
595
+ thresholds?: Record<string, unknown> | undefined;
596
+ modules?: Record<string, Record<string, unknown>> | undefined;
597
+ }>>;
598
+ security: z.ZodOptional<z.ZodObject<{
599
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ rules?: Record<string, string> | undefined;
602
+ }, {
603
+ rules?: Record<string, string> | undefined;
604
+ }>>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ architecture?: {
607
+ thresholds?: Record<string, unknown> | undefined;
608
+ modules?: Record<string, Record<string, unknown>> | undefined;
609
+ } | undefined;
610
+ layers?: {
611
+ name: string;
612
+ pattern: string;
613
+ allowedDependencies: string[];
614
+ }[] | undefined;
615
+ boundaries?: {
616
+ requireSchema?: string[] | undefined;
617
+ } | undefined;
618
+ forbiddenImports?: {
619
+ from: string;
620
+ disallow: string[];
621
+ message?: string | undefined;
622
+ }[] | undefined;
623
+ security?: {
624
+ rules?: Record<string, string> | undefined;
625
+ } | undefined;
626
+ }, {
627
+ architecture?: {
628
+ thresholds?: Record<string, unknown> | undefined;
629
+ modules?: Record<string, Record<string, unknown>> | undefined;
630
+ } | undefined;
631
+ layers?: {
632
+ name: string;
633
+ pattern: string;
634
+ allowedDependencies: string[];
635
+ }[] | undefined;
636
+ boundaries?: {
637
+ requireSchema?: string[] | undefined;
638
+ } | undefined;
639
+ forbiddenImports?: {
640
+ from: string;
641
+ disallow: string[];
642
+ message?: string | undefined;
643
+ }[] | undefined;
644
+ security?: {
645
+ rules?: Record<string, string> | undefined;
646
+ } | undefined;
647
+ }>;
648
+ declare const BundleSchema: z.ZodObject<{
649
+ name: z.ZodString;
650
+ version: z.ZodString;
651
+ description: z.ZodOptional<z.ZodString>;
652
+ minHarnessVersion: z.ZodOptional<z.ZodString>;
653
+ manifest: z.ZodObject<{
654
+ name: z.ZodString;
655
+ version: z.ZodString;
656
+ description: z.ZodOptional<z.ZodString>;
657
+ include: z.ZodArray<z.ZodString, "many">;
658
+ minHarnessVersion: z.ZodOptional<z.ZodString>;
659
+ keywords: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
660
+ layers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
661
+ boundaries: z.ZodOptional<z.ZodArray<z.ZodObject<{
662
+ name: z.ZodString;
663
+ layer: z.ZodString;
664
+ direction: z.ZodEnum<["input", "output"]>;
665
+ schema: z.ZodString;
666
+ }, "strip", z.ZodTypeAny, {
667
+ name: string;
668
+ layer: string;
669
+ direction: "input" | "output";
670
+ schema: string;
671
+ }, {
672
+ name: string;
673
+ layer: string;
674
+ direction: "input" | "output";
675
+ schema: string;
676
+ }>, "many">>;
677
+ }, "strip", z.ZodTypeAny, {
678
+ name: string;
679
+ version: string;
680
+ include: string[];
681
+ keywords: string[];
682
+ layers?: Record<string, string[]> | undefined;
683
+ description?: string | undefined;
684
+ minHarnessVersion?: string | undefined;
685
+ boundaries?: {
686
+ name: string;
687
+ layer: string;
688
+ direction: "input" | "output";
689
+ schema: string;
690
+ }[] | undefined;
691
+ }, {
692
+ name: string;
693
+ version: string;
694
+ include: string[];
695
+ layers?: Record<string, string[]> | undefined;
696
+ description?: string | undefined;
697
+ minHarnessVersion?: string | undefined;
698
+ keywords?: string[] | undefined;
699
+ boundaries?: {
700
+ name: string;
701
+ layer: string;
702
+ direction: "input" | "output";
703
+ schema: string;
704
+ }[] | undefined;
705
+ }>;
706
+ constraints: z.ZodObject<{
707
+ layers: z.ZodOptional<z.ZodArray<z.ZodObject<{
708
+ name: z.ZodString;
709
+ pattern: z.ZodString;
710
+ allowedDependencies: z.ZodArray<z.ZodString, "many">;
711
+ }, "strip", z.ZodTypeAny, {
712
+ name: string;
713
+ pattern: string;
714
+ allowedDependencies: string[];
715
+ }, {
716
+ name: string;
717
+ pattern: string;
718
+ allowedDependencies: string[];
719
+ }>, "many">>;
720
+ forbiddenImports: z.ZodOptional<z.ZodArray<z.ZodObject<{
721
+ from: z.ZodString;
722
+ disallow: z.ZodArray<z.ZodString, "many">;
723
+ message: z.ZodOptional<z.ZodString>;
724
+ }, "strip", z.ZodTypeAny, {
725
+ from: string;
726
+ disallow: string[];
727
+ message?: string | undefined;
728
+ }, {
729
+ from: string;
730
+ disallow: string[];
731
+ message?: string | undefined;
732
+ }>, "many">>;
733
+ boundaries: z.ZodOptional<z.ZodObject<{
734
+ requireSchema: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
735
+ }, "strip", z.ZodTypeAny, {
736
+ requireSchema?: string[] | undefined;
737
+ }, {
738
+ requireSchema?: string[] | undefined;
739
+ }>>;
740
+ architecture: z.ZodOptional<z.ZodObject<{
741
+ thresholds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
742
+ modules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
743
+ }, "strip", z.ZodTypeAny, {
744
+ thresholds?: Record<string, unknown> | undefined;
745
+ modules?: Record<string, Record<string, unknown>> | undefined;
746
+ }, {
747
+ thresholds?: Record<string, unknown> | undefined;
748
+ modules?: Record<string, Record<string, unknown>> | undefined;
749
+ }>>;
750
+ security: z.ZodOptional<z.ZodObject<{
751
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
752
+ }, "strip", z.ZodTypeAny, {
753
+ rules?: Record<string, string> | undefined;
754
+ }, {
755
+ rules?: Record<string, string> | undefined;
756
+ }>>;
757
+ }, "strip", z.ZodTypeAny, {
758
+ architecture?: {
759
+ thresholds?: Record<string, unknown> | undefined;
760
+ modules?: Record<string, Record<string, unknown>> | undefined;
761
+ } | undefined;
762
+ layers?: {
763
+ name: string;
764
+ pattern: string;
765
+ allowedDependencies: string[];
766
+ }[] | undefined;
767
+ boundaries?: {
768
+ requireSchema?: string[] | undefined;
769
+ } | undefined;
770
+ forbiddenImports?: {
771
+ from: string;
772
+ disallow: string[];
773
+ message?: string | undefined;
774
+ }[] | undefined;
775
+ security?: {
776
+ rules?: Record<string, string> | undefined;
777
+ } | undefined;
778
+ }, {
779
+ architecture?: {
780
+ thresholds?: Record<string, unknown> | undefined;
781
+ modules?: Record<string, Record<string, unknown>> | undefined;
782
+ } | undefined;
783
+ layers?: {
784
+ name: string;
785
+ pattern: string;
786
+ allowedDependencies: string[];
787
+ }[] | undefined;
788
+ boundaries?: {
789
+ requireSchema?: string[] | undefined;
790
+ } | undefined;
791
+ forbiddenImports?: {
792
+ from: string;
793
+ disallow: string[];
794
+ message?: string | undefined;
795
+ }[] | undefined;
796
+ security?: {
797
+ rules?: Record<string, string> | undefined;
798
+ } | undefined;
799
+ }>;
800
+ contributions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ name: string;
803
+ version: string;
804
+ manifest: {
805
+ name: string;
806
+ version: string;
807
+ include: string[];
808
+ keywords: string[];
809
+ layers?: Record<string, string[]> | undefined;
810
+ description?: string | undefined;
811
+ minHarnessVersion?: string | undefined;
812
+ boundaries?: {
813
+ name: string;
814
+ layer: string;
815
+ direction: "input" | "output";
816
+ schema: string;
817
+ }[] | undefined;
818
+ };
819
+ constraints: {
820
+ architecture?: {
821
+ thresholds?: Record<string, unknown> | undefined;
822
+ modules?: Record<string, Record<string, unknown>> | undefined;
823
+ } | undefined;
824
+ layers?: {
825
+ name: string;
826
+ pattern: string;
827
+ allowedDependencies: string[];
828
+ }[] | undefined;
829
+ boundaries?: {
830
+ requireSchema?: string[] | undefined;
831
+ } | undefined;
832
+ forbiddenImports?: {
833
+ from: string;
834
+ disallow: string[];
835
+ message?: string | undefined;
836
+ }[] | undefined;
837
+ security?: {
838
+ rules?: Record<string, string> | undefined;
839
+ } | undefined;
840
+ };
841
+ description?: string | undefined;
842
+ minHarnessVersion?: string | undefined;
843
+ contributions?: Record<string, unknown> | undefined;
844
+ }, {
845
+ name: string;
846
+ version: string;
847
+ manifest: {
848
+ name: string;
849
+ version: string;
850
+ include: string[];
851
+ layers?: Record<string, string[]> | undefined;
852
+ description?: string | undefined;
853
+ minHarnessVersion?: string | undefined;
854
+ keywords?: string[] | undefined;
855
+ boundaries?: {
856
+ name: string;
857
+ layer: string;
858
+ direction: "input" | "output";
859
+ schema: string;
860
+ }[] | undefined;
861
+ };
862
+ constraints: {
863
+ architecture?: {
864
+ thresholds?: Record<string, unknown> | undefined;
865
+ modules?: Record<string, Record<string, unknown>> | undefined;
866
+ } | undefined;
867
+ layers?: {
868
+ name: string;
869
+ pattern: string;
870
+ allowedDependencies: string[];
871
+ }[] | undefined;
872
+ boundaries?: {
873
+ requireSchema?: string[] | undefined;
874
+ } | undefined;
875
+ forbiddenImports?: {
876
+ from: string;
877
+ disallow: string[];
878
+ message?: string | undefined;
879
+ }[] | undefined;
880
+ security?: {
881
+ rules?: Record<string, string> | undefined;
882
+ } | undefined;
883
+ };
884
+ description?: string | undefined;
885
+ minHarnessVersion?: string | undefined;
886
+ contributions?: Record<string, unknown> | undefined;
887
+ }>;
888
+ declare const ContributionsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
889
+ type Bundle = z.infer<typeof BundleSchema>;
890
+ type BundleConstraints = z.infer<typeof BundleConstraintsSchema>;
891
+ type Contributions = Record<string, unknown>;
892
+ declare const LockfilePackageSchema: z.ZodObject<{
893
+ version: z.ZodString;
894
+ source: z.ZodString;
895
+ installedAt: z.ZodString;
896
+ contributions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
897
+ resolved: z.ZodOptional<z.ZodString>;
898
+ integrity: z.ZodOptional<z.ZodString>;
899
+ provenance: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
900
+ }, "strip", z.ZodTypeAny, {
901
+ source: string;
902
+ version: string;
903
+ installedAt: string;
904
+ contributions?: Record<string, unknown> | null | undefined;
905
+ resolved?: string | undefined;
906
+ integrity?: string | undefined;
907
+ provenance?: string[] | undefined;
908
+ }, {
909
+ source: string;
910
+ version: string;
911
+ installedAt: string;
912
+ contributions?: Record<string, unknown> | null | undefined;
913
+ resolved?: string | undefined;
914
+ integrity?: string | undefined;
915
+ provenance?: string[] | undefined;
916
+ }>;
917
+ declare const LockfileSchema: z.ZodEffects<z.ZodObject<{
918
+ version: z.ZodOptional<z.ZodLiteral<1>>;
919
+ lockfileVersion: z.ZodOptional<z.ZodLiteral<1>>;
920
+ packages: z.ZodRecord<z.ZodString, z.ZodObject<{
921
+ version: z.ZodString;
922
+ source: z.ZodString;
923
+ installedAt: z.ZodString;
924
+ contributions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
925
+ resolved: z.ZodOptional<z.ZodString>;
926
+ integrity: z.ZodOptional<z.ZodString>;
927
+ provenance: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
928
+ }, "strip", z.ZodTypeAny, {
929
+ source: string;
930
+ version: string;
931
+ installedAt: string;
932
+ contributions?: Record<string, unknown> | null | undefined;
933
+ resolved?: string | undefined;
934
+ integrity?: string | undefined;
935
+ provenance?: string[] | undefined;
936
+ }, {
937
+ source: string;
938
+ version: string;
939
+ installedAt: string;
940
+ contributions?: Record<string, unknown> | null | undefined;
941
+ resolved?: string | undefined;
942
+ integrity?: string | undefined;
943
+ provenance?: string[] | undefined;
944
+ }>>;
945
+ }, "strip", z.ZodTypeAny, {
946
+ packages: Record<string, {
947
+ source: string;
948
+ version: string;
949
+ installedAt: string;
950
+ contributions?: Record<string, unknown> | null | undefined;
951
+ resolved?: string | undefined;
952
+ integrity?: string | undefined;
953
+ provenance?: string[] | undefined;
954
+ }>;
955
+ version?: 1 | undefined;
956
+ lockfileVersion?: 1 | undefined;
957
+ }, {
958
+ packages: Record<string, {
959
+ source: string;
960
+ version: string;
961
+ installedAt: string;
962
+ contributions?: Record<string, unknown> | null | undefined;
963
+ resolved?: string | undefined;
964
+ integrity?: string | undefined;
965
+ provenance?: string[] | undefined;
966
+ }>;
967
+ version?: 1 | undefined;
968
+ lockfileVersion?: 1 | undefined;
969
+ }>, {
970
+ packages: Record<string, {
971
+ source: string;
972
+ version: string;
973
+ installedAt: string;
974
+ contributions?: Record<string, unknown> | null | undefined;
975
+ resolved?: string | undefined;
976
+ integrity?: string | undefined;
977
+ provenance?: string[] | undefined;
978
+ }>;
979
+ version?: 1 | undefined;
980
+ lockfileVersion?: 1 | undefined;
981
+ }, {
982
+ packages: Record<string, {
983
+ source: string;
984
+ version: string;
985
+ installedAt: string;
986
+ contributions?: Record<string, unknown> | null | undefined;
987
+ resolved?: string | undefined;
988
+ integrity?: string | undefined;
989
+ provenance?: string[] | undefined;
990
+ }>;
991
+ version?: 1 | undefined;
992
+ lockfileVersion?: 1 | undefined;
993
+ }>;
994
+ type Lockfile = z.infer<typeof LockfileSchema>;
995
+ type LockfilePackage = z.infer<typeof LockfilePackageSchema>;
996
+ declare const SharableLayerSchema: z.ZodUnknown;
997
+ declare const SharableForbiddenImportSchema: z.ZodUnknown;
998
+ declare const SharableBoundaryConfigSchema: z.ZodUnknown;
999
+ declare const SharableSecurityRulesSchema: z.ZodUnknown;
1000
+
1001
+ /**
1002
+ * Utility to write a config object to disk as JSON or YAML.
1003
+ * In this implementation, we'll keep it simple and just use JSON.stringify
1004
+ * or a placeholder for YAML if needed.
1005
+ */
1006
+ declare function writeConfig(filePath: string, content: unknown): Promise<Result<void, Error>>;
1007
+
1008
+ /**
1009
+ * Parse and validate a manifest from a pre-parsed object.
1010
+ *
1011
+ * YAML parsing is the caller's responsibility (stays in the CLI layer).
1012
+ * This function validates the parsed structure against ManifestSchema.
1013
+ *
1014
+ * @param parsed - The result of YAML.parse() or JSON.parse()
1015
+ * @returns Result<Manifest, string>
1016
+ */
1017
+ declare function parseManifest(parsed: unknown): Result<Manifest, string>;
1018
+
1019
+ /**
1020
+ * Extract a constraints bundle from a harness config using the paths declared
1021
+ * in the manifest's `include` array.
1022
+ *
1023
+ * Only paths that exist in the config are included in the bundle.
1024
+ * Missing paths are silently omitted (not an error).
1025
+ *
1026
+ * Supported include paths:
1027
+ * "layers" → config.layers
1028
+ * "forbiddenImports" → config.forbiddenImports
1029
+ * "boundaries" → config.boundaries
1030
+ * "architecture" → config.architecture
1031
+ * "security.rules" → config.security.rules
1032
+ *
1033
+ * @param manifest - Validated Manifest object
1034
+ * @param config - The project's harness config (Record<string, unknown>)
1035
+ * @returns Result<Bundle, string>
1036
+ */
1037
+ declare function extractBundle(manifest: Manifest, config: Record<string, unknown>): Result<Bundle, string>;
1038
+
1039
+ interface ConflictReport {
1040
+ section: string;
1041
+ key: string;
1042
+ localValue: unknown;
1043
+ packageValue: unknown;
1044
+ description: string;
1045
+ }
1046
+ interface MergeResult {
1047
+ config: Record<string, unknown>;
1048
+ contributions: Contributions;
1049
+ conflicts: ConflictReport[];
1050
+ }
1051
+ declare function deepMergeConstraints(localConfig: Record<string, unknown>, bundleConstraints: BundleConstraints, _existingContributions?: Contributions): MergeResult;
1052
+
1053
+ /**
1054
+ * Read and validate a lockfile from disk.
1055
+ *
1056
+ * Returns null (not an error) if the file does not exist.
1057
+ * Returns an error if the file exists but is invalid JSON or fails schema validation.
1058
+ */
1059
+ declare function readLockfile(lockfilePath: string): Promise<Result<Lockfile | null, string>>;
1060
+ /**
1061
+ * Write a lockfile to disk using atomic write.
1062
+ */
1063
+ declare function writeLockfile(lockfilePath: string, lockfile: Lockfile): Promise<Result<void, Error>>;
1064
+ /**
1065
+ * Add or replace a package entry in the lockfile (immutable).
1066
+ *
1067
+ * If the package already exists, its entry is replaced (upgrade semantics).
1068
+ */
1069
+ declare function addProvenance(lockfile: Lockfile, packageName: string, entry: LockfilePackage): Lockfile;
1070
+ /**
1071
+ * Remove a package entry from the lockfile (immutable).
1072
+ *
1073
+ * Returns the updated lockfile and the removed package's contributions
1074
+ * (or null if the package was not found).
1075
+ */
1076
+ declare function removeProvenance(lockfile: Lockfile, packageName: string): {
1077
+ lockfile: Lockfile;
1078
+ contributions: Contributions | null;
1079
+ };
1080
+
1081
+ /**
1082
+ * Remove contributions from a config object.
1083
+ *
1084
+ * Uses the contributions record (as stored in the lockfile) to identify
1085
+ * exactly which rules/layers/thresholds to remove from each section.
1086
+ *
1087
+ * Returns a new config object; does not mutate the input.
1088
+ */
1089
+ declare function removeContributions(config: Record<string, unknown>, contributions: Contributions): Record<string, unknown>;
1090
+
447
1091
  interface InternalSymbol {
448
1092
  name: string;
449
1093
  type: 'function' | 'class' | 'variable' | 'type';
@@ -1420,13 +2064,13 @@ declare const EntropyConfigSchema: z.ZodObject<{
1420
2064
  entryPoints?: string[] | undefined;
1421
2065
  includeTypes?: boolean | undefined;
1422
2066
  includeInternals?: boolean | undefined;
1423
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2067
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1424
2068
  }, {
1425
2069
  ignorePatterns?: string[] | undefined;
1426
2070
  entryPoints?: string[] | undefined;
1427
2071
  includeTypes?: boolean | undefined;
1428
2072
  includeInternals?: boolean | undefined;
1429
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2073
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1430
2074
  }>]>>;
1431
2075
  patterns: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
1432
2076
  patterns: z.ZodArray<z.ZodObject<{
@@ -1692,7 +2336,7 @@ declare const EntropyConfigSchema: z.ZodObject<{
1692
2336
  entryPoints?: string[] | undefined;
1693
2337
  includeTypes?: boolean | undefined;
1694
2338
  includeInternals?: boolean | undefined;
1695
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2339
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1696
2340
  } | undefined;
1697
2341
  patterns?: boolean | {
1698
2342
  patterns: {
@@ -1748,7 +2392,7 @@ declare const EntropyConfigSchema: z.ZodObject<{
1748
2392
  entryPoints?: string[] | undefined;
1749
2393
  includeTypes?: boolean | undefined;
1750
2394
  includeInternals?: boolean | undefined;
1751
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2395
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1752
2396
  } | undefined;
1753
2397
  patterns?: boolean | {
1754
2398
  patterns: {
@@ -1810,7 +2454,7 @@ declare const EntropyConfigSchema: z.ZodObject<{
1810
2454
  entryPoints?: string[] | undefined;
1811
2455
  includeTypes?: boolean | undefined;
1812
2456
  includeInternals?: boolean | undefined;
1813
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2457
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1814
2458
  } | undefined;
1815
2459
  patterns?: boolean | {
1816
2460
  patterns: {
@@ -1855,9 +2499,9 @@ declare const EntropyConfigSchema: z.ZodObject<{
1855
2499
  } | undefined;
1856
2500
  };
1857
2501
  parser?: any;
2502
+ include?: string[] | undefined;
1858
2503
  docPaths?: string[] | undefined;
1859
2504
  entryPoints?: string[] | undefined;
1860
- include?: string[] | undefined;
1861
2505
  exclude?: string[] | undefined;
1862
2506
  }, {
1863
2507
  rootDir: string;
@@ -1874,7 +2518,7 @@ declare const EntropyConfigSchema: z.ZodObject<{
1874
2518
  entryPoints?: string[] | undefined;
1875
2519
  includeTypes?: boolean | undefined;
1876
2520
  includeInternals?: boolean | undefined;
1877
- treatDynamicImportsAs?: "used" | "unknown" | undefined;
2521
+ treatDynamicImportsAs?: "unknown" | "used" | undefined;
1878
2522
  } | undefined;
1879
2523
  patterns?: boolean | {
1880
2524
  patterns: {
@@ -1919,9 +2563,9 @@ declare const EntropyConfigSchema: z.ZodObject<{
1919
2563
  } | undefined;
1920
2564
  };
1921
2565
  parser?: any;
2566
+ include?: string[] | undefined;
1922
2567
  docPaths?: string[] | undefined;
1923
2568
  entryPoints?: string[] | undefined;
1924
- include?: string[] | undefined;
1925
2569
  exclude?: string[] | undefined;
1926
2570
  }>;
1927
2571
  /**
@@ -2141,7 +2785,7 @@ interface ForbiddenPattern {
2141
2785
  fileGlob?: string;
2142
2786
  }
2143
2787
  type AgentType = 'architecture-enforcer' | 'documentation-maintainer' | 'test-reviewer' | 'entropy-cleaner' | 'custom';
2144
- interface AgentConfig {
2788
+ interface FeedbackAgentConfig {
2145
2789
  type: AgentType;
2146
2790
  customType?: string;
2147
2791
  context: ReviewContext;
@@ -2158,7 +2802,7 @@ interface AgentProcess {
2158
2802
  id: string;
2159
2803
  status: 'pending' | 'running' | 'completed' | 'failed' | 'timeout';
2160
2804
  startedAt: string;
2161
- config: AgentConfig;
2805
+ config: FeedbackAgentConfig;
2162
2806
  }
2163
2807
  interface PeerReview {
2164
2808
  agentId: string;
@@ -2289,7 +2933,7 @@ interface TelemetryAdapter {
2289
2933
  interface AgentExecutor {
2290
2934
  readonly name: string;
2291
2935
  health(): Promise<Result<ExecutorHealth, FeedbackError>>;
2292
- spawn(config: AgentConfig): Promise<Result<AgentProcess, FeedbackError>>;
2936
+ spawn(config: FeedbackAgentConfig): Promise<Result<AgentProcess, FeedbackError>>;
2293
2937
  status(processId: string): Promise<Result<AgentProcess, FeedbackError>>;
2294
2938
  wait(processId: string, timeout?: number): Promise<Result<PeerReview, FeedbackError>>;
2295
2939
  kill(processId: string): Promise<Result<void, FeedbackError>>;
@@ -2388,7 +3032,7 @@ declare class NoOpExecutor implements AgentExecutor {
2388
3032
  readonly name = "noop";
2389
3033
  private processes;
2390
3034
  health(): Promise<Result<ExecutorHealth, FeedbackError>>;
2391
- spawn(config: AgentConfig): Promise<Result<AgentProcess, FeedbackError>>;
3035
+ spawn(config: FeedbackAgentConfig): Promise<Result<AgentProcess, FeedbackError>>;
2392
3036
  status(processId: string): Promise<Result<AgentProcess, FeedbackError>>;
2393
3037
  wait(processId: string): Promise<Result<PeerReview, FeedbackError>>;
2394
3038
  kill(processId: string): Promise<Result<void, FeedbackError>>;
@@ -2444,6 +3088,171 @@ declare class NoOpSink implements ActionSink {
2444
3088
  write(): Promise<Result<void, FeedbackError>>;
2445
3089
  }
2446
3090
 
3091
+ declare class CircularDepsCollector implements Collector {
3092
+ readonly category: "circular-deps";
3093
+ getRules(_config: ArchConfig, _rootDir: string): ConstraintRule[];
3094
+ collect(_config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3095
+ }
3096
+
3097
+ declare class LayerViolationCollector implements Collector {
3098
+ readonly category: "layer-violations";
3099
+ getRules(_config: ArchConfig, _rootDir: string): ConstraintRule[];
3100
+ collect(_config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3101
+ }
3102
+
3103
+ declare class ComplexityCollector implements Collector {
3104
+ readonly category: "complexity";
3105
+ getRules(_config: ArchConfig, _rootDir: string): ConstraintRule[];
3106
+ collect(_config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3107
+ }
3108
+
3109
+ declare class CouplingCollector implements Collector {
3110
+ readonly category: "coupling";
3111
+ getRules(_config: ArchConfig, _rootDir: string): ConstraintRule[];
3112
+ collect(_config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3113
+ }
3114
+
3115
+ declare class ForbiddenImportCollector implements Collector {
3116
+ readonly category: "forbidden-imports";
3117
+ getRules(_config: ArchConfig, _rootDir: string): ConstraintRule[];
3118
+ collect(_config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3119
+ }
3120
+
3121
+ declare class ModuleSizeCollector implements Collector {
3122
+ readonly category: "module-size";
3123
+ getRules(config: ArchConfig, _rootDir: string): ConstraintRule[];
3124
+ collect(config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3125
+ }
3126
+
3127
+ declare class DepDepthCollector implements Collector {
3128
+ readonly category: "dependency-depth";
3129
+ getRules(config: ArchConfig, _rootDir: string): ConstraintRule[];
3130
+ collect(config: ArchConfig, rootDir: string): Promise<MetricResult[]>;
3131
+ }
3132
+
3133
+ /**
3134
+ * Produce a stable violation ID.
3135
+ * Formula: sha256(relativePath + ':' + category + ':' + normalizedDetail)
3136
+ * Line numbers are excluded to keep IDs stable across unrelated edits.
3137
+ */
3138
+ declare function violationId(relativePath: string, category: string, normalizedDetail: string): string;
3139
+ /**
3140
+ * Produce a stable constraint rule ID.
3141
+ * Formula: sha256(category + ':' + scope + ':' + description)
3142
+ */
3143
+ declare function constraintRuleId(category: string, scope: string, description: string): string;
3144
+
3145
+ declare const defaultCollectors: Collector[];
3146
+ /**
3147
+ * Run all collectors in parallel and return a flat array of MetricResults.
3148
+ */
3149
+ declare function runAll(config: ArchConfig, rootDir: string, collectors?: Collector[]): Promise<MetricResult[]>;
3150
+
3151
+ /**
3152
+ * Minimal graph store interface for constraint node operations.
3153
+ * Matches the subset of GraphStore used by this module.
3154
+ */
3155
+ interface ConstraintNodeStore {
3156
+ findNodes(query: {
3157
+ type: string;
3158
+ }): Array<{
3159
+ id: string;
3160
+ [key: string]: unknown;
3161
+ }>;
3162
+ upsertNode(node: Record<string, unknown>): void;
3163
+ removeNode(id: string): void;
3164
+ }
3165
+ /**
3166
+ * Synchronize constraint rules with graph nodes.
3167
+ *
3168
+ * - Upserts each rule as a `constraint` node (sets `createdAt` on first insert)
3169
+ * - Matches violations to rules and updates `lastViolatedAt`
3170
+ * - Prunes constraint nodes not present in the current rules set (orphan cleanup)
3171
+ */
3172
+ declare function syncConstraintNodes(store: ConstraintNodeStore, rules: ConstraintRule[], violations: MetricResult[]): void;
3173
+
3174
+ interface StaleConstraint {
3175
+ id: string;
3176
+ category: ArchMetricCategory;
3177
+ description: string;
3178
+ scope: string;
3179
+ lastViolatedAt: string | null;
3180
+ daysSinceLastViolation: number;
3181
+ }
3182
+ interface DetectStaleResult {
3183
+ staleConstraints: StaleConstraint[];
3184
+ totalConstraints: number;
3185
+ windowDays: number;
3186
+ }
3187
+ /**
3188
+ * Detect constraint rules that haven't been violated within the given window.
3189
+ *
3190
+ * A constraint is considered stale if its comparison timestamp
3191
+ * (lastViolatedAt ?? createdAt) is older than `now - windowDays`.
3192
+ */
3193
+ declare function detectStaleConstraints(store: ConstraintNodeStore, windowDays?: number, category?: ArchMetricCategory): DetectStaleResult;
3194
+
3195
+ /**
3196
+ * Manages architecture baselines stored on disk.
3197
+ *
3198
+ * Baselines are stored at `.harness/arch/baselines.json` relative to the project root.
3199
+ * Each category maps to an aggregate value and an allowlist of known violation IDs.
3200
+ */
3201
+ declare class ArchBaselineManager {
3202
+ private readonly baselinesPath;
3203
+ constructor(projectRoot: string, baselinePath?: string);
3204
+ /**
3205
+ * Snapshot the current metric results into an ArchBaseline.
3206
+ * Aggregates multiple MetricResults for the same category by summing values
3207
+ * and concatenating violation IDs.
3208
+ */
3209
+ capture(results: MetricResult[], commitHash: string): ArchBaseline;
3210
+ /**
3211
+ * Load the baselines file from disk.
3212
+ * Returns null if the file does not exist, contains invalid JSON,
3213
+ * or fails ArchBaselineSchema validation.
3214
+ */
3215
+ load(): ArchBaseline | null;
3216
+ /**
3217
+ * Save an ArchBaseline to disk.
3218
+ * Creates parent directories if they do not exist.
3219
+ * Uses atomic write (write to temp file, then rename) to prevent corruption.
3220
+ */
3221
+ save(baseline: ArchBaseline): void;
3222
+ }
3223
+
3224
+ /**
3225
+ * Diff current metric results against a stored baseline.
3226
+ *
3227
+ * Pure function implementing the ratchet logic:
3228
+ * - New violations (in current but not baseline) cause failure
3229
+ * - Aggregate value exceeding baseline causes failure (regression)
3230
+ * - Pre-existing violations (in both) are allowed
3231
+ * - Resolved violations (in baseline but not current) are celebrated
3232
+ *
3233
+ * Categories present in current but absent from the baseline are treated
3234
+ * as having an empty baseline (value: 0, no known violations), so any
3235
+ * violations in those categories are considered new.
3236
+ */
3237
+ declare function diff(current: MetricResult[], baseline: ArchBaseline): ArchDiffResult;
3238
+
3239
+ /**
3240
+ * Resolve effective thresholds for a given scope.
3241
+ *
3242
+ * When scope is 'project' or has no matching module entry, returns
3243
+ * project-wide thresholds. Otherwise, merges project thresholds
3244
+ * with module-level overrides (module wins per-category).
3245
+ *
3246
+ * For object-valued thresholds (e.g. coupling: { maxFanIn, maxFanOut }),
3247
+ * performs a shallow merge at the category level:
3248
+ * project { maxFanIn: 10, maxFanOut: 8 } + module { maxFanOut: 5 }
3249
+ * => { maxFanIn: 10, maxFanOut: 5 }
3250
+ *
3251
+ * When either side is a scalar, the module value replaces the project
3252
+ * value entirely (no merge across scalar/object boundaries).
3253
+ */
3254
+ declare function resolveThresholds(scope: string, config: ArchConfig): ThresholdConfig;
3255
+
2447
3256
  declare const FailureEntrySchema: z.ZodObject<{
2448
3257
  date: z.ZodString;
2449
3258
  skill: z.ZodString;
@@ -2451,13 +3260,13 @@ declare const FailureEntrySchema: z.ZodObject<{
2451
3260
  description: z.ZodString;
2452
3261
  }, "strip", z.ZodTypeAny, {
2453
3262
  type: string;
2454
- date: string;
2455
3263
  description: string;
3264
+ date: string;
2456
3265
  skill: string;
2457
3266
  }, {
2458
3267
  type: string;
2459
- date: string;
2460
3268
  description: string;
3269
+ date: string;
2461
3270
  skill: string;
2462
3271
  }>;
2463
3272
  type FailureEntry = z.infer<typeof FailureEntrySchema>;
@@ -2609,12 +3418,12 @@ declare const HarnessStateSchema: z.ZodObject<{
2609
3418
  status: z.ZodEnum<["open", "resolved"]>;
2610
3419
  }, "strip", z.ZodTypeAny, {
2611
3420
  id: string;
2612
- status: "open" | "resolved";
2613
3421
  description: string;
3422
+ status: "resolved" | "open";
2614
3423
  }, {
2615
3424
  id: string;
2616
- status: "open" | "resolved";
2617
3425
  description: string;
3426
+ status: "resolved" | "open";
2618
3427
  }>, "many">>;
2619
3428
  progress: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<["pending", "in_progress", "complete"]>>>;
2620
3429
  lastSession: z.ZodOptional<z.ZodObject<{
@@ -2641,8 +3450,8 @@ declare const HarnessStateSchema: z.ZodObject<{
2641
3450
  }[];
2642
3451
  blockers: {
2643
3452
  id: string;
2644
- status: "open" | "resolved";
2645
3453
  description: string;
3454
+ status: "resolved" | "open";
2646
3455
  }[];
2647
3456
  schemaVersion: 1;
2648
3457
  position: {
@@ -2665,8 +3474,8 @@ declare const HarnessStateSchema: z.ZodObject<{
2665
3474
  }[] | undefined;
2666
3475
  blockers?: {
2667
3476
  id: string;
2668
- status: "open" | "resolved";
2669
3477
  description: string;
3478
+ status: "resolved" | "open";
2670
3479
  }[] | undefined;
2671
3480
  position?: {
2672
3481
  task?: string | undefined;
@@ -2915,10 +3724,10 @@ declare const SecurityConfigSchema: z.ZodObject<{
2915
3724
  } | undefined;
2916
3725
  }>>;
2917
3726
  }, "strip", z.ZodTypeAny, {
3727
+ rules: Record<string, "error" | "warning" | "info" | "off">;
2918
3728
  enabled: boolean;
2919
3729
  strict: boolean;
2920
3730
  exclude: string[];
2921
- rules: Record<string, "error" | "warning" | "info" | "off">;
2922
3731
  external?: {
2923
3732
  semgrep?: {
2924
3733
  enabled: boolean | "auto";
@@ -2929,10 +3738,10 @@ declare const SecurityConfigSchema: z.ZodObject<{
2929
3738
  } | undefined;
2930
3739
  } | undefined;
2931
3740
  }, {
3741
+ rules?: Record<string, "error" | "warning" | "info" | "off"> | undefined;
2932
3742
  enabled?: boolean | undefined;
2933
3743
  strict?: boolean | undefined;
2934
3744
  exclude?: string[] | undefined;
2935
- rules?: Record<string, "error" | "warning" | "info" | "off"> | undefined;
2936
3745
  external?: {
2937
3746
  semgrep?: {
2938
3747
  enabled?: boolean | "auto" | undefined;
@@ -3880,6 +4689,52 @@ type Confirmation = z.infer<typeof ConfirmationSchema>;
3880
4689
  type Transition = z.infer<typeof TransitionSchema>;
3881
4690
  type EmitInteractionInput = z.infer<typeof EmitInteractionInputSchema>;
3882
4691
 
4692
+ interface Content {
4693
+ codeTranslation: string;
4694
+ }
4695
+ interface BlueprintModule {
4696
+ id: string;
4697
+ title: string;
4698
+ description: string;
4699
+ files: string[];
4700
+ content?: Content;
4701
+ }
4702
+ interface Hotspot {
4703
+ file: string;
4704
+ function: string;
4705
+ score: number;
4706
+ }
4707
+ interface ModuleDependency {
4708
+ from: string;
4709
+ to: string;
4710
+ }
4711
+ interface BlueprintData {
4712
+ projectName: string;
4713
+ generatedAt: string;
4714
+ modules: BlueprintModule[];
4715
+ hotspots: Hotspot[];
4716
+ dependencies: ModuleDependency[];
4717
+ }
4718
+ interface BlueprintOptions {
4719
+ outputDir: string;
4720
+ projectName?: string;
4721
+ }
4722
+
4723
+ declare class ProjectScanner {
4724
+ private rootDir;
4725
+ constructor(rootDir: string);
4726
+ scan(): Promise<BlueprintData>;
4727
+ }
4728
+
4729
+ declare class BlueprintGenerator {
4730
+ private contentPipeline;
4731
+ generate(data: BlueprintData, options: BlueprintOptions): Promise<void>;
4732
+ }
4733
+
4734
+ declare class ContentPipeline {
4735
+ generateModuleContent(module: BlueprintModule): Promise<Content>;
4736
+ }
4737
+
3883
4738
  interface UpdateCheckState {
3884
4739
  lastCheckTime: number;
3885
4740
  latestVersion: string | null;
@@ -3920,15 +4775,22 @@ declare function getUpdateNotification(currentVersion: string): string | null;
3920
4775
  /**
3921
4776
  * @harness-engineering/core
3922
4777
  *
3923
- * Core library for Harness Engineering toolkit
4778
+ * Core library for Harness Engineering toolkit.
4779
+ * This library provides the fundamental building blocks for codebase analysis,
4780
+ * validation, entropy management, and agent-driven workflows.
4781
+ */
4782
+ /**
4783
+ * Re-export all fundamental types from the types package.
3924
4784
  */
3925
4785
 
3926
4786
  /**
4787
+ * The current version of the Harness Engineering core library.
4788
+ *
3927
4789
  * @deprecated Read the CLI version from `@harness-engineering/cli/package.json`
3928
4790
  * instead. This hardcoded constant drifts from the actual CLI version on each
3929
4791
  * release. Kept only as a fallback for consumers that cannot resolve the CLI
3930
4792
  * package at runtime.
3931
4793
  */
3932
- declare const VERSION = "1.8.2";
4794
+ declare const VERSION = "0.11.0";
3933
4795
 
3934
- export { AGENT_DESCRIPTORS, ARCHITECTURE_DESCRIPTOR, type AST, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AgentAction, AgentActionEmitter, type AgentConfig, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, BUG_DETECTION_DESCRIPTOR, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, COMPLIANCE_DESCRIPTOR, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodebaseSnapshot, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, ConsoleSink, type ConstraintError, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, type Convention, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STATE, DEFAULT_STREAM_INDEX, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DiffInfo, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, type EligibilityResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type FailureEntry, FailureEntrySchema, type FanOutOptions, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, FileSink, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, type GenerationSection, type GitHubInlineComment, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type HotspotContext, type Import, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type JSDocComment, type LanguageParser, type Layer, type LayerConfig, type LogEntry, type LogFilter, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type Metric, type ModelProvider, type ModelTier, type ModelTierConfig, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, type OrphanedDep, type ParseError, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, type PriorReview, type ProviderDefaults, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionReport, type RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStrength, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, type SafetyLevel, type ScanResult, type SecurityCategory, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SelfReviewConfig, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillExecutor, type SourceFile, type Span, type SpanEvent, type StepExecutor, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, type StructureValidation, type Suggestion, type SuggestionReport, type SyncChange, type SyncOptions, type TelemetryAdapter, type TelemetryHealth, type TimeRange, type TokenBudget, type TokenBudgetOverrides, type Trace, type Transition, TransitionSchema, type TurnExecutor, TypeScriptParser, type UnusedImport, type UpdateCheckState, VERSION, type ValidateFindingsOptions, type ValidationError, type WorkflowPhase, analyzeDiff, appendFailure, appendLearning, applyFixes, applyHotspotDowngrade, archiveFailures, archiveStream, buildDependencyGraph, buildExclusionSet, buildSnapshot, checkDocCoverage, checkEligibility, classifyFinding, configureFeedback, contextBudget, contextFilter, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createSelfReview, createStream, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectPatternViolations, detectSizeBudgetViolations, detectStack, determineAssessment, executeWorkflow, expressRules, extractMarkdownLinks, extractSections, fanOutReview, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatTerminalOutput, generateAgentsMap, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getPhaseCategories, getStreamForBranch, getUpdateNotification, goRules, injectionRules, isSmallSuggestion, isUpdateCheckEnabled, listStreams, loadFailures, loadHandoff, loadRelevantLearnings, loadState, loadStreamIndex, logAgentAction, migrateToStreams, networkRules, nodeRules, parseDiff, parseRoadmap, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, reactRules, readCheckState, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resolveFileToLayer, resolveModelTier, resolveRuleSeverity, resolveStreamPath, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scopeContext, secretRules, serializeRoadmap, setActiveStream, shouldRunCheck, spawnBackgroundCheck, syncRoadmap, touchStream, trackAction, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, xssRules };
4796
+ export { AGENT_DESCRIPTORS, ARCHITECTURE_DESCRIPTOR, type AST, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AgentAction, AgentActionEmitter, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, ArchBaseline, ArchBaselineManager, ArchConfig, ArchDiffResult, ArchMetricCategory, BUG_DETECTION_DESCRIPTOR, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BlueprintData, BlueprintGenerator, type BlueprintModule, type BlueprintOptions, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, type Bundle, type BundleConstraints, BundleConstraintsSchema, BundleSchema, COMPLIANCE_DESCRIPTOR, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, CircularDepsCollector, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodebaseSnapshot, Collector, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, ComplexityCollector, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, type ConflictReport, ConsoleSink, type ConstraintError, type ConstraintNodeStore, ConstraintRule, type Content, ContentPipeline, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, type Contributions, ContributionsSchema, type Convention, CouplingCollector, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STATE, DEFAULT_STREAM_INDEX, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, DepDepthCollector, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DetectStaleResult, type DiffInfo, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, type EligibilityResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type FailureEntry, FailureEntrySchema, type FanOutOptions, type FeedbackAgentConfig, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, FileSink, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, ForbiddenImportCollector, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, type GenerationSection, type GitHubInlineComment, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type Hotspot, type HotspotContext, type Import, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type JSDocComment, type LanguageParser, type Layer, type LayerConfig, LayerViolationCollector, type Lockfile, type LockfilePackage, LockfilePackageSchema, LockfileSchema, type LogEntry, type LogFilter, type Manifest, ManifestSchema, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type MergeResult, type Metric, MetricResult, type ModelProvider, type ModelTier, type ModelTierConfig, type ModuleDependency, ModuleSizeCollector, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, type OrphanedDep, type ParseError, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, type PriorReview, ProjectScanner, type ProviderDefaults, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionReport, type RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStrength, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, type SafetyLevel, type ScanResult, type SecurityCategory, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SelfReviewConfig, SharableBoundaryConfigSchema, SharableForbiddenImportSchema, SharableLayerSchema, SharableSecurityRulesSchema, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillExecutor, type SourceFile, type Span, type SpanEvent, type StaleConstraint, type StepExecutor, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, type StructureValidation, type Suggestion, type SuggestionReport, type SyncChange, type SyncOptions, type TelemetryAdapter, type TelemetryHealth, ThresholdConfig, type TimeRange, type TokenBudget, type TokenBudgetOverrides, type Trace, type Transition, TransitionSchema, type TurnExecutor, TypeScriptParser, type UnusedImport, type UpdateCheckState, VERSION, type ValidateFindingsOptions, type ValidationError, type WorkflowPhase, addProvenance, analyzeDiff, appendFailure, appendLearning, applyFixes, applyHotspotDowngrade, archiveFailures, archiveStream, buildDependencyGraph, buildExclusionSet, buildSnapshot, checkDocCoverage, checkEligibility, classifyFinding, configureFeedback, constraintRuleId, contextBudget, contextFilter, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createSelfReview, createStream, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, deepMergeConstraints, defaultCollectors, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectPatternViolations, detectSizeBudgetViolations, detectStack, detectStaleConstraints, determineAssessment, diff, executeWorkflow, expressRules, extractBundle, extractMarkdownLinks, extractSections, fanOutReview, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatTerminalOutput, generateAgentsMap, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getPhaseCategories, getStreamForBranch, getUpdateNotification, goRules, injectionRules, isSmallSuggestion, isUpdateCheckEnabled, listStreams, loadFailures, loadHandoff, loadRelevantLearnings, loadState, loadStreamIndex, logAgentAction, migrateToStreams, networkRules, nodeRules, parseDiff, parseManifest, parseRoadmap, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, reactRules, readCheckState, readLockfile, removeContributions, removeProvenance, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resolveFileToLayer, resolveModelTier, resolveRuleSeverity, resolveStreamPath, resolveThresholds, runAll, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scopeContext, secretRules, serializeRoadmap, setActiveStream, shouldRunCheck, spawnBackgroundCheck, syncConstraintNodes, syncRoadmap, touchStream, trackAction, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, violationId, writeConfig, writeLockfile, xssRules };