@neat.is/types 0.9.2-dev.20260822 → 0.9.3-dev.20260823

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
@@ -22,6 +22,11 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ApplicablePoliciesResponseSchema: () => ApplicablePoliciesResponseSchema,
24
24
  ApplicablePolicySchema: () => ApplicablePolicySchema,
25
+ AskFactSchema: () => AskFactSchema,
26
+ AskIntentSchema: () => AskIntentSchema,
27
+ AskMatchSchema: () => AskMatchSchema,
28
+ AskResultSchema: () => AskResultSchema,
29
+ AskSectionSchema: () => AskSectionSchema,
25
30
  BlastRadiusAffectedNodeSchema: () => BlastRadiusAffectedNodeSchema,
26
31
  BlastRadiusResultSchema: () => BlastRadiusResultSchema,
27
32
  BlastRadiusRuleSchema: () => BlastRadiusRuleSchema,
@@ -331,7 +336,18 @@ var EdgeEvidenceSchema = import_zod2.z.object({
331
336
  // client named, alongside the file:line it named them at. Absent on every
332
337
  // other edge — a config or infra edge has no HTTP method.
333
338
  method: import_zod2.z.string().optional(),
334
- pathTemplate: import_zod2.z.string().optional()
339
+ pathTemplate: import_zod2.z.string().optional(),
340
+ // How a datastore host was recovered (ADR-213). `config` when the host came
341
+ // from an env var / IConfiguration key / config file — the deployment's real
342
+ // target; `literal` when it was read from a hardcoded string literal in
343
+ // source. The divergence ranker reads this to tell a genuine declared store
344
+ // from a hardcoded fault-injection / flag-gated probe: a `literal` host
345
+ // production never observed, sitting beside a `config`-driven store of the
346
+ // same engine on the same service, is a dead alternate whose missing-observed
347
+ // is dampened rather than surfaced as a real gap. Present only on datastore
348
+ // CONNECTS_TO edges from a recogniser that distinguishes the two; absent on
349
+ // every other edge.
350
+ hostSource: import_zod2.z.enum(["literal", "config"]).optional()
335
351
  });
336
352
  var LatencyMsSchema = import_zod2.z.object({
337
353
  p50: import_zod2.z.number().nonnegative(),
@@ -869,6 +885,57 @@ var ObservedDependenciesResultSchema = import_zod5.z.object({
869
885
  window: import_zod5.z.enum(["7d", "lifetime"]).optional(),
870
886
  inboundLastObserved: import_zod5.z.string().datetime().optional()
871
887
  });
888
+ var AskIntentSchema = import_zod5.z.enum([
889
+ "root-cause",
890
+ "blast-radius",
891
+ "dependencies",
892
+ "observed",
893
+ "incidents",
894
+ "divergence",
895
+ "overview"
896
+ ]);
897
+ var AskMatchSchema = import_zod5.z.object({
898
+ nodeId: import_zod5.z.string(),
899
+ label: import_zod5.z.string(),
900
+ via: import_zod5.z.enum(["id", "label", "token", "embedding"]),
901
+ score: import_zod5.z.number().min(0).max(1)
902
+ });
903
+ var AskFactSchema = import_zod5.z.object({
904
+ text: import_zod5.z.string(),
905
+ provenance: ProvenanceSchema.optional(),
906
+ confidence: import_zod5.z.number().min(0).max(1).optional()
907
+ });
908
+ var AskSectionSchema = import_zod5.z.object({
909
+ heading: import_zod5.z.string(),
910
+ facts: import_zod5.z.array(AskFactSchema)
911
+ });
912
+ var AskResultSchema = import_zod5.z.object({
913
+ question: import_zod5.z.string(),
914
+ // The traversal the router chose from the question's intent keywords.
915
+ intent: AskIntentSchema,
916
+ // The entities the question resolved to, best match first.
917
+ matched: import_zod5.z.array(AskMatchSchema),
918
+ // The node the answer is anchored on — matched[0]'s id, absent when nothing
919
+ // in the question resolved to a node.
920
+ primaryNode: import_zod5.z.string().optional(),
921
+ // Whether the answer is anchored on one node or spans the whole graph.
922
+ // `'node'` when an entity resolved; `'global'` when the question was
923
+ // inherently graph-wide (overview / divergences / incidents) and answered
924
+ // across the whole graph with no entity named. Absent when nothing resolved
925
+ // and the intent needs a subject (dependencies / blast-radius / root-cause /
926
+ // observed) — those return naming guidance, not a graph-wide answer.
927
+ scope: import_zod5.z.enum(["global", "node"]).optional(),
928
+ // The composed, provenance-tagged context, section by section.
929
+ sections: import_zod5.z.array(AskSectionSchema),
930
+ // The compact, answer-shaped summary the agent reads first — not a raw graph
931
+ // dump, so the graph reads as lower-friction than grep.
932
+ answer: import_zod5.z.string(),
933
+ // Headline confidence of the leading section, when it has one.
934
+ confidence: import_zod5.z.number().min(0).max(1).optional(),
935
+ // The distinct provenances across every fact in the answer, so the footer can
936
+ // tell the agent how much of this is OBSERVED vs EXTRACTED.
937
+ provenance: import_zod5.z.array(ProvenanceSchema)
938
+ });
872
939
 
873
940
  // src/identity.ts
874
941
  var SERVICE_PREFIX = "service:";
@@ -1365,6 +1432,9 @@ var MCP_TOOL_NAMES = [
1365
1432
  // Two-way RCA navigation (ADR-189): step the graph and confirm a link.
1366
1433
  "expand",
1367
1434
  "relate",
1435
+ // Plain-language door over the fused graph (ADR-198): resolve a question to
1436
+ // nodes, route to the right traversal, answer with provenance-tagged context.
1437
+ "ask",
1368
1438
  // Six /neat extend tools (ADR-081, ADR-086, #387).
1369
1439
  "neat_list_uninstrumented",
1370
1440
  "neat_lookup_instrumentation",
@@ -1552,6 +1622,11 @@ function passesExtractedFloor(confidence) {
1552
1622
  0 && (module.exports = {
1553
1623
  ApplicablePoliciesResponseSchema,
1554
1624
  ApplicablePolicySchema,
1625
+ AskFactSchema,
1626
+ AskIntentSchema,
1627
+ AskMatchSchema,
1628
+ AskResultSchema,
1629
+ AskSectionSchema,
1555
1630
  BlastRadiusAffectedNodeSchema,
1556
1631
  BlastRadiusResultSchema,
1557
1632
  BlastRadiusRuleSchema,