@neat.is/types 0.10.6 → 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 +93 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4087 -918
- package/dist/index.d.ts +4087 -918
- package/dist/index.js +87 -8
- 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,
|
|
@@ -82,6 +86,7 @@ __export(index_exports, {
|
|
|
82
86
|
IncidentBlastRadiusSchema: () => IncidentBlastRadiusSchema,
|
|
83
87
|
IncidentCardSchema: () => IncidentCardSchema,
|
|
84
88
|
IncidentChainHopSchema: () => IncidentChainHopSchema,
|
|
89
|
+
IncidentDeployContextSchema: () => IncidentDeployContextSchema,
|
|
85
90
|
IncidentDivergenceSchema: () => IncidentDivergenceSchema,
|
|
86
91
|
IncidentEventPayloadSchema: () => IncidentEventPayloadSchema,
|
|
87
92
|
IncidentGradeBandSchema: () => IncidentGradeBandSchema,
|
|
@@ -106,6 +111,7 @@ __export(index_exports, {
|
|
|
106
111
|
NodeType: () => NodeType,
|
|
107
112
|
NodeTypeSchema: () => NodeTypeSchema,
|
|
108
113
|
ObservedDependenciesResultSchema: () => ObservedDependenciesResultSchema,
|
|
114
|
+
ObservedDeployContextSchema: () => ObservedDeployContextSchema,
|
|
109
115
|
ObservedFailingDivergenceSchema: () => ObservedFailingDivergenceSchema,
|
|
110
116
|
ObservedFailureKindSchema: () => ObservedFailureKindSchema,
|
|
111
117
|
ObservedSymbolMismatchDivergenceSchema: () => ObservedSymbolMismatchDivergenceSchema,
|
|
@@ -449,6 +455,27 @@ var GraphEdgeSchema = import_zod2.z.object({
|
|
|
449
455
|
});
|
|
450
456
|
|
|
451
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
|
+
});
|
|
452
479
|
var CompatibleDriverSchema = import_zod3.z.object({
|
|
453
480
|
name: import_zod3.z.string(),
|
|
454
481
|
minVersion: import_zod3.z.string()
|
|
@@ -477,6 +504,10 @@ var ServiceNodeSchema = import_zod3.z.object({
|
|
|
477
504
|
// frontend's icon key at the service-rollup level (ADR-133,
|
|
478
505
|
// docs/contracts/static-extraction.md).
|
|
479
506
|
platform: import_zod3.z.string().optional(),
|
|
507
|
+
// The platform's own name for this service where its config declares one:
|
|
508
|
+
// the Vercel project name from `.vercel/project.json`, the Supabase
|
|
509
|
+
// `project_id` (ADR-138). Optional growth (ADR-031); absent elsewhere.
|
|
510
|
+
platformName: import_zod3.z.string().optional(),
|
|
480
511
|
discoveredVia: DiscoveredViaSchema.optional(),
|
|
481
512
|
version: import_zod3.z.string().optional(),
|
|
482
513
|
dbConnectionTarget: import_zod3.z.string().optional(),
|
|
@@ -499,6 +530,11 @@ var ServiceNodeSchema = import_zod3.z.object({
|
|
|
499
530
|
// (ADR-031, ADR-225), absent on a non-k8s service.
|
|
500
531
|
observedImage: import_zod3.z.string().optional(),
|
|
501
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(),
|
|
502
538
|
repoPath: import_zod3.z.string().optional(),
|
|
503
539
|
owner: import_zod3.z.string().optional(),
|
|
504
540
|
dependencies: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.string()).optional(),
|
|
@@ -583,6 +619,28 @@ var ColumnAttrSchema = import_zod3.z.object({
|
|
|
583
619
|
// (`kind` is an open string); folded by `foldSdkWrites`, never `foldColumns`.
|
|
584
620
|
sdkWrites: import_zod3.z.array(import_zod3.z.enum(["client", "admin"])).optional()
|
|
585
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
|
+
});
|
|
586
644
|
var InfraNodeSchema = import_zod3.z.object({
|
|
587
645
|
id: import_zod3.z.string(),
|
|
588
646
|
type: import_zod3.z.literal(NodeType.InfraNode),
|
|
@@ -613,7 +671,10 @@ var InfraNodeSchema = import_zod3.z.object({
|
|
|
613
671
|
// carry the same declared facts on the topology node for traversal/blast-radius.
|
|
614
672
|
image: import_zod3.z.string().optional(),
|
|
615
673
|
replicas: import_zod3.z.number().optional(),
|
|
616
|
-
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()
|
|
617
678
|
});
|
|
618
679
|
var FrontierNodeSchema = import_zod3.z.object({
|
|
619
680
|
id: import_zod3.z.string(),
|
|
@@ -1149,15 +1210,18 @@ var IncidentGradeSchema = import_zod6.z.object({
|
|
|
1149
1210
|
urgency: import_zod6.z.object({ value: import_zod6.z.number().min(0).max(1).nullable(), reason: import_zod6.z.string().optional() }),
|
|
1150
1211
|
priorsVersion: import_zod6.z.string()
|
|
1151
1212
|
});
|
|
1213
|
+
var IncidentDeployContextSchema = DeployContextSchema;
|
|
1152
1214
|
var IncidentCardSchema = import_zod6.z.object({
|
|
1153
1215
|
kind: import_zod6.z.literal("incident"),
|
|
1154
|
-
id: import_zod6.z.string(),
|
|
1216
|
+
id: import_zod6.z.string().nullable(),
|
|
1155
1217
|
// ISO8601 — the incident's own time.
|
|
1156
|
-
at: import_zod6.z.string(),
|
|
1157
|
-
incidentKind: IncidentKindSchema,
|
|
1158
|
-
service: import_zod6.z.string(),
|
|
1218
|
+
at: import_zod6.z.string().nullable(),
|
|
1219
|
+
incidentKind: IncidentKindSchema.nullable(),
|
|
1220
|
+
service: import_zod6.z.string().nullable(),
|
|
1159
1221
|
affectedNode: import_zod6.z.string(),
|
|
1160
|
-
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(),
|
|
1161
1225
|
exceptionType: import_zod6.z.string().optional(),
|
|
1162
1226
|
httpStatusCode: import_zod6.z.number().int().optional(),
|
|
1163
1227
|
// Coalesced burst size (ErrorEvent.incidentCount).
|
|
@@ -1170,6 +1234,9 @@ var IncidentCardSchema = import_zod6.z.object({
|
|
|
1170
1234
|
blastRadius: IncidentBlastRadiusSchema.optional(),
|
|
1171
1235
|
policies: import_zod6.z.array(IncidentPolicySchema).optional(),
|
|
1172
1236
|
divergence: import_zod6.z.array(IncidentDivergenceSchema).optional(),
|
|
1237
|
+
// The OBSERVED deploy/process/config context for a pre-span failure (ADR-240),
|
|
1238
|
+
// present only when the incident carries it (a k8s deploy fault).
|
|
1239
|
+
deployContext: IncidentDeployContextSchema.optional(),
|
|
1173
1240
|
// The rendered one-line sentence — a human/loose-LLM read over the structured
|
|
1174
1241
|
// body, never the wire format.
|
|
1175
1242
|
headline: import_zod6.z.string(),
|
|
@@ -1718,6 +1785,16 @@ var DeployMismatchDivergenceSchema = import_zod9.z.object({
|
|
|
1718
1785
|
declaredReplicas: import_zod9.z.number().optional(),
|
|
1719
1786
|
observedReplicas: import_zod9.z.number().optional()
|
|
1720
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
|
+
});
|
|
1721
1798
|
var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
|
|
1722
1799
|
MissingObservedDivergenceSchema,
|
|
1723
1800
|
MissingExtractedDivergenceSchema,
|
|
@@ -1726,7 +1803,8 @@ var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
|
|
|
1726
1803
|
CompatViolationDivergenceSchema,
|
|
1727
1804
|
ObservedSymbolMismatchDivergenceSchema,
|
|
1728
1805
|
ObservedFailingDivergenceSchema,
|
|
1729
|
-
DeployMismatchDivergenceSchema
|
|
1806
|
+
DeployMismatchDivergenceSchema,
|
|
1807
|
+
FlagMismatchDivergenceSchema
|
|
1730
1808
|
]);
|
|
1731
1809
|
var DivergenceResultSchema = import_zod9.z.object({
|
|
1732
1810
|
divergences: import_zod9.z.array(DivergenceSchema),
|
|
@@ -1743,7 +1821,8 @@ var DivergenceTypeSchema = import_zod9.z.enum([
|
|
|
1743
1821
|
"compat-violation",
|
|
1744
1822
|
"observed-symbol-mismatch",
|
|
1745
1823
|
"observed-failing",
|
|
1746
|
-
"deploy-mismatch"
|
|
1824
|
+
"deploy-mismatch",
|
|
1825
|
+
"flag-mismatch"
|
|
1747
1826
|
]);
|
|
1748
1827
|
|
|
1749
1828
|
// src/mcp-tools.ts
|
|
@@ -2026,6 +2105,7 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2026
2105
|
DEFAULT_EXTRACTED_PRECISION_FLOOR,
|
|
2027
2106
|
DaemonHealthResponseSchema,
|
|
2028
2107
|
DatabaseNodeSchema,
|
|
2108
|
+
DeployContextSchema,
|
|
2029
2109
|
DeployMismatchDivergenceSchema,
|
|
2030
2110
|
DeployMismatchKindSchema,
|
|
2031
2111
|
DiscoveredViaSchema,
|
|
@@ -2046,6 +2126,9 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2046
2126
|
ExtractionCoverageSchema,
|
|
2047
2127
|
FieldGuardRuleSchema,
|
|
2048
2128
|
FileNodeSchema,
|
|
2129
|
+
FlagAttrSchema,
|
|
2130
|
+
FlagDefinitionSchema,
|
|
2131
|
+
FlagMismatchDivergenceSchema,
|
|
2049
2132
|
FrontierNodeSchema,
|
|
2050
2133
|
GraphDiffResultSchema,
|
|
2051
2134
|
GraphEdgeSchema,
|
|
@@ -2060,6 +2143,7 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2060
2143
|
IncidentBlastRadiusSchema,
|
|
2061
2144
|
IncidentCardSchema,
|
|
2062
2145
|
IncidentChainHopSchema,
|
|
2146
|
+
IncidentDeployContextSchema,
|
|
2063
2147
|
IncidentDivergenceSchema,
|
|
2064
2148
|
IncidentEventPayloadSchema,
|
|
2065
2149
|
IncidentGradeBandSchema,
|
|
@@ -2084,6 +2168,7 @@ var PrVerdictBodySchema = import_zod11.z.object({
|
|
|
2084
2168
|
NodeType,
|
|
2085
2169
|
NodeTypeSchema,
|
|
2086
2170
|
ObservedDependenciesResultSchema,
|
|
2171
|
+
ObservedDeployContextSchema,
|
|
2087
2172
|
ObservedFailingDivergenceSchema,
|
|
2088
2173
|
ObservedFailureKindSchema,
|
|
2089
2174
|
ObservedSymbolMismatchDivergenceSchema,
|