@neat.is/core 0.10.6 → 0.10.7-dev.20261011
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/{chunk-MW2XYLCS.js → chunk-6K22WGO7.js} +49 -1
- package/dist/{chunk-MW2XYLCS.js.map → chunk-6K22WGO7.js.map} +1 -1
- package/dist/chunk-AEMLUMHC.js +42 -0
- package/dist/chunk-AEMLUMHC.js.map +1 -0
- package/dist/{chunk-OKM4N7GH.js → chunk-S5S2FYCQ.js} +26 -5
- package/dist/chunk-S5S2FYCQ.js.map +1 -0
- package/dist/cli.cjs +137 -10
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +3 -2
- package/dist/cli.d.ts +3 -2
- package/dist/cli.js +53 -12
- package/dist/cli.js.map +1 -1
- package/dist/incidents-render.cjs +66 -0
- package/dist/incidents-render.cjs.map +1 -0
- package/dist/incidents-render.d.cts +5 -0
- package/dist/incidents-render.d.ts +5 -0
- package/dist/incidents-render.js +8 -0
- package/dist/incidents-render.js.map +1 -0
- package/dist/index.cjs +72 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +78 -6
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +8 -5
- package/dist/neatd.js.map +1 -1
- package/dist/server.cjs +48 -0
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +7 -2
- package/dist/chunk-OKM4N7GH.js.map +0 -1
|
@@ -17514,6 +17514,36 @@ import {
|
|
|
17514
17514
|
var CODE_FILEPATH_ATTR2 = "code.filepath";
|
|
17515
17515
|
var CODE_LINENO_ATTR2 = "code.lineno";
|
|
17516
17516
|
var BLAST_NEAREST_LIMIT = 5;
|
|
17517
|
+
function deployContextOf(ev) {
|
|
17518
|
+
const a = ev.attributes;
|
|
17519
|
+
if (!a) return void 0;
|
|
17520
|
+
const str = (k) => typeof a[k] === "string" ? a[k] : void 0;
|
|
17521
|
+
const int = (k) => typeof a[k] === "number" && Number.isFinite(a[k]) ? Math.trunc(a[k]) : void 0;
|
|
17522
|
+
const strs = (k) => {
|
|
17523
|
+
const v = a[k];
|
|
17524
|
+
return Array.isArray(v) && v.every((x) => typeof x === "string") && v.length > 0 ? v : void 0;
|
|
17525
|
+
};
|
|
17526
|
+
const ctx = {};
|
|
17527
|
+
const fault = str("k8s.fault");
|
|
17528
|
+
if (fault) ctx.fault = fault;
|
|
17529
|
+
const waiting = str("k8s.waitingReason");
|
|
17530
|
+
if (waiting) ctx.waitingReason = waiting;
|
|
17531
|
+
const image = str("k8s.image");
|
|
17532
|
+
if (image) ctx.image = image;
|
|
17533
|
+
const restarts = int("k8s.restartCount");
|
|
17534
|
+
if (restarts !== void 0) ctx.restartCount = restarts;
|
|
17535
|
+
const termReason = str("k8s.terminatedReason");
|
|
17536
|
+
if (termReason) ctx.terminatedReason = termReason;
|
|
17537
|
+
const exitCode = int("k8s.exitCode");
|
|
17538
|
+
if (exitCode !== void 0) ctx.exitCode = exitCode;
|
|
17539
|
+
const env = strs("k8s.containerEnv");
|
|
17540
|
+
if (env) ctx.containerEnv = env;
|
|
17541
|
+
const args = strs("k8s.containerArgs");
|
|
17542
|
+
if (args) ctx.containerArgs = args;
|
|
17543
|
+
const log = str("k8s.processLog");
|
|
17544
|
+
if (log) ctx.processLog = log;
|
|
17545
|
+
return Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
17546
|
+
}
|
|
17517
17547
|
function grainOf2(graph, nodeId) {
|
|
17518
17548
|
if (graph.hasNode(nodeId)) {
|
|
17519
17549
|
const t = graph.getNodeAttributes(nodeId).type;
|
|
@@ -17566,6 +17596,11 @@ function promoteCauseLocus(graph, causeNode, incidents) {
|
|
|
17566
17596
|
return locusFromNode(graph, causeNode);
|
|
17567
17597
|
}
|
|
17568
17598
|
function divergenceSummary(d) {
|
|
17599
|
+
if (d.type === "observed-symbol-mismatch" || d.source === d.target) {
|
|
17600
|
+
const symbol = "symbol" in d && d.symbol ? d.symbol : d.source;
|
|
17601
|
+
const at = "location" in d && d.location ? ` at ${d.location}` : "";
|
|
17602
|
+
return `${symbol}${at}`;
|
|
17603
|
+
}
|
|
17569
17604
|
const column = "column" in d && d.column ? `.${d.column}` : "";
|
|
17570
17605
|
const label = "table" in d && d.table ? `${d.table}${column}` : `${d.source} \u2192 ${d.target}`;
|
|
17571
17606
|
return label;
|
|
@@ -17656,6 +17691,10 @@ function buildIncidentCard(graph, errorEvent, incidents, policies) {
|
|
|
17656
17691
|
...nearest.length > 0 ? { blastRadius: { totalAffected: blast.totalAffected, nearest } } : {},
|
|
17657
17692
|
...policyCards.length > 0 ? { policies: policyCards } : {},
|
|
17658
17693
|
...divergences.length > 0 ? { divergence: divergences } : {},
|
|
17694
|
+
...(() => {
|
|
17695
|
+
const dc = deployContextOf(errorEvent);
|
|
17696
|
+
return dc ? { deployContext: dc } : {};
|
|
17697
|
+
})(),
|
|
17659
17698
|
headline: renderHeadline(graph, errorEvent, locus, rootCause?.node ?? null)
|
|
17660
17699
|
};
|
|
17661
17700
|
card.grade = gradeIncidentCard(card);
|
|
@@ -18009,6 +18048,15 @@ var TYPE_NOUNS = [
|
|
|
18009
18048
|
];
|
|
18010
18049
|
var EMBED_MIN_SCORE = 0.35;
|
|
18011
18050
|
async function resolveEntities(graph, question, searchIndex, maxNodes) {
|
|
18051
|
+
const verbatim = [];
|
|
18052
|
+
for (const word of question.split(/\s+/)) {
|
|
18053
|
+
const id = word.replace(/^["'`(<]+|["'`)>?!.,;]+$/g, "");
|
|
18054
|
+
if (!id || !graph.hasNode(id) || verbatim.some((m) => m.nodeId === id)) continue;
|
|
18055
|
+
const node = graph.getNodeAttributes(id);
|
|
18056
|
+
if (node.type === NodeType33.FrontierNode) continue;
|
|
18057
|
+
verbatim.push({ nodeId: id, label: nodeName(node), via: "id", score: 1 });
|
|
18058
|
+
}
|
|
18059
|
+
if (verbatim.length > 0) return { matched: verbatim.slice(0, maxNodes) };
|
|
18012
18060
|
const qTokens = queryTokens(question);
|
|
18013
18061
|
const normalized = question.toLowerCase();
|
|
18014
18062
|
const best = /* @__PURE__ */ new Map();
|
|
@@ -24360,4 +24408,4 @@ export {
|
|
|
24360
24408
|
deprovisionConnector,
|
|
24361
24409
|
buildApi
|
|
24362
24410
|
};
|
|
24363
|
-
//# sourceMappingURL=chunk-
|
|
24411
|
+
//# sourceMappingURL=chunk-6K22WGO7.js.map
|