@scoutflo/alert-correlation 0.3.0 → 0.4.1

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 CHANGED
@@ -14,7 +14,13 @@ This package consumes core entity, fact, and status primitives where safe. It al
14
14
 
15
15
  ## Version
16
16
 
17
- Current package version: `0.2.1`.
17
+ Current package version: `0.4.0`.
18
+
19
+ `0.4.0` exact-pins `@scoutflo/correlation-core@0.2.0` and re-exports
20
+ the new core contract framework surface. The matcher-coupled
21
+ `CorrelationCandidate` / `CorrelationEvidence` / `AlertCorrelationDecision`
22
+ legacy shapes are intentionally unchanged until the contract-driven matcher
23
+ work.
18
24
 
19
25
  Gateway and Voyager should consume the exact published version:
20
26
 
@@ -1,4 +1,5 @@
1
1
  import type { CorrelationEntityRef, CorrelationEntityType } from '@scoutflo/correlation-core';
2
+ import type { TopologyCorrelationContractKey, TopologyCorrelationContractVersion } from '@scoutflo/topology-contracts';
2
3
  export type { CorrelationEntityType };
3
4
  export type CorrelationTopologyEntityRef = CorrelationEntityRef;
4
5
  export interface CorrelationService {
@@ -25,7 +26,14 @@ export interface CorrelationRelationship {
25
26
  from: CorrelationTopologyEntityRef;
26
27
  to: CorrelationTopologyEntityRef;
27
28
  attributeSchemaKey?: string;
29
+ attribute_schema_key?: string;
30
+ correlationContractKey?: TopologyCorrelationContractKey;
31
+ correlationContractVersion?: TopologyCorrelationContractVersion;
32
+ correlation_contract_key?: TopologyCorrelationContractKey;
33
+ correlation_contract_version?: TopologyCorrelationContractVersion;
28
34
  attributes?: Record<string, unknown>;
35
+ sourceAttributes?: Record<string, unknown>;
36
+ source_attributes?: Record<string, unknown>;
29
37
  }
30
38
  export interface TopologyCandidateInput {
31
39
  sourceResource: CorrelationTopologyResource | null;
@@ -0,0 +1,5 @@
1
+ import type { CorrelationCandidate as CoreCorrelationCandidate, CorrelationDecision as CoreCorrelationDecision, CorrelationEvidence as CoreCorrelationEvidence } from '@scoutflo/correlation-core';
2
+ import type { AlertCorrelationDecision, CorrelationCandidate, CorrelationEvidence } from '../contracts/decision';
3
+ export declare function legacyEvidenceToCoreEvidence(evidence: CorrelationEvidence): CoreCorrelationEvidence;
4
+ export declare function legacyCandidateToCoreCandidate(candidate: CorrelationCandidate): CoreCorrelationCandidate;
5
+ export declare function legacyDecisionToCoreDecision(decision: AlertCorrelationDecision): CoreCorrelationDecision;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.legacyEvidenceToCoreEvidence = legacyEvidenceToCoreEvidence;
4
+ exports.legacyCandidateToCoreCandidate = legacyCandidateToCoreCandidate;
5
+ exports.legacyDecisionToCoreDecision = legacyDecisionToCoreDecision;
6
+ const CORE_STATUS_BY_LEGACY_STATUS = {
7
+ resolved: 'resolved',
8
+ ambiguous: 'ambiguous',
9
+ degraded: 'degraded',
10
+ unresolved: 'unresolved',
11
+ evidence_available_topology_missing: 'degraded',
12
+ insufficient_evidence: 'unresolved',
13
+ };
14
+ function factFromLegacyEvidence(evidence) {
15
+ if (!evidence.factKey || evidence.factValue === undefined) {
16
+ return undefined;
17
+ }
18
+ return [
19
+ {
20
+ key: evidence.factKey,
21
+ value: evidence.factValue,
22
+ sourcePath: `legacy_alert_correlation.${evidence.kind}.${evidence.factKey}`,
23
+ confidence: 1,
24
+ kind: evidence.kind === 'raw_alert_field' ? 'text_derived' : 'resource_hint',
25
+ },
26
+ ];
27
+ }
28
+ function legacyEvidenceToCoreEvidence(evidence) {
29
+ return {
30
+ type: evidence.kind,
31
+ ref: evidence.relationshipId ?? `legacy_alert_correlation:${evidence.kind}`,
32
+ summary: evidence.reason,
33
+ facts: factFromLegacyEvidence(evidence),
34
+ };
35
+ }
36
+ function legacyCandidateToCoreCandidate(candidate) {
37
+ return {
38
+ target: candidate.target,
39
+ score: candidate.confidence,
40
+ evidence: candidate.evidence.map(legacyEvidenceToCoreEvidence),
41
+ reasonCodes: candidate.reasonCodes,
42
+ };
43
+ }
44
+ function legacyDecisionToCoreDecision(decision) {
45
+ return {
46
+ status: CORE_STATUS_BY_LEGACY_STATUS[decision.status],
47
+ target: decision.target,
48
+ candidates: decision.candidates.map(legacyCandidateToCoreCandidate),
49
+ evidence: decision.evidence.map(legacyEvidenceToCoreEvidence),
50
+ confidence: decision.confidence,
51
+ reasonCodes: decision.reasonCodes,
52
+ };
53
+ }
54
+ //# sourceMappingURL=coreCompatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coreCompatibility.js","sourceRoot":"","sources":["../../../src/decision/coreCompatibility.ts"],"names":[],"mappings":";;AAuCA,oEASC;AAED,wEASC;AAED,oEAWC;AA1DD,MAAM,4BAA4B,GAAqD;IACrF,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,mCAAmC,EAAE,UAAU;IAC/C,qBAAqB,EAAE,YAAY;CACpC,CAAC;AAEF,SAAS,sBAAsB,CAAC,QAA6B;IAC3D,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL;YACE,GAAG,EAAE,QAAQ,CAAC,OAAO;YACrB,KAAK,EAAE,QAAQ,CAAC,SAAS;YACzB,UAAU,EAAE,4BAA4B,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,EAAE;YAC3E,UAAU,EAAE,CAAC;YACb,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe;SAC7E;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAC1C,QAA6B;IAE7B,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,GAAG,EAAE,QAAQ,CAAC,cAAc,IAAI,4BAA4B,QAAQ,CAAC,IAAI,EAAE;QAC3E,OAAO,EAAE,QAAQ,CAAC,MAAM;QACxB,KAAK,EAAE,sBAAsB,CAAC,QAAQ,CAAC;KACxC,CAAC;AACJ,CAAC;AAED,SAAgB,8BAA8B,CAC5C,SAA+B;IAE/B,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,KAAK,EAAE,SAAS,CAAC,UAAU;QAC3B,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAA4B,CAAC;QAC9D,WAAW,EAAE,SAAS,CAAC,WAAW;KACnC,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAC1C,QAAkC;IAElC,OAAO;QACL,MAAM,EAAE,4BAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC;QACrD,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,8BAA8B,CAAC;QACnE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAA4B,CAAC;QAC7D,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,WAAW,EAAE,QAAQ,CAAC,WAAW;KAClC,CAAC;AACJ,CAAC"}
@@ -1,5 +1,9 @@
1
1
  export declare const ALERT_CORRELATION_PACKAGE = "@scoutflo/alert-correlation";
2
2
  export * as correlationCore from '@scoutflo/correlation-core';
3
+ export { confidenceSchema, correlationEvidenceSchema, correlationFactSchema, createCorrelationContractRegistry, CorrelationContractRegistry, } from '@scoutflo/correlation-core';
4
+ export { connectionContractRef, getConnectionContract, listActiveConnectionContracts, listConnectionContracts, topologyCorrelationContractRefSchema, } from '@scoutflo/topology-contracts';
5
+ export type { Confidence, CorrelationContract, CorrelationFact, CorrelationEvidence as CoreCorrelationEvidence, CorrelationProjector, CorrelationProjectorInput, CorrelationView, EndpointSpec, MatchKey, } from '@scoutflo/correlation-core';
6
+ export type { ConnectionContractMetadata, ConnectionContractRef, TopologyCorrelationContractKey, TopologyCorrelationContractRef, TopologyCorrelationContractVersion, } from '@scoutflo/topology-contracts';
3
7
  export * from './contracts/alertRef';
4
8
  export * from './contracts/alertEvidence';
5
9
  export * from './contracts/facts';
@@ -15,6 +19,7 @@ export * from './extractors/victoriaMetricsExtractor';
15
19
  export * from './extractors/registry';
16
20
  export * from './decision/reasonCodes';
17
21
  export * from './decision/decideTarget';
22
+ export * from './decision/coreCompatibility';
18
23
  export * from './matchers/types';
19
24
  export * from './matchers/providerRelationshipMatcher';
20
25
  export * from './resolveAlertCorrelation';
package/dist/src/index.js CHANGED
@@ -36,9 +36,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.correlationCore = exports.ALERT_CORRELATION_PACKAGE = void 0;
39
+ exports.topologyCorrelationContractRefSchema = exports.listConnectionContracts = exports.listActiveConnectionContracts = exports.getConnectionContract = exports.connectionContractRef = exports.CorrelationContractRegistry = exports.createCorrelationContractRegistry = exports.correlationFactSchema = exports.correlationEvidenceSchema = exports.confidenceSchema = exports.correlationCore = exports.ALERT_CORRELATION_PACKAGE = void 0;
40
40
  exports.ALERT_CORRELATION_PACKAGE = '@scoutflo/alert-correlation';
41
41
  exports.correlationCore = __importStar(require("@scoutflo/correlation-core"));
42
+ var correlation_core_1 = require("@scoutflo/correlation-core");
43
+ Object.defineProperty(exports, "confidenceSchema", { enumerable: true, get: function () { return correlation_core_1.confidenceSchema; } });
44
+ Object.defineProperty(exports, "correlationEvidenceSchema", { enumerable: true, get: function () { return correlation_core_1.correlationEvidenceSchema; } });
45
+ Object.defineProperty(exports, "correlationFactSchema", { enumerable: true, get: function () { return correlation_core_1.correlationFactSchema; } });
46
+ Object.defineProperty(exports, "createCorrelationContractRegistry", { enumerable: true, get: function () { return correlation_core_1.createCorrelationContractRegistry; } });
47
+ Object.defineProperty(exports, "CorrelationContractRegistry", { enumerable: true, get: function () { return correlation_core_1.CorrelationContractRegistry; } });
48
+ var topology_contracts_1 = require("@scoutflo/topology-contracts");
49
+ Object.defineProperty(exports, "connectionContractRef", { enumerable: true, get: function () { return topology_contracts_1.connectionContractRef; } });
50
+ Object.defineProperty(exports, "getConnectionContract", { enumerable: true, get: function () { return topology_contracts_1.getConnectionContract; } });
51
+ Object.defineProperty(exports, "listActiveConnectionContracts", { enumerable: true, get: function () { return topology_contracts_1.listActiveConnectionContracts; } });
52
+ Object.defineProperty(exports, "listConnectionContracts", { enumerable: true, get: function () { return topology_contracts_1.listConnectionContracts; } });
53
+ Object.defineProperty(exports, "topologyCorrelationContractRefSchema", { enumerable: true, get: function () { return topology_contracts_1.topologyCorrelationContractRefSchema; } });
42
54
  __exportStar(require("./contracts/alertRef"), exports);
43
55
  __exportStar(require("./contracts/alertEvidence"), exports);
44
56
  __exportStar(require("./contracts/facts"), exports);
@@ -54,6 +66,7 @@ __exportStar(require("./extractors/victoriaMetricsExtractor"), exports);
54
66
  __exportStar(require("./extractors/registry"), exports);
55
67
  __exportStar(require("./decision/reasonCodes"), exports);
56
68
  __exportStar(require("./decision/decideTarget"), exports);
69
+ __exportStar(require("./decision/coreCompatibility"), exports);
57
70
  __exportStar(require("./matchers/types"), exports);
58
71
  __exportStar(require("./matchers/providerRelationshipMatcher"), exports);
59
72
  __exportStar(require("./resolveAlertCorrelation"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,yBAAyB,GAAG,6BAA6B,CAAC;AAEvE,8EAA8D;AAE9D,uDAAqC;AACrC,4DAA0C;AAC1C,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AACrC,sDAAoC;AACpC,4DAA0C;AAC1C,qDAAmC;AACnC,gEAA8C;AAC9C,mEAAiD;AACjD,+DAA6C;AAC7C,wEAAsD;AACtD,wDAAsC;AACtC,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,yEAAuD;AACvD,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,yBAAyB,GAAG,6BAA6B,CAAC;AAEvE,8EAA8D;AAC9D,+DAMoC;AALlC,oHAAA,gBAAgB,OAAA;AAChB,6HAAA,yBAAyB,OAAA;AACzB,yHAAA,qBAAqB,OAAA;AACrB,qIAAA,iCAAiC,OAAA;AACjC,+HAAA,2BAA2B,OAAA;AAE7B,mEAMsC;AALpC,2HAAA,qBAAqB,OAAA;AACrB,2HAAA,qBAAqB,OAAA;AACrB,mIAAA,6BAA6B,OAAA;AAC7B,6HAAA,uBAAuB,OAAA;AACvB,0IAAA,oCAAoC,OAAA;AAqBtC,uDAAqC;AACrC,4DAA0C;AAC1C,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AACrC,sDAAoC;AACpC,4DAA0C;AAC1C,qDAAmC;AACnC,gEAA8C;AAC9C,mEAAiD;AACjD,+DAA6C;AAC7C,wEAAsD;AACtD,wDAAsC;AACtC,yDAAuC;AACvC,0DAAwC;AACxC,+DAA6C;AAC7C,mDAAiC;AACjC,yEAAuD;AACvD,4DAA0C"}
@@ -47,4 +47,100 @@ const src_1 = require("../src");
47
47
  strict_1.default.equal(decision.confidence, 10);
48
48
  strict_1.default.deepEqual(decision.target, { type: 'service', id: 'svc-checkout' });
49
49
  });
50
+ (0, node_test_1.default)('re-exports the new core contract surface without changing matcher-coupled decisions', () => {
51
+ const projector = ({ attributes }) => ({
52
+ contract_key: 'k8s_workload_monitored_by_prometheus_compatible',
53
+ contract_version: 'v1',
54
+ workload_name: attributes.workload_name,
55
+ });
56
+ const contract = {
57
+ contract_key: 'k8s_workload_monitored_by_prometheus_compatible',
58
+ contract_version: 'v1',
59
+ relation: 'MONITORED_BY',
60
+ relation_class: 'associative',
61
+ source_endpoint: { entity_type: 'resource', resource_type: 'kubernetes_deployment' },
62
+ target_endpoint: { entity_type: 'service' },
63
+ project: projector,
64
+ };
65
+ const registry = (0, src_1.createCorrelationContractRegistry)();
66
+ registry.register(contract);
67
+ const fact = src_1.correlationFactSchema.parse({
68
+ key: 'namespace',
69
+ value: 'prod-demo',
70
+ namespace: 'kubernetes',
71
+ provider: 'prometheus',
72
+ sourcePath: 'labels.namespace',
73
+ confidence: 1,
74
+ kind: 'label',
75
+ });
76
+ const evidence = src_1.correlationEvidenceSchema.parse({
77
+ type: 'relationship_attribute',
78
+ ref: 'rel-1',
79
+ provider: 'prometheus',
80
+ observedAt: '2026-06-20T08:30:00.000Z',
81
+ facts: [fact],
82
+ });
83
+ strict_1.default.equal(registry.get(contract.contract_key, contract.contract_version), contract);
84
+ strict_1.default.equal(fact.namespace, 'kubernetes');
85
+ strict_1.default.equal(evidence.provider, 'prometheus');
86
+ });
87
+ (0, node_test_1.default)('correlation relationships can transport connection contract refs and source attributes', () => {
88
+ const relationship = {
89
+ id: 'rel-1',
90
+ relation: 'SENDS_METRICS_TO',
91
+ from: { type: 'service', id: 'svc-checkout' },
92
+ to: { type: 'resource', id: 'res-prometheus' },
93
+ attributeSchemaKey: 'monitoring.prometheus',
94
+ attribute_schema_key: 'monitoring.prometheus',
95
+ correlationContractKey: 'k8s_workload_sends_metrics_to_prometheus_compatible',
96
+ correlationContractVersion: 'v1',
97
+ correlation_contract_key: 'k8s_workload_sends_metrics_to_prometheus_compatible',
98
+ correlation_contract_version: 'v1',
99
+ attributes: { workload_name: 'checkout' },
100
+ sourceAttributes: {
101
+ prometheus: { serviceLabel: 'checkout' },
102
+ },
103
+ source_attributes: {
104
+ prometheus: { serviceLabel: 'checkout' },
105
+ },
106
+ };
107
+ strict_1.default.deepEqual(src_1.topologyCorrelationContractRefSchema.parse({
108
+ correlation_contract_key: relationship.correlation_contract_key,
109
+ correlation_contract_version: relationship.correlation_contract_version,
110
+ }), {
111
+ correlation_contract_key: 'k8s_workload_sends_metrics_to_prometheus_compatible',
112
+ correlation_contract_version: 'v1',
113
+ });
114
+ });
115
+ (0, node_test_1.default)('legacy alert candidates and decisions can be converted to core schemas', () => {
116
+ const candidate = {
117
+ target: { type: 'service', id: 'svc-checkout' },
118
+ name: 'checkout',
119
+ confidence: 12,
120
+ evidence: [
121
+ {
122
+ kind: 'relationship_attribute',
123
+ factKey: 'deployment',
124
+ factValue: 'checkout',
125
+ relationshipId: 'rel-1',
126
+ reason: 'deployment exact match',
127
+ },
128
+ ],
129
+ reasonCodes: ['relationship_attribute_match'],
130
+ };
131
+ const decision = {
132
+ status: 'resolved',
133
+ target: candidate.target,
134
+ candidates: [candidate],
135
+ evidence: candidate.evidence,
136
+ confidence: candidate.confidence,
137
+ reasonCodes: candidate.reasonCodes,
138
+ };
139
+ const coreCandidate = src_1.correlationCore.correlationCandidateSchema.parse((0, src_1.legacyCandidateToCoreCandidate)(candidate));
140
+ const coreDecision = src_1.correlationCore.correlationDecisionSchema.parse((0, src_1.legacyDecisionToCoreDecision)(decision));
141
+ strict_1.default.equal(coreCandidate.score, 12);
142
+ strict_1.default.equal(coreCandidate.evidence[0]?.type, 'relationship_attribute');
143
+ strict_1.default.equal(coreDecision.status, 'resolved');
144
+ strict_1.default.equal(coreDecision.candidates[0]?.score, 12);
145
+ });
50
146
  //# sourceMappingURL=core-compatibility.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-compatibility.test.js","sourceRoot":"","sources":["../../test/core-compatibility.test.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AACxC,0DAA6B;AAC7B,gCAOgB;AAEhB,IAAA,mBAAI,EAAC,yCAAyC,EAAE,GAAG,EAAE;IACnD,MAAM,IAAI,GAAS;QACjB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,GAAG;Q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C,yBAAyB,CAAC,KAAK,CAClE,IAAA,kCAA4B,EAAC,QAAQ,CAAC,CACvC,CAAC;IAEF,gBAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtC,gBAAM,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;IACxE,gBAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9C,gBAAM,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scoutflo/alert-correlation",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Pure alert-to-topology correlation contracts and policies for Scoutflo alert investigation workflows.",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -19,7 +19,8 @@
19
19
  "author": "Scoutflo",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@scoutflo/correlation-core": "0.1.0",
22
+ "@scoutflo/correlation-core": "0.2.0",
23
+ "@scoutflo/topology-contracts": "0.7.8",
23
24
  "zod": "^3.23.8"
24
25
  },
25
26
  "devDependencies": {