log10x-mcp 1.27.0 → 1.27.1
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.
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Log10x MCP — file-mode tenx runtime config.
|
|
2
|
+
#
|
|
3
|
+
# Reads events from LOG10X_MCP_INPUT_PATH, writes templates/encoded/
|
|
4
|
+
# decoded/aggregated to LOG10X_MCP_OUTPUT_DIR. Override this file via
|
|
5
|
+
# LOG10X_MCP_FILE_CONFIG_PATH.
|
|
6
|
+
|
|
7
|
+
tenx: run
|
|
8
|
+
runtimeName: $=TenXEnv.get("LOG10X_MCP_RUNTIME_NAME", "mcp-file")
|
|
9
|
+
|
|
10
|
+
# Include the input/output MODULES, not their config wrappers. The
|
|
11
|
+
# wrappers pre-define named entries reading/writing the image's bundled
|
|
12
|
+
# sample, and `allowMultiple: true` would run those alongside the MCP's
|
|
13
|
+
# own entries below.
|
|
14
|
+
include:
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Shared bootstrap (symbols, template loading, transform, etc.)
|
|
18
|
+
- apps/shared
|
|
19
|
+
|
|
20
|
+
# Input module
|
|
21
|
+
- run/modules/input/file
|
|
22
|
+
|
|
23
|
+
# Full enrichment chain.
|
|
24
|
+
- run/initialize/inputField
|
|
25
|
+
- run/initialize/level
|
|
26
|
+
- run/initialize/group
|
|
27
|
+
- run/initialize/message
|
|
28
|
+
- run/initialize/httpCode
|
|
29
|
+
- run/initialize/lookup
|
|
30
|
+
- run/initialize/custom
|
|
31
|
+
- run/initialize/k8s
|
|
32
|
+
|
|
33
|
+
# Aggregator. Without this NO TenXSummary is produced, so the
|
|
34
|
+
# `filter: isSummary` output below matches nothing and aggregated.csv
|
|
35
|
+
# is a header with zero data rows. That silently strips the only
|
|
36
|
+
# source of per-pattern severity, and `isReducibleSeverity(undefined)`
|
|
37
|
+
# then treats every ERROR pattern as reducible. Do not remove.
|
|
38
|
+
#
|
|
39
|
+
# DELIBERATELY EXPLICIT. DO NOT RELY ON FLAVOR DEFAULTS. If a future
|
|
40
|
+
# engine emits summary rows by default, this stays. Flavors differ:
|
|
41
|
+
# the compiler-flavor image emitted neither summary rows nor anchors
|
|
42
|
+
# while the edge-flavor host binary emitted both, on the same input
|
|
43
|
+
# and version family. A pinned older image, or a flavor we have not
|
|
44
|
+
# met, silently stops producing them, severity coverage returns to
|
|
45
|
+
# 0%, every ERROR pattern is marked reducible, and NOTHING ERRORS.
|
|
46
|
+
# That silence is how this defect survived unnoticed the first time.
|
|
47
|
+
- run/aggregate/mcp
|
|
48
|
+
|
|
49
|
+
# Output module
|
|
50
|
+
- run/modules/output/event/file
|
|
51
|
+
|
|
52
|
+
# Template cache: in local-binary mode the runner shadows the install's
|
|
53
|
+
# run/template/config.yaml with files: [] so persistent state under
|
|
54
|
+
# data/templates/ and data/sample/output/ doesn't pre-load. Docker is
|
|
55
|
+
# ephemeral, so the runner skips the shadow there.
|
|
56
|
+
|
|
57
|
+
# ========================== Input options ==========================
|
|
58
|
+
|
|
59
|
+
inputFile:
|
|
60
|
+
- name: mcpFileInput
|
|
61
|
+
path: $=TenXEnv.get("LOG10X_MCP_INPUT_PATH")
|
|
62
|
+
printProgress: false
|
|
63
|
+
extractors: []
|
|
64
|
+
sourcePattern: null
|
|
65
|
+
|
|
66
|
+
# ========================= Output options =========================
|
|
67
|
+
|
|
68
|
+
outputFile:
|
|
69
|
+
|
|
70
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/templates.json"
|
|
71
|
+
writeTemplates: true
|
|
72
|
+
append: false
|
|
73
|
+
|
|
74
|
+
# DELIBERATELY EXPLICIT. DO NOT RELY ON FLAVOR DEFAULTS. Asking for
|
|
75
|
+
# these here is not redundant even once the engine emits them by
|
|
76
|
+
# default: it is what makes the MCP independent of which flavor and
|
|
77
|
+
# which image tag it happens to be talking to. See the note above.
|
|
78
|
+
#
|
|
79
|
+
# The four anchor fields after encode() are what carry Reporter-tier
|
|
80
|
+
# identity out of the engine: `pattern=,<symbolMessage>` and
|
|
81
|
+
# `patternHash=,<tenx_hash>`. cli-output-parser reads them off each
|
|
82
|
+
# encoded line, and pattern-extraction joins aggregated.csv on the
|
|
83
|
+
# tenx_hash to resolve severity. Drop them and every pattern loses its
|
|
84
|
+
# tenxHash, the aggregated join misses, and collapseBySymbolMessage
|
|
85
|
+
# becomes a no-op.
|
|
86
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/encoded.log"
|
|
87
|
+
fields:
|
|
88
|
+
- encode()
|
|
89
|
+
- patternPrefix="pattern="
|
|
90
|
+
- $=yield TenXEnv.get("symbolMessageField")
|
|
91
|
+
- patternHashPrefix="patternHash="
|
|
92
|
+
- $=yield TenXEnv.get("symbolMessageHashField")
|
|
93
|
+
|
|
94
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/decoded.log"
|
|
95
|
+
filter: isEncoded
|
|
96
|
+
fields:
|
|
97
|
+
- text
|
|
98
|
+
|
|
99
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/aggregated.csv"
|
|
100
|
+
filter: isSummary
|
|
101
|
+
header: $=yield TenXString.join(",", TenXEnv.get("enrichmentFields"), "summaryVolume", "summaryBytes", "summaryTotals") + "\n"
|
|
102
|
+
fields:
|
|
103
|
+
- $=yield TenXEnv.get("enrichmentFields")
|
|
104
|
+
- summaryVolume
|
|
105
|
+
- summaryBytes
|
|
106
|
+
- summaryTotals
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Log10x MCP — stdin-mode tenx runtime config.
|
|
2
|
+
#
|
|
3
|
+
# Used by log10x_resolve_batch. The batch is piped to tenx over stdin,
|
|
4
|
+
# templates + encoded rows + aggregated summary are written to a
|
|
5
|
+
# per-invocation temp dir via LOG10X_MCP_OUTPUT_DIR.
|
|
6
|
+
#
|
|
7
|
+
# Safe to edit: copy to ~/.log10x-mcp/stdin.config.yaml and set
|
|
8
|
+
# LOG10X_MCP_STDIN_CONFIG_PATH in the MCP env.
|
|
9
|
+
|
|
10
|
+
tenx: run
|
|
11
|
+
runtimeName: $=TenXEnv.get("LOG10X_MCP_RUNTIME_NAME", "mcp-stdin")
|
|
12
|
+
|
|
13
|
+
# Stdin input is controlled by the `stdinEnabled` env var. Force it on
|
|
14
|
+
# so the stdin reader consumes piped batches.
|
|
15
|
+
stdinEnabled: "true"
|
|
16
|
+
|
|
17
|
+
include:
|
|
18
|
+
|
|
19
|
+
# --------------------------- Shared bootstrap ---------------------------
|
|
20
|
+
# apps/shared chains run/bootstrap, run/symbol, run/template,
|
|
21
|
+
# run/transform, run/reload, run/monitor, run/console — everything
|
|
22
|
+
# the runtime needs before input/enrichment/output. Intentionally
|
|
23
|
+
# NOT including `dev` or `run/aggregate/dev` — those pull in
|
|
24
|
+
# DevOutputStream which requires an API key, and we want local
|
|
25
|
+
# offline validation to work without one.
|
|
26
|
+
- apps/shared
|
|
27
|
+
|
|
28
|
+
# --------------------------- Input ---------------------------
|
|
29
|
+
- run/input/stdin
|
|
30
|
+
|
|
31
|
+
# ------------------------ Enrichment --------------------------
|
|
32
|
+
# Full chain — keeps validation realistic. Matches the modules the
|
|
33
|
+
# paste Lambda and in-cluster fluentd use, so templates and
|
|
34
|
+
# identities here are byte-compatible with the production pipeline.
|
|
35
|
+
- run/initialize/inputField
|
|
36
|
+
- run/initialize/level
|
|
37
|
+
- run/initialize/group
|
|
38
|
+
- run/initialize/message
|
|
39
|
+
- run/initialize/httpCode
|
|
40
|
+
- run/initialize/lookup
|
|
41
|
+
- run/initialize/custom
|
|
42
|
+
- run/initialize/k8s
|
|
43
|
+
|
|
44
|
+
# --------------------------- Output ---------------------------
|
|
45
|
+
# File sink only. Output paths are constructed per-invocation from
|
|
46
|
+
# LOG10X_MCP_OUTPUT_DIR. The MCP creates a fresh tempdir per call
|
|
47
|
+
# so concurrent invocations don't collide.
|
|
48
|
+
#
|
|
49
|
+
# IMPORTANT: include the bare module (`run/modules/output/event/file`)
|
|
50
|
+
# not the full config-bearing path (`run/output/event/file`). The
|
|
51
|
+
# full path's `config.yaml` defines `outputFile:` entries pointing at
|
|
52
|
+
# `data/sample/output/*.json` — those entries APPEND to ours and the
|
|
53
|
+
# engine writes newly-discovered templates into the system cache at
|
|
54
|
+
# `/usr/local/etc/tenx/config/data/sample/output/templates.json`. On
|
|
55
|
+
# subsequent MCP runs the engine loads that system cache and
|
|
56
|
+
# correctly deduplicates already-known templates, so our tempdir's
|
|
57
|
+
# `templates.json` comes back empty even though `encoded.log` is full
|
|
58
|
+
# — which makes `resolve_batch` return "No patterns resolved" for any
|
|
59
|
+
# input whose templates were learned in a previous MCP run.
|
|
60
|
+
# Caught live by the eval-harness sub-agent on cart logs (templates
|
|
61
|
+
# were cached system-wide after the first run; second run returned
|
|
62
|
+
# 0 templates with the same input).
|
|
63
|
+
- run/modules/output/event/file
|
|
64
|
+
|
|
65
|
+
# Template cache: the engine loads cached templates from
|
|
66
|
+
# data/templates/*.json and data/sample/output/*.json at startup.
|
|
67
|
+
# The MCP's runner sets TENX_INCLUDE_PATHS with the per-invocation
|
|
68
|
+
# tempdir FIRST, so template-file globs resolve to empty directories
|
|
69
|
+
# there before hitting the install's cache. This forces all templates
|
|
70
|
+
# produced during the run to be "new" and written to templates.json.
|
|
71
|
+
|
|
72
|
+
# ========================== Input options ==========================
|
|
73
|
+
|
|
74
|
+
stdin:
|
|
75
|
+
extractors: []
|
|
76
|
+
sourcePattern: null
|
|
77
|
+
|
|
78
|
+
# ========================= Output options =========================
|
|
79
|
+
|
|
80
|
+
outputFile:
|
|
81
|
+
|
|
82
|
+
# Full structural identity library — one line per unique template.
|
|
83
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/templates.json"
|
|
84
|
+
writeTemplates: true
|
|
85
|
+
append: false
|
|
86
|
+
|
|
87
|
+
# Per-event encoded rows — one per input event, mapping to template hash.
|
|
88
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/encoded.log"
|
|
89
|
+
fields:
|
|
90
|
+
- encode()
|
|
91
|
+
|
|
92
|
+
# Per-event decoded text — for human inspection / round-trip checks.
|
|
93
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/decoded.log"
|
|
94
|
+
filter: isEncoded
|
|
95
|
+
fields:
|
|
96
|
+
- text
|
|
97
|
+
|
|
98
|
+
# Aggregated summary — used for severity / service / volume rollups.
|
|
99
|
+
- path: $=TenXEnv.get("LOG10X_MCP_OUTPUT_DIR") + "/aggregated.csv"
|
|
100
|
+
filter: isSummary
|
|
101
|
+
header: $=yield TenXString.join(",", TenXEnv.get("enrichmentFields"), "summaryVolume", "summaryBytes", "summaryTotals") + "\n"
|
|
102
|
+
fields:
|
|
103
|
+
- $=yield TenXEnv.get("enrichmentFields")
|
|
104
|
+
- summaryVolume
|
|
105
|
+
- summaryBytes
|
|
106
|
+
- summaryTotals
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "log10x-mcp",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"description": "Log10x MCP Server \u2014 per-pattern log cost attribution, root-cause investigation, pasted-batch triage, archive query/backfill, and cross-pillar correlation against customer metric backends (Grafana Cloud, Mimir, Thanos, AMP) with structural validation that refuses when it cannot prove linkage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"build",
|
|
13
|
+
"assets",
|
|
13
14
|
"default-manifest.json",
|
|
14
15
|
"README.md",
|
|
15
16
|
"LICENSE"
|