@neat.is/types 0.9.2-dev.20260821 → 0.9.2

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,
@@ -869,6 +874,57 @@ var ObservedDependenciesResultSchema = import_zod5.z.object({
869
874
  window: import_zod5.z.enum(["7d", "lifetime"]).optional(),
870
875
  inboundLastObserved: import_zod5.z.string().datetime().optional()
871
876
  });
877
+ var AskIntentSchema = import_zod5.z.enum([
878
+ "root-cause",
879
+ "blast-radius",
880
+ "dependencies",
881
+ "observed",
882
+ "incidents",
883
+ "divergence",
884
+ "overview"
885
+ ]);
886
+ var AskMatchSchema = import_zod5.z.object({
887
+ nodeId: import_zod5.z.string(),
888
+ label: import_zod5.z.string(),
889
+ via: import_zod5.z.enum(["id", "label", "token", "embedding"]),
890
+ score: import_zod5.z.number().min(0).max(1)
891
+ });
892
+ var AskFactSchema = import_zod5.z.object({
893
+ text: import_zod5.z.string(),
894
+ provenance: ProvenanceSchema.optional(),
895
+ confidence: import_zod5.z.number().min(0).max(1).optional()
896
+ });
897
+ var AskSectionSchema = import_zod5.z.object({
898
+ heading: import_zod5.z.string(),
899
+ facts: import_zod5.z.array(AskFactSchema)
900
+ });
901
+ var AskResultSchema = import_zod5.z.object({
902
+ question: import_zod5.z.string(),
903
+ // The traversal the router chose from the question's intent keywords.
904
+ intent: AskIntentSchema,
905
+ // The entities the question resolved to, best match first.
906
+ matched: import_zod5.z.array(AskMatchSchema),
907
+ // The node the answer is anchored on — matched[0]'s id, absent when nothing
908
+ // in the question resolved to a node.
909
+ primaryNode: import_zod5.z.string().optional(),
910
+ // Whether the answer is anchored on one node or spans the whole graph.
911
+ // `'node'` when an entity resolved; `'global'` when the question was
912
+ // inherently graph-wide (overview / divergences / incidents) and answered
913
+ // across the whole graph with no entity named. Absent when nothing resolved
914
+ // and the intent needs a subject (dependencies / blast-radius / root-cause /
915
+ // observed) — those return naming guidance, not a graph-wide answer.
916
+ scope: import_zod5.z.enum(["global", "node"]).optional(),
917
+ // The composed, provenance-tagged context, section by section.
918
+ sections: import_zod5.z.array(AskSectionSchema),
919
+ // The compact, answer-shaped summary the agent reads first — not a raw graph
920
+ // dump, so the graph reads as lower-friction than grep.
921
+ answer: import_zod5.z.string(),
922
+ // Headline confidence of the leading section, when it has one.
923
+ confidence: import_zod5.z.number().min(0).max(1).optional(),
924
+ // The distinct provenances across every fact in the answer, so the footer can
925
+ // tell the agent how much of this is OBSERVED vs EXTRACTED.
926
+ provenance: import_zod5.z.array(ProvenanceSchema)
927
+ });
872
928
 
873
929
  // src/identity.ts
874
930
  var SERVICE_PREFIX = "service:";
@@ -1365,6 +1421,9 @@ var MCP_TOOL_NAMES = [
1365
1421
  // Two-way RCA navigation (ADR-189): step the graph and confirm a link.
1366
1422
  "expand",
1367
1423
  "relate",
1424
+ // Plain-language door over the fused graph (ADR-198): resolve a question to
1425
+ // nodes, route to the right traversal, answer with provenance-tagged context.
1426
+ "ask",
1368
1427
  // Six /neat extend tools (ADR-081, ADR-086, #387).
1369
1428
  "neat_list_uninstrumented",
1370
1429
  "neat_lookup_instrumentation",
@@ -1552,6 +1611,11 @@ function passesExtractedFloor(confidence) {
1552
1611
  0 && (module.exports = {
1553
1612
  ApplicablePoliciesResponseSchema,
1554
1613
  ApplicablePolicySchema,
1614
+ AskFactSchema,
1615
+ AskIntentSchema,
1616
+ AskMatchSchema,
1617
+ AskResultSchema,
1618
+ AskSectionSchema,
1555
1619
  BlastRadiusAffectedNodeSchema,
1556
1620
  BlastRadiusResultSchema,
1557
1621
  BlastRadiusRuleSchema,