@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.cjs CHANGED
@@ -48,6 +48,8 @@ __export(index_exports, {
48
48
  DEFAULT_EXTRACTED_PRECISION_FLOOR: () => DEFAULT_EXTRACTED_PRECISION_FLOOR,
49
49
  DaemonHealthResponseSchema: () => DaemonHealthResponseSchema,
50
50
  DatabaseNodeSchema: () => DatabaseNodeSchema,
51
+ DeployMismatchDivergenceSchema: () => DeployMismatchDivergenceSchema,
52
+ DeployMismatchKindSchema: () => DeployMismatchKindSchema,
51
53
  DiscoveredViaSchema: () => DiscoveredViaSchema,
52
54
  DivergenceResultSchema: () => DivergenceResultSchema,
53
55
  DivergenceSchema: () => DivergenceSchema,
@@ -150,6 +152,7 @@ __export(index_exports, {
150
152
  extractedEdgeId: () => extractedEdgeId,
151
153
  extractedPrecisionFloor: () => extractedPrecisionFloor,
152
154
  fileId: () => fileId,
155
+ frontierEdgeId: () => frontierEdgeId,
153
156
  frontierId: () => frontierId,
154
157
  graphqlOperationId: () => graphqlOperationId,
155
158
  grpcMethodId: () => grpcMethodId,
@@ -186,7 +189,15 @@ var Provenance = {
186
189
  EXTRACTED: "EXTRACTED",
187
190
  INFERRED: "INFERRED",
188
191
  OBSERVED: "OBSERVED",
189
- STALE: "STALE"
192
+ STALE: "STALE",
193
+ // The staged-surface tense (ADR-094 / ADR-226): a claim outside the settled
194
+ // graph — an edge NEAT reached toward but cannot yet observe (a hop whose far
195
+ // end hung), or a proposed relationship not yet enacted. "Provenance is
196
+ // everything outside the graph." A FRONTIER edge is a real, persisted surface,
197
+ // but it is NEVER ranked: it stays out of `PROV_RANK` and is skipped by settled
198
+ // traversal (Rule 3, edge level). It graduates to OBSERVED (promotion) when its
199
+ // real twin arrives, or is culled. Restores the value ADR-068 froze out.
200
+ FRONTIER: "FRONTIER"
190
201
  };
191
202
  var EdgeType = {
192
203
  CALLS: "CALLS",
@@ -325,7 +336,8 @@ var ProvenanceSchema = import_zod2.z.enum([
325
336
  Provenance.EXTRACTED,
326
337
  Provenance.INFERRED,
327
338
  Provenance.OBSERVED,
328
- Provenance.STALE
339
+ Provenance.STALE,
340
+ Provenance.FRONTIER
329
341
  ]);
330
342
  var EdgeTypeSchema = import_zod2.z.enum([
331
343
  EdgeType.CALLS,
@@ -459,6 +471,16 @@ var ServiceNodeSchema = import_zod3.z.object({
459
471
  // absent on a non-k8s service. See docs/contracts/schema.md.
460
472
  declaredImage: import_zod3.z.string().optional(),
461
473
  declaredReplicas: import_zod3.z.number().optional(),
474
+ // Observed k8s deploy state, stamped by the k8s observed reader
475
+ // (`connectors/kubernetes/`) from live cluster state: the container image the
476
+ // running pods actually report and the count of ready replicas. Compared on
477
+ // this same `service:<name>` node against `declaredImage`/`declaredReplicas`
478
+ // (above) to surface a `deploy-mismatch` divergence — the stuck rollout where
479
+ // the manifest declares a new image but the old pods still serve it, so no
480
+ // incident fires (the service is up) yet declared ≠ running. Optional growth
481
+ // (ADR-031, ADR-225), absent on a non-k8s service.
482
+ observedImage: import_zod3.z.string().optional(),
483
+ observedReadyReplicas: import_zod3.z.number().optional(),
462
484
  repoPath: import_zod3.z.string().optional(),
463
485
  owner: import_zod3.z.string().optional(),
464
486
  dependencies: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.string()).optional(),
@@ -804,6 +826,7 @@ var NodeContextSchema = import_zod5.z.object({
804
826
  var NodeClassificationSchema = import_zod5.z.enum([
805
827
  "primary-failure",
806
828
  "symptom-only",
829
+ "unreachable",
807
830
  "unrelated"
808
831
  ]);
809
832
  var RootCauseCandidateSchema = import_zod5.z.object({
@@ -1276,6 +1299,9 @@ function observedEdgeId(source, target, type) {
1276
1299
  function inferredEdgeId(source, target, type) {
1277
1300
  return `${type}:INFERRED:${source}${EDGE_ARROW}${target}`;
1278
1301
  }
1302
+ function frontierEdgeId(source, target, type) {
1303
+ return `${type}:FRONTIER:${source}${EDGE_ARROW}${target}`;
1304
+ }
1279
1305
  function parseEdgeId(id) {
1280
1306
  const arrowIdx = id.lastIndexOf(EDGE_ARROW);
1281
1307
  if (arrowIdx === -1) return null;
@@ -1286,7 +1312,7 @@ function parseEdgeId(id) {
1286
1312
  if (firstColon === -1) return null;
1287
1313
  const type = left.slice(0, firstColon);
1288
1314
  const rest = left.slice(firstColon + 1);
1289
- for (const prov of ["OBSERVED", "INFERRED"]) {
1315
+ for (const prov of ["OBSERVED", "INFERRED", "FRONTIER"]) {
1290
1316
  if (rest.startsWith(`${prov}:`)) {
1291
1317
  return { type, provenance: prov, source: rest.slice(prov.length + 1), target };
1292
1318
  }
@@ -1595,6 +1621,16 @@ var ObservedFailingDivergenceSchema = import_zod9.z.object({
1595
1621
  incidentCount: import_zod9.z.number().int().positive().optional(),
1596
1622
  httpStatusCode: import_zod9.z.number().int().optional()
1597
1623
  });
1624
+ var DeployMismatchKindSchema = import_zod9.z.enum(["image", "replicas"]);
1625
+ var DeployMismatchDivergenceSchema = import_zod9.z.object({
1626
+ type: import_zod9.z.literal("deploy-mismatch"),
1627
+ ...commonFields,
1628
+ kind: DeployMismatchKindSchema,
1629
+ declaredImage: import_zod9.z.string().optional(),
1630
+ observedImage: import_zod9.z.string().optional(),
1631
+ declaredReplicas: import_zod9.z.number().optional(),
1632
+ observedReplicas: import_zod9.z.number().optional()
1633
+ });
1598
1634
  var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
1599
1635
  MissingObservedDivergenceSchema,
1600
1636
  MissingExtractedDivergenceSchema,
@@ -1602,7 +1638,8 @@ var DivergenceSchema = import_zod9.z.discriminatedUnion("type", [
1602
1638
  HostMismatchDivergenceSchema,
1603
1639
  CompatViolationDivergenceSchema,
1604
1640
  ObservedSymbolMismatchDivergenceSchema,
1605
- ObservedFailingDivergenceSchema
1641
+ ObservedFailingDivergenceSchema,
1642
+ DeployMismatchDivergenceSchema
1606
1643
  ]);
1607
1644
  var DivergenceResultSchema = import_zod9.z.object({
1608
1645
  divergences: import_zod9.z.array(DivergenceSchema),
@@ -1618,7 +1655,8 @@ var DivergenceTypeSchema = import_zod9.z.enum([
1618
1655
  "host-mismatch",
1619
1656
  "compat-violation",
1620
1657
  "observed-symbol-mismatch",
1621
- "observed-failing"
1658
+ "observed-failing",
1659
+ "deploy-mismatch"
1622
1660
  ]);
1623
1661
 
1624
1662
  // src/mcp-tools.ts
@@ -1857,6 +1895,8 @@ function passesExtractedFloor(confidence) {
1857
1895
  DEFAULT_EXTRACTED_PRECISION_FLOOR,
1858
1896
  DaemonHealthResponseSchema,
1859
1897
  DatabaseNodeSchema,
1898
+ DeployMismatchDivergenceSchema,
1899
+ DeployMismatchKindSchema,
1860
1900
  DiscoveredViaSchema,
1861
1901
  DivergenceResultSchema,
1862
1902
  DivergenceSchema,
@@ -1959,6 +1999,7 @@ function passesExtractedFloor(confidence) {
1959
1999
  extractedEdgeId,
1960
2000
  extractedPrecisionFloor,
1961
2001
  fileId,
2002
+ frontierEdgeId,
1962
2003
  frontierId,
1963
2004
  graphqlOperationId,
1964
2005
  grpcMethodId,