@anarchitects/governance-core 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -1
- package/dist/core/adapter.d.ts +2 -2
- package/dist/core/ai-analysis.d.ts +2 -2
- package/dist/core/ai-context.d.ts +125 -0
- package/dist/core/ai-context.d.ts.map +1 -0
- package/dist/core/ai-payload.d.ts +64 -0
- package/dist/core/ai-payload.d.ts.map +1 -0
- package/dist/core/ai.d.ts +1 -1
- package/dist/core/assessment-artifacts.d.ts +8 -8
- package/dist/core/assessment.d.ts +2 -2
- package/dist/core/built-in-rule-pack.d.ts +1 -1
- package/dist/core/built-in-rules.d.ts +2 -2
- package/dist/core/delivery-impact.d.ts +1 -1
- package/dist/core/drift.d.ts +1 -1
- package/dist/core/exception-runtime.d.ts +3 -3
- package/dist/core/exceptions.d.ts +1 -1
- package/dist/core/health.d.ts +1 -1
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/metrics.d.ts +2 -2
- package/dist/core/models.d.ts +1 -1
- package/dist/core/project-matching.d.ts +7 -0
- package/dist/core/project-matching.d.ts.map +1 -0
- package/dist/core/rule-engine.d.ts +1 -1
- package/dist/core/rules.d.ts +4 -4
- package/dist/core/signal-builders.d.ts +2 -2
- package/dist/core/snapshots.d.ts +3 -1
- package/dist/core/snapshots.d.ts.map +1 -1
- package/dist/extensions/capabilities.d.ts +1 -1
- package/dist/extensions/contracts.d.ts +3 -3
- package/dist/extensions/runtime.d.ts +4 -4
- package/dist/index.js +1978 -1433
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Canonical Governance contracts, deterministic evaluation logic, and portable ext
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
`@anarchitects/governance-core` is the package that defines the Governance model layer for the
|
|
7
|
+
`@anarchitects/governance-core` is the package that defines the Governance model layer for the Anarchitects Governance package family. It owns the public contracts that adapters, hosts, and extensions normalize into, plus the deterministic logic that evaluates those contracts.
|
|
8
8
|
|
|
9
9
|
Use this package when you need:
|
|
10
10
|
|
|
@@ -22,6 +22,7 @@ This package is responsible for:
|
|
|
22
22
|
- defining adapter-facing input contracts such as `GovernanceProjectInput`, `GovernanceDependencyInput`, and `GovernanceWorkspaceAdapterResult`
|
|
23
23
|
- defining profile, rule, signal, exception, measurement, health, assessment, snapshot, and drift contracts
|
|
24
24
|
- providing deterministic helpers such as profile normalization, rule evaluation, assessment assembly, snapshot comparison, and AI handoff payload builders
|
|
25
|
+
- providing host-independent helpers that map changed files onto canonical `GovernanceProject` models and shape snapshot delivery-impact summaries
|
|
25
26
|
- providing portable extension contracts and runtime helpers that stay independent from Nx
|
|
26
27
|
|
|
27
28
|
This package is not responsible for:
|
|
@@ -40,16 +41,30 @@ The package has a single public entrypoint:
|
|
|
40
41
|
```ts
|
|
41
42
|
import {
|
|
42
43
|
buildDeliveryImpactAssessment,
|
|
44
|
+
buildSnapshotDeliveryImpactSummary,
|
|
45
|
+
buildCognitiveLoadContext,
|
|
46
|
+
buildDriftInterpretationAnalysis,
|
|
43
47
|
buildGovernanceAssessment,
|
|
44
48
|
buildGovernanceAssessmentArtifacts,
|
|
49
|
+
buildGovernancePayloadTruncationMetadata,
|
|
45
50
|
buildGovernanceConformanceSignals,
|
|
46
51
|
buildGovernanceGraphSignals,
|
|
47
52
|
buildGovernancePolicySignals,
|
|
48
53
|
buildGovernanceRecommendations,
|
|
54
|
+
buildOnboardingContext,
|
|
55
|
+
buildPersistentSmellSignals,
|
|
56
|
+
buildPrImpactContext,
|
|
57
|
+
buildRecommendationsTrendContext,
|
|
58
|
+
resolveAffectedGovernanceProjects,
|
|
59
|
+
buildRefactoringSuggestionsContext,
|
|
49
60
|
buildGovernanceWorkspace,
|
|
50
61
|
buildMetricSnapshot,
|
|
62
|
+
buildScopedDriftRequest,
|
|
63
|
+
buildScopedRootCauseRequest,
|
|
64
|
+
buildScopedScorecardRequest,
|
|
51
65
|
calculateGovernanceHealth,
|
|
52
66
|
calculateGovernanceMetrics,
|
|
67
|
+
compareGovernanceViolationsForPriority,
|
|
53
68
|
compareSnapshots,
|
|
54
69
|
coreBuiltInRulePack,
|
|
55
70
|
evaluateGovernancePolicies,
|
|
@@ -58,6 +73,8 @@ import {
|
|
|
58
73
|
normalizeGovernanceException,
|
|
59
74
|
normalizeGovernanceProfile,
|
|
60
75
|
registerLoadedGovernanceExtensions,
|
|
76
|
+
scopeGovernanceDependencies,
|
|
77
|
+
sliceGovernancePayloadItems,
|
|
61
78
|
type GovernanceWorkspaceAdapter,
|
|
62
79
|
type GovernanceWorkspace,
|
|
63
80
|
type GovernanceWorkspaceAdapterResult,
|
|
@@ -72,9 +89,12 @@ The root export currently re-exports these API groups:
|
|
|
72
89
|
- `built-in-rule-pack`
|
|
73
90
|
- `built-in-rules`
|
|
74
91
|
- `drift`
|
|
92
|
+
- `ai-context`
|
|
93
|
+
- `ai-payload`
|
|
75
94
|
- `models`
|
|
76
95
|
- `exceptions`
|
|
77
96
|
- `profile`
|
|
97
|
+
- `project-matching`
|
|
78
98
|
- `rule-engine`
|
|
79
99
|
- `rules`
|
|
80
100
|
- `signals`
|
|
@@ -108,7 +128,12 @@ Deterministic helpers include:
|
|
|
108
128
|
- `buildGovernanceRecommendations(...)`
|
|
109
129
|
- `applyGovernanceExceptions(...)`, `evaluateGovernanceExceptionLifecycle(...)`, and `buildGovernanceExceptionReport(...)`
|
|
110
130
|
- `buildDeliveryImpactAssessment(...)` and `summarizeDeliveryImpact(...)`
|
|
131
|
+
- `buildSnapshotDeliveryImpactSummary(...)`
|
|
111
132
|
- deterministic AI request builders and summarizers such as `buildRootCauseRequest(...)`, `buildPrImpactRequest(...)`, `buildScorecardRequest(...)`, `buildOnboardingRequest(...)`, `buildManagementInsightsAiRequest(...)`, `summarizeRootCause(...)`, `summarizePrImpact(...)`, `summarizeScorecard(...)`, `summarizeOnboarding(...)`, and `summarizeManagementInsights(...)`
|
|
133
|
+
- deterministic payload-scope helpers such as `buildGovernancePayloadTruncationMetadata(...)`, `sliceGovernancePayloadItems(...)`, `scopeGovernanceDependencies(...)`, and `compareGovernanceViolationsForPriority(...)`
|
|
134
|
+
- scoped AI handoff request helpers such as `buildScopedRootCauseRequest(...)`, `buildScopedDriftRequest(...)`, and `buildScopedScorecardRequest(...)`
|
|
135
|
+
- deterministic AI context builders such as `buildPrImpactContext(...)`, `buildCognitiveLoadContext(...)`, `buildRecommendationsTrendContext(...)`, `buildPersistentSmellSignals(...)`, `buildRefactoringSuggestionsContext(...)`, `buildOnboardingContext(...)`, and `buildDriftInterpretationAnalysis(...)`
|
|
136
|
+
- `resolveAffectedGovernanceProjects(...)`
|
|
112
137
|
- `evaluateRules(...)` and `evaluateRulePack(...)`
|
|
113
138
|
- `normalizeGovernanceProfile(...)`
|
|
114
139
|
- `normalizeGovernanceException(...)`
|
|
@@ -206,6 +231,39 @@ Thin runtime hosts can consume the package in this order:
|
|
|
206
231
|
- apply exception lifecycle and suppression with `evaluateGovernanceExceptionLifecycle(...)`, `applyGovernanceExceptions(...)`, and `buildGovernanceExceptionReport(...)`
|
|
207
232
|
- build higher-level delivery and AI artifacts with `buildDeliveryImpactAssessment(...)`, `buildManagementInsightsAiRequest(...)`, `summarizeManagementInsights(...)`, and the other deterministic AI request/summarizer helpers
|
|
208
233
|
|
|
234
|
+
Hosts remain responsible for:
|
|
235
|
+
|
|
236
|
+
- collecting changed files from git or another host runtime
|
|
237
|
+
- resolving refs, workspace roots, and process execution
|
|
238
|
+
- discovering snapshot files and choosing baseline/current snapshot inputs
|
|
239
|
+
- persisting snapshots and other host-owned artifacts
|
|
240
|
+
|
|
241
|
+
Core also provides two small host-independent handoff helpers:
|
|
242
|
+
|
|
243
|
+
- `resolveAffectedGovernanceProjects(...)` maps host-supplied repo-relative changed file paths onto canonical `GovernanceProject` records. It normalizes Windows separators, trims trailing slashes from project roots, ignores empty changed-file entries, and treats `'.'` or `''` project roots as root-level projects that match any non-empty changed file.
|
|
244
|
+
- `buildSnapshotDeliveryImpactSummary(...)` shapes a `DeliveryImpactAssessment` into a `SnapshotDeliveryImpactSummary` by sorting indices by `id` and copying the first five delivery-impact drivers into the snapshot-safe summary contract.
|
|
245
|
+
|
|
246
|
+
## AI Host Helpers
|
|
247
|
+
|
|
248
|
+
Thin host packages can now keep AI handoff shaping in Core by composing:
|
|
249
|
+
|
|
250
|
+
- `scopeGovernanceDependencies(...)`
|
|
251
|
+
- `sliceGovernancePayloadItems(...)`
|
|
252
|
+
- `compareGovernanceViolationsForPriority(...)`
|
|
253
|
+
- `buildScopedRootCauseRequest(...)`
|
|
254
|
+
- `buildScopedDriftRequest(...)`
|
|
255
|
+
- `buildScopedScorecardRequest(...)`
|
|
256
|
+
- `buildDriftInterpretationAnalysis(...)`
|
|
257
|
+
- `buildPrImpactContext(...)`
|
|
258
|
+
- `buildCognitiveLoadContext(...)`
|
|
259
|
+
- `buildRecommendationsTrendContext(...)`
|
|
260
|
+
- `buildPersistentSmellSignals(...)`
|
|
261
|
+
- `buildRefactoringSuggestionsContext(...)`
|
|
262
|
+
- `buildOnboardingContext(...)`
|
|
263
|
+
|
|
264
|
+
These helpers are deterministic and host-independent. Hosts still own file IO,
|
|
265
|
+
git diffing, workspace-root path resolution, output rendering, and persistence.
|
|
266
|
+
|
|
209
267
|
## Package Boundaries
|
|
210
268
|
|
|
211
269
|
`@anarchitects/governance-core` is platform-independent.
|
package/dist/core/adapter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GovernanceWorkspace } from './models.js';
|
|
2
|
-
import { ProfileOverrides } from './profile.js';
|
|
1
|
+
import type { GovernanceWorkspace } from './models.js';
|
|
2
|
+
import type { ProfileOverrides } from './profile.js';
|
|
3
3
|
export interface GovernanceWorkspaceAdapterResult {
|
|
4
4
|
workspace?: GovernanceWorkspace;
|
|
5
5
|
workspaceId?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AiAnalysisRequest, AiAnalysisResult, GovernanceAssessment, GovernanceDependency, MetricSnapshot, SnapshotComparison, SnapshotViolation } from './models.js';
|
|
2
|
-
import { DeliveryImpactAssessment } from './delivery-impact.js';
|
|
1
|
+
import type { AiAnalysisRequest, AiAnalysisResult, GovernanceAssessment, GovernanceDependency, MetricSnapshot, SnapshotComparison, SnapshotViolation } from './models.js';
|
|
2
|
+
import type { DeliveryImpactAssessment } from './delivery-impact.js';
|
|
3
3
|
export interface BuildManagementInsightsAiRequestInput {
|
|
4
4
|
deliveryImpact: DeliveryImpactAssessment;
|
|
5
5
|
assessment?: GovernanceAssessment;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { AiAnalysisRequest, AiAnalysisResult, DriftSignal, DriftSummary, GovernanceDependency, GovernanceProject, MetricSnapshot, SnapshotViolation } from './models.js';
|
|
2
|
+
export interface GovernancePrImpactContext {
|
|
3
|
+
changedFilesCount: number;
|
|
4
|
+
affectedProjects: string[];
|
|
5
|
+
affectedProjectsCount: number;
|
|
6
|
+
affectedDomains: string[];
|
|
7
|
+
affectedDomainCount: number;
|
|
8
|
+
scopedDependencyCount: number;
|
|
9
|
+
crossDomainDependencyEdges: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FanoutProjectSummary {
|
|
12
|
+
project: string;
|
|
13
|
+
fanout: number;
|
|
14
|
+
}
|
|
15
|
+
export interface GovernanceCognitiveLoadContext {
|
|
16
|
+
scope: string;
|
|
17
|
+
selectedProjects: string[];
|
|
18
|
+
selectedProjectsCount: number;
|
|
19
|
+
affectedDomains: string[];
|
|
20
|
+
affectedDomainCount: number;
|
|
21
|
+
scopedDependencyCount: number;
|
|
22
|
+
crossDomainDependencyEdges: number;
|
|
23
|
+
averageFanout: number;
|
|
24
|
+
maxFanout: number;
|
|
25
|
+
topFanoutProjects: FanoutProjectSummary[];
|
|
26
|
+
project?: string;
|
|
27
|
+
domain?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GovernanceRecommendationsTrendContext {
|
|
30
|
+
overallTrend: DriftSignal['status'];
|
|
31
|
+
worseningSignalCount: number;
|
|
32
|
+
improvingSignalCount: number;
|
|
33
|
+
stableSignalCount: number;
|
|
34
|
+
signalCount: number;
|
|
35
|
+
snapshotCount: number;
|
|
36
|
+
trendWindowInsufficient: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface GovernancePersistentSmellSignal {
|
|
39
|
+
type: string;
|
|
40
|
+
source: string;
|
|
41
|
+
count: number;
|
|
42
|
+
}
|
|
43
|
+
export interface HotspotProjectSummary {
|
|
44
|
+
project: string;
|
|
45
|
+
count: number;
|
|
46
|
+
}
|
|
47
|
+
export interface GovernanceRefactoringSuggestionsContext {
|
|
48
|
+
analyzedViolations: number;
|
|
49
|
+
totalViolations: number;
|
|
50
|
+
hotspotProjects: HotspotProjectSummary[];
|
|
51
|
+
highFanoutProjects: HotspotProjectSummary[];
|
|
52
|
+
hotspotDomains: string[];
|
|
53
|
+
persistentSmellSignals: GovernancePersistentSmellSignal[];
|
|
54
|
+
snapshotCount: number;
|
|
55
|
+
sampledSnapshotCount: number;
|
|
56
|
+
}
|
|
57
|
+
export interface DomainCountSummary {
|
|
58
|
+
domain: string;
|
|
59
|
+
count: number;
|
|
60
|
+
}
|
|
61
|
+
export interface LayerCountSummary {
|
|
62
|
+
layer: string;
|
|
63
|
+
count: number;
|
|
64
|
+
}
|
|
65
|
+
export interface GovernanceOnboardingContext {
|
|
66
|
+
projectCount: number;
|
|
67
|
+
dependencyCount: number;
|
|
68
|
+
ownershipCoverage: number;
|
|
69
|
+
domainSummary: DomainCountSummary[];
|
|
70
|
+
layerSummary: LayerCountSummary[];
|
|
71
|
+
topFanoutProjects: HotspotProjectSummary[];
|
|
72
|
+
analyzedViolations: number;
|
|
73
|
+
totalViolations: number;
|
|
74
|
+
}
|
|
75
|
+
export interface BuildPrImpactContextInput {
|
|
76
|
+
affectedProjects: readonly string[] | readonly GovernanceProject[];
|
|
77
|
+
dependencies: readonly GovernanceDependency[];
|
|
78
|
+
projects?: readonly GovernanceProject[];
|
|
79
|
+
changedFiles?: readonly string[];
|
|
80
|
+
changedFilesCount?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface BuildCognitiveLoadContextInput {
|
|
83
|
+
selectedProjects: readonly string[] | readonly GovernanceProject[];
|
|
84
|
+
dependencies: readonly GovernanceDependency[];
|
|
85
|
+
projects?: readonly GovernanceProject[];
|
|
86
|
+
scope?: string;
|
|
87
|
+
project?: string;
|
|
88
|
+
domain?: string;
|
|
89
|
+
topProjectsLimit?: number;
|
|
90
|
+
}
|
|
91
|
+
export interface BuildRecommendationsTrendContextInput {
|
|
92
|
+
signals: readonly DriftSignal[];
|
|
93
|
+
summary?: DriftSummary;
|
|
94
|
+
snapshotCount?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface BuildPersistentSmellSignalsInput {
|
|
97
|
+
recentSnapshots: readonly MetricSnapshot[];
|
|
98
|
+
minimumOccurrences?: number;
|
|
99
|
+
}
|
|
100
|
+
export interface BuildRefactoringSuggestionsContextInput {
|
|
101
|
+
violations: readonly SnapshotViolation[];
|
|
102
|
+
dependencies: readonly GovernanceDependency[];
|
|
103
|
+
projects: readonly GovernanceProject[];
|
|
104
|
+
recentSnapshots?: readonly MetricSnapshot[];
|
|
105
|
+
topProjectsLimit?: number;
|
|
106
|
+
analyzedViolationsLimit?: number;
|
|
107
|
+
minimumPersistentOccurrences?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface BuildOnboardingContextInput {
|
|
110
|
+
projects: readonly GovernanceProject[];
|
|
111
|
+
dependencies: readonly GovernanceDependency[];
|
|
112
|
+
topViolations?: readonly SnapshotViolation[];
|
|
113
|
+
topProjectsLimit?: number;
|
|
114
|
+
totalViolationsCount?: number;
|
|
115
|
+
}
|
|
116
|
+
export declare function summarizeDriftInterpretation(request: AiAnalysisRequest, signals: readonly DriftSignal[], summary: DriftSummary): AiAnalysisResult;
|
|
117
|
+
export declare const buildDriftInterpretationAnalysis: typeof summarizeDriftInterpretation;
|
|
118
|
+
export declare function buildPrImpactContext(input: BuildPrImpactContextInput): GovernancePrImpactContext;
|
|
119
|
+
export declare function buildCognitiveLoadContext(input: BuildCognitiveLoadContextInput): GovernanceCognitiveLoadContext;
|
|
120
|
+
export declare function countWorseningDriftSignals(signals: readonly DriftSignal[]): number;
|
|
121
|
+
export declare function buildRecommendationsTrendContext(input: BuildRecommendationsTrendContextInput): GovernanceRecommendationsTrendContext;
|
|
122
|
+
export declare function buildPersistentSmellSignals(input: BuildPersistentSmellSignalsInput): GovernancePersistentSmellSignal[];
|
|
123
|
+
export declare function buildRefactoringSuggestionsContext(input: BuildRefactoringSuggestionsContextInput): GovernanceRefactoringSuggestionsContext;
|
|
124
|
+
export declare function buildOnboardingContext(input: BuildOnboardingContextInput): GovernanceOnboardingContext;
|
|
125
|
+
//# sourceMappingURL=ai-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-context.d.ts","sourceRoot":"","sources":["../../src/core/ai-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd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AgCnC;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,uCAAuC,GAC7C,uCAAuC,CA0DzC;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,2BAA2B,CAyD7B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AiAnalysisRequest, DriftSignal, DriftSummary, GovernanceDependency, MetricSnapshot, SnapshotComparison, SnapshotViolation } from './models.js';
|
|
2
|
+
export interface GovernancePayloadTruncationMetadata {
|
|
3
|
+
totalCount: number;
|
|
4
|
+
selectedCount: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
truncated: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface GovernancePayloadSliceResult<T> {
|
|
9
|
+
items: T[];
|
|
10
|
+
truncation: GovernancePayloadTruncationMetadata;
|
|
11
|
+
}
|
|
12
|
+
export interface RootCausePayloadScope {
|
|
13
|
+
projectScopeCount: number;
|
|
14
|
+
dependencies: GovernancePayloadTruncationMetadata;
|
|
15
|
+
violations: GovernancePayloadTruncationMetadata;
|
|
16
|
+
}
|
|
17
|
+
export interface DriftPayloadScope {
|
|
18
|
+
signals: GovernancePayloadTruncationMetadata;
|
|
19
|
+
metricDeltas: GovernancePayloadTruncationMetadata;
|
|
20
|
+
scoreDeltas: GovernancePayloadTruncationMetadata;
|
|
21
|
+
newViolations: GovernancePayloadTruncationMetadata;
|
|
22
|
+
resolvedViolations: GovernancePayloadTruncationMetadata;
|
|
23
|
+
}
|
|
24
|
+
export interface ScorecardPayloadScope {
|
|
25
|
+
snapshotViolations: GovernancePayloadTruncationMetadata;
|
|
26
|
+
metricDeltas: GovernancePayloadTruncationMetadata;
|
|
27
|
+
scoreDeltas: GovernancePayloadTruncationMetadata;
|
|
28
|
+
}
|
|
29
|
+
export interface ScopedGovernanceAiRequestResult<TScope> {
|
|
30
|
+
request: AiAnalysisRequest;
|
|
31
|
+
payloadScope: TScope;
|
|
32
|
+
}
|
|
33
|
+
export interface BuildScopedRootCauseRequestInput {
|
|
34
|
+
request: AiAnalysisRequest;
|
|
35
|
+
dependencies?: GovernanceDependency[];
|
|
36
|
+
topViolations?: SnapshotViolation[];
|
|
37
|
+
projectScope?: Iterable<string>;
|
|
38
|
+
dependencyLimit?: number;
|
|
39
|
+
topViolationsLimit?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface BuildScopedDriftRequestInput {
|
|
42
|
+
request: AiAnalysisRequest;
|
|
43
|
+
comparison?: SnapshotComparison;
|
|
44
|
+
signals?: DriftSignal[];
|
|
45
|
+
summary?: DriftSummary;
|
|
46
|
+
signalLimit?: number;
|
|
47
|
+
deltaLimit?: number;
|
|
48
|
+
violationLimit?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface BuildScopedScorecardRequestInput {
|
|
51
|
+
request: AiAnalysisRequest;
|
|
52
|
+
snapshot?: MetricSnapshot;
|
|
53
|
+
comparison?: SnapshotComparison;
|
|
54
|
+
violationLimit?: number;
|
|
55
|
+
deltaLimit?: number;
|
|
56
|
+
}
|
|
57
|
+
export declare function buildGovernancePayloadTruncationMetadata(totalCount: number, selectedCount: number, limit: number): GovernancePayloadTruncationMetadata;
|
|
58
|
+
export declare function sliceGovernancePayloadItems<T>(items: readonly T[], limit: number | undefined, compare: (left: T, right: T) => number): GovernancePayloadSliceResult<T>;
|
|
59
|
+
export declare function scopeGovernanceDependencies(dependencies: readonly GovernanceDependency[], projectScope: Iterable<string>, limit?: number): GovernancePayloadSliceResult<GovernanceDependency>;
|
|
60
|
+
export declare function compareGovernanceViolationsForPriority(left: SnapshotViolation, right: SnapshotViolation): number;
|
|
61
|
+
export declare function buildScopedRootCauseRequest(input: BuildScopedRootCauseRequestInput): ScopedGovernanceAiRequestResult<RootCausePayloadScope>;
|
|
62
|
+
export declare function buildScopedDriftRequest(input: BuildScopedDriftRequestInput): ScopedGovernanceAiRequestResult<DriftPayloadScope>;
|
|
63
|
+
export declare function buildScopedScorecardRequest(input: BuildScopedScorecardRequestInput): ScopedGovernanceAiRequestResult<ScorecardPayloadScope>;
|
|
64
|
+
//# sourceMappingURL=ai-payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-payload.d.ts","sourceRoot":"","sources":["../../src/core/ai-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAElB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,mCAAmC;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B,CAAC,CAAC;IAC7C,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,UAAU,EAAE,mCAAmC,CAAC;CACjD;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,mCAAmC,CAAC;IAClD,UAAU,EAAE,mCAAmC,CAAC;CACjD;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,mCAAmC,CAAC;IAC7C,YAAY,EAAE,mCAAmC,CAAC;IAClD,WAAW,EAAE,mCAAmC,CAAC;IACjD,aAAa,EAAE,mCAAmC,CAAC;IACnD,kBAAkB,EAAE,mCAAmC,CAAC;CACzD;AAED,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,mCAAmC,CAAC;IACxD,YAAY,EAAE,mCAAmC,CAAC;IAClD,WAAW,EAAE,mCAAmC,CAAC;CAClD;AAED,MAAM,WAAW,+BAA+B,CAAC,MAAM;IACrD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,EA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C,CACpD,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,iBAAiB,GACvB,MAAM,CAQR;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,+BAA+B,CAAC,qBAAqB,CAAC,CA8CxD;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,+BAA+B,CAAC,iBAAiB,CAAC,CAoEpD;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,+BAA+B,CAAC,qBAAqB,CAAC,CA8DxD"}
|
package/dist/core/ai.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiAnalysisRequest, AiAnalysisResult } from './models.js';
|
|
1
|
+
import type { AiAnalysisRequest, AiAnalysisResult } from './models.js';
|
|
2
2
|
export type AiHandoffUseCase = Extract<AiAnalysisRequest['kind'], 'root-cause' | 'drift' | 'pr-impact' | 'scorecard' | 'management-insights'>;
|
|
3
3
|
export interface GovernanceAiHandoffPayload<TRequest = Record<string, unknown>, TAnalysis = AiAnalysisResult> {
|
|
4
4
|
useCase: AiHandoffUseCase;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { GovernanceCapability, GovernanceDiagnostic, GovernanceWorkspaceAdapterResult } from './adapter.js';
|
|
2
|
-
import { GovernanceExceptionApplicationResult } from './exception-runtime.js';
|
|
3
|
-
import { GovernanceExtensionDiagnostic, GovernanceExtensionHostContext, GovernanceExtensionRegistry } from '../extensions/index.js';
|
|
4
|
-
import { GovernanceAssessment, GovernanceWorkspace, Measurement, Recommendation, Violation } from './models.js';
|
|
5
|
-
import { GovernanceException } from './exceptions.js';
|
|
6
|
-
import { GovernanceProfile } from './profile.js';
|
|
7
|
-
import { GovernanceConformanceFinding, GovernanceGraphSnapshot } from './signal-builders.js';
|
|
8
|
-
import { GovernanceSignal } from './signals.js';
|
|
1
|
+
import type { GovernanceCapability, GovernanceDiagnostic, GovernanceWorkspaceAdapterResult } from './adapter.js';
|
|
2
|
+
import { type GovernanceExceptionApplicationResult } from './exception-runtime.js';
|
|
3
|
+
import { type GovernanceExtensionDiagnostic, type GovernanceExtensionHostContext, type GovernanceExtensionRegistry } from '../extensions/index.js';
|
|
4
|
+
import type { GovernanceAssessment, GovernanceWorkspace, Measurement, Recommendation, Violation } from './models.js';
|
|
5
|
+
import type { GovernanceException } from './exceptions.js';
|
|
6
|
+
import type { GovernanceProfile } from './profile.js';
|
|
7
|
+
import { type GovernanceConformanceFinding, type GovernanceGraphSnapshot } from './signal-builders.js';
|
|
8
|
+
import type { GovernanceSignal } from './signals.js';
|
|
9
9
|
export interface BuildGovernanceAssessmentArtifactsInput {
|
|
10
10
|
profile: GovernanceProfile;
|
|
11
11
|
workspaceAdapterResult?: GovernanceWorkspaceAdapterResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GovernanceAssessment, GovernanceExceptionReport, GovernanceTopIssue, Measurement, MetricBreakdown, Recommendation, SignalBreakdown, Violation, GovernanceWorkspace, HealthScore } from './models.js';
|
|
2
|
-
import { GovernanceSignal } from './signals.js';
|
|
1
|
+
import type { GovernanceAssessment, GovernanceExceptionReport, GovernanceTopIssue, Measurement, MetricBreakdown, Recommendation, SignalBreakdown, Violation, GovernanceWorkspace, HealthScore } from './models.js';
|
|
2
|
+
import type { GovernanceSignal } from './signals.js';
|
|
3
3
|
export type GovernanceAssessmentReportType = 'health' | 'boundaries' | 'ownership' | 'architecture';
|
|
4
4
|
export interface GovernanceAssessmentInput {
|
|
5
5
|
workspace: GovernanceWorkspace;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceRulePack } from './rules.js';
|
|
1
|
+
import type { GovernanceRulePack } from './rules.js';
|
|
2
2
|
export declare const CORE_BUILT_IN_RULE_PACK_ID = "core";
|
|
3
3
|
export declare const coreBuiltInRulePack: GovernanceRulePack;
|
|
4
4
|
export declare const coreBuiltInRulePacks: GovernanceRulePack[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from './models.js';
|
|
2
|
-
import { GovernanceRule, GovernanceRuleContext, GovernanceRuleResult } from './rules.js';
|
|
1
|
+
import type { Violation } from './models.js';
|
|
2
|
+
import type { GovernanceRule, GovernanceRuleContext, GovernanceRuleResult } from './rules.js';
|
|
3
3
|
type SynchronousGovernanceRule<TOptions = unknown> = GovernanceRule<TOptions> & {
|
|
4
4
|
evaluate(context: GovernanceRuleContext<TOptions>): GovernanceRuleResult;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceAssessment, SnapshotComparison } from './models.js';
|
|
1
|
+
import type { GovernanceAssessment, SnapshotComparison } from './models.js';
|
|
2
2
|
export type GovernanceAudience = 'management' | 'technical-lead' | 'developer';
|
|
3
3
|
export type GovernanceInsightCategory = 'cost-of-change' | 'time-to-market' | 'delivery-risk' | 'predictability' | 'maintainability' | 'ownership' | (string & {});
|
|
4
4
|
export interface GovernanceInsightDriver {
|
package/dist/core/drift.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DriftSignal, DriftSummary, MetricSnapshot, SnapshotComparison } from './models.js';
|
|
1
|
+
import type { DriftSignal, DriftSummary, MetricSnapshot, SnapshotComparison } from './models.js';
|
|
2
2
|
export declare function compareSnapshots(baseline: MetricSnapshot, current: MetricSnapshot): SnapshotComparison;
|
|
3
3
|
export declare function summarizeDrift(comparison: SnapshotComparison, threshold?: number): DriftSignal[];
|
|
4
4
|
export declare function buildDriftSummary(signals: DriftSignal[]): DriftSummary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GovernanceExceptionReport, GovernanceExceptionStatus, Violation } from './models.js';
|
|
2
|
-
import { GovernanceException } from './exceptions.js';
|
|
3
|
-
import { GovernanceConformanceFinding } from './signal-builders.js';
|
|
1
|
+
import type { GovernanceExceptionReport, GovernanceExceptionStatus, Violation } from './models.js';
|
|
2
|
+
import { type GovernanceException } from './exceptions.js';
|
|
3
|
+
import type { GovernanceConformanceFinding } from './signal-builders.js';
|
|
4
4
|
export interface GovernanceExceptionLifecycle {
|
|
5
5
|
exception: GovernanceException;
|
|
6
6
|
status: GovernanceExceptionStatus;
|
package/dist/core/health.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceTopIssue, HealthScore, HealthStatusThresholds, Measurement, Recommendation, Violation } from './models.js';
|
|
1
|
+
import type { GovernanceTopIssue, HealthScore, HealthStatusThresholds, Measurement, Recommendation, Violation } from './models.js';
|
|
2
2
|
export type MetricWeights = Partial<Record<Measurement['id'], number>>;
|
|
3
3
|
export interface GovernanceHealthExplainabilityInput {
|
|
4
4
|
topIssues?: GovernanceTopIssue[];
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './adapter.js';
|
|
2
2
|
export * from './ai-analysis.js';
|
|
3
|
+
export * from './ai-context.js';
|
|
4
|
+
export * from './ai-payload.js';
|
|
3
5
|
export * from './assessment.js';
|
|
4
6
|
export * from './assessment-artifacts.js';
|
|
5
7
|
export * from './ai.js';
|
|
@@ -13,6 +15,7 @@ export * from './exceptions.js';
|
|
|
13
15
|
export * from './health.js';
|
|
14
16
|
export * from './metrics.js';
|
|
15
17
|
export * from './profile.js';
|
|
18
|
+
export * from './project-matching.js';
|
|
16
19
|
export * from './rule-engine.js';
|
|
17
20
|
export * from './rules.js';
|
|
18
21
|
export * from './signal-builders.js';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/dist/core/metrics.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Measurement, GovernanceWorkspace } from './models.js';
|
|
2
|
-
import { GovernanceSignal } from './signals.js';
|
|
1
|
+
import type { Measurement, GovernanceWorkspace } from './models.js';
|
|
2
|
+
import type { GovernanceSignal } from './signals.js';
|
|
3
3
|
export interface CalculateGovernanceMetricsInput {
|
|
4
4
|
workspace: GovernanceWorkspace;
|
|
5
5
|
signals: GovernanceSignal[];
|
package/dist/core/models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceSignalCategory, GovernanceSignalSeverity, GovernanceSignalSource, GovernanceSignalType } from './signals.js';
|
|
1
|
+
import type { GovernanceSignalCategory, GovernanceSignalSeverity, GovernanceSignalSource, GovernanceSignalType } from './signals.js';
|
|
2
2
|
export interface GovernanceWorkspace {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GovernanceProject } from './models.js';
|
|
2
|
+
export interface ResolveAffectedGovernanceProjectsOptions {
|
|
3
|
+
projects: readonly GovernanceProject[];
|
|
4
|
+
changedFiles: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveAffectedGovernanceProjects(options: ResolveAffectedGovernanceProjectsOptions): GovernanceProject[];
|
|
7
|
+
//# sourceMappingURL=project-matching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-matching.d.ts","sourceRoot":"","sources":["../../src/core/project-matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,wCAAwC;IACvD,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,wCAAwC,GAChD,iBAAiB,EAAE,CAiBrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceRule, GovernanceRuleContext, GovernanceRuleExecutionResult, GovernanceRulePack } from './rules.js';
|
|
1
|
+
import type { GovernanceRule, GovernanceRuleContext, GovernanceRuleExecutionResult, GovernanceRulePack } from './rules.js';
|
|
2
2
|
export declare function evaluateRules<TOptions = unknown>(rules: GovernanceRule<TOptions>[], context: GovernanceRuleContext<TOptions>): Promise<GovernanceRuleExecutionResult>;
|
|
3
3
|
export declare function evaluateRulePack<TOptions = unknown>(rulePack: GovernanceRulePack<TOptions>, context: GovernanceRuleContext<TOptions>): Promise<GovernanceRuleExecutionResult>;
|
|
4
4
|
//# sourceMappingURL=rule-engine.d.ts.map
|
package/dist/core/rules.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GovernanceCapability, GovernanceDiagnostic } from './adapter.js';
|
|
2
|
-
import { Measurement, Violation, GovernanceWorkspace } from './models.js';
|
|
3
|
-
import { GovernanceProfile } from './profile.js';
|
|
4
|
-
import { GovernanceSignal } from './signals.js';
|
|
1
|
+
import type { GovernanceCapability, GovernanceDiagnostic } from './adapter.js';
|
|
2
|
+
import type { Measurement, Violation, GovernanceWorkspace } from './models.js';
|
|
3
|
+
import type { GovernanceProfile } from './profile.js';
|
|
4
|
+
import type { GovernanceSignal } from './signals.js';
|
|
5
5
|
export type GovernanceRuleSeverity = Violation['severity'];
|
|
6
6
|
export type GovernanceRuleCategory = Violation['category'] | 'convention' | 'metadata' | 'structure' | 'snapshot' | 'drift' | 'ai' | (string & {});
|
|
7
7
|
export interface GovernanceRuleContext<TOptions = unknown> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Violation } from './models.js';
|
|
2
|
-
import { GovernanceSignal, GovernanceSignalCategory, GovernanceSignalSeverity } from './signals.js';
|
|
1
|
+
import type { Violation } from './models.js';
|
|
2
|
+
import type { GovernanceSignal, GovernanceSignalCategory, GovernanceSignalSeverity } from './signals.js';
|
|
3
3
|
export interface GovernanceGraphSnapshotProject {
|
|
4
4
|
id: string;
|
|
5
5
|
domain?: string;
|
package/dist/core/snapshots.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { GovernanceAssessment, MetricSnapshot, SnapshotDeliveryImpactSummary } from './models.js';
|
|
1
|
+
import type { GovernanceAssessment, MetricSnapshot, SnapshotDeliveryImpactSummary } from './models.js';
|
|
2
|
+
import type { DeliveryImpactAssessment } from './delivery-impact.js';
|
|
2
3
|
export interface GovernanceSnapshotMetadata {
|
|
3
4
|
timestamp: string;
|
|
4
5
|
repo: string;
|
|
@@ -9,4 +10,5 @@ export interface GovernanceSnapshotMetadata {
|
|
|
9
10
|
deliveryImpact?: SnapshotDeliveryImpactSummary;
|
|
10
11
|
}
|
|
11
12
|
export declare function buildMetricSnapshot(assessment: GovernanceAssessment, metadata: GovernanceSnapshotMetadata): MetricSnapshot;
|
|
13
|
+
export declare function buildSnapshotDeliveryImpactSummary(deliveryImpact: DeliveryImpactAssessment): SnapshotDeliveryImpactSummary;
|
|
12
14
|
//# sourceMappingURL=snapshots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/core/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,6BAA6B,EAE9B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/core/snapshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,6BAA6B,EAE9B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAIrE,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,oBAAoB,EAChC,QAAQ,EAAE,0BAA0B,GACnC,cAAc,CA2ChB;AAED,wBAAgB,kCAAkC,CAChD,cAAc,EAAE,wBAAwB,GACvC,6BAA6B,CAoB/B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GovernanceCapability } from '../core/index.js';
|
|
1
|
+
import type { GovernanceCapability } from '../core/index.js';
|
|
2
2
|
export interface GovernanceCapabilityRegistry {
|
|
3
3
|
has(id: string): boolean;
|
|
4
4
|
get<TData = unknown>(id: string): GovernanceCapability<TData> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GovernanceProfile, GovernanceWorkspace, Measurement, Violation } from '../core/index.js';
|
|
2
|
-
import { GovernanceSignal } from '../core/signals.js';
|
|
3
|
-
import { GovernanceCapabilityRegistry } from './capabilities.js';
|
|
1
|
+
import type { GovernanceProfile, GovernanceWorkspace, Measurement, Violation } from '../core/index.js';
|
|
2
|
+
import type { GovernanceSignal } from '../core/signals.js';
|
|
3
|
+
import type { GovernanceCapabilityRegistry } from './capabilities.js';
|
|
4
4
|
export interface GovernanceExtensionHostContext {
|
|
5
5
|
workspaceRoot: string;
|
|
6
6
|
profileName: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GovernanceWorkspace, Measurement, Violation } from '../core/index.js';
|
|
2
|
-
import { GovernanceSignal } from '../core/signals.js';
|
|
3
|
-
import { GovernanceExtensionDefinition, GovernanceExtensionHost as GovernanceExtensionHostContract, GovernanceExtensionHostContext, GovernanceMetricProvider, GovernanceMetricProviderInput, GovernanceExtensionRulePack, GovernanceRulePackInput, GovernanceSignalProvider, GovernanceSignalProviderInput, GovernanceWorkspaceEnricher, GovernanceWorkspaceEnricherInput } from './contracts.js';
|
|
4
|
-
import { GovernanceExtensionDiagnostic } from './diagnostics.js';
|
|
1
|
+
import type { GovernanceWorkspace, Measurement, Violation } from '../core/index.js';
|
|
2
|
+
import type { GovernanceSignal } from '../core/signals.js';
|
|
3
|
+
import type { GovernanceExtensionDefinition, GovernanceExtensionHost as GovernanceExtensionHostContract, GovernanceExtensionHostContext, GovernanceMetricProvider, GovernanceMetricProviderInput, GovernanceExtensionRulePack, GovernanceRulePackInput, GovernanceSignalProvider, GovernanceSignalProviderInput, GovernanceWorkspaceEnricher, GovernanceWorkspaceEnricherInput } from './contracts.js';
|
|
4
|
+
import type { GovernanceExtensionDiagnostic } from './diagnostics.js';
|
|
5
5
|
interface RegisteredGovernanceContribution<T> {
|
|
6
6
|
pluginId: string;
|
|
7
7
|
contribution: T;
|