@tellagen/mcp-server 0.6.0 → 0.7.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 +26 -2
- package/SKILL.md +106 -19
- package/contracts/mcp-protocol.json +52 -3
- package/contracts/runbooks/manifest.json +10 -10
- package/contracts/runbooks/v2/client-protocol.json +6 -0
- package/contracts/runbooks/v2/fixtures/filesystem-pressure.json +22 -31
- package/contracts/runbooks/v2/result-summary.guidance.json +53 -5
- package/contracts/runbooks/v2/timeline-event-blocks.schema.json +4 -2
- package/contracts/tellagen-runbook-contracts.json +3 -3
- package/dist/active-run.d.ts +6 -0
- package/dist/active-run.js +14 -0
- package/dist/active-run.js.map +1 -1
- package/dist/cli/doctor.d.ts +2 -2
- package/dist/cli/doctor.js +2 -35
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/kubernetes.d.ts +47 -0
- package/dist/cli/kubernetes.js +369 -0
- package/dist/cli/kubernetes.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 +277 -24
- package/dist/diagnosis-structure.js +273 -8
- package/dist/diagnosis-structure.js.map +1 -1
- package/dist/doctor/checks.js +8 -2
- package/dist/doctor/checks.js.map +1 -1
- package/dist/doctor/k8s-read-only.d.ts +16 -0
- package/dist/doctor/k8s-read-only.js +89 -0
- package/dist/doctor/k8s-read-only.js.map +1 -0
- package/dist/doctor/real-fs.d.ts +3 -0
- package/dist/doctor/real-fs.js +36 -0
- package/dist/doctor/real-fs.js.map +1 -0
- package/dist/figures.d.ts +121 -26
- package/dist/figures.js +44 -2
- package/dist/figures.js.map +1 -1
- package/dist/heartbeat.d.ts +3 -0
- package/dist/heartbeat.js +32 -1
- package/dist/heartbeat.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/k8s-safety.d.ts +2 -2
- package/dist/k8s-safety.js +2 -2
- package/dist/k8s-safety.js.map +1 -1
- package/dist/listen-config.d.ts +5 -5
- package/dist/listen-probe.d.ts +14 -1
- package/dist/listen-probe.js +83 -5
- package/dist/listen-probe.js.map +1 -1
- package/dist/listen-settings.d.ts +8 -0
- package/dist/listen-settings.js +29 -0
- package/dist/listen-settings.js.map +1 -1
- package/dist/listener.d.ts +11 -0
- package/dist/listener.js +60 -16
- package/dist/listener.js.map +1 -1
- package/dist/run-events.js +13 -1
- package/dist/run-events.js.map +1 -1
- package/dist/run-requests.d.ts +16 -0
- package/dist/run-requests.js +56 -0
- package/dist/run-requests.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +10 -8
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +37 -0
- package/dist/session.js +59 -0
- package/dist/session.js.map +1 -1
- package/dist/tools/amendments.d.ts +13 -0
- package/dist/tools/amendments.js +206 -0
- package/dist/tools/amendments.js.map +1 -0
- package/dist/tools/catalog.js +3 -0
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/diagnostics.js +57 -12
- package/dist/tools/diagnostics.js.map +1 -1
- package/dist/tools/figures.d.ts +1 -1
- package/dist/tools/figures.js +12 -6
- package/dist/tools/figures.js.map +1 -1
- package/dist/tools/findings.d.ts +128 -0
- package/dist/tools/findings.js +6 -6
- package/dist/tools/findings.js.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/investigations.d.ts +3222 -4
- package/dist/tools/investigations.js +174 -61
- package/dist/tools/investigations.js.map +1 -1
- package/dist/tools/next.d.ts +16 -0
- package/dist/tools/next.js +49 -1
- package/dist/tools/next.js.map +1 -1
- package/dist/tools/requests.d.ts +3 -0
- package/dist/tools/requests.js +62 -0
- package/dist/tools/requests.js.map +1 -0
- package/dist/tools/resume.js +14 -1
- package/dist/tools/resume.js.map +1 -1
- package/dist/tools/timeline.js +13 -2
- package/dist/tools/timeline.js.map +1 -1
- package/dist/version.d.ts +4 -2
- package/dist/version.js +4 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/server.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { formatError, TellagenAPIError } from "../errors.js";
|
|
3
3
|
import { KUBERNETES_SAFETY_CHECK_IDS, KUBERNETES_SAFETY_PROTOCOL, KUBERNETES_SAFETY_STATUSES, } from "../k8s-safety.js";
|
|
4
|
+
import { kubernetesReadOnlyOfClient } from "../doctor/k8s-read-only.js";
|
|
5
|
+
import { realDoctorFs } from "../doctor/real-fs.js";
|
|
4
6
|
import { TOOL_REPORT_PATH } from "../tool-report.js";
|
|
5
7
|
import { AVAILABLE_SOURCE_KEYS, availableSourceSchema } from "./investigations.js";
|
|
6
8
|
const accessStatusSchema = z.enum([
|
|
@@ -93,7 +95,28 @@ export function registerDiagnosticTools(server, client) {
|
|
|
93
95
|
},
|
|
94
96
|
}, async ({ diagnostic_session_id, reports }) => {
|
|
95
97
|
try {
|
|
96
|
-
const
|
|
98
|
+
const path = `/api/v1/settings/agent/diagnostic-sessions/${diagnostic_session_id}/reports`;
|
|
99
|
+
const plain = reports.map(normalizeDiagnosticReport);
|
|
100
|
+
// Whether the Kubernetes server runs read-only is read from its client config entry, like
|
|
101
|
+
// in the tool report, and only for the kubernetes report of a tool that was found.
|
|
102
|
+
const found = reports.some((r) => r.tool_id === "kubernetes" && r.installed);
|
|
103
|
+
const readOnly = found ? kubernetesReadOnlyOfClient(client.session.identity?.name, realDoctorFs()) : undefined;
|
|
104
|
+
let data;
|
|
105
|
+
if (readOnly === undefined) {
|
|
106
|
+
data = await client.post(path, { reports: plain });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
const withFlag = plain.map((r) => (r.tool_id === "kubernetes" ? { ...r, kubernetes_read_only_tools: readOnly } : r));
|
|
110
|
+
try {
|
|
111
|
+
data = await client.post(path, { reports: withFlag });
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
// An older Tellagen refuses a field it does not know: send the report without it.
|
|
115
|
+
if (!(err instanceof TellagenAPIError && err.status === 400 && err.code === "unknown_field"))
|
|
116
|
+
throw err;
|
|
117
|
+
data = await client.post(path, { reports: plain });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
97
120
|
return {
|
|
98
121
|
content: [{ type: "text", text: JSON.stringify(data) }],
|
|
99
122
|
};
|
|
@@ -123,7 +146,7 @@ const safetyCheckSchema = z
|
|
|
123
146
|
.strict();
|
|
124
147
|
function registerReportAvailableSources(server, client) {
|
|
125
148
|
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.`,
|
|
149
|
+
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 (for docs, the name of the source, such as Confluence, Notion or repository folder). Safe to repeat. ${KUBERNETES_SAFETY_PROTOCOL} Pass those results as kubernetes_checks only when you ran them.`,
|
|
127
150
|
inputSchema: {
|
|
128
151
|
available_sources: z
|
|
129
152
|
.array(availableSourceSchema)
|
|
@@ -150,21 +173,43 @@ function registerReportAvailableSources(server, client) {
|
|
|
150
173
|
...(profileId ? { profile_id: profileId } : {}),
|
|
151
174
|
};
|
|
152
175
|
const checks = input.kubernetes_checks ?? [];
|
|
176
|
+
// Whether the Kubernetes server of this client runs read-only is read from its own
|
|
177
|
+
// config entry, only when the report says Kubernetes was found. Only the one fact leaves.
|
|
178
|
+
const kubernetesFound = input.available_sources.some((source) => source.key === "kubernetes" && source.state === "found");
|
|
179
|
+
const readOnly = kubernetesFound ? kubernetesReadOnlyOfClient(client.session.identity?.name, realDoctorFs()) : undefined;
|
|
180
|
+
const extras = {
|
|
181
|
+
...(checks.length > 0 ? { kubernetes_checks: checks } : {}),
|
|
182
|
+
...(readOnly !== undefined ? { kubernetes_read_only_tools: readOnly } : {}),
|
|
183
|
+
};
|
|
184
|
+
// An older Tellagen refuses a field it does not know. Try the fields it may know first
|
|
185
|
+
// (the checks), and the plain sources last.
|
|
186
|
+
const attempts = [{ ...body, ...extras }];
|
|
187
|
+
if (readOnly !== undefined && checks.length > 0)
|
|
188
|
+
attempts.push({ ...body, kubernetes_checks: checks });
|
|
189
|
+
if (Object.keys(extras).length > 0)
|
|
190
|
+
attempts.push(body);
|
|
153
191
|
let data;
|
|
154
192
|
let note;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
193
|
+
for (let i = 0; i < attempts.length && !data; i++) {
|
|
194
|
+
try {
|
|
195
|
+
data = await client.post(TOOL_REPORT_PATH, attempts[i], { safeToRepeat: true });
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
const last = i === attempts.length - 1;
|
|
199
|
+
if (last || !(err instanceof TellagenAPIError && err.status === 400 && err.code === "unknown_field"))
|
|
200
|
+
throw err;
|
|
163
201
|
}
|
|
164
|
-
|
|
165
|
-
|
|
202
|
+
if (data && i > 0) {
|
|
203
|
+
const sent = attempts[i];
|
|
204
|
+
note = "kubernetes_checks" in sent
|
|
205
|
+
? "This Tellagen stored the sources and checks but not whether the Kubernetes tools are read-only yet."
|
|
206
|
+
: checks.length > 0
|
|
207
|
+
? "This Tellagen stored the sources but not the Kubernetes safety checks yet."
|
|
208
|
+
: "This Tellagen stored the sources but not whether the Kubernetes tools are read-only yet.";
|
|
166
209
|
}
|
|
167
210
|
}
|
|
211
|
+
if (!data)
|
|
212
|
+
throw new Error("tool report was not sent");
|
|
168
213
|
return {
|
|
169
214
|
content: [{ type: "text", text: JSON.stringify(note ? { ...data, note } : data) }],
|
|
170
215
|
};
|
|
@@ -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,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,IAAI;IACJ,cAAc;IACd,cAAc;IACd,eAAe;IACf,aAAa;IACb,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC/D,MAAM,EAAE,iBAAiB;IACzB,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;CACtE,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,C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AM,GAAG,CAAC;4BACjB,CAAC,CAAC,4EAA4E;4BAC9E,CAAC,CAAC,0FAA0F,CAAC;gBACnG,CAAC;YACH,CAAC;YACD,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE,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
|
@@ -3,7 +3,7 @@ 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
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";
|
|
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 row may also be measured against a limit or a budget (a page-weight budget, a connection cap): when the pickup lists figure_limits_v1 in server_capabilities, send {\"label\": \"Checkout bundle\", \"after\": 7908, \"limit\": 7500} and leave before out. Never put a limit or a budget in before: a row that reads 7,680 before and 7,908 after, where 7,680 is the budget, says the value grew when it only crossed a line. The builder drops the limit and says so in notes when the pickup does not list figure_limits_v1, and then the row needs a before.\n\nA figure shows the fact its step states. Do not put a table of jobs under a step that the jobs do not prove, and keep the run, job and commit ids in links, not in the title or a label.\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 of the failing run\",\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,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { activeRunId } from "../active-run.js";
|
|
3
|
-
import { runWindowOf, supportsDiffLines, supportsFigureExtras, supportsLogLines } from "../diagnosis-structure.js";
|
|
4
|
-
import { buildFigure, figureToolInputSchema, withoutFigureExtrasInBlock } from "../figures.js";
|
|
3
|
+
import { runWindowOf, supportsDiffLines, supportsFigureExtras, supportsFigureLimits, supportsLogLines } from "../diagnosis-structure.js";
|
|
4
|
+
import { buildFigure, figureToolInputSchema, withoutFigureExtrasInBlock, withoutFigureLimitsInBlock } 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
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.`;
|
|
@@ -52,6 +52,10 @@ Use it for a value measured before and after a deploy, rollback, fix or config c
|
|
|
52
52
|
"rows": [ { "label": "POST /checkout", "before": 180, "after": 640 },
|
|
53
53
|
{ "label": "GET /cart", "before": 95, "after": 110 } ] }
|
|
54
54
|
|
|
55
|
+
A row may also be measured against a limit or a budget (a page-weight budget, a connection cap): when the pickup lists figure_limits_v1 in server_capabilities, send {"label": "Checkout bundle", "after": 7908, "limit": 7500} and leave before out. Never put a limit or a budget in before: a row that reads 7,680 before and 7,908 after, where 7,680 is the budget, says the value grew when it only crossed a line. The builder drops the limit and says so in notes when the pickup does not list figure_limits_v1, and then the row needs a before.
|
|
56
|
+
|
|
57
|
+
A figure shows the fact its step states. Do not put a table of jobs under a step that the jobs do not prove, and keep the run, job and commit ids in links, not in the title or a label.
|
|
58
|
+
|
|
55
59
|
A distribution is a compare of percentiles: use p50, p95 and p99 as rows, with the SLO as the threshold.
|
|
56
60
|
|
|
57
61
|
### trend: a series over time
|
|
@@ -88,7 +92,7 @@ Top queries, failing routes, slowest endpoints. Give columns, then one cell per
|
|
|
88
92
|
|
|
89
93
|
A 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.
|
|
90
94
|
|
|
91
|
-
{ "type": "checks", "title": "Jobs
|
|
95
|
+
{ "type": "checks", "title": "Jobs of the failing run",
|
|
92
96
|
"items": [ { "label": "Frontend Tests", "state": "fail", "detail": "1 failed of 13516" }, { "label": "E2E Tests", "state": "pass" } ] }
|
|
93
97
|
|
|
94
98
|
### changes: a value that moved
|
|
@@ -197,12 +201,13 @@ Call tellagen_build_figure with placement step_figure or timeline_block, and use
|
|
|
197
201
|
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.
|
|
198
202
|
`;
|
|
199
203
|
const isDiff = (figure) => typeof figure === "object" && figure !== null && figure.type === "diff";
|
|
204
|
+
const usesFigureLimits = (figure) => withoutFigureLimitsInBlock(figure).what.length > 0;
|
|
200
205
|
const isLogLines = (figure) => typeof figure === "object" && figure !== null && figure.type === "log_lines";
|
|
201
206
|
const usesFigureExtras = (figure) => withoutFigureExtrasInBlock(figure).what.length > 0;
|
|
202
207
|
export function registerFigureTools(server, client) {
|
|
203
208
|
server.registerTool("tellagen_build_figure", {
|
|
204
209
|
title: "Build a figure",
|
|
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,
|
|
210
|
+
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, a stats title, more than 4 stats and runs_not_shown only when it lists figure_extras_v1, and the limit of a compare row only when it lists figure_limits_v1 (a row with a limit needs no before; never put a limit in before). 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.",
|
|
206
211
|
inputSchema: {
|
|
207
212
|
placement: z
|
|
208
213
|
.enum(["step_figure", "timeline_block"])
|
|
@@ -215,16 +220,17 @@ export function registerFigureTools(server, client) {
|
|
|
215
220
|
.string()
|
|
216
221
|
.min(1)
|
|
217
222
|
.optional()
|
|
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."),
|
|
223
|
+
.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; figure_limits_v1: a limit on a compare row; log_lines_v1: log_lines) and, for log_lines, what the run window is. Without it the latest pickup of this process decides."),
|
|
219
224
|
},
|
|
220
225
|
}, async ({ run_id: givenRunId, ...input }) => {
|
|
221
226
|
const run_id = activeRunId(client, givenRunId);
|
|
222
227
|
const diffLines = isDiff(input.figure) ? await supportsDiffLines(client, run_id) : false;
|
|
223
228
|
const figureExtras = usesFigureExtras(input.figure) ? await supportsFigureExtras(client, run_id) : false;
|
|
229
|
+
const figureLimits = usesFigureLimits(input.figure) ? await supportsFigureLimits(client, run_id) : false;
|
|
224
230
|
const isLogs = isLogLines(input.figure);
|
|
225
231
|
const logLines = isLogs ? await supportsLogLines(client, run_id) : false;
|
|
226
232
|
const window = isLogs ? await runWindowOf(client, run_id) : undefined;
|
|
227
|
-
const result = buildFigure(input, { diffLines, figureExtras, logLines, window });
|
|
233
|
+
const result = buildFigure(input, { diffLines, figureExtras, figureLimits, logLines, window });
|
|
228
234
|
if (!result.ok) {
|
|
229
235
|
return {
|
|
230
236
|
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,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,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,oBAAo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AAG,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,13 +1,140 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
import { TellagenClient } from "../client.js";
|
|
3
4
|
export declare const MAX_FINDING_CHECKS = 3;
|
|
4
5
|
export declare const MAX_CHECK_QUESTION = 200;
|
|
5
6
|
export declare const MAX_CHECK_SOURCE = 120;
|
|
7
|
+
export declare const findingCheckSchema: z.ZodObject<{
|
|
8
|
+
source: z.ZodString;
|
|
9
|
+
question: z.ZodString;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
source: string;
|
|
12
|
+
question: string;
|
|
13
|
+
}, {
|
|
14
|
+
source: string;
|
|
15
|
+
question: string;
|
|
16
|
+
}>;
|
|
6
17
|
/** What is wrong with the checks of a finding, in words the model can act on. */
|
|
7
18
|
export declare function findingChecksProblem(findingType: string, role: string | undefined, checks: Array<{
|
|
8
19
|
source: string;
|
|
9
20
|
question: string;
|
|
10
21
|
}> | undefined): string | undefined;
|
|
22
|
+
export declare const screenshotSchema: z.ZodObject<{
|
|
23
|
+
url: z.ZodOptional<z.ZodString>;
|
|
24
|
+
base64: z.ZodOptional<z.ZodString>;
|
|
25
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
26
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
base64?: string | undefined;
|
|
29
|
+
url?: string | undefined;
|
|
30
|
+
caption?: string | undefined;
|
|
31
|
+
media_type?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
base64?: string | undefined;
|
|
34
|
+
url?: string | undefined;
|
|
35
|
+
caption?: string | undefined;
|
|
36
|
+
media_type?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const evidenceRefSchema: z.ZodObject<{
|
|
39
|
+
screenshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
|
+
url: z.ZodOptional<z.ZodString>;
|
|
41
|
+
base64: z.ZodOptional<z.ZodString>;
|
|
42
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
43
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
base64?: string | undefined;
|
|
46
|
+
url?: string | undefined;
|
|
47
|
+
caption?: string | undefined;
|
|
48
|
+
media_type?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
base64?: string | undefined;
|
|
51
|
+
url?: string | undefined;
|
|
52
|
+
caption?: string | undefined;
|
|
53
|
+
media_type?: string | undefined;
|
|
54
|
+
}>, "many">>;
|
|
55
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
kind: z.ZodEnum<["explore", "panel", "diff", "commit", "pr", "logs", "trace", "ci_run", "deployment", "release"]>;
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "trace" | "deployment" | "explore" | "panel" | "logs";
|
|
61
|
+
label: string;
|
|
62
|
+
url: string;
|
|
63
|
+
}, {
|
|
64
|
+
kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "trace" | "deployment" | "explore" | "panel" | "logs";
|
|
65
|
+
label: string;
|
|
66
|
+
url: string;
|
|
67
|
+
}>, "many">>;
|
|
68
|
+
command: z.ZodOptional<z.ZodString>;
|
|
69
|
+
datasource: z.ZodOptional<z.ZodString>;
|
|
70
|
+
source: z.ZodString;
|
|
71
|
+
query: z.ZodOptional<z.ZodString>;
|
|
72
|
+
result_summary: z.ZodString;
|
|
73
|
+
result_sample: z.ZodOptional<z.ZodString>;
|
|
74
|
+
url: z.ZodOptional<z.ZodString>;
|
|
75
|
+
tool_use_id: z.ZodOptional<z.ZodString>;
|
|
76
|
+
artifact_id: z.ZodOptional<z.ZodString>;
|
|
77
|
+
artifact_digest: z.ZodOptional<z.ZodString>;
|
|
78
|
+
evidence_fact_key: z.ZodOptional<z.ZodString>;
|
|
79
|
+
captured_at: z.ZodOptional<z.ZodString>;
|
|
80
|
+
result_bytes: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
source: string;
|
|
85
|
+
result_summary: string;
|
|
86
|
+
datasource?: string | undefined;
|
|
87
|
+
command?: string | undefined;
|
|
88
|
+
url?: string | undefined;
|
|
89
|
+
query?: string | undefined;
|
|
90
|
+
artifact_id?: string | undefined;
|
|
91
|
+
tool_use_id?: string | undefined;
|
|
92
|
+
result_bytes?: number | undefined;
|
|
93
|
+
links?: {
|
|
94
|
+
kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "trace" | "deployment" | "explore" | "panel" | "logs";
|
|
95
|
+
label: string;
|
|
96
|
+
url: string;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
result_sample?: string | undefined;
|
|
99
|
+
artifact_digest?: string | undefined;
|
|
100
|
+
evidence_fact_key?: string | undefined;
|
|
101
|
+
truncated?: boolean | undefined;
|
|
102
|
+
captured_at?: string | undefined;
|
|
103
|
+
verified?: boolean | undefined;
|
|
104
|
+
screenshots?: {
|
|
105
|
+
base64?: string | undefined;
|
|
106
|
+
url?: string | undefined;
|
|
107
|
+
caption?: string | undefined;
|
|
108
|
+
media_type?: string | undefined;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
source: string;
|
|
112
|
+
result_summary: string;
|
|
113
|
+
datasource?: string | undefined;
|
|
114
|
+
command?: string | undefined;
|
|
115
|
+
url?: string | undefined;
|
|
116
|
+
query?: string | undefined;
|
|
117
|
+
artifact_id?: string | undefined;
|
|
118
|
+
tool_use_id?: string | undefined;
|
|
119
|
+
result_bytes?: number | undefined;
|
|
120
|
+
links?: {
|
|
121
|
+
kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "trace" | "deployment" | "explore" | "panel" | "logs";
|
|
122
|
+
label: string;
|
|
123
|
+
url: string;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
result_sample?: string | undefined;
|
|
126
|
+
artifact_digest?: string | undefined;
|
|
127
|
+
evidence_fact_key?: string | undefined;
|
|
128
|
+
truncated?: boolean | undefined;
|
|
129
|
+
captured_at?: string | undefined;
|
|
130
|
+
verified?: boolean | undefined;
|
|
131
|
+
screenshots?: {
|
|
132
|
+
base64?: string | undefined;
|
|
133
|
+
url?: string | undefined;
|
|
134
|
+
caption?: string | undefined;
|
|
135
|
+
media_type?: string | undefined;
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
}>;
|
|
11
138
|
/** The screenshot limits of a finding, as Tellagen enforces them. */
|
|
12
139
|
export declare const SCREENSHOT_LIMITS: {
|
|
13
140
|
readonly count: 20;
|
|
@@ -21,6 +148,7 @@ type ScreenshotInput = {
|
|
|
21
148
|
type RefWithScreenshots = {
|
|
22
149
|
screenshots?: ScreenshotInput[];
|
|
23
150
|
};
|
|
151
|
+
export declare function hasScreenshots(screenshots: ScreenshotInput[] | undefined, refs: RefWithScreenshots[] | undefined): boolean;
|
|
24
152
|
/** The size in bytes of the data a base64 text holds. */
|
|
25
153
|
export declare function base64Bytes(value: string): number;
|
|
26
154
|
/**
|
package/dist/tools/findings.js
CHANGED
|
@@ -8,7 +8,7 @@ import { QUESTION_CHECKS_CAPABILITY } from "../run-window.js";
|
|
|
8
8
|
export const MAX_FINDING_CHECKS = 3;
|
|
9
9
|
export const MAX_CHECK_QUESTION = 200;
|
|
10
10
|
export const MAX_CHECK_SOURCE = 120;
|
|
11
|
-
const findingCheckSchema = z
|
|
11
|
+
export const findingCheckSchema = z
|
|
12
12
|
.object({
|
|
13
13
|
source: z
|
|
14
14
|
.string()
|
|
@@ -41,7 +41,7 @@ export function findingChecksProblem(findingType, role, checks) {
|
|
|
41
41
|
}
|
|
42
42
|
return undefined;
|
|
43
43
|
}
|
|
44
|
-
const screenshotSchema = z.object({
|
|
44
|
+
export const screenshotSchema = z.object({
|
|
45
45
|
url: z
|
|
46
46
|
.string()
|
|
47
47
|
.url()
|
|
@@ -62,7 +62,7 @@ const screenshotSchema = z.object({
|
|
|
62
62
|
});
|
|
63
63
|
const hasStableId = (ref) => [ref.artifact_id, ref.artifact_digest, ref.tool_use_id].some((value) => typeof value === "string" && value.trim().length > 0);
|
|
64
64
|
const factKeyAloneNotice = "evidence_fact_key was sent without artifact_id, artifact_digest or tool_use_id. Tellagen works out the key itself and replaces yours, so it may not join this finding to its trace step. Send the same tool_use_id on the trace step and on the evidence ref.";
|
|
65
|
-
const evidenceRefSchema = z
|
|
65
|
+
export const evidenceRefSchema = z
|
|
66
66
|
.object({
|
|
67
67
|
source: z
|
|
68
68
|
.string()
|
|
@@ -134,7 +134,7 @@ export const SCREENSHOT_LIMITS = {
|
|
|
134
134
|
function allScreenshots(screenshots, refs) {
|
|
135
135
|
return [...(screenshots ?? []), ...(refs ?? []).flatMap((ref) => ref.screenshots ?? [])];
|
|
136
136
|
}
|
|
137
|
-
function hasScreenshots(screenshots, refs) {
|
|
137
|
+
export function hasScreenshots(screenshots, refs) {
|
|
138
138
|
return allScreenshots(screenshots, refs).length > 0;
|
|
139
139
|
}
|
|
140
140
|
/** The size in bytes of the data a base64 text holds. */
|
|
@@ -193,11 +193,11 @@ export function registerFindingTools(server, client) {
|
|
|
193
193
|
"negative",
|
|
194
194
|
"gap",
|
|
195
195
|
])
|
|
196
|
-
.describe("Type of finding: observation (notable data), correlation (two related things), hypothesis (proposed cause), evidence (proof), recommendation (suggested action), negative (ruled out), gap (
|
|
196
|
+
.describe("Type of finding: observation (notable data), correlation (two related things), hypothesis (proposed cause), evidence (proof), recommendation (suggested action), negative (ruled out), gap (a question a person can answer; a source you could not read goes in coverage with a reason, not here)"),
|
|
197
197
|
role: z
|
|
198
198
|
.enum(["confirms", "supports", "contradicts", "gap"])
|
|
199
199
|
.optional()
|
|
200
|
-
.describe("How this finding relates to the current diagnosis. Send contradicts on a negative finding and gap on a gap finding (a
|
|
200
|
+
.describe("How this finding relates to the current diagnosis. Send contradicts on a negative finding and gap on a gap finding (a question a person can answer). Without a role Tellagen stores supports."),
|
|
201
201
|
claim: z
|
|
202
202
|
.string()
|
|
203
203
|
.min(1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings.js","sourceRoot":"","sources":["../../src/tools/findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,MAAM,kBAAkB,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,C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