@neat.is/types 0.10.7-dev.20261011 → 0.10.7-dev.20261012
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.cjs +84 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3879 -843
- package/dist/index.d.ts +3879 -843
- package/dist/index.js +79 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
DEFAULT_EXTRACTED_PRECISION_FLOOR: () => DEFAULT_EXTRACTED_PRECISION_FLOOR,
|
|
49
49
|
DaemonHealthResponseSchema: () => DaemonHealthResponseSchema,
|
|
50
50
|
DatabaseNodeSchema: () => DatabaseNodeSchema,
|
|
51
|
+
DeployContextSchema: () => DeployContextSchema,
|
|
51
52
|
DeployMismatchDivergenceSchema: () => DeployMismatchDivergenceSchema,
|
|
52
53
|
DeployMismatchKindSchema: () => DeployMismatchKindSchema,
|
|
53
54
|
DiscoveredViaSchema: () => DiscoveredViaSchema,
|
|
@@ -68,6 +69,9 @@ __export(index_exports, {
|
|
|
68
69
|
ExtractionCoverageSchema: () => ExtractionCoverageSchema,
|
|
69
70
|
FieldGuardRuleSchema: () => FieldGuardRuleSchema,
|
|
70
71
|
FileNodeSchema: () => FileNodeSchema,
|
|
72
|
+
FlagAttrSchema: () => FlagAttrSchema,
|
|
73
|
+
FlagDefinitionSchema: () => FlagDefinitionSchema,
|
|
74
|
+
FlagMismatchDivergenceSchema: () => FlagMismatchDivergenceSchema,
|
|
71
75
|
FrontierNodeSchema: () => FrontierNodeSchema,
|
|
72
76
|
GraphDiffResultSchema: () => GraphDiffResultSchema,
|
|
73
77
|
GraphEdgeSchema: () => GraphEdgeSchema,
|
|
@@ -107,6 +111,7 @@ __export(index_exports, {
|
|
|
107
111
|
NodeType: () => NodeType,
|
|
108
112
|
NodeTypeSchema: () => NodeTypeSchema,
|
|
109
113
|
ObservedDependenciesResultSchema: () => ObservedDependenciesResultSchema,
|
|
114
|
+
ObservedDeployContextSchema: () => ObservedDeployContextSchema,
|
|
110
115
|
ObservedFailingDivergenceSchema: () => ObservedFailingDivergenceSchema,
|
|
111
116
|
ObservedFailureKindSchema: () => ObservedFailureKindSchema,
|
|
112
117
|
ObservedSymbolMismatchDivergenceSchema: () => ObservedSymbolMismatchDivergenceSchema,
|
|
@@ -450,6 +455,27 @@ var GraphEdgeSchema = import_zod2.z.object({
|
|
|
450
455
|
});
|
|
451
456
|
|
|
452
457
|
// src/nodes.ts
|
|
458
|
+
var DeployContextSchema = import_zod3.z.object({
|
|
459
|
+
// The deploy fault classification: crash-loop / image-pull / scaled-to-zero /
|
|
460
|
+
// no-ready-replicas.
|
|
461
|
+
fault: import_zod3.z.string().optional(),
|
|
462
|
+
// The container's waiting reason (CrashLoopBackOff / ImagePullBackOff / …).
|
|
463
|
+
waitingReason: import_zod3.z.string().optional(),
|
|
464
|
+
image: import_zod3.z.string().optional(),
|
|
465
|
+
restartCount: import_zod3.z.number().int().nonnegative().optional(),
|
|
466
|
+
terminatedReason: import_zod3.z.string().optional(),
|
|
467
|
+
exitCode: import_zod3.z.number().int().optional(),
|
|
468
|
+
// Redacted, bounded descriptors (ADR-237): a secret-keyed value is masked whole,
|
|
469
|
+
// a valueFrom is a reference descriptor, never a raw secret.
|
|
470
|
+
containerEnv: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
471
|
+
containerArgs: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
472
|
+
// The last-terminated (or current, ADR-239) stdout tail — the boot traceback.
|
|
473
|
+
processLog: import_zod3.z.string().optional()
|
|
474
|
+
});
|
|
475
|
+
var ObservedDeployContextSchema = DeployContextSchema.extend({
|
|
476
|
+
incidentId: import_zod3.z.string(),
|
|
477
|
+
observedAt: import_zod3.z.string()
|
|
478
|
+
});
|
|
453
479
|
var CompatibleDriverSchema = import_zod3.z.object({
|
|
454
480
|
name: import_zod3.z.string(),
|
|
455
481
|
minVersion: import_zod3.z.string()
|
|
@@ -504,6 +530,11 @@ var ServiceNodeSchema = import_zod3.z.object({
|
|
|
504
530
|
// (ADR-031, ADR-225), absent on a non-k8s service.
|
|
505
531
|
observedImage: import_zod3.z.string().optional(),
|
|
506
532
|
observedReadyReplicas: import_zod3.z.number().optional(),
|
|
533
|
+
// The faulted workload's observed deploy/process/config context, fused here at
|
|
534
|
+
// ingest by the k8s observed reader (ADR-243, amending ADR-237/240). The one copy:
|
|
535
|
+
// the incident card, `neat incidents` and MCP read it from this node. Optional
|
|
536
|
+
// growth (ADR-031), absent on a non-k8s or healthy service.
|
|
537
|
+
observedDeployContext: ObservedDeployContextSchema.optional(),
|
|
507
538
|
repoPath: import_zod3.z.string().optional(),
|
|
508
539
|
owner: import_zod3.z.string().optional(),
|
|
509
540
|
dependencies: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.string()).optional(),
|
|
@@ -588,6 +619,28 @@ var ColumnAttrSchema = import_zod3.z.object({
|
|
|
588
619
|
// (`kind` is an open string); folded by `foldSdkWrites`, never `foldColumns`.
|
|
589
620
|
sdkWrites: import_zod3.z.array(import_zod3.z.enum(["client", "admin"])).optional()
|
|
590
621
|
});
|
|
622
|
+
var FlagDefinitionSchema = import_zod3.z.object({
|
|
623
|
+
state: import_zod3.z.string(),
|
|
624
|
+
defaultVariant: import_zod3.z.string().nullable(),
|
|
625
|
+
variants: import_zod3.z.record(import_zod3.z.unknown()),
|
|
626
|
+
targeting: import_zod3.z.unknown().optional()
|
|
627
|
+
});
|
|
628
|
+
var FlagAttrSchema = import_zod3.z.object({
|
|
629
|
+
key: import_zod3.z.string(),
|
|
630
|
+
provenances: import_zod3.z.array(ProvenanceSchema),
|
|
631
|
+
declared: FlagDefinitionSchema.optional(),
|
|
632
|
+
// The flag file the declaration came from, relative to the scan root.
|
|
633
|
+
declaredIn: import_zod3.z.string().optional(),
|
|
634
|
+
observed: FlagDefinitionSchema.optional(),
|
|
635
|
+
observedAt: import_zod3.z.string().optional(),
|
|
636
|
+
observedVariant: import_zod3.z.string().optional(),
|
|
637
|
+
// The OpenFeature resolution reason that came with it (STATIC, DEFAULT,
|
|
638
|
+
// TARGETING_MATCH, SPLIT, ERROR...). A targeted variant is the flag working as
|
|
639
|
+
// committed, so only a STATIC/DEFAULT resolution is compared to the default.
|
|
640
|
+
observedVariantReason: import_zod3.z.string().optional(),
|
|
641
|
+
observedVariantAt: import_zod3.z.string().optional(),
|
|
642
|
+
readers: import_zod3.z.array(import_zod3.z.object({ file: import_zod3.z.string(), service: import_zod3.z.string(), line: import_zod3.z.number().int().optional() })).optional()
|
|
643
|
+
});
|
|
591
644
|
var InfraNodeSchema = import_zod3.z.object({
|
|
592
645
|
id: import_zod3.z.string(),
|
|
593
646
|
type: import_zod3.z.literal(NodeType.InfraNode),
|
|
@@ -618,7 +671,10 @@ var InfraNodeSchema = import_zod3.z.object({
|
|
|
618
671
|
// carry the same declared facts on the topology node for traversal/blast-radius.
|
|
619
672
|
image: import_zod3.z.string().optional(),
|
|
620
673
|
replicas: import_zod3.z.number().optional(),
|
|
621
|
-
namespace: import_zod3.z.string().optional()
|
|
674
|
+
namespace: import_zod3.z.string().optional(),
|
|
675
|
+
// The flag grain on a `flag-store` InfraNode (ADR-242), one entry per flag key.
|
|
676
|
+
// Absent on every other InfraNode. Optional growth (ADR-031).
|
|
677
|
+
flags: import_zod3.z.array(FlagAttrSchema).optional()
|
|
622
678
|
});
|
|
623
679
|
var FrontierNodeSchema = import_zod3.z.object({
|
|
624
680
|
id: import_zod3.z.string(),
|
|
@@ -1154,32 +1210,18 @@ var IncidentGradeSchema = import_zod6.z.object({
|
|
|
1154
1210
|
urgency: import_zod6.z.object({ value: import_zod6.z.number().min(0).max(1).nullable(), reason: import_zod6.z.string().optional() }),
|
|
1155
1211
|
priorsVersion: import_zod6.z.string()
|
|
1156
1212
|
});
|
|
1157
|
-
var IncidentDeployContextSchema =
|
|
1158
|
-
// The deploy fault classification (k8s.fault): crash-loop / image-pull /
|
|
1159
|
-
// scaled-to-zero / no-ready-replicas.
|
|
1160
|
-
fault: import_zod6.z.string().optional(),
|
|
1161
|
-
// The container's waiting reason (CrashLoopBackOff / ImagePullBackOff / …).
|
|
1162
|
-
waitingReason: import_zod6.z.string().optional(),
|
|
1163
|
-
image: import_zod6.z.string().optional(),
|
|
1164
|
-
restartCount: import_zod6.z.number().int().nonnegative().optional(),
|
|
1165
|
-
terminatedReason: import_zod6.z.string().optional(),
|
|
1166
|
-
exitCode: import_zod6.z.number().int().optional(),
|
|
1167
|
-
// Redacted, bounded descriptors (ADR-237): a secret-keyed value is masked whole,
|
|
1168
|
-
// a valueFrom is a reference descriptor, never a raw secret.
|
|
1169
|
-
containerEnv: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1170
|
-
containerArgs: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1171
|
-
// The last-terminated (or current, ADR-239) stdout tail — the boot traceback.
|
|
1172
|
-
processLog: import_zod6.z.string().optional()
|
|
1173
|
-
});
|
|
1213
|
+
var IncidentDeployContextSchema = DeployContextSchema;
|
|
1174
1214
|
var IncidentCardSchema = import_zod6.z.object({
|
|
1175
1215
|
kind: import_zod6.z.literal("incident"),
|
|
1176
|
-
id: import_zod6.z.string(),
|
|
1216
|
+
id: import_zod6.z.string().nullable(),
|
|
1177
1217
|
// ISO8601 — the incident's own time.
|
|
1178
|
-
at: import_zod6.z.string(),
|
|
1179
|
-
incidentKind: IncidentKindSchema,
|
|
1180
|
-
service: import_zod6.z.string(),
|
|
1218
|
+
at: import_zod6.z.string().nullable(),
|
|
1219
|
+
incidentKind: IncidentKindSchema.nullable(),
|
|
1220
|
+
service: import_zod6.z.string().nullable(),
|
|
1181
1221
|
affectedNode: import_zod6.z.string(),
|
|
1182
|
-
message: import_zod6.z.string(),
|
|
1222
|
+
message: import_zod6.z.string().nullable(),
|
|
1223
|
+
// Present only on a card composed for a node with no recorded incident.
|
|
1224
|
+
noIncident: import_zod6.z.object({ reason: import_zod6.z.string() }).optional(),
|
|
1183
1225
|
exceptionType: import_zod6.z.string().optional(),
|
|
1184
1226
|
httpStatusCode: import_zod6.z.number().int().optional(),
|
|
1185
1227
|
// Coalesced burst size (ErrorEvent.incidentCount).
|
|
@@ -1743,6 +1785,16 @@ var DeployMismatchDivergenceSchema = import_zod9.z.object({
|
|
|
1743
1785
|
declaredReplicas: import_zod9.z.number().optional(),
|
|
1744
1786
|
observedReplicas: import_zod9.z.number().optional()
|
|
1745
1787
|
});
|
|
1788
|
+
var FlagMismatchDivergenceSchema = import_zod9.z.object({
|
|
1789
|
+
type: import_zod9.z.literal("flag-mismatch"),
|
|
1790
|
+
...commonFields,
|
|
1791
|
+
flagKey: import_zod9.z.string(),
|
|
1792
|
+
changed: import_zod9.z.array(import_zod9.z.string()),
|
|
1793
|
+
declaredVariant: import_zod9.z.string().nullable().optional(),
|
|
1794
|
+
observedVariant: import_zod9.z.string().nullable().optional(),
|
|
1795
|
+
// The code locations that read the key in the source service (`file:line`).
|
|
1796
|
+
readers: import_zod9.z.array(import_zod9.z.string()).optional()
|
|
1797
|
+
});
|
|
1746
1798
|
var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
|
|
1747
1799
|
MissingObservedDivergenceSchema,
|
|
1748
1800
|
MissingExtractedDivergenceSchema,
|
|
@@ -1751,7 +1803,8 @@ var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
|
|
|
1751
1803
|
CompatViolationDivergenceSchema,
|
|
1752
1804
|
ObservedSymbolMismatchDivergenceSchema,
|
|
1753
1805
|
ObservedFailingDivergenceSchema,
|
|
1754
|
-
DeployMismatchDivergenceSchema
|
|
1806
|
+
DeployMismatchDivergenceSchema,
|
|
1807
|
+
FlagMismatchDivergenceSchema
|
|
1755
1808
|
]);
|
|
1756
1809
|
var DivergenceResultSchema = import_zod9.z.object({
|
|
1757
1810
|
divergences: import_zod9.z.array(DivergenceSchema),
|
|
@@ -1768,7 +1821,8 @@ var DivergenceTypeSchema = import_zod9.z.enum([
|
|
|
1768
1821
|
"compat-violation",
|
|
1769
1822
|
"observed-symbol-mismatch",
|
|
1770
1823
|
"observed-failing",
|
|
1771
|
-
"deploy-mismatch"
|
|
1824
|
+
"deploy-mismatch",
|
|
1825
|
+
"flag-mismatch"
|
|
1772
1826
|
]);
|
|
1773
1827
|
|
|
1774
1828
|
// src/mcp-tools.ts
|
|
@@ -2051,6 +2105,7 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2051
2105
|
DEFAULT_EXTRACTED_PRECISION_FLOOR,
|
|
2052
2106
|
DaemonHealthResponseSchema,
|
|
2053
2107
|
DatabaseNodeSchema,
|
|
2108
|
+
DeployContextSchema,
|
|
2054
2109
|
DeployMismatchDivergenceSchema,
|
|
2055
2110
|
DeployMismatchKindSchema,
|
|
2056
2111
|
DiscoveredViaSchema,
|
|
@@ -2071,6 +2126,9 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2071
2126
|
ExtractionCoverageSchema,
|
|
2072
2127
|
FieldGuardRuleSchema,
|
|
2073
2128
|
FileNodeSchema,
|
|
2129
|
+
FlagAttrSchema,
|
|
2130
|
+
FlagDefinitionSchema,
|
|
2131
|
+
FlagMismatchDivergenceSchema,
|
|
2074
2132
|
FrontierNodeSchema,
|
|
2075
2133
|
GraphDiffResultSchema,
|
|
2076
2134
|
GraphEdgeSchema,
|
|
@@ -2110,6 +2168,7 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2110
2168
|
NodeType,
|
|
2111
2169
|
NodeTypeSchema,
|
|
2112
2170
|
ObservedDependenciesResultSchema,
|
|
2171
|
+
ObservedDeployContextSchema,
|
|
2113
2172
|
ObservedFailingDivergenceSchema,
|
|
2114
2173
|
ObservedFailureKindSchema,
|
|
2115
2174
|
ObservedSymbolMismatchDivergenceSchema,
|