@neat.is/types 0.9.13-dev.20260901 → 0.9.14

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.js CHANGED
@@ -4,7 +4,15 @@ var Provenance = {
4
4
  EXTRACTED: "EXTRACTED",
5
5
  INFERRED: "INFERRED",
6
6
  OBSERVED: "OBSERVED",
7
- STALE: "STALE"
7
+ STALE: "STALE",
8
+ // The staged-surface tense (ADR-094 / ADR-226): a claim outside the settled
9
+ // graph — an edge NEAT reached toward but cannot yet observe (a hop whose far
10
+ // end hung), or a proposed relationship not yet enacted. "Provenance is
11
+ // everything outside the graph." A FRONTIER edge is a real, persisted surface,
12
+ // but it is NEVER ranked: it stays out of `PROV_RANK` and is skipped by settled
13
+ // traversal (Rule 3, edge level). It graduates to OBSERVED (promotion) when its
14
+ // real twin arrives, or is culled. Restores the value ADR-068 froze out.
15
+ FRONTIER: "FRONTIER"
8
16
  };
9
17
  var EdgeType = {
10
18
  CALLS: "CALLS",
@@ -143,7 +151,8 @@ var ProvenanceSchema = z2.enum([
143
151
  Provenance.EXTRACTED,
144
152
  Provenance.INFERRED,
145
153
  Provenance.OBSERVED,
146
- Provenance.STALE
154
+ Provenance.STALE,
155
+ Provenance.FRONTIER
147
156
  ]);
148
157
  var EdgeTypeSchema = z2.enum([
149
158
  EdgeType.CALLS,
@@ -277,6 +286,16 @@ var ServiceNodeSchema = z3.object({
277
286
  // absent on a non-k8s service. See docs/contracts/schema.md.
278
287
  declaredImage: z3.string().optional(),
279
288
  declaredReplicas: z3.number().optional(),
289
+ // Observed k8s deploy state, stamped by the k8s observed reader
290
+ // (`connectors/kubernetes/`) from live cluster state: the container image the
291
+ // running pods actually report and the count of ready replicas. Compared on
292
+ // this same `service:<name>` node against `declaredImage`/`declaredReplicas`
293
+ // (above) to surface a `deploy-mismatch` divergence — the stuck rollout where
294
+ // the manifest declares a new image but the old pods still serve it, so no
295
+ // incident fires (the service is up) yet declared ≠ running. Optional growth
296
+ // (ADR-031, ADR-225), absent on a non-k8s service.
297
+ observedImage: z3.string().optional(),
298
+ observedReadyReplicas: z3.number().optional(),
280
299
  repoPath: z3.string().optional(),
281
300
  owner: z3.string().optional(),
282
301
  dependencies: z3.record(z3.string(), z3.string()).optional(),
@@ -622,6 +641,7 @@ var NodeContextSchema = z5.object({
622
641
  var NodeClassificationSchema = z5.enum([
623
642
  "primary-failure",
624
643
  "symptom-only",
644
+ "unreachable",
625
645
  "unrelated"
626
646
  ]);
627
647
  var RootCauseCandidateSchema = z5.object({
@@ -1094,6 +1114,9 @@ function observedEdgeId(source, target, type) {
1094
1114
  function inferredEdgeId(source, target, type) {
1095
1115
  return `${type}:INFERRED:${source}${EDGE_ARROW}${target}`;
1096
1116
  }
1117
+ function frontierEdgeId(source, target, type) {
1118
+ return `${type}:FRONTIER:${source}${EDGE_ARROW}${target}`;
1119
+ }
1097
1120
  function parseEdgeId(id) {
1098
1121
  const arrowIdx = id.lastIndexOf(EDGE_ARROW);
1099
1122
  if (arrowIdx === -1) return null;
@@ -1104,7 +1127,7 @@ function parseEdgeId(id) {
1104
1127
  if (firstColon === -1) return null;
1105
1128
  const type = left.slice(0, firstColon);
1106
1129
  const rest = left.slice(firstColon + 1);
1107
- for (const prov of ["OBSERVED", "INFERRED"]) {
1130
+ for (const prov of ["OBSERVED", "INFERRED", "FRONTIER"]) {
1108
1131
  if (rest.startsWith(`${prov}:`)) {
1109
1132
  return { type, provenance: prov, source: rest.slice(prov.length + 1), target };
1110
1133
  }
@@ -1413,6 +1436,16 @@ var ObservedFailingDivergenceSchema = z9.object({
1413
1436
  incidentCount: z9.number().int().positive().optional(),
1414
1437
  httpStatusCode: z9.number().int().optional()
1415
1438
  });
1439
+ var DeployMismatchKindSchema = z9.enum(["image", "replicas"]);
1440
+ var DeployMismatchDivergenceSchema = z9.object({
1441
+ type: z9.literal("deploy-mismatch"),
1442
+ ...commonFields,
1443
+ kind: DeployMismatchKindSchema,
1444
+ declaredImage: z9.string().optional(),
1445
+ observedImage: z9.string().optional(),
1446
+ declaredReplicas: z9.number().optional(),
1447
+ observedReplicas: z9.number().optional()
1448
+ });
1416
1449
  var DivergenceSchema = z9.discriminatedUnion("type", [
1417
1450
  MissingObservedDivergenceSchema,
1418
1451
  MissingExtractedDivergenceSchema,
@@ -1420,7 +1453,8 @@ var DivergenceSchema = z9.discriminatedUnion("type", [
1420
1453
  HostMismatchDivergenceSchema,
1421
1454
  CompatViolationDivergenceSchema,
1422
1455
  ObservedSymbolMismatchDivergenceSchema,
1423
- ObservedFailingDivergenceSchema
1456
+ ObservedFailingDivergenceSchema,
1457
+ DeployMismatchDivergenceSchema
1424
1458
  ]);
1425
1459
  var DivergenceResultSchema = z9.object({
1426
1460
  divergences: z9.array(DivergenceSchema),
@@ -1436,7 +1470,8 @@ var DivergenceTypeSchema = z9.enum([
1436
1470
  "host-mismatch",
1437
1471
  "compat-violation",
1438
1472
  "observed-symbol-mismatch",
1439
- "observed-failing"
1473
+ "observed-failing",
1474
+ "deploy-mismatch"
1440
1475
  ]);
1441
1476
 
1442
1477
  // src/mcp-tools.ts
@@ -1674,6 +1709,8 @@ export {
1674
1709
  DEFAULT_EXTRACTED_PRECISION_FLOOR,
1675
1710
  DaemonHealthResponseSchema,
1676
1711
  DatabaseNodeSchema,
1712
+ DeployMismatchDivergenceSchema,
1713
+ DeployMismatchKindSchema,
1677
1714
  DiscoveredViaSchema,
1678
1715
  DivergenceResultSchema,
1679
1716
  DivergenceSchema,
@@ -1776,6 +1813,7 @@ export {
1776
1813
  extractedEdgeId,
1777
1814
  extractedPrecisionFloor,
1778
1815
  fileId,
1816
+ frontierEdgeId,
1779
1817
  frontierId,
1780
1818
  graphqlOperationId,
1781
1819
  grpcMethodId,