@tellagen/mcp-server 0.5.0 → 0.6.0
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/README.md +32 -6
- package/SKILL.md +44 -7
- package/contracts/mcp-protocol.json +13 -1
- package/contracts/runbooks/manifest.json +20 -10
- package/contracts/runbooks/v2/client-protocol.json +59 -2
- package/contracts/runbooks/v2/client-writes.guidance.json +16 -1
- package/contracts/runbooks/v2/fixtures/timeline-event-blocks-rejected.json +15 -1
- package/contracts/runbooks/v2/investigation-window.guidance.json +45 -0
- package/contracts/runbooks/v2/question-checks.guidance.json +49 -0
- package/contracts/runbooks/v2/timeline-event-blocks.schema.json +62 -1
- package/contracts/tellagen-runbook-contracts.json +3 -3
- package/dist/cli/doctor.d.ts +19 -0
- package/dist/cli/doctor.js +212 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/main.js +5 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/diagnosis-structure.d.ts +131 -106
- package/dist/diagnosis-structure.js +64 -7
- package/dist/diagnosis-structure.js.map +1 -1
- package/dist/doctor/checks.d.ts +42 -0
- package/dist/doctor/checks.js +175 -0
- package/dist/doctor/checks.js.map +1 -0
- package/dist/doctor/config-files.d.ts +49 -0
- package/dist/doctor/config-files.js +121 -0
- package/dist/doctor/config-files.js.map +1 -0
- package/dist/doctor/toml.d.ts +13 -0
- package/dist/doctor/toml.js +205 -0
- package/dist/doctor/toml.js.map +1 -0
- package/dist/figures.d.ts +447 -123
- package/dist/figures.js +297 -5
- package/dist/figures.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/k8s-safety.d.ts +42 -0
- package/dist/k8s-safety.js +33 -0
- package/dist/k8s-safety.js.map +1 -0
- package/dist/log-lines.d.ts +118 -0
- package/dist/log-lines.js +534 -0
- package/dist/log-lines.js.map +1 -0
- package/dist/redact.d.ts +21 -0
- package/dist/redact.js +212 -5
- package/dist/redact.js.map +1 -1
- package/dist/run-state.d.ts +37 -0
- package/dist/run-state.js +14 -0
- package/dist/run-state.js.map +1 -1
- package/dist/run-window.d.ts +59 -0
- package/dist/run-window.js +141 -0
- package/dist/run-window.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/session.d.ts +13 -0
- package/dist/session.js +32 -0
- package/dist/session.js.map +1 -1
- package/dist/source-bases.d.ts +75 -0
- package/dist/source-bases.js +125 -0
- package/dist/source-bases.js.map +1 -0
- package/dist/tool-report.d.ts +2 -0
- package/dist/tool-report.js +3 -0
- package/dist/tool-report.js.map +1 -0
- package/dist/tools/catalog.js +1 -0
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/datasources.js +70 -13
- package/dist/tools/datasources.js.map +1 -1
- package/dist/tools/diagnostics.js +85 -2
- package/dist/tools/diagnostics.js.map +1 -1
- package/dist/tools/figures.d.ts +2 -2
- package/dist/tools/figures.js +29 -7
- package/dist/tools/figures.js.map +1 -1
- package/dist/tools/findings.d.ts +8 -0
- package/dist/tools/findings.js +63 -2
- package/dist/tools/findings.js.map +1 -1
- package/dist/tools/investigations.d.ts +1 -1
- package/dist/tools/investigations.js +46 -4
- package/dist/tools/investigations.js.map +1 -1
- package/dist/tools/postmortem-runbooks.d.ts +20 -20
- package/dist/tools/source-links.d.ts +23 -0
- package/dist/tools/source-links.js +53 -16
- package/dist/tools/source-links.js.map +1 -1
- package/dist/tools/timeline.js +13 -2
- package/dist/tools/timeline.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +3 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/server.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasources.js","sourceRoot":"","sources":["../../src/tools/datasources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA+C3C,MAAM,wBAAwB,G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|
+
import { formatError, TellagenAPIError } from "../errors.js";
|
|
3
|
+
import { KUBERNETES_SAFETY_CHECK_IDS, KUBERNETES_SAFETY_PROTOCOL, KUBERNETES_SAFETY_STATUSES, } from "../k8s-safety.js";
|
|
4
|
+
import { TOOL_REPORT_PATH } from "../tool-report.js";
|
|
5
|
+
import { AVAILABLE_SOURCE_KEYS, availableSourceSchema } from "./investigations.js";
|
|
3
6
|
const accessStatusSchema = z.enum([
|
|
4
7
|
"ok",
|
|
5
8
|
"missing_tool",
|
|
@@ -74,8 +77,10 @@ export function registerDiagnosticTools(server, client) {
|
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
});
|
|
80
|
+
registerReportAvailableSources(server, client);
|
|
77
81
|
server.registerTool("tellagen_report_diagnostic_tools", {
|
|
78
|
-
description: "Report which MCP tools are visible and usable to a diagnostic session (diag_* ID), after you have checked them. Send only sanitized names and access results, never credentials. It does not start or change an investigation run."
|
|
82
|
+
description: "Report which MCP tools are visible and usable to a diagnostic session (diag_* ID), after you have checked them. Send only sanitized names and access results, never credentials. It does not start or change an investigation run. For the kubernetes tool, add the safety check as checks. " +
|
|
83
|
+
KUBERNETES_SAFETY_PROTOCOL,
|
|
79
84
|
inputSchema: {
|
|
80
85
|
diagnostic_session_id: z
|
|
81
86
|
.string()
|
|
@@ -110,4 +115,82 @@ function normalizeDiagnosticReport(report) {
|
|
|
110
115
|
reported_by: reportedBy,
|
|
111
116
|
};
|
|
112
117
|
}
|
|
118
|
+
const safetyCheckSchema = z
|
|
119
|
+
.object({
|
|
120
|
+
id: z.enum(KUBERNETES_SAFETY_CHECK_IDS).describe("Stable id of the kubectl auth can-i check"),
|
|
121
|
+
status: z.enum(KUBERNETES_SAFETY_STATUSES),
|
|
122
|
+
})
|
|
123
|
+
.strict();
|
|
124
|
+
function registerReportAvailableSources(server, client) {
|
|
125
|
+
server.registerTool("tellagen_report_available_sources", {
|
|
126
|
+
description: `Tell Tellagen which data sources this client can reach, with no run and no diagnostic session ID, so the tools table in Settings shows the current state of this client. Look at the MCP servers and shell tools you have and map them to ${AVAILABLE_SOURCE_KEYS.join(", ")}, as tellagen_pick_up_investigation does: one entry for each key, found or not_found, with an optional short detail that holds no token, no password and no path with a user name. Safe to repeat. ${KUBERNETES_SAFETY_PROTOCOL} Pass those results as kubernetes_checks only when you ran them.`,
|
|
127
|
+
inputSchema: {
|
|
128
|
+
available_sources: z
|
|
129
|
+
.array(availableSourceSchema)
|
|
130
|
+
.min(1)
|
|
131
|
+
.max(20)
|
|
132
|
+
.describe("The data sources this client can reach, one entry per catalog key, each found or not_found."),
|
|
133
|
+
profile_id: z
|
|
134
|
+
.string()
|
|
135
|
+
.trim()
|
|
136
|
+
.max(128)
|
|
137
|
+
.optional()
|
|
138
|
+
.describe("The exact MCP profile ID of the client, when it has one. Left out, TELLAGEN_MCP_PROFILE_ID is used."),
|
|
139
|
+
kubernetes_checks: z
|
|
140
|
+
.array(safetyCheckSchema)
|
|
141
|
+
.max(4)
|
|
142
|
+
.optional()
|
|
143
|
+
.describe("The four kubectl auth can-i results of the Kubernetes safety check. Leave out when you did not run them."),
|
|
144
|
+
},
|
|
145
|
+
}, async (input) => {
|
|
146
|
+
try {
|
|
147
|
+
const profileId = (input.profile_id ?? process.env.TELLAGEN_MCP_PROFILE_ID ?? "").trim();
|
|
148
|
+
const body = {
|
|
149
|
+
available_sources: input.available_sources,
|
|
150
|
+
...(profileId ? { profile_id: profileId } : {}),
|
|
151
|
+
};
|
|
152
|
+
const checks = input.kubernetes_checks ?? [];
|
|
153
|
+
let data;
|
|
154
|
+
let note;
|
|
155
|
+
try {
|
|
156
|
+
data = await client.post(TOOL_REPORT_PATH, checks.length > 0 ? { ...body, kubernetes_checks: checks } : body, { safeToRepeat: true });
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
if (checks.length > 0 && err instanceof TellagenAPIError && err.status === 400 && err.code === "unknown_field") {
|
|
160
|
+
// An older Tellagen takes the sources and not the checks.
|
|
161
|
+
data = await client.post(TOOL_REPORT_PATH, body, { safeToRepeat: true });
|
|
162
|
+
note = "This Tellagen stored the sources but not the Kubernetes safety checks yet.";
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
throw err;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
content: [{ type: "text", text: JSON.stringify(note ? { ...data, note } : data) }],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
if (err instanceof TellagenAPIError && (err.status === 404 || err.status === 405)) {
|
|
174
|
+
return {
|
|
175
|
+
content: [
|
|
176
|
+
{
|
|
177
|
+
type: "text",
|
|
178
|
+
text: JSON.stringify({
|
|
179
|
+
error: true,
|
|
180
|
+
status: err.status,
|
|
181
|
+
code: "tool_report_not_supported",
|
|
182
|
+
message: "This Tellagen does not take a tool report without a check yet. Ask an admin to update Tellagen, or start the check from Settings > Local diagnosis and use tellagen_report_diagnostic_tools with its diag_ ID.",
|
|
183
|
+
}),
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
isError: true,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
content: [{ type: "text", text: formatError(err) }],
|
|
191
|
+
isError: true,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
113
196
|
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/tools/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/tools/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAA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,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;aAC5F,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,gBAAgB,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,CAAC;gBAClF,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gCACnB,KAAK,EAAE,IAAI;gCACX,MAAM,EAAE,GAAG,CAAC,MAAM;gCAClB,IAAI,EAAE,2BAA2B;gCACjC,OAAO,EACL,gNAAgN;6BACnN,CAAC;yBACH;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/figures.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import type { TellagenClient } from "../client.js";
|
|
3
3
|
export declare const FIGURE_GUIDE_URI = "resource://tellagen/figure-guide";
|
|
4
4
|
/** Added to the server instructions so every agent knows figures exist. */
|
|
5
|
-
export declare const FIGURE_INSTRUCTIONS = "Figures: Tellagen draws typed widgets (stats, compare, trend, table, checks, changes, range_overlap, histogram, run_history, diff) from data you send, in the Diagnosis tab, on the timeline and in the postmortem. Use tellagen_build_figure to turn the numbers you read from a tool result into a figure Tellagen accepts: it puts a time series on an even grid of at most 500 points, turns deploy, alert and rollback times into marks, turns cumulative histogram buckets into bucket counts, maps a GitHub Actions run list to a run history, and enforces every limit. Attach the result as a causal step's figure or as a block on a timeline event. A figure owns its numbers: never repeat them in prose, never invent one, and keep units in the unit field. Read resource://tellagen/figure-guide to choose the widget that fits the question and to learn how to plot data on it.";
|
|
6
|
-
export declare const FIGURE_GUIDE = "# Tellagen figures\n\nA figure is a small typed widget that Tellagen draws for you. You send the data. Tellagen draws it the same way in the Diagnosis tab, on the timeline and in the postmortem, and a responder can pin one from one place to another.\n\nUse tellagen_build_figure to make one. It reshapes the numbers you already read from a tool result and checks them against Tellagen's limits before you send anything. It has no data of its own.\n\n## Rules every figure follows\n\n1. A figure owns its numbers. The sentence next to it says what happened and why. It does not repeat the numbers.\n2. Never invent a number. Every value comes from a tool result you can cite. If you do not have the value, leave that row, figure or block out.\n3. Units go in the unit field, once. Do not put them inside a number, and do not repeat them in every label.\n4. One figure per causal step, under the step it proves. A step with no good figure carries none.\n5. Say where the data came from. A trend carries its query in source. For other figures, cite the tool result in the step's evidence refs.\n6. A tone is a meaning, not emphasis: good for healthy or recovered, warn for needs attention, bad for failing, neutral for a plain fact.\n7. The limits below are enforced. A figure over a limit is rejected with the field named. Shorten the data yourself. Do not expect it to be trimmed.\n\n## Pick the widget by the question\n\n| The question | Widget | Step figure | Timeline block | Limits |\n| --- | --- | --- | --- | --- |\n| What are the few numbers that matter? | stats | yes | yes | 1 to 8 items (4 or fewer is best), title 80, label 48, value 32, caption 64 |\n| Did it get better, and is it inside the line? | compare | yes | yes | 1 to 8 rows, 3 details per row |\n| When did it start, and what happened around then? | trend | yes | yes | 2 to 500 points, 3 marks |\n| Which items rank highest? | table | no | yes | 1 to 6 columns, 1 to 12 rows, cell 64 |\n| Which checks passed, failed or did not run? | checks | yes | yes | 1 to 12 items, label 80, detail 160 |\n| What moved from one thing to another? | changes | no | yes | 1 to 8 rows, from and to 80, note 160 |\n| Where do two or more ranges meet? | range_overlap | yes | yes | 2 to 4 rows, label 80, unit 12 |\n| Did the slow tail move, when the average did not? | histogram | yes | yes | 3 to 61 edges (2 to 60 buckets), one count per bucket |\n| Which build broke, and which fixed it? | run_history | yes | yes | 2 to 30 runs, runs_not_shown, 4 marks, ref 80, sha 64, job 80, url 500 |\n| What exactly changed in the code? | diff | yes | yes | path 200, ref 64, 1 to 6 hunks, 12 changed lines in all, line 160 |\n\n## How to plot data on each widget\n\n### compare: before and after\n\nUse it for a value measured before and after a deploy, rollback, fix or config change. One row per host, route, query or job, biggest movers first.\n\n1. Pick two windows of the same length, one before the change and one after. Run the same query on both.\n2. Take one number per row from each window, for example the p95 over the window.\n3. Set unit once. Set better to lower or higher. Add a threshold for the SLO or alert line.\n\n { \"type\": \"compare\", \"title\": \"p95 latency by route\", \"unit\": \"ms\", \"better\": \"lower\",\n \"threshold\": { \"value\": 500, \"label\": \"SLO 500 ms\" },\n \"rows\": [ { \"label\": \"POST /checkout\", \"before\": 180, \"after\": 640 },\n { \"label\": \"GET /cart\", \"before\": 95, \"after\": 110 } ] }\n\nA distribution is a compare of percentiles: use p50, p95 and p99 as rows, with the SLO as the threshold.\n\n### trend: a series over time\n\nUse it when the evidence is how a value moved. Send the raw samples as points and the times of the events that explain the shape as events.\n\n1. Run a range query. Keep the time and the value of every sample.\n2. Send them as points with t and v. t is an ISO time or Unix time in seconds or milliseconds. v may be a numeric string, as Prometheus returns it. A null or NaN is skipped.\n3. Tellagen puts the points on an even grid of at most max_points (default 240, most 500) and sets start and step_seconds. Samples that share a step combine with reduce. Use max for error rate and latency so a spike survives, mean for a smooth rate.\n4. Add up to three events: a deploy, an alert, a rollback. They become marks at the right index. An event outside the range is left out and reported.\n5. Fill source with kind, datasource, query and step.\n\n { \"type\": \"trend\", \"title\": \"5xx share of requests\", \"unit\": \"%\", \"reduce\": \"max\",\n \"points\": [ { \"t\": \"2026-11-02T14:00:00Z\", \"v\": \"0.24\" }, { \"t\": \"2026-11-02T14:01:00Z\", \"v\": \"0.27\" } ],\n \"events\": [ { \"at\": \"2026-11-02T14:42:00Z\", \"label\": \"Deploy\" }, { \"at\": \"2026-11-02T15:28:00Z\", \"label\": \"Rollback\" } ],\n \"threshold\": { \"value\": 1, \"label\": \"SLO 1%\" },\n \"source\": { \"kind\": \"promql\", \"datasource\": \"prometheus\", \"query\": \"sum(rate(...))\", \"step\": \"1m\" } }\n\nIf the values are already on an even grid, send series with start and step_seconds, and marks by index. Empty steps are filled with a straight line and reported, so say so in the step when it matters.\n\n### stats: the few numbers that matter\n\nAim for four or fewer. Each has a short label, a value, a caption that says what it is measured on, and a tone. The first four are tiles in one row, so put the total first and give a tone only to the exception. Items five to eight are drawn as plain rows under the tiles. When this Tellagen lists figure_extras_v1 in server_capabilities you may also send a title (up to 80 characters) to name the tiles, for example \"Tests of the run\", and up to eight items. Pass run_id to tellagen_build_figure for this check. Without figure_extras_v1 the builder drops the title and every item after the fourth, and says so in notes, because an older Tellagen rejects them and drops the whole figure.\n\n { \"type\": \"stats\", \"items\": [ { \"label\": \"Failed e2e tests\", \"value\": \"1 of 121\", \"caption\": \"master, Oct 30\", \"tone\": \"bad\" } ] }\n\nA tile caption says what the number is measured on. The name of the source, such as \"node --test summary\", belongs in a source chip (the step's evidence refs), not in a caption.\n\n### table: a ranked list\n\nTop queries, failing routes, slowest endpoints. Give columns, then one cell per column in every row. Numbers are written as text. Keep each cell under 64 characters.\n\n### checks: pass or fail per check\n\nA recovery checklist or a CI job list. Put failures first. The block holds 12 items, so for a larger list send every failure and the checks that matter, and give the counts of the rest in the step.\n\n { \"type\": \"checks\", \"title\": \"Jobs on run 41289327533\",\n \"items\": [ { \"label\": \"Frontend Tests\", \"state\": \"fail\", \"detail\": \"1 failed of 13516\" }, { \"label\": \"E2E Tests\", \"state\": \"pass\" } ] }\n\n### changes: a value that moved\n\nA setting, a version, a limit. Each row has a label and a from, a to, or both, with an optional note.\n\n### range_overlap: ranges that meet\n\nUse it when the cause is two ranges meeting: layout offsets, a maintenance window against an error spike, memory or port ranges. Two to four rows, each with a label, a from and a to (from not above to), all in one unit.\n\n1. Read each range from a tool result: the config, the layout, the window times as numbers.\n2. Send min and max for the whole range when you want an overview strip, and every row must fall inside them. Leave out window: Tellagen zooms to the overlap.\n3. Never send the overlap itself. Tellagen computes it, and the builder tells you what it is in summary.\n\n { \"type\": \"range_overlap\", \"title\": \"Header and sticky bar\", \"unit\": \"px\",\n \"rows\": [ { \"label\": \"Header\", \"from\": 0, \"to\": 153 }, { \"label\": \"Sticky bar\", \"from\": 149, \"to\": 197 } ] }\n\n### histogram: a distribution before and after\n\nUse it when an average hides a slow tail. Send bucket counts for two equal windows. Tellagen computes p50, p95, p99 and the share over the threshold from the buckets, so never send percentiles.\n\n1. Run the bucket query on a window before the change and on one of the same length after it, for example sum by (le) (increase(http_request_duration_seconds_bucket{service=\"checkout\"}[30m])) at the end of each window.\n2. Send the result as buckets: one entry per le with the cumulative before and after counts, as Prometheus returns them, numeric strings and \"+Inf\" included.\n3. The builder turns them into edges (lower_edge, default 0, then every finite le) and one count per bucket. Observations above the last finite le have no bucket: the builder rejects them unless you set overflow to drop, and then you say so in the step.\n4. Add the SLO as threshold, in the unit of the le values.\n\n { \"type\": \"histogram\", \"title\": \"Checkout latency\", \"unit\": \"s\",\n \"buckets\": [ { \"le\": \"0.1\", \"before\": \"820\", \"after\": \"610\" }, { \"le\": \"0.5\", \"before\": \"990\", \"after\": \"800\" },\n { \"le\": \"1\", \"before\": \"1000\", \"after\": \"940\" }, { \"le\": \"+Inf\", \"before\": \"1000\", \"after\": \"940\" } ],\n \"threshold\": { \"value\": 0.5, \"label\": \"SLO 500 ms\" } }\n\nIf you already have per-bucket counts, send edges, before and after instead: before and after hold exactly one count per bucket (one fewer than edges), none negative.\n\n### run_history: CI builds, jobs, canaries or deploys\n\nUse it for a regression in CI or a bad deploy. Runs go oldest first, each with a ref, a result (success, failure, cancelled, pending), and the failing job when one failed.\n\n1. List the workflow runs of the branch around the failure: the GitHub Actions REST list, the GitHub MCP list of workflow runs, or gh run list --json number,databaseId,headSha,conclusion,status,createdAt,startedAt,event,url.\n2. Send them as github_runs, as they came. The builder maps each run: ref #run_number, the head sha, the start time, the event as trigger, the run page as url, and the conclusion as result (timed_out and startup_failure count as failure). A run whose conclusion is skipped, neutral, stale or action_required has no result: leave it out or send runs yourself. Runs are put oldest first by time.\n3. Add job to the failing runs: the name of the job that failed, from the run's jobs list.\n4. Add marks for the change that broke it (change_ref regression) and the one that fixed it (fix). Give the sha of the change and the builder places the mark before the first run built from it, or give between with the refs of the two neighbouring runs. change_ref may be a change_refs role: regression_source and first_bad become regression, fix stays fix, others become change.\n5. Set repo to owner/name so each run links to its page, and an optional span such as { \"from\": \"#4151\", \"to\": \"#4163\", \"label\": \"E2E Tests failed\" }.\n6. A history holds at most 30 runs. If yours has more, send the 30 that matter (the runs around the break and the fix, oldest first) and set runs_not_shown to how many you left out; the strip then says \"N more runs not shown.\" Only when this Tellagen lists figure_extras_v1; without it the builder drops runs_not_shown and says so in notes.\n\n { \"type\": \"run_history\", \"title\": \"E2E on master\", \"repo\": \"acme/shop\", \"branch\": \"master\",\n \"github_runs\": [ { \"run_number\": 4150, \"head_sha\": \"9f2c1e0\", \"conclusion\": \"success\", \"created_at\": \"2026-10-30T08:00:00Z\", \"event\": \"push\" },\n { \"run_number\": 4151, \"head_sha\": \"4b7a2d1\", \"conclusion\": \"failure\", \"created_at\": \"2026-10-30T09:00:00Z\", \"event\": \"push\", \"job\": \"E2E Tests\" } ],\n \"marks\": [ { \"sha\": \"4b7a2d1\", \"change_ref\": \"regression\", \"title\": \"Move the header to a sticky layout\" } ] }\n\n### diff: the change that broke or fixed it\n\nUse it for the lines of the change that broke or fixed it. A short change is sent whole.\n\n1. Read the commit or pull request file from GitHub. additions and deletions are the size of the whole change, from the commit or the pull request, never counted by you from a part of it.\n2. If the change has 12 or fewer changed lines (in at most 6 hunks), send all of them. Send the file's patch as patch: the builder keeps every line, one hunk per @@ header.\n3. If it has more, send the whole hunks the claim cites, in file order, at most 3 hunks and at most 12 changed lines in all: give their numbers in select_hunks (1 is the first @@ header). If one hunk alone is longer than 12 changed lines, the builder cuts it after a complete pair of removed and added lines.\n4. Never send a changed line without its counterpart: each removed line comes with the line that replaced it, next to it, as a patch lists them. If you write hunks yourself, keep that order and keep the indentation.\n5. When the pickup lists diff_lines_v1 in server_capabilities, a hunk may also carry up to 2 unchanged lines (op context) before and after it, and old_no and new_no (1-based) on every line. The builder adds them from the patch headers when you pass run_id. Never invent a number: if you do not have the real numbers, leave all of them out. Without diff_lines_v1 the builder sends only changed lines and no numbers, and says so in notes.\n6. Set path, ref (the commit sha) and repo.\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"-\", \"text\": \" position: static;\" }, { \"op\": \"+\", \"text\": \" position: sticky;\" } ] ] }\n\nWith diff_lines_v1 the same change, with the unchanged lines around it and the numbers of the real file:\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"context\", \"text\": \".header {\", \"old_no\": 11, \"new_no\": 11 },\n { \"op\": \"-\", \"text\": \" position: static;\", \"old_no\": 12 }, { \"op\": \"+\", \"text\": \" position: sticky;\", \"new_no\": 12 },\n { \"op\": \"context\", \"text\": \"}\", \"old_no\": 13, \"new_no\": 13 } ] ] }\n\n## Where the figure goes\n\n- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB. This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).\n- A timeline event: put it in blocks on tellagen_post_timeline_event or tellagen_update_timeline_event. Any type is allowed, up to 12 per event. An update replaces the whole array, so send every block you want to keep, and [] clears them. Set slot to summary to draw the block above the note, or anchor to the exact heading text it sits under. Not both. Set postmortem to false to keep a block out of the postmortem.\n\nCall tellagen_build_figure with placement step_figure or timeline_block, and use the block it returns as it is.\n\n## Getting the data from other servers\n\n- Grafana or Prometheus: a range query returns time and value pairs. Send them as points. Run the same query on two equal windows for a compare.\n- Loki: a count over time by step is a trend. A count by label over two windows is a compare.\n- Prometheus histograms: the _bucket series summed by le over two equal windows are a histogram. Send them as buckets.\n- GitHub Actions: failed jobs of one run go in checks, failures first. The runs of a branch are a run_history: send the run list as github_runs.\n- GitHub commits and pull requests: the lines that broke or fixed it are a diff. Send the file's patch, and the change's additions and deletions.\n- Kubernetes: restarts or ready counts before and after are a compare, a list of pods is a table.\n\n## If Tellagen rejects a figure\n\nThe builder names the field. For a timeline block the API answers 400 invalid_block with field and details.errors. Fix exactly those fields and send once more. Do not drop a figure to get past an error unless the data in it is not real.\n";
|
|
5
|
+
export declare const FIGURE_INSTRUCTIONS = "Figures: Tellagen draws typed widgets (stats, compare, trend, table, checks, changes, range_overlap, histogram, run_history, diff, log_lines) from data you send, in the Diagnosis tab, on the timeline and in the postmortem. Use tellagen_build_figure to turn the numbers you read from a tool result into a figure Tellagen accepts: it puts a time series on an even grid of at most 500 points, turns deploy, alert and rollback times into marks, turns cumulative histogram buckets into bucket counts, maps a GitHub Actions run list to a run history, picks the log lines of a Loki result (log_lines), and enforces every limit. Attach the result as a causal step's figure or as a block on a timeline event. A figure owns its numbers: never repeat them in prose, never invent one, and keep units in the unit field. Read resource://tellagen/figure-guide to choose the widget that fits the question and to learn how to plot data on it.";
|
|
6
|
+
export declare const FIGURE_GUIDE = "# Tellagen figures\n\nA figure is a small typed widget that Tellagen draws for you. You send the data. Tellagen draws it the same way in the Diagnosis tab, on the timeline and in the postmortem, and a responder can pin one from one place to another.\n\nUse tellagen_build_figure to make one. It reshapes the numbers you already read from a tool result and checks them against Tellagen's limits before you send anything. It has no data of its own.\n\n## Rules every figure follows\n\n1. A figure owns its numbers. The sentence next to it says what happened and why. It does not repeat the numbers.\n2. Never invent a number. Every value comes from a tool result you can cite. If you do not have the value, leave that row, figure or block out.\n3. Units go in the unit field, once. Do not put them inside a number, and do not repeat them in every label.\n4. One figure per causal step, under the step it proves. A step with no good figure carries none.\n5. Say where the data came from. A trend carries its query in source. For other figures, cite the tool result in the step's evidence refs.\n6. A tone is a meaning, not emphasis: good for healthy or recovered, warn for needs attention, bad for failing, neutral for a plain fact.\n7. The limits below are enforced. A figure over a limit is rejected with the field named. Shorten the data yourself. Do not expect it to be trimmed.\n\n## Pick the widget by the question\n\n| The question | Widget | Step figure | Timeline block | Limits |\n| --- | --- | --- | --- | --- |\n| What are the few numbers that matter? | stats | yes | yes | 1 to 8 items (4 or fewer is best), title 80, label 48, value 32, caption 64 |\n| Did it get better, and is it inside the line? | compare | yes | yes | 1 to 8 rows, 3 details per row |\n| When did it start, and what happened around then? | trend | yes | yes | 2 to 500 points, 3 marks |\n| Which items rank highest? | table | no | yes | 1 to 6 columns, 1 to 12 rows, cell 64 |\n| Which checks passed, failed or did not run? | checks | yes | yes | 1 to 12 items, label 80, detail 160 |\n| What moved from one thing to another? | changes | no | yes | 1 to 8 rows, from and to 80, note 160 |\n| Where do two or more ranges meet? | range_overlap | yes | yes | 2 to 4 rows, label 80, unit 12 |\n| Did the slow tail move, when the average did not? | histogram | yes | yes | 3 to 61 edges (2 to 60 buckets), one count per bucket |\n| Which build broke, and which fixed it? | run_history | yes | yes | 2 to 30 runs, runs_not_shown, 4 marks, ref 80, sha 64, job 80, url 500 |\n| What exactly changed in the code? | diff | yes | yes | path 200, ref 64, 1 to 6 hunks, 12 changed lines in all, line 160 |\n| Which log lines prove it, or show there are none? | log_lines | yes | yes | 0 to 8 lines, line text 500, 6 fields, note 160, matched and scanned up to 1,000,000,000 |\n\n## How to plot data on each widget\n\n### compare: before and after\n\nUse it for a value measured before and after a deploy, rollback, fix or config change. One row per host, route, query or job, biggest movers first.\n\n1. Pick two windows of the same length, one before the change and one after. Run the same query on both.\n2. Take one number per row from each window, for example the p95 over the window.\n3. Set unit once. Set better to lower or higher. Add a threshold for the SLO or alert line.\n\n { \"type\": \"compare\", \"title\": \"p95 latency by route\", \"unit\": \"ms\", \"better\": \"lower\",\n \"threshold\": { \"value\": 500, \"label\": \"SLO 500 ms\" },\n \"rows\": [ { \"label\": \"POST /checkout\", \"before\": 180, \"after\": 640 },\n { \"label\": \"GET /cart\", \"before\": 95, \"after\": 110 } ] }\n\nA distribution is a compare of percentiles: use p50, p95 and p99 as rows, with the SLO as the threshold.\n\n### trend: a series over time\n\nUse it when the evidence is how a value moved. Send the raw samples as points and the times of the events that explain the shape as events.\n\n1. Run a range query. Keep the time and the value of every sample.\n2. Send them as points with t and v. t is an ISO time or Unix time in seconds or milliseconds. v may be a numeric string, as Prometheus returns it. A null or NaN is skipped.\n3. Tellagen puts the points on an even grid of at most max_points (default 240, most 500) and sets start and step_seconds. Samples that share a step combine with reduce. Use max for error rate and latency so a spike survives, mean for a smooth rate.\n4. Add up to three events: a deploy, an alert, a rollback. They become marks at the right index. An event outside the range is left out and reported.\n5. Fill source with kind, datasource, query and step.\n\n { \"type\": \"trend\", \"title\": \"5xx share of requests\", \"unit\": \"%\", \"reduce\": \"max\",\n \"points\": [ { \"t\": \"2026-11-02T14:00:00Z\", \"v\": \"0.24\" }, { \"t\": \"2026-11-02T14:01:00Z\", \"v\": \"0.27\" } ],\n \"events\": [ { \"at\": \"2026-11-02T14:42:00Z\", \"label\": \"Deploy\" }, { \"at\": \"2026-11-02T15:28:00Z\", \"label\": \"Rollback\" } ],\n \"threshold\": { \"value\": 1, \"label\": \"SLO 1%\" },\n \"source\": { \"kind\": \"promql\", \"datasource\": \"prometheus\", \"query\": \"sum(rate(...))\", \"step\": \"1m\" } }\n\nIf the values are already on an even grid, send series with start and step_seconds, and marks by index. Empty steps are filled with a straight line and reported, so say so in the step when it matters.\n\n### stats: the few numbers that matter\n\nAim for four or fewer. Each has a short label, a value, a caption that says what it is measured on, and a tone. The first four are tiles in one row, so put the total first and give a tone only to the exception. Items five to eight are drawn as plain rows under the tiles. When this Tellagen lists figure_extras_v1 in server_capabilities you may also send a title (up to 80 characters) to name the tiles, for example \"Tests of the run\", and up to eight items. Pass run_id to tellagen_build_figure for this check. Without figure_extras_v1 the builder drops the title and every item after the fourth, and says so in notes, because an older Tellagen rejects them and drops the whole figure.\n\n { \"type\": \"stats\", \"items\": [ { \"label\": \"Failed e2e tests\", \"value\": \"1 of 121\", \"caption\": \"master, Oct 30\", \"tone\": \"bad\" } ] }\n\nA tile caption says what the number is measured on. The name of the source, such as \"node --test summary\", belongs in a source chip (the step's evidence refs), not in a caption.\n\n### table: a ranked list\n\nTop queries, failing routes, slowest endpoints. Give columns, then one cell per column in every row. Numbers are written as text. Keep each cell under 64 characters.\n\n### checks: pass or fail per check\n\nA recovery checklist or a CI job list. Put failures first. The block holds 12 items, so for a larger list send every failure and the checks that matter, and give the counts of the rest in the step.\n\n { \"type\": \"checks\", \"title\": \"Jobs on run 41289327533\",\n \"items\": [ { \"label\": \"Frontend Tests\", \"state\": \"fail\", \"detail\": \"1 failed of 13516\" }, { \"label\": \"E2E Tests\", \"state\": \"pass\" } ] }\n\n### changes: a value that moved\n\nA setting, a version, a limit. Each row has a label and a from, a to, or both, with an optional note.\n\n### range_overlap: ranges that meet\n\nUse it when the cause is two ranges meeting: layout offsets, a maintenance window against an error spike, memory or port ranges. Two to four rows, each with a label, a from and a to (from not above to), all in one unit.\n\n1. Read each range from a tool result: the config, the layout, the window times as numbers.\n2. Send min and max for the whole range when you want an overview strip, and every row must fall inside them. Leave out window: Tellagen zooms to the overlap.\n3. Never send the overlap itself. Tellagen computes it, and the builder tells you what it is in summary.\n\n { \"type\": \"range_overlap\", \"title\": \"Header and sticky bar\", \"unit\": \"px\",\n \"rows\": [ { \"label\": \"Header\", \"from\": 0, \"to\": 153 }, { \"label\": \"Sticky bar\", \"from\": 149, \"to\": 197 } ] }\n\n### histogram: a distribution before and after\n\nUse it when an average hides a slow tail. Send bucket counts for two equal windows. Tellagen computes p50, p95, p99 and the share over the threshold from the buckets, so never send percentiles.\n\n1. Run the bucket query on a window before the change and on one of the same length after it, for example sum by (le) (increase(http_request_duration_seconds_bucket{service=\"checkout\"}[30m])) at the end of each window.\n2. Send the result as buckets: one entry per le with the cumulative before and after counts, as Prometheus returns them, numeric strings and \"+Inf\" included.\n3. The builder turns them into edges (lower_edge, default 0, then every finite le) and one count per bucket. Observations above the last finite le have no bucket: the builder rejects them unless you set overflow to drop, and then you say so in the step.\n4. Add the SLO as threshold, in the unit of the le values.\n\n { \"type\": \"histogram\", \"title\": \"Checkout latency\", \"unit\": \"s\",\n \"buckets\": [ { \"le\": \"0.1\", \"before\": \"820\", \"after\": \"610\" }, { \"le\": \"0.5\", \"before\": \"990\", \"after\": \"800\" },\n { \"le\": \"1\", \"before\": \"1000\", \"after\": \"940\" }, { \"le\": \"+Inf\", \"before\": \"1000\", \"after\": \"940\" } ],\n \"threshold\": { \"value\": 0.5, \"label\": \"SLO 500 ms\" } }\n\nIf you already have per-bucket counts, send edges, before and after instead: before and after hold exactly one count per bucket (one fewer than edges), none negative.\n\n### run_history: CI builds, jobs, canaries or deploys\n\nUse it for a regression in CI or a bad deploy. Runs go oldest first, each with a ref, a result (success, failure, cancelled, pending), and the failing job when one failed.\n\n1. List the workflow runs of the branch around the failure: the GitHub Actions REST list, the GitHub MCP list of workflow runs, or gh run list --json number,databaseId,headSha,conclusion,status,createdAt,startedAt,event,url.\n2. Send them as github_runs, as they came. The builder maps each run: ref #run_number, the head sha, the start time, the event as trigger, the run page as url, and the conclusion as result (timed_out and startup_failure count as failure). A run whose conclusion is skipped, neutral, stale or action_required has no result: leave it out or send runs yourself. Runs are put oldest first by time.\n3. Add job to the failing runs: the name of the job that failed, from the run's jobs list.\n4. Add marks for the change that broke it (change_ref regression) and the one that fixed it (fix). Give the sha of the change and the builder places the mark before the first run built from it, or give between with the refs of the two neighbouring runs. change_ref may be a change_refs role: regression_source and first_bad become regression, fix stays fix, others become change.\n5. Set repo to owner/name so each run links to its page, and an optional span such as { \"from\": \"#4151\", \"to\": \"#4163\", \"label\": \"E2E Tests failed\" }.\n6. A history holds at most 30 runs. If yours has more, send the 30 that matter (the runs around the break and the fix, oldest first) and set runs_not_shown to how many you left out; the strip then says \"N more runs not shown.\" Only when this Tellagen lists figure_extras_v1; without it the builder drops runs_not_shown and says so in notes.\n\n { \"type\": \"run_history\", \"title\": \"E2E on master\", \"repo\": \"acme/shop\", \"branch\": \"master\",\n \"github_runs\": [ { \"run_number\": 4150, \"head_sha\": \"9f2c1e0\", \"conclusion\": \"success\", \"created_at\": \"2026-10-30T08:00:00Z\", \"event\": \"push\" },\n { \"run_number\": 4151, \"head_sha\": \"4b7a2d1\", \"conclusion\": \"failure\", \"created_at\": \"2026-10-30T09:00:00Z\", \"event\": \"push\", \"job\": \"E2E Tests\" } ],\n \"marks\": [ { \"sha\": \"4b7a2d1\", \"change_ref\": \"regression\", \"title\": \"Move the header to a sticky layout\" } ] }\n\n### diff: the change that broke or fixed it\n\nUse it for the lines of the change that broke or fixed it. A short change is sent whole.\n\n1. Read the commit or pull request file from GitHub. additions and deletions are the size of the whole change, from the commit or the pull request, never counted by you from a part of it.\n2. If the change has 12 or fewer changed lines (in at most 6 hunks), send all of them. Send the file's patch as patch: the builder keeps every line, one hunk per @@ header.\n3. If it has more, send the whole hunks the claim cites, in file order, at most 3 hunks and at most 12 changed lines in all: give their numbers in select_hunks (1 is the first @@ header). If one hunk alone is longer than 12 changed lines, the builder cuts it after a complete pair of removed and added lines.\n4. Never send a changed line without its counterpart: each removed line comes with the line that replaced it, next to it, as a patch lists them. If you write hunks yourself, keep that order and keep the indentation.\n5. When the pickup lists diff_lines_v1 in server_capabilities, a hunk may also carry up to 2 unchanged lines (op context) before and after it, and old_no and new_no (1-based) on every line. The builder adds them from the patch headers when you pass run_id. Never invent a number: if you do not have the real numbers, leave all of them out. Without diff_lines_v1 the builder sends only changed lines and no numbers, and says so in notes.\n6. Set path, ref (the commit sha) and repo.\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"-\", \"text\": \" position: static;\" }, { \"op\": \"+\", \"text\": \" position: sticky;\" } ] ] }\n\nWith diff_lines_v1 the same change, with the unchanged lines around it and the numbers of the real file:\n\n { \"type\": \"diff\", \"path\": \"web/components/Header.tsx\", \"repo\": \"acme/shop\", \"ref\": \"4b7a2d1\", \"additions\": 1, \"deletions\": 1,\n \"hunks\": [ [ { \"op\": \"context\", \"text\": \".header {\", \"old_no\": 11, \"new_no\": 11 },\n { \"op\": \"-\", \"text\": \" position: static;\", \"old_no\": 12 }, { \"op\": \"+\", \"text\": \" position: sticky;\", \"new_no\": 12 },\n { \"op\": \"context\", \"text\": \"}\", \"old_no\": 13, \"new_no\": 13 } ] ] }\n\n### log_lines: the log lines that prove a claim, or that there are none\n\nUse it for log evidence instead of a stats tile: the lines themselves, how many lines matched out of how many were scanned, and the range that was searched. It needs log_lines_v1 in server_capabilities. Pass run_id so the builder can check this, and so it can use the run window as the default range.\n\n1. Run the Loki query over a range inside the run window. Keep the whole result, with the stream labels.\n2. Send it as streams (the Loki result as returned: [{ stream: { labels }, values: [[ns, line]] }]) or as entries ([{ timestamp, line, labels }]), with query, datasource, from and to. Never write a line yourself: the builder takes only lines that are in the result.\n3. The builder keeps at most 8 lines, the ones that show the event first, and reads each level from a stream label, from the JSON or logfmt of the line, or from a word at its start. Text is kept as logged: it only loses colour codes and secrets, and line breaks become a mark.\n4. matched is the number of lines the query matched in the range. It defaults to the lines you sent, so send matched when the query had a limit. scanned is the number of lines the query looked at (query_loki_stats gives it). The builder works out lines_not_shown.\n5. Say which lines show the event: match lists the terms that mark a line matches_event. Mark a line that looks like proof and is not with marks, for example a line of another tenant, company or request: { \"field\": { \"key\": \"company_id\", \"value\": \"578\" }, \"relation\": \"unrelated\", \"note\": \"Company 578, 11 hours after the event\" }. An unrelated line stays in the figure, with its note, so a reader can see why it is not proof. Never use the text of an unrelated line as the quote of a finding.\n6. A query that found nothing is proof only with its range. Send matched 0 with scanned, from and to: 0 of 2,313 lines from 00:26 to 01:26 says something, an empty list with no range does not. Send streams as an empty list.\n7. Set event_at to the moment of the event, so the page can say how far a line is from it.\n\n { \"type\": \"log_lines\", \"title\": \"Errors from the worker\", \"query\": \"{app=\\\"worker\\\"} |= \\\"timeout\\\"\", \"datasource\": \"loki\",\n \"from\": \"2026-11-14T00:11:00Z\", \"to\": \"2026-11-14T01:26:00Z\", \"event_at\": \"2026-11-14T00:41:00Z\", \"scanned\": 2313,\n \"streams\": [ { \"stream\": { \"app\": \"worker\", \"pod\": \"worker-7\" }, \"values\": [ [ \"1794010860000000000\", \"level=error msg=\\\"upstream timeout\\\" task=sync\" ] ] } ],\n \"match\": [ \"upstream timeout\" ] }\n\n## Where the figure goes\n\n- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB (48 KB for log_lines). This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not list log_lines_v1 drops a log_lines figure, so the builder refuses to make one. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).\n- A timeline event: put it in blocks on tellagen_post_timeline_event or tellagen_update_timeline_event. Any type is allowed, up to 12 per event. An update replaces the whole array, so send every block you want to keep, and [] clears them. Set slot to summary to draw the block above the note, or anchor to the exact heading text it sits under. Not both. Set postmortem to false to keep a block out of the postmortem.\n\nCall tellagen_build_figure with placement step_figure or timeline_block, and use the block it returns as it is.\n\n## Getting the data from other servers\n\n- Grafana or Prometheus: a range query returns time and value pairs. Send them as points. Run the same query on two equal windows for a compare.\n- Loki: a count over time by step is a trend. A count by label over two windows is a compare. The lines of a query result are a log_lines figure, and it is better than a stats tile for log evidence, because the reader can read the lines.\n- Prometheus histograms: the _bucket series summed by le over two equal windows are a histogram. Send them as buckets.\n- GitHub Actions: failed jobs of one run go in checks, failures first. The runs of a branch are a run_history: send the run list as github_runs.\n- GitHub commits and pull requests: the lines that broke or fixed it are a diff. Send the file's patch, and the change's additions and deletions.\n- Kubernetes: restarts or ready counts before and after are a compare, a list of pods is a table.\n\n## If Tellagen rejects a figure\n\nThe builder names the field. For a timeline block the API answers 400 invalid_block with field and details.errors. Fix exactly those fields and send once more. Do not drop a figure to get past an error unless the data in it is not real.\n";
|
|
7
7
|
export declare function registerFigureTools(server: McpServer, client: TellagenClient): void;
|
|
8
8
|
/** Registered from createServer, next to the other resources. */
|
|
9
9
|
export declare function registerFigureResource(server: McpServer): void;
|
package/dist/tools/figures.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { activeRunId } from "../active-run.js";
|
|
3
|
-
import { supportsDiffLines, supportsFigureExtras } from "../diagnosis-structure.js";
|
|
3
|
+
import { runWindowOf, supportsDiffLines, supportsFigureExtras, supportsLogLines } from "../diagnosis-structure.js";
|
|
4
4
|
import { buildFigure, figureToolInputSchema, withoutFigureExtrasInBlock } from "../figures.js";
|
|
5
5
|
export const FIGURE_GUIDE_URI = "resource://tellagen/figure-guide";
|
|
6
6
|
/** Added to the server instructions so every agent knows figures exist. */
|
|
7
|
-
export const FIGURE_INSTRUCTIONS = `Figures: Tellagen draws typed widgets (stats, compare, trend, table, checks, changes, range_overlap, histogram, run_history, diff) from data you send, in the Diagnosis tab, on the timeline and in the postmortem. Use tellagen_build_figure to turn the numbers you read from a tool result into a figure Tellagen accepts: it puts a time series on an even grid of at most 500 points, turns deploy, alert and rollback times into marks, turns cumulative histogram buckets into bucket counts, maps a GitHub Actions run list to a run history, and enforces every limit. Attach the result as a causal step's figure or as a block on a timeline event. A figure owns its numbers: never repeat them in prose, never invent one, and keep units in the unit field. Read ${FIGURE_GUIDE_URI} to choose the widget that fits the question and to learn how to plot data on it.`;
|
|
7
|
+
export const FIGURE_INSTRUCTIONS = `Figures: Tellagen draws typed widgets (stats, compare, trend, table, checks, changes, range_overlap, histogram, run_history, diff, log_lines) from data you send, in the Diagnosis tab, on the timeline and in the postmortem. Use tellagen_build_figure to turn the numbers you read from a tool result into a figure Tellagen accepts: it puts a time series on an even grid of at most 500 points, turns deploy, alert and rollback times into marks, turns cumulative histogram buckets into bucket counts, maps a GitHub Actions run list to a run history, picks the log lines of a Loki result (log_lines), and enforces every limit. Attach the result as a causal step's figure or as a block on a timeline event. A figure owns its numbers: never repeat them in prose, never invent one, and keep units in the unit field. Read ${FIGURE_GUIDE_URI} to choose the widget that fits the question and to learn how to plot data on it.`;
|
|
8
8
|
export const FIGURE_GUIDE = `# Tellagen figures
|
|
9
9
|
|
|
10
10
|
A figure is a small typed widget that Tellagen draws for you. You send the data. Tellagen draws it the same way in the Diagnosis tab, on the timeline and in the postmortem, and a responder can pin one from one place to another.
|
|
@@ -35,6 +35,7 @@ Use tellagen_build_figure to make one. It reshapes the numbers you already read
|
|
|
35
35
|
| Did the slow tail move, when the average did not? | histogram | yes | yes | 3 to 61 edges (2 to 60 buckets), one count per bucket |
|
|
36
36
|
| Which build broke, and which fixed it? | run_history | yes | yes | 2 to 30 runs, runs_not_shown, 4 marks, ref 80, sha 64, job 80, url 500 |
|
|
37
37
|
| What exactly changed in the code? | diff | yes | yes | path 200, ref 64, 1 to 6 hunks, 12 changed lines in all, line 160 |
|
|
38
|
+
| Which log lines prove it, or show there are none? | log_lines | yes | yes | 0 to 8 lines, line text 500, 6 fields, note 160, matched and scanned up to 1,000,000,000 |
|
|
38
39
|
|
|
39
40
|
## How to plot data on each widget
|
|
40
41
|
|
|
@@ -158,9 +159,26 @@ With diff_lines_v1 the same change, with the unchanged lines around it and the n
|
|
|
158
159
|
{ "op": "-", "text": " position: static;", "old_no": 12 }, { "op": "+", "text": " position: sticky;", "new_no": 12 },
|
|
159
160
|
{ "op": "context", "text": "}", "old_no": 13, "new_no": 13 } ] ] }
|
|
160
161
|
|
|
162
|
+
### log_lines: the log lines that prove a claim, or that there are none
|
|
163
|
+
|
|
164
|
+
Use it for log evidence instead of a stats tile: the lines themselves, how many lines matched out of how many were scanned, and the range that was searched. It needs log_lines_v1 in server_capabilities. Pass run_id so the builder can check this, and so it can use the run window as the default range.
|
|
165
|
+
|
|
166
|
+
1. Run the Loki query over a range inside the run window. Keep the whole result, with the stream labels.
|
|
167
|
+
2. Send it as streams (the Loki result as returned: [{ stream: { labels }, values: [[ns, line]] }]) or as entries ([{ timestamp, line, labels }]), with query, datasource, from and to. Never write a line yourself: the builder takes only lines that are in the result.
|
|
168
|
+
3. The builder keeps at most 8 lines, the ones that show the event first, and reads each level from a stream label, from the JSON or logfmt of the line, or from a word at its start. Text is kept as logged: it only loses colour codes and secrets, and line breaks become a mark.
|
|
169
|
+
4. matched is the number of lines the query matched in the range. It defaults to the lines you sent, so send matched when the query had a limit. scanned is the number of lines the query looked at (query_loki_stats gives it). The builder works out lines_not_shown.
|
|
170
|
+
5. Say which lines show the event: match lists the terms that mark a line matches_event. Mark a line that looks like proof and is not with marks, for example a line of another tenant, company or request: { "field": { "key": "company_id", "value": "578" }, "relation": "unrelated", "note": "Company 578, 11 hours after the event" }. An unrelated line stays in the figure, with its note, so a reader can see why it is not proof. Never use the text of an unrelated line as the quote of a finding.
|
|
171
|
+
6. A query that found nothing is proof only with its range. Send matched 0 with scanned, from and to: 0 of 2,313 lines from 00:26 to 01:26 says something, an empty list with no range does not. Send streams as an empty list.
|
|
172
|
+
7. Set event_at to the moment of the event, so the page can say how far a line is from it.
|
|
173
|
+
|
|
174
|
+
{ "type": "log_lines", "title": "Errors from the worker", "query": "{app=\\"worker\\"} |= \\"timeout\\"", "datasource": "loki",
|
|
175
|
+
"from": "2026-11-14T00:11:00Z", "to": "2026-11-14T01:26:00Z", "event_at": "2026-11-14T00:41:00Z", "scanned": 2313,
|
|
176
|
+
"streams": [ { "stream": { "app": "worker", "pod": "worker-7" }, "values": [ [ "1794010860000000000", "level=error msg=\\"upstream timeout\\" task=sync" ] ] } ],
|
|
177
|
+
"match": [ "upstream timeout" ] }
|
|
178
|
+
|
|
161
179
|
## Where the figure goes
|
|
162
180
|
|
|
163
|
-
- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB. This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).
|
|
181
|
+
- A causal step: set it as figure on the step in result_summary.causal_paths. Every type except table and changes is allowed there, at most 16 KB (48 KB for log_lines). This needs the diagnosis structure, which the pickup advertises as diagnosis_structure_v1. A Tellagen that does not list log_lines_v1 drops a log_lines figure, so the builder refuses to make one. A Tellagen that does not know a figure type yet drops the figure and says so in the completion warnings (figure_invalid).
|
|
164
182
|
- A timeline event: put it in blocks on tellagen_post_timeline_event or tellagen_update_timeline_event. Any type is allowed, up to 12 per event. An update replaces the whole array, so send every block you want to keep, and [] clears them. Set slot to summary to draw the block above the note, or anchor to the exact heading text it sits under. Not both. Set postmortem to false to keep a block out of the postmortem.
|
|
165
183
|
|
|
166
184
|
Call tellagen_build_figure with placement step_figure or timeline_block, and use the block it returns as it is.
|
|
@@ -168,7 +186,7 @@ Call tellagen_build_figure with placement step_figure or timeline_block, and use
|
|
|
168
186
|
## Getting the data from other servers
|
|
169
187
|
|
|
170
188
|
- Grafana or Prometheus: a range query returns time and value pairs. Send them as points. Run the same query on two equal windows for a compare.
|
|
171
|
-
- Loki: a count over time by step is a trend. A count by label over two windows is a compare.
|
|
189
|
+
- Loki: a count over time by step is a trend. A count by label over two windows is a compare. The lines of a query result are a log_lines figure, and it is better than a stats tile for log evidence, because the reader can read the lines.
|
|
172
190
|
- Prometheus histograms: the _bucket series summed by le over two equal windows are a histogram. Send them as buckets.
|
|
173
191
|
- GitHub Actions: failed jobs of one run go in checks, failures first. The runs of a branch are a run_history: send the run list as github_runs.
|
|
174
192
|
- GitHub commits and pull requests: the lines that broke or fixed it are a diff. Send the file's patch, and the change's additions and deletions.
|
|
@@ -179,11 +197,12 @@ Call tellagen_build_figure with placement step_figure or timeline_block, and use
|
|
|
179
197
|
The builder names the field. For a timeline block the API answers 400 invalid_block with field and details.errors. Fix exactly those fields and send once more. Do not drop a figure to get past an error unless the data in it is not real.
|
|
180
198
|
`;
|
|
181
199
|
const isDiff = (figure) => typeof figure === "object" && figure !== null && figure.type === "diff";
|
|
200
|
+
const isLogLines = (figure) => typeof figure === "object" && figure !== null && figure.type === "log_lines";
|
|
182
201
|
const usesFigureExtras = (figure) => withoutFigureExtrasInBlock(figure).what.length > 0;
|
|
183
202
|
export function registerFigureTools(server, client) {
|
|
184
203
|
server.registerTool("tellagen_build_figure", {
|
|
185
204
|
title: "Build a figure",
|
|
186
|
-
description: "Turn numbers you already read from a tool result into a figure (a typed widget) that Tellagen draws, and check it against Tellagen's limits before you send it. Widgets: stats (headline numbers: aim for 4, up to 8 with figure_extras_v1, and an optional title), compare (before and after per host, route or job, with an SLO line), trend (a series over time with up to 3 marks), table (a ranked list, up to 12 rows), checks (pass or fail per check, up to 12), changes (a value that moved from one thing to another), range_overlap (2 to 4 ranges that meet), histogram (bucket counts before and after), run_history (CI or deploy runs with the regression and fix marks), diff (the changed lines of a code change). For a time series send raw samples as points and the deploy, alert or rollback times as events: the tool puts them on an even grid of at most 500 points and works out the mark positions. For a histogram send Prometheus cumulative le buckets as buckets; for a run history send the GitHub Actions run list as github_runs; for a diff send the patch of one file: a change of 12 or fewer changed lines is sent whole with each removed line next to the line that replaced it, a longer one needs select_hunks (at most 3 hunks). Pass run_id so unchanged lines and line numbers are added only when this Tellagen lists diff_lines_v1, and a stats title, more than 4 stats and runs_not_shown only when it lists figure_extras_v1. It has no data of its own and never invents a value, so send only numbers from a tool result you can cite. placement step_figure is for a causal step (any type except table and changes, one per step). placement timeline_block is for a timeline event (any type). Read resource://tellagen/figure-guide to choose the widget and to see how to plot data on it.",
|
|
205
|
+
description: "Turn numbers you already read from a tool result into a figure (a typed widget) that Tellagen draws, and check it against Tellagen's limits before you send it. Widgets: stats (headline numbers: aim for 4, up to 8 with figure_extras_v1, and an optional title), compare (before and after per host, route or job, with an SLO line), trend (a series over time with up to 3 marks), table (a ranked list, up to 12 rows), checks (pass or fail per check, up to 12), changes (a value that moved from one thing to another), range_overlap (2 to 4 ranges that meet), histogram (bucket counts before and after), run_history (CI or deploy runs with the regression and fix marks), diff (the changed lines of a code change), log_lines (the log lines of a Loki result that prove a claim, or the proof that there are none). For a time series send raw samples as points and the deploy, alert or rollback times as events: the tool puts them on an even grid of at most 500 points and works out the mark positions. For a histogram send Prometheus cumulative le buckets as buckets; for a run history send the GitHub Actions run list as github_runs; for a diff send the patch of one file: a change of 12 or fewer changed lines is sent whole with each removed line next to the line that replaced it, a longer one needs select_hunks (at most 3 hunks). Pass run_id so unchanged lines and line numbers are added only when this Tellagen lists diff_lines_v1, and a stats title, more than 4 stats and runs_not_shown only when it lists figure_extras_v1. It has no data of its own and never invents a value, so send only numbers from a tool result you can cite. placement step_figure is for a causal step (any type except table and changes, one per step). placement timeline_block is for a timeline event (any type). Read resource://tellagen/figure-guide to choose the widget and to see how to plot data on it.",
|
|
187
206
|
inputSchema: {
|
|
188
207
|
placement: z
|
|
189
208
|
.enum(["step_figure", "timeline_block"])
|
|
@@ -196,13 +215,16 @@ export function registerFigureTools(server, client) {
|
|
|
196
215
|
.string()
|
|
197
216
|
.min(1)
|
|
198
217
|
.optional()
|
|
199
|
-
.describe("The investigation run you are working on. For a diff, a stats or a
|
|
218
|
+
.describe("The investigation run you are working on. For a diff, a stats, a run_history or a log_lines figure, Tellagen is asked which features it lists in server_capabilities (diff_lines_v1: unchanged lines and line numbers; figure_extras_v1: a stats title, more than 4 stats, runs_not_shown; log_lines_v1: log_lines) and, for log_lines, what the run window is. Without it the latest pickup of this process decides."),
|
|
200
219
|
},
|
|
201
220
|
}, async ({ run_id: givenRunId, ...input }) => {
|
|
202
221
|
const run_id = activeRunId(client, givenRunId);
|
|
203
222
|
const diffLines = isDiff(input.figure) ? await supportsDiffLines(client, run_id) : false;
|
|
204
223
|
const figureExtras = usesFigureExtras(input.figure) ? await supportsFigureExtras(client, run_id) : false;
|
|
205
|
-
const
|
|
224
|
+
const isLogs = isLogLines(input.figure);
|
|
225
|
+
const logLines = isLogs ? await supportsLogLines(client, run_id) : false;
|
|
226
|
+
const window = isLogs ? await runWindowOf(client, run_id) : undefined;
|
|
227
|
+
const result = buildFigure(input, { diffLines, figureExtras, logLines, window });
|
|
206
228
|
if (!result.ok) {
|
|
207
229
|
return {
|
|
208
230
|
content: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figures.js","sourceRoot":"","sources":["../../src/tools/figures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"figures.js","sourceRoot":"","sources":["../../src/tools/figures.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACnH,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE/F,MAAM,CAAC,MAAM,gBAAgB,GAAG,kCAAkC,CAAC;AAEnE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,+yBAA+yB,gBAAgB,mFAAmF,CAAC;AAEt7B,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAC9G,CAAC;qBACH;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CACF,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,gBAAgB,CACrB,cAAc,EACd,gBAAgB,EAChB;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,2JAA2J;QAC7J,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;KAC7E,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/dist/tools/findings.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { TellagenClient } from "../client.js";
|
|
3
|
+
export declare const MAX_FINDING_CHECKS = 3;
|
|
4
|
+
export declare const MAX_CHECK_QUESTION = 200;
|
|
5
|
+
export declare const MAX_CHECK_SOURCE = 120;
|
|
6
|
+
/** What is wrong with the checks of a finding, in words the model can act on. */
|
|
7
|
+
export declare function findingChecksProblem(findingType: string, role: string | undefined, checks: Array<{
|
|
8
|
+
source: string;
|
|
9
|
+
question: string;
|
|
10
|
+
}> | undefined): string | undefined;
|
|
3
11
|
/** The screenshot limits of a finding, as Tellagen enforces them. */
|
|
4
12
|
export declare const SCREENSHOT_LIMITS: {
|
|
5
13
|
readonly count: 20;
|
package/dist/tools/findings.js
CHANGED
|
@@ -3,7 +3,44 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
import { optionalRunIdSchema, resolveRunId } from "../active-run.js";
|
|
4
4
|
import { httpDefaults } from "../client.js";
|
|
5
5
|
import { formatError } from "../errors.js";
|
|
6
|
-
import { DIAGNOSIS_CHANGES_CAPABILITY, evidenceRefStructureShape, stripFindingChangeLinks, stripFindingEvidenceStructure, supportsDiagnosisChanges, supportsDiagnosisStructure, unsupportedNotice, gapQuestionNotice, } from "../diagnosis-structure.js";
|
|
6
|
+
import { DIAGNOSIS_CHANGES_CAPABILITY, evidenceRefStructureShape, stripFindingChangeLinks, stripFindingEvidenceStructure, supportsDiagnosisChanges, supportsDiagnosisStructure, supportsCapability, unsupportedNotice, gapQuestionNotice, } from "../diagnosis-structure.js";
|
|
7
|
+
import { QUESTION_CHECKS_CAPABILITY } from "../run-window.js";
|
|
8
|
+
export const MAX_FINDING_CHECKS = 3;
|
|
9
|
+
export const MAX_CHECK_QUESTION = 200;
|
|
10
|
+
export const MAX_CHECK_SOURCE = 120;
|
|
11
|
+
const findingCheckSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
source: z
|
|
14
|
+
.string()
|
|
15
|
+
.trim()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(MAX_CHECK_SOURCE)
|
|
18
|
+
.describe("The place the person looks, in a few words: a system, a page or a tool, for example Slack or the Tellagen workspace"),
|
|
19
|
+
question: z
|
|
20
|
+
.string()
|
|
21
|
+
.trim()
|
|
22
|
+
.min(1)
|
|
23
|
+
.max(MAX_CHECK_QUESTION)
|
|
24
|
+
.describe("One yes or no question that ends with a question mark, at most 200 characters. Never two questions joined by and."),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
/** What is wrong with the checks of a finding, in words the model can act on. */
|
|
28
|
+
export function findingChecksProblem(findingType, role, checks) {
|
|
29
|
+
if (checks === undefined)
|
|
30
|
+
return undefined;
|
|
31
|
+
if (findingType !== "gap" && role !== "gap") {
|
|
32
|
+
return "checks belong on a gap finding only (finding_type gap). Leave them out of any other finding.";
|
|
33
|
+
}
|
|
34
|
+
for (const [index, check] of checks.entries()) {
|
|
35
|
+
if (!check.question.trim().endsWith("?")) {
|
|
36
|
+
return `checks[${index}].question must be one yes or no question that ends with a question mark.`;
|
|
37
|
+
}
|
|
38
|
+
if ((check.question.match(/\?/g) ?? []).length > 1) {
|
|
39
|
+
return `checks[${index}].question holds more than one question. Split it into separate checks, each naming its source.`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
7
44
|
const screenshotSchema = z.object({
|
|
8
45
|
url: z
|
|
9
46
|
.string()
|
|
@@ -169,6 +206,12 @@ export function registerFindingTools(server, client) {
|
|
|
169
206
|
.string()
|
|
170
207
|
.min(1)
|
|
171
208
|
.describe("Detailed explanation with supporting data — this is the body of the finding"),
|
|
209
|
+
checks: z
|
|
210
|
+
.array(findingCheckSchema)
|
|
211
|
+
.min(1)
|
|
212
|
+
.max(MAX_FINDING_CHECKS)
|
|
213
|
+
.optional()
|
|
214
|
+
.describe("Gap findings only, when the gap blocks the diagnosis: one to three yes or no checks, each {source, question}, so a person can answer in a few seconds. Keep claim as the one question, and put in checks only what you could not check yourself. Sent only when this Tellagen lists question_checks_v1."),
|
|
172
215
|
confidence: z
|
|
173
216
|
.number()
|
|
174
217
|
.min(0)
|
|
@@ -187,9 +230,16 @@ export function registerFindingTools(server, client) {
|
|
|
187
230
|
.optional()
|
|
188
231
|
.describe("Standalone screenshots for this finding (e.g., Grafana dashboard panels, error traces). Use evidence_refs[].screenshots for source-specific screenshots."),
|
|
189
232
|
},
|
|
190
|
-
}, async ({ incident_id, investigation_run_id: givenRunId, finding_type, role, claim, evidence_summary, confidence, confidence_reason, evidence_refs, screenshots, }) => {
|
|
233
|
+
}, async ({ incident_id, investigation_run_id: givenRunId, finding_type, role, claim, evidence_summary, checks, confidence, confidence_reason, evidence_refs, screenshots, }) => {
|
|
191
234
|
try {
|
|
192
235
|
const investigation_run_id = resolveRunId(client, givenRunId);
|
|
236
|
+
const checksProblem = findingChecksProblem(finding_type, role, checks);
|
|
237
|
+
if (checksProblem) {
|
|
238
|
+
return {
|
|
239
|
+
content: [{ type: "text", text: checksProblem }],
|
|
240
|
+
isError: true,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
193
243
|
checkScreenshotSizes(screenshots, evidence_refs);
|
|
194
244
|
const reqBody = {
|
|
195
245
|
investigation_run_id,
|
|
@@ -204,6 +254,15 @@ export function registerFindingTools(server, client) {
|
|
|
204
254
|
reqBody.role = role;
|
|
205
255
|
if (screenshots !== undefined)
|
|
206
256
|
reqBody.screenshots = screenshots;
|
|
257
|
+
let checksNotice;
|
|
258
|
+
if (checks !== undefined) {
|
|
259
|
+
if (await supportsCapability(client, investigation_run_id, QUESTION_CHECKS_CAPABILITY)) {
|
|
260
|
+
reqBody.checks = checks;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
checksNotice = `This Tellagen backend does not advertise ${QUESTION_CHECKS_CAPABILITY}, so the checks were not sent. The claim of the gap finding went through as the one question; put the facts a person must look up in evidence_summary.`;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
207
266
|
// links, command and datasource go only to a backend that advertises
|
|
208
267
|
// diagnosis_structure_v1; an older one would drop them silently.
|
|
209
268
|
let notice;
|
|
@@ -213,6 +272,8 @@ export function registerFindingTools(server, client) {
|
|
|
213
272
|
const question = gapQuestionNotice(finding_type, role, claim);
|
|
214
273
|
if (question)
|
|
215
274
|
notice = notice ? `${notice} ${question}` : question;
|
|
275
|
+
if (checksNotice)
|
|
276
|
+
notice = notice ? `${notice} ${checksNotice}` : checksNotice;
|
|
216
277
|
const stripped = stripFindingEvidenceStructure(reqBody.evidence_refs);
|
|
217
278
|
if (stripped.removed.length > 0 &&
|
|
218
279
|
!(await supportsDiagnosisStructure(client, investigation_run_id))) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.js","sourceRoot":"","sources":["../../src/tools/findings.ts"],"names":[],"mappings":"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AC,QAAQ,GAAG,QAAQ,CAAC;YACxD,IAAI,UAAU,KAAK,SAAS;gBAAE,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;YAC9D,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;YAC5C,IAAI,cAAc,KAAK,SAAS;gBAC9B,OAAO,CAAC,cAAc,GAAG,cAAc,CAAC;YAC1C,IAAI,WAAW,KAAK,SAAS;gBAAE,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;YACjE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAC5B,oBAAoB,UAAU,UAAU,EACxC,OAAO,CACR,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;aACjE,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { TellagenClient } from "../client.js";
|
|
4
4
|
/** The data source kinds a client can say it has, by Tellagen catalog key. */
|
|
5
5
|
export declare const AVAILABLE_SOURCE_KEYS: readonly ["grafana", "kubernetes", "github", "docs", "local_host"];
|
|
6
|
-
declare const availableSourceSchema: z.ZodObject<{
|
|
6
|
+
export declare const availableSourceSchema: z.ZodObject<{
|
|
7
7
|
key: z.ZodEnum<["grafana", "kubernetes", "github", "docs", "local_host"]>;
|
|
8
8
|
state: z.ZodEnum<["found", "not_found"]>;
|
|
9
9
|
detail: z.ZodOptional<z.ZodString>;
|