@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 +76 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +323 -14
- package/dist/index.d.ts +323 -14
- package/dist/index.js +71 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -168,7 +168,18 @@ var EdgeEvidenceSchema = z2.object({
|
|
|
168
168
|
// client named, alongside the file:line it named them at. Absent on every
|
|
169
169
|
// other edge — a config or infra edge has no HTTP method.
|
|
170
170
|
method: z2.string().optional(),
|
|
171
|
-
pathTemplate: z2.string().optional()
|
|
171
|
+
pathTemplate: z2.string().optional(),
|
|
172
|
+
// How a datastore host was recovered (ADR-213). `config` when the host came
|
|
173
|
+
// from an env var / IConfiguration key / config file — the deployment's real
|
|
174
|
+
// target; `literal` when it was read from a hardcoded string literal in
|
|
175
|
+
// source. The divergence ranker reads this to tell a genuine declared store
|
|
176
|
+
// from a hardcoded fault-injection / flag-gated probe: a `literal` host
|
|
177
|
+
// production never observed, sitting beside a `config`-driven store of the
|
|
178
|
+
// same engine on the same service, is a dead alternate whose missing-observed
|
|
179
|
+
// is dampened rather than surfaced as a real gap. Present only on datastore
|
|
180
|
+
// CONNECTS_TO edges from a recogniser that distinguishes the two; absent on
|
|
181
|
+
// every other edge.
|
|
182
|
+
hostSource: z2.enum(["literal", "config"]).optional()
|
|
172
183
|
});
|
|
173
184
|
var LatencyMsSchema = z2.object({
|
|
174
185
|
p50: z2.number().nonnegative(),
|
|
@@ -706,6 +717,57 @@ var ObservedDependenciesResultSchema = z5.object({
|
|
|
706
717
|
window: z5.enum(["7d", "lifetime"]).optional(),
|
|
707
718
|
inboundLastObserved: z5.string().datetime().optional()
|
|
708
719
|
});
|
|
720
|
+
var AskIntentSchema = z5.enum([
|
|
721
|
+
"root-cause",
|
|
722
|
+
"blast-radius",
|
|
723
|
+
"dependencies",
|
|
724
|
+
"observed",
|
|
725
|
+
"incidents",
|
|
726
|
+
"divergence",
|
|
727
|
+
"overview"
|
|
728
|
+
]);
|
|
729
|
+
var AskMatchSchema = z5.object({
|
|
730
|
+
nodeId: z5.string(),
|
|
731
|
+
label: z5.string(),
|
|
732
|
+
via: z5.enum(["id", "label", "token", "embedding"]),
|
|
733
|
+
score: z5.number().min(0).max(1)
|
|
734
|
+
});
|
|
735
|
+
var AskFactSchema = z5.object({
|
|
736
|
+
text: z5.string(),
|
|
737
|
+
provenance: ProvenanceSchema.optional(),
|
|
738
|
+
confidence: z5.number().min(0).max(1).optional()
|
|
739
|
+
});
|
|
740
|
+
var AskSectionSchema = z5.object({
|
|
741
|
+
heading: z5.string(),
|
|
742
|
+
facts: z5.array(AskFactSchema)
|
|
743
|
+
});
|
|
744
|
+
var AskResultSchema = z5.object({
|
|
745
|
+
question: z5.string(),
|
|
746
|
+
// The traversal the router chose from the question's intent keywords.
|
|
747
|
+
intent: AskIntentSchema,
|
|
748
|
+
// The entities the question resolved to, best match first.
|
|
749
|
+
matched: z5.array(AskMatchSchema),
|
|
750
|
+
// The node the answer is anchored on — matched[0]'s id, absent when nothing
|
|
751
|
+
// in the question resolved to a node.
|
|
752
|
+
primaryNode: z5.string().optional(),
|
|
753
|
+
// Whether the answer is anchored on one node or spans the whole graph.
|
|
754
|
+
// `'node'` when an entity resolved; `'global'` when the question was
|
|
755
|
+
// inherently graph-wide (overview / divergences / incidents) and answered
|
|
756
|
+
// across the whole graph with no entity named. Absent when nothing resolved
|
|
757
|
+
// and the intent needs a subject (dependencies / blast-radius / root-cause /
|
|
758
|
+
// observed) — those return naming guidance, not a graph-wide answer.
|
|
759
|
+
scope: z5.enum(["global", "node"]).optional(),
|
|
760
|
+
// The composed, provenance-tagged context, section by section.
|
|
761
|
+
sections: z5.array(AskSectionSchema),
|
|
762
|
+
// The compact, answer-shaped summary the agent reads first — not a raw graph
|
|
763
|
+
// dump, so the graph reads as lower-friction than grep.
|
|
764
|
+
answer: z5.string(),
|
|
765
|
+
// Headline confidence of the leading section, when it has one.
|
|
766
|
+
confidence: z5.number().min(0).max(1).optional(),
|
|
767
|
+
// The distinct provenances across every fact in the answer, so the footer can
|
|
768
|
+
// tell the agent how much of this is OBSERVED vs EXTRACTED.
|
|
769
|
+
provenance: z5.array(ProvenanceSchema)
|
|
770
|
+
});
|
|
709
771
|
|
|
710
772
|
// src/identity.ts
|
|
711
773
|
var SERVICE_PREFIX = "service:";
|
|
@@ -1202,6 +1264,9 @@ var MCP_TOOL_NAMES = [
|
|
|
1202
1264
|
// Two-way RCA navigation (ADR-189): step the graph and confirm a link.
|
|
1203
1265
|
"expand",
|
|
1204
1266
|
"relate",
|
|
1267
|
+
// Plain-language door over the fused graph (ADR-198): resolve a question to
|
|
1268
|
+
// nodes, route to the right traversal, answer with provenance-tagged context.
|
|
1269
|
+
"ask",
|
|
1205
1270
|
// Six /neat extend tools (ADR-081, ADR-086, #387).
|
|
1206
1271
|
"neat_list_uninstrumented",
|
|
1207
1272
|
"neat_lookup_instrumentation",
|
|
@@ -1388,6 +1453,11 @@ function passesExtractedFloor(confidence) {
|
|
|
1388
1453
|
export {
|
|
1389
1454
|
ApplicablePoliciesResponseSchema,
|
|
1390
1455
|
ApplicablePolicySchema,
|
|
1456
|
+
AskFactSchema,
|
|
1457
|
+
AskIntentSchema,
|
|
1458
|
+
AskMatchSchema,
|
|
1459
|
+
AskResultSchema,
|
|
1460
|
+
AskSectionSchema,
|
|
1391
1461
|
BlastRadiusAffectedNodeSchema,
|
|
1392
1462
|
BlastRadiusResultSchema,
|
|
1393
1463
|
BlastRadiusRuleSchema,
|