@scoutflo/topology-contracts 0.7.27 → 0.8.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/README.md +47 -0
- package/dist/src/correlation/connectionContractV1.d.ts +48 -100
- package/dist/src/correlation/connectionContractV1.js +3 -75
- package/dist/src/correlation/connectionContractV1.js.map +1 -1
- package/dist/src/correlation/contracts/authoring.d.ts +1 -1
- package/dist/src/correlation/contracts/authoring.js +5 -16
- package/dist/src/correlation/contracts/authoring.js.map +1 -1
- package/dist/src/correlation/contracts/families/index.d.ts +31 -39
- package/dist/src/correlation/contracts/families/integrations/index.d.ts +31 -39
- package/dist/src/correlation/contracts/families/integrations/index.js +36 -39
- package/dist/src/correlation/contracts/families/integrations/index.js.map +1 -1
- package/dist/src/correlation/contracts/registry.d.ts +31 -39
- package/dist/test/contracts.test.js +43 -59
- package/dist/test/contracts.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,53 @@ This package owns:
|
|
|
11
11
|
- topology correlation rule metadata and candidate DTO schemas;
|
|
12
12
|
- topology correlation contract endpoint, relation-class, family, and contract-key vocabulary;
|
|
13
13
|
- Gateway/Mongo-aligned topology resource and relation vocabulary constants useful at contract boundaries.
|
|
14
|
+
- the bounded, schema-validated Gateway-to-Voyager `alertContext.topologyContext` DTO.
|
|
15
|
+
|
|
16
|
+
## Gateway alert topology context
|
|
17
|
+
|
|
18
|
+
`topologySlice` is the canonical topology reconstruction whenever it is present. When it is absent,
|
|
19
|
+
legacy projections remain the compatibility fallback. The legacy
|
|
20
|
+
`investigationContext.investigationResources` and `investigationContext.relatedServices` fields
|
|
21
|
+
remain parseable for compatibility, but are deprecated derived projections and must not override
|
|
22
|
+
or be merged back into `topologySlice`. Parsed legacy v1 payloads receive explicit `compatibility`
|
|
23
|
+
metadata expressing that rule.
|
|
24
|
+
|
|
25
|
+
All context input passes an iterative preflight before recursive parsing: maximum depth 12, maximum
|
|
26
|
+
1,000 object/array nodes, maximum 1 MiB aggregate key/string content, and bounded map keys. Opaque
|
|
27
|
+
legacy records remain extensible only inside that aggregate budget.
|
|
28
|
+
|
|
29
|
+
For untrusted recursive input, use `gatewayTopologyContextSchema` or
|
|
30
|
+
`nestedTopologyResponseSchema`. Recursive node/child builders are intentionally not exported.
|
|
31
|
+
|
|
32
|
+
`candidateTargets` is a read-only transport projection of the authoritative
|
|
33
|
+
`alertCorrelationCandidate`, not a second authoring model. It retains `displayName` for existing
|
|
34
|
+
consumers and carries only correlation identity, confidence, bounded normalized evidence, and the
|
|
35
|
+
same machine-readable reason-code semantics. Runtime discovery and provider behavior do not belong
|
|
36
|
+
in this DTO. Typed `diagnostics`
|
|
37
|
+
reports evidence and topology-slice availability/truncation; a producer may not claim truncation
|
|
38
|
+
without reporting omitted evidence or a bounded truncation reason.
|
|
39
|
+
|
|
40
|
+
Existing `confidence` remains the backward-compatible decile score (current payloads use values
|
|
41
|
+
such as 9). Producers that expose normalized confidence use `normalizedConfidence`, which is
|
|
42
|
+
strictly bounded to 0..1; consumers must not silently reinterpret the legacy scale.
|
|
43
|
+
|
|
44
|
+
Release order for this contract is: publish `@scoutflo/topology-contracts`, update and publish
|
|
45
|
+
`@scoutflo/alert-correlation` against that registry version, then update Gateway (producer) and
|
|
46
|
+
Voyager (consumer). Consumers must not use `file:` dependencies. Gateway should validate the
|
|
47
|
+
outbound field before Voyager makes it authoritative.
|
|
48
|
+
|
|
49
|
+
## Runtime container provenance
|
|
50
|
+
|
|
51
|
+
`runtime.container-provenance.v1` is a separate immutable evidence DTO shared by Kubernetes and
|
|
52
|
+
Gateway. It preserves requested image, observed runtime image/image ID/digest, and pod-metadata
|
|
53
|
+
source claims as distinct trust domains. `claimed_source.status` is only `unverified` or
|
|
54
|
+
`unavailable`; an Argo target revision, image tag, or pod annotation is never promoted to verified
|
|
55
|
+
runtime identity. Containers are bounded to 128 and must be deterministically sorted by regular,
|
|
56
|
+
init, then ephemeral kind and name before truncation. Equal names in different kinds remain distinct.
|
|
57
|
+
For compatibility, parsing supplies the v1 version when an older K8s payload omits it and accepts a
|
|
58
|
+
missing `containers_omitted`; new K8s producers must emit both before this is treated as their
|
|
59
|
+
validated shared wire format. Digests are lowercase `sha256`, `sha384`, or `sha512` with exact hex
|
|
60
|
+
lengths. Every unavailable, unverified, unknown, or inconsistent state carries a bounded reason.
|
|
14
61
|
|
|
15
62
|
Canonical topology resource and relation constants mirror stable persisted Scoutflo ontology values. Source-sync family constants remain separate and may use provider/source-specific family names such as AWS scan families.
|
|
16
63
|
|