log10x-mcp 1.29.30 → 1.29.31

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.
@@ -247,42 +247,69 @@ Decoding aids you may use:
247
247
  These are aids, not certainties. Cite the raw token; let the user verify.
248
248
 
249
249
  RENDERING A PLAN (the \`plan\` object from log10x_estimate_savings / log10x_poc_from_local):
250
- open with a THREE-LINE BLOCK built from the plan's fields, every number verbatim:
251
- **Target: cut <targetPct>% of the <destination> bill. This plan reaches <achievedPct>%.**
252
- **How:** <planned count> of <planned+kept count> message types move to <the lever, in plain words —
253
- e.g. "CloudWatch's Infrequent Access tier: same events, still queryable, lower rate">. When rows
254
- escalated to offload, say so as the deliberate step it is ("the costliest type goes to S3 instead,
255
- which closes the target; the retriever fetches those events back on demand").
256
- **Never touched:** every error and warning (<count of protected kept rows> message types). Nothing in
257
- this plan deletes an event.
258
- Then the rows, as a NUMBERED stacked list, costliest first, capped at 5-7 plus an
259
- "and N more message types, same levers, smallest last" line. NEVER a markdown table: table cells crop
260
- or horizontally-scroll long identifiers. Each card opens with the NOUN, and the verdict comes last:
250
+ open with the VERDICT BLOCK — four labeled lines built from the plan's fields, every number verbatim,
251
+ ONE fact per line so the reader scans labels instead of parsing sentences. The lines answer, in order:
252
+ did it work, what happens to the number, how, what is protected.
253
+
254
+ **<Target|Budget> met, keeping everything.**
255
+ (append "except <N> opted-in lossy types" only when lossy rows exist)
256
+ **<billUsd verbatim>/mo → <landsAtUsd verbatim>/mo**, <restate the ask: "a <achievedPct>% cut against
257
+ the <targetPct>% ask" for percent · "under the $<budget>/mo line" for a dollar budget>
258
+ For a VOLUME budget the hero numbers are BYTES: "**<bytes today> → <landsAtBytesMonthly>**, under
259
+ the <N> GB/mo line", with the dollar effect second ("and takes $<X>/mo off the bill with it").
260
+ **Lever:** <plain words, e.g. "CloudWatch Infrequent Access tier: same events, still queryable,
261
+ lower rate">, <planned count> of <planned+kept count> message types. When rows escalated to
262
+ offload, narrate it as the deliberate step it is ("the costliest types go to S3 instead, which
263
+ closes the line; the retriever fetches them back on demand").
264
+ **Never touched:** every error and warning (<protected kept count> types). Nothing deleted.
265
+ (when the scope has no protected rows, state what IS true instead: e.g. "the remaining <N> types
266
+ stay as they are; the budget was met before reaching them")
267
+
268
+ DEFAULT DEPTH — a plan renders as a conversation, not a document. By default show: the verdict block,
269
+ the TOP 3 cards, one "and <N> more message types, same lever, smallest last" line, and the largest
270
+ kept row. Stop there. The full list, per-service views, kept-row detail, and recurring wiring render
271
+ only when the user asks for them; the plan object is already in context, so going deeper costs no new
272
+ tool call. When expanding, page in groups of 5-7 rows.
273
+
274
+ Cards are a NUMBERED stacked list, costliest first. NEVER a markdown table: table cells crop or
275
+ horizontally-scroll long identifiers. Each card opens with the NOUN, and the verdict comes last:
261
276
 
262
277
  1. **<displayName>** · <dominantService>
263
278
  \`<name — the full identifier, in inline code, never truncated>\` (only when it says more than displayName)
264
279
  <one-clause gloss, per the INTERPRETING METRIC PATTERNS rules above>.
265
280
  → <action, plain words> · **saves <savedUsd verbatim>** (percent of the bill when dollars are sub-dollar)
281
+ (volume-budget rows lead with bytes instead: "→ <action> · **moves <savedBytes> out** · saves <savedUsd>")
266
282
 
267
283
  The gloss is one clause of business meaning ONLY for a code path recognized with high confidence
268
284
  (public OSS / vendor SDKs); an unrecognized symbol gets the literal treatment ("application log
269
285
  statement") or no gloss at all — a hedged guess is worse than silence. The gloss never carries a
270
286
  number. Severity is omitted on planned rows (INFO earns no ink); on KEPT rows it is the REASON the
271
287
  row is kept, stated as such: "**ERROR** · never touched". Show the largest kept row as one card ending
272
- "→ kept, never touched · <billUsd verbatim> stays". When the plan carries a \`gap\`, relay its message
273
- and remedies verbatim — the choice between installing the retriever and accepting loss belongs to the
274
- user, never to you.
275
-
276
- BUDGET TARGETS: when the user states a standing line instead of a cut — "keep payment under $500/mo",
277
- "stay under 2 TB/mo" — pass \`budget_usd_monthly\` or \`budget_gb_monthly\` (service-scoped via
278
- \`service\` when they named one) instead of a percent. The verdict line changes and MUST stay in the
279
- user's denomination: "**Budget: keep <scope> under <budget>/mo. This plan lands at <landsAt>/mo.**"
280
- Never restate a dollar budget as a volume claim or the reverse: a dollar budget met by tier_down moves
281
- NOTHING out of the destination, and a volume budget says nothing about the bill. tier_down cannot serve
282
- a volume budget at all (every byte still lands) — the tool already excludes it; do not re-add it in
283
- prose. A budget is idempotent: already under budget returns an empty plan with the headroom stated —
284
- render that single line and no cards. Everything else (three-line block, numbered cards, gap verbatim)
285
- renders exactly as above.
288
+ "→ kept, never touched · <billUsd verbatim> stays".
289
+
290
+ WHEN THE PLAN CARRIES A GAP (met=false): the gap gets the same labeled treatment, never a prose
291
+ paragraph. Build it from gap.message's numbers and gap.remedies' order:
292
+
293
+ **<Target|Budget> out of reach while keeping everything.**
294
+ **<today's number, in the ask's denomination>**, <amount over the line | points short of the ask>
295
+ **Why:** <one clause, e.g. "the tier lever keeps every byte in CloudWatch, so volume stays put" ·
296
+ "without the retriever, offloaded events would be unreachable">
297
+ **The choice, left with the user:**
298
+ 1. Install the S3 retriever: offload closes the gap, everything stays recoverable
299
+ 2. <Drop | Sample or drop> the overage: lossy, those events stop reaching the destination
300
+
301
+ Order the remedies exactly as gap.remedies orders them. Never pick for the user, never soften the
302
+ word "lossy", and render the choice list even when the user seems to lean one way.
303
+
304
+ BUDGET TARGETS: when the user states a standing line instead of a cut ("keep payment under $500/mo",
305
+ "stay under 2 TB/mo"), pass \`budget_usd_monthly\` or \`budget_gb_monthly\` (service-scoped via
306
+ \`service\` when they named one) instead of a percent. The verdict block MUST stay in the
307
+ user's denomination: dollars hero for a dollar budget, bytes hero for a volume budget with the dollar
308
+ effect second. Never restate a dollar budget as a volume claim or the reverse: a dollar budget met by
309
+ tier_down moves NOTHING out of the destination, and a volume budget says nothing about the bill.
310
+ tier_down cannot serve a volume budget at all (every byte still lands); the tool already excludes it,
311
+ do not re-add it in prose. A budget is idempotent: already under budget returns an empty plan,
312
+ rendered as the single headroom line and nothing else, no cards, no lever line.
286
313
 
287
314
  PROSPECT LANE: When the user asks to run a POC on their own logs ("run a cost POC", "analyze this log file", "what would 10x save on our <analyzer>"), or asks for a plan that cuts a given percentage before anything is installed ("define a plan that cuts 30%", "what is the difference between cutting 10% and 20%"), the answer is log10x_poc_from_local — after log10x_start on a fresh session, directly afterwards. It reads local files or a kubectl sample, runs the engine on this machine, sends nothing out, and takes target_percent_reduction for percentage asks; re-run it with two targets to compare them. log10x_poc_from_siem_submit is the same ask when log-analyzer credentials exist. These tools are registered on every keyless or POC boot. When any number in an answer comes from the public demo dataset rather than the user\'s own logs, the answer must say so.`;
288
315
  //# sourceMappingURL=server-instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../../src/lib/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,4BAA4B,EAAe,MAAM,mBAAmB,CAAC;AAE9E,0EAA0E;AAC1E,+EAA+E;AAC/E,4EAA4E;AAC5E,6EAA6E;AAC7E,MAAM,cAAc,GAClB;IACE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,eAAe,EAAE,eAAe,CAAC;IAClC,CAAC,YAAY,EAAE,YAAY,CAAC;CAE/B;KACE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE;IACnB,MAAM,CAAC,GAAG,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAC3C,2EAA2E;IAC3E,4EAA4E;IAC5E,6DAA6D;IAC7D,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,OAAO,GAAG,KAAK,IAAI,KAAK,KAAK,CAAC;AAChC,CAAC,CAAC;K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AAC,CAAC;AAEd,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8KjC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;m2BAgHm1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log10x-mcp",
3
- "version": "1.29.30",
3
+ "version": "1.29.31",
4
4
  "description": "Log10x MCP Server — per-pattern log cost attribution, root-cause investigation, pasted-batch triage, archive query/backfill, and cross-pillar correlation against customer metric backends (Grafana Cloud, Mimir, Thanos, AMP) with structural validation that refuses when it cannot prove linkage",
5
5
  "type": "module",
6
6
  "main": "build/index.js",