@talonic/mcp 0.1.99 → 0.1.101

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/CHANGELOG.md CHANGED
@@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  > The publish workflow assigns the version on release; after the push that publishes it, promote this block to `## [<version>] - <date>` (the changelog lock accepts the current package version living here until then).
11
11
 
12
+ ### Changed
13
+
14
+ - **Cards in the Ink design.** Ink's palette and type (`--void-*` tokens from the platform's `ink/restructure`: accent #512DA8 / #C9B6F5, neutral surfaces, quieter dividers and chips) replace the generic indigo/grey for all ten cards, in light and dark. The answer card renders its markdown as prose (bold, lists, code, https links, tables, escape-first so model text can never become markup), drops the boxed raw-markdown block, the ask/conversation ids and the token count, shows a "Verified" style verdict, numbered sources, and one quiet meta line (credits · queries · seconds).
15
+
16
+ ## [0.1.100] - 2026-11-21
17
+
18
+ ### Changed
19
+
20
+ - **Questions steer to `talonic_ask` at the moment the model reaches for SQL.** Results of `query_data`, `describe_data`, `workspace_overview` and `plan_fields` via `talonic_invoke_agent_tool` carry one extra content item (`structuredContent.next_step`) saying that `talonic_ask` does the same work server-side in one cited call. An unknown-field refusal (the model guessed a `field_key`, as in the 2026-11-20 claude.ai session) adds that `talonic_ask` resolves field names itself. `content[0]` stays parseable JSON.
21
+
22
+ ## [0.1.99] - 2026-11-21
23
+
12
24
  ### Security
13
25
 
14
26
  - Runtime dependencies patched (`npm audit --omit=dev`: 9 advisories → 0, one critical). Minimum versions raised to `@modelcontextprotocol/sdk` ^1.32.2 and `zod` ^4.6.7 so installs never resolve the vulnerable ranges; transitive fixes (`proxy-addr`, `body-parser`, `fast-uri`, `hono`, `qs`, …) come through the lockfile. Dev-only `vitest` advisories need a major upgrade and stay open.
@@ -522,24 +522,34 @@ function widgetMeta(description) {
522
522
  return meta;
523
523
  }
524
524
  var BASE_CSS = `
525
+ /* Ink tokens (platform ink/restructure, src/app/globals.css --void-*). */
525
526
  :root {
526
- --bg: #ffffff; --fg: #111827; --muted: #6b7280; --border: #e5e7eb;
527
- --accent: #4f46e5; --good: #16a34a; --warn: #d97706; --bad: #dc2626;
528
- --chip: #f3f4f6;
527
+ --bg: #FFFFFF; --fg: #1B1B1F; --muted: #5B5B64; --faint: #6A6A71;
528
+ --border: rgba(20, 20, 30, 0.12); --divider: rgba(20, 20, 30, 0.07);
529
+ --accent: #512DA8; --accent-dim: rgba(81, 45, 168, 0.07); --accent-tint: #EEE8F8;
530
+ --good: #1F9D5B; --warn: #B97E14; --bad: #C94343;
531
+ --chip: #F5F5F3; --surface-2: #F5F5F3;
529
532
  }
530
533
  @media (prefers-color-scheme: dark) {
531
534
  :root:not([data-theme="light"]) {
532
- --bg: #0f1115; --fg: #f3f4f6; --muted: #9ca3af; --border: #1f2937;
533
- --chip: #1f2937;
535
+ --bg: #101013; --fg: #EDEDEF; --muted: #A2A2AB; --faint: #86868E;
536
+ --border: rgba(255, 255, 255, 0.08); --divider: rgba(255, 255, 255, 0.06);
537
+ --accent: #C9B6F5; --accent-dim: rgba(201, 182, 245, 0.10); --accent-tint: #2A1F3D;
538
+ --good: #5BC98B; --warn: #E8B45A; --bad: #E36D6D;
539
+ --chip: #1A1A1F; --surface-2: #16161A;
534
540
  }
535
541
  }
536
542
  :root[data-theme="dark"] {
537
- --bg: #0f1115; --fg: #f3f4f6; --muted: #9ca3af; --border: #1f2937;
538
- --chip: #1f2937;
543
+ --bg: #101013; --fg: #EDEDEF; --muted: #A2A2AB; --faint: #86868E;
544
+ --border: rgba(255, 255, 255, 0.08); --divider: rgba(255, 255, 255, 0.06);
545
+ --accent: #C9B6F5; --accent-dim: rgba(201, 182, 245, 0.10); --accent-tint: #2A1F3D;
546
+ --good: #5BC98B; --warn: #E8B45A; --bad: #E36D6D;
547
+ --chip: #1A1A1F; --surface-2: #16161A;
539
548
  }
540
549
  :root[data-host="mcp-apps"] { --bg: transparent; }
541
550
  html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg);
542
- font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, sans-serif; }
551
+ font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
552
+ -webkit-font-smoothing: antialiased; }
543
553
  .root { padding: 20px; box-sizing: border-box; }
544
554
  * { box-sizing: border-box; }
545
555
  .empty { color: var(--muted); padding: 28px; text-align: center; }
@@ -547,10 +557,26 @@ var BASE_CSS = `
547
557
  .small { font-size: 12px; }
548
558
  .header { display: flex; align-items: flex-start; justify-content: space-between;
549
559
  gap: 12px; margin-bottom: 16px; }
550
- .title { font-weight: 600; }
551
- .subtitle { color: var(--muted); font-size: 12px; }
560
+ .title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
561
+ .subtitle { color: var(--faint); font-size: 12px; }
562
+ .eyebrow { color: var(--faint); font-size: 12px; font-weight: 500; margin-bottom: 2px; }
563
+ .prose { font-size: 14.5px; line-height: 1.6; color: var(--fg); }
564
+ .prose p { margin: 0 0 10px; }
565
+ .prose p:last-child, .prose ul:last-child, .prose ol:last-child { margin-bottom: 0; }
566
+ .prose ul, .prose ol { margin: 0 0 10px; padding-left: 20px; }
567
+ .prose li { margin: 3px 0; }
568
+ .prose h3, .prose h4 { font-size: 14.5px; font-weight: 600; margin: 14px 0 6px; }
569
+ .prose code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--chip);
570
+ border: 1px solid var(--divider); border-radius: 4px; padding: 0 4px; }
571
+ .prose strong { font-weight: 600; }
572
+ .prose a { color: var(--accent); text-decoration: none; }
573
+ .prose a:hover { text-decoration: underline; }
574
+ .prose table { margin: 6px 0 12px; }
575
+ .section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--divider); }
576
+ .section-label { color: var(--faint); font-size: 12px; font-weight: 500; margin-bottom: 8px; }
577
+ .meta { color: var(--faint); font-size: 12px; margin-top: 14px; }
552
578
  table { width: 100%; border-collapse: collapse; margin-top: 8px; }
553
- th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
579
+ th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--divider);
554
580
  vertical-align: top; font-size: 13px; }
555
581
  th { color: var(--muted); font-weight: 500; font-size: 12px; }
556
582
  th:first-child, td:first-child { padding-left: 0; }
@@ -568,15 +594,18 @@ var BASE_CSS = `
568
594
  border-radius: 6px; padding: 6px 10px; font: inherit; cursor: pointer;
569
595
  text-decoration: none; display: inline-block; }
570
596
  button:hover, a.btn:hover { border-color: var(--accent); }
571
- a.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
572
- .chip { display: inline-block; background: var(--chip); border-radius: 999px;
573
- padding: 1px 8px; font-size: 12px; margin: 2px 4px 2px 0; }
597
+ a.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
598
+ :root[data-host="mcp-apps"] a.btn.primary { color: #fff; }
599
+ @media (prefers-color-scheme: dark) { :root[data-host="mcp-apps"]:not([data-theme="light"]) a.btn.primary { color: #17102A; } }
600
+ :root[data-host="mcp-apps"][data-theme="dark"] a.btn.primary { color: #17102A; }
601
+ .chip { display: inline-block; background: var(--chip); border-radius: 6px; color: var(--muted);
602
+ padding: 1px 7px; font-size: 12px; font-weight: 500; margin: 2px 4px 2px 0; }
574
603
  .big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
575
604
  .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
576
605
  gap: 10px; margin-top: 14px; }
577
606
  /* Stat tile: label stacked above value, padded, never crowding an edge. */
578
607
  .kv { display: flex; flex-direction: column; gap: 3px;
579
- background: var(--chip); border: 1px solid var(--border); border-radius: 8px;
608
+ background: var(--surface-2); border: 1px solid var(--divider); border-radius: 10px;
580
609
  padding: 10px 12px; min-width: 0; }
581
610
  .kv .k { color: var(--muted); font-size: 12px; }
582
611
  .kv .val { font-weight: 500; }
@@ -587,7 +616,7 @@ var BASE_CSS = `
587
616
  .chip.good { background: rgba(22,163,74,.12); color: var(--good); }
588
617
  .chip.warn { background: rgba(217,119,6,.14); color: var(--warn); }
589
618
  .chip.bad { background: rgba(220,38,38,.12); color: var(--bad); }
590
- .chip.info { background: rgba(79,70,229,.12); color: var(--accent); }
619
+ .chip.info { background: var(--accent-dim); color: var(--accent); }
591
620
  .plane { margin-top: 14px; }
592
621
  .plane .subtitle { margin-bottom: 4px; }
593
622
  .num { text-align: right; }
@@ -626,6 +655,45 @@ var BASE_CSS = `
626
655
  }
627
656
  @media (prefers-reduced-motion: reduce) { .tl-spin, .tl-core, .tl-arm { animation: none; } }
628
657
  `;
658
+ var MD_JS = String.raw`
659
+ // Minimal, escape-first markdown: paragraphs, - / 1. lists, ### headings,
660
+ // **bold**, *em*, code spans, https links, pipe tables. Input is escaped before
661
+ // any markup is added, so model text can never inject HTML.
662
+ function mdInline(t) {
663
+ return esc(t)
664
+ .replace(/\x60([^\x60]+)\x60/g, "<code>$1</code>")
665
+ .replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>")
666
+ .replace(/(^|[^*])\*([^*\s][^*]*)\*/g, "$1<em>$2</em>")
667
+ .replace(/\[([^\]]+)\]\((https:\/\/[^\s)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>');
668
+ }
669
+ function md(text) {
670
+ var lines = String(text == null ? "" : text).replace(/\r/g, "").split("\n");
671
+ var out = [], para = [], list = null, i = 0;
672
+ function flushPara() { if (para.length) { out.push("<p>" + para.map(mdInline).join("<br>") + "</p>"); para = []; } }
673
+ function flushList() { if (list) { out.push("<" + list.tag + ">" + list.items.map(function (x) { return "<li>" + mdInline(x) + "</li>"; }).join("") + "</" + list.tag + ">"); list = null; } }
674
+ for (; i < lines.length; i++) {
675
+ var l = lines[i], m;
676
+ if (/^\s*$/.test(l)) { flushPara(); flushList(); continue; }
677
+ if (/^\s*\|.*\|\s*$/.test(l) && i + 1 < lines.length && /^\s*\|?\s*:?-{2,}/.test(lines[i + 1])) {
678
+ flushPara(); flushList();
679
+ var cells = function (row) { return row.trim().replace(/^\||\|$/g, "").split("|").map(function (c) { return c.trim(); }); };
680
+ var head = cells(l); i += 2; var rows = [];
681
+ while (i < lines.length && /^\s*\|.*\|\s*$/.test(lines[i])) { rows.push(cells(lines[i])); i++; }
682
+ i--;
683
+ out.push("<table><thead><tr>" + head.map(function (h) { return "<th>" + mdInline(h) + "</th>"; }).join("") + "</tr></thead><tbody>"
684
+ + rows.slice(0, 50).map(function (r) { return "<tr>" + r.map(function (c) { return '<td class="val">' + mdInline(c) + "</td>"; }).join("") + "</tr>"; }).join("") + "</tbody></table>");
685
+ continue;
686
+ }
687
+ if ((m = /^\s*#{1,6}\s+(.*)$/.exec(l))) { flushPara(); flushList(); out.push("<h3>" + mdInline(m[1]) + "</h3>"); continue; }
688
+ if ((m = /^\s*[-*•]\s+(.*)$/.exec(l))) { flushPara(); if (!list || list.tag !== "ul") { flushList(); list = { tag: "ul", items: [] }; } list.items.push(m[1]); continue; }
689
+ if ((m = /^\s*\d+[.)]\s+(.*)$/.exec(l))) { flushPara(); if (!list || list.tag !== "ol") { flushList(); list = { tag: "ol", items: [] }; } list.items.push(m[1]); continue; }
690
+ if (list) { list.items[list.items.length - 1] += " " + l.trim(); continue; }
691
+ para.push(l.trim());
692
+ }
693
+ flushPara(); flushList();
694
+ return out.join("");
695
+ }
696
+ `;
629
697
  var HELPERS_JS = `
630
698
  var root = document.getElementById("root");
631
699
  function esc(s) {
@@ -648,6 +716,7 @@ var HELPERS_JS = `
648
716
  var p = Math.round(v * 100);
649
717
  return '<span class="bar ' + confClass(v) + '"><span style="width:' + p + '%"></span></span> <span class="muted small">' + p + '%</span>';
650
718
  }
719
+ ${MD_JS}
651
720
  function empty(msg) { root.innerHTML = '<div class="empty">' + esc(msg) + '</div>'; }
652
721
  function copyButton(id, text) {
653
722
  var btn = document.getElementById(id);
@@ -1943,9 +2012,13 @@ function getAnswerPolledWidgetHtml() {
1943
2012
  return POLLED_HTML;
1944
2013
  }
1945
2014
  var CSS3 = `
1946
- .cite { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
1947
- .cite:last-child { border-bottom: none; }
1948
- pre.md.answer { max-height: 480px; font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, sans-serif; }
2015
+ .cites { list-style: none; padding: 0; margin: 0; counter-reset: c; display: grid; gap: 10px; }
2016
+ .cites li { counter-increment: c; display: grid; grid-template-columns: 22px 1fr; gap: 0 6px; font-size: 13px; }
2017
+ .cites li::before { content: counter(c); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
2018
+ .cites .q { color: var(--fg); }
2019
+ .cites .src { grid-column: 2; color: var(--faint); font-size: 12px; margin-top: 2px; }
2020
+ .correction { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--accent-dim); font-size: 13px; }
2021
+ .thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); }
1949
2022
  `;
1950
2023
  var ANSWER_BODY = `
1951
2024
  if (!payload || typeof payload !== "object" || !payload.ask_id) { empty("No answer."); return; }
@@ -1955,34 +2028,36 @@ var ANSWER_BODY = `
1955
2028
  var usage = obj(payload.usage);
1956
2029
  var cites = Array.isArray(payload.citations) ? payload.citations : [];
1957
2030
  var arts = Array.isArray(payload.artifacts) ? payload.artifacts : [];
1958
- var verdictTone = ver.verdict === "supported" ? "good" : ver.verdict === "issues" ? "warn" : ver.verdict === "unverifiable" ? "bad" : "";
1959
- var head = '<div class="header"><div><div class="title">' + HEADLINE + '</div><div class="subtitle">ask ' + idChip(payload.ask_id) + (payload.conversation_id ? ' \xB7 conversation ' + idChip(payload.conversation_id) : "") + '</div></div>'
1960
- + '<div>' + (status === "completed" ? chip(ver.verdict, verdictTone) : chip(status, status === "error" ? "bad" : "info")) + '</div></div>';
2031
+ var verdict = { supported: ["Verified", "good"], issues: ["Has issues", "warn"], unverifiable: ["Unverified", "bad"] }[ver.verdict];
2032
+ var ids = "ask " + payload.ask_id + (payload.conversation_id ? " \xB7 conversation " + payload.conversation_id : "");
2033
+ var head = '<div class="header"><div class="title" title="' + esc(ids) + '">' + HEADLINE + '</div>'
2034
+ + '<div>' + (status === "completed" ? (verdict ? chip(verdict[0], verdict[1]) : "") : status === "error" ? chip("Error", "bad") : "") + '</div></div>';
1961
2035
  if (status === "processing") {
1962
- root.innerHTML = head + '<div class="small">Still thinking\u2026 call talonic_get_answer with ask_id ' + idChip(payload.ask_id) + ' in a few seconds.</div>';
2036
+ root.innerHTML = head + '<div class="thinking">Still working on it. The answer appears here in a few seconds.</div>';
1963
2037
  return;
1964
2038
  }
1965
2039
  var answer = typeof payload.answer === "string" ? payload.answer : (payload.answer == null ? "" : fmt(payload.answer));
1966
- var citeHtml = cites.length ? '<div class="plane"><div class="subtitle">Citations (' + cites.length + ')</div>' + cites.slice(0, 20).map(function (c, i) {
2040
+ var citeHtml = cites.length ? '<div class="section"><div class="section-label">Sources</div><ol class="cites">' + cites.slice(0, 12).map(function (c) {
1967
2041
  c = obj(c);
1968
- return '<div class="cite"><span class="small">[' + (i + 1) + '] \u201C' + esc(clamp(c.quote || fmt(c), 200)) + '\u201D</span><span class="muted small">' + chip(c.kind, c.kind === "field" ? "info" : "") + esc(c.filename || shortId(c.document_id)) + (c.reference ? ' \xB7 ' + esc(c.reference) : "") + '</span></div>';
1969
- }).join("") + '</div>' : "";
1970
- var artHtml = arts.length ? '<div class="plane"><div class="subtitle">Artifacts (' + arts.length + ')</div>' + arts.slice(0, 10).map(function (a) {
2042
+ var where = esc(c.filename || shortId(c.document_id)) + (c.reference ? ' \xB7 ' + esc(c.reference) : "");
2043
+ var link = typeof c.app_url === "string" && /^https:\\/\\//.test(c.app_url) ? c.app_url : "";
2044
+ return '<li><span class="q">' + (c.quote ? "\u201C" + esc(clamp(c.quote, 220)) + "\u201D" : where) + '</span>'
2045
+ + '<span class="src">' + (link ? '<a href="' + esc(link) + '" target="_blank" rel="noopener noreferrer" style="color:inherit">' + where + '</a>' : where) + '</span></li>';
2046
+ }).join("") + '</ol>' + (cites.length > 12 ? '<div class="meta">+' + (cites.length - 12) + ' more sources</div>' : "") + '</div>' : "";
2047
+ var artHtml = arts.length ? '<div class="section"><div class="section-label">Files</div>' + arts.slice(0, 10).map(function (a) {
1971
2048
  a = obj(a);
1972
2049
  var link = typeof a.link === "string" && /^https:\\/\\//.test(a.link) ? a.link : "";
1973
- return '<div class="kv"><span class="val">' + esc(a.label || a.type || a.id || "artifact") + '</span>' + (link ? '<a class="btn small" href="' + esc(link) + '" target="_blank" rel="noopener noreferrer">Open</a>' : "") + '</div>';
2050
+ return link ? '<a class="btn" href="' + esc(link) + '" target="_blank" rel="noopener noreferrer" style="margin:0 6px 6px 0">' + esc(a.label || a.type || "Open file") + '</a>' : '<span class="chip">' + esc(a.label || a.type || "file") + '</span>';
1974
2051
  }).join("") + '</div>' : "";
1975
- var tiles = [];
1976
- if (typeof usage.credits_charged === "number") tiles.push(usage.credits_charged + " credits");
1977
- if (typeof usage.tokens === "number") tiles.push(usage.tokens + " tokens");
1978
- if (typeof payload.tool_calls === "number") tiles.push(payload.tool_calls + " tool call" + (payload.tool_calls === 1 ? "" : "s"));
1979
- if (typeof payload.waited_ms === "number") tiles.push((payload.waited_ms / 1000).toFixed(1) + " s");
1980
- if (typeof ver.checks_total === "number") tiles.push(ver.checks_total + " checks, " + (ver.checks_unsupported || 0) + " unsupported");
2052
+ var meta = [];
2053
+ if (typeof usage.credits_charged === "number") meta.push(usage.credits_charged + " credits");
2054
+ if (typeof payload.tool_calls === "number") meta.push(payload.tool_calls + (payload.tool_calls === 1 ? " query" : " queries"));
2055
+ if (typeof payload.waited_ms === "number") meta.push((payload.waited_ms / 1000).toFixed(1) + " s");
1981
2056
  root.innerHTML = head
1982
- + (answer ? '<pre class="md answer">' + esc(answer) + '</pre>' : '<div class="muted small">The agent returned no answer text.</div>')
1983
- + (ver.correction ? '<div class="small" style="margin-top:6px"><span class="muted">Correction:</span> ' + esc(ver.correction) + '</div>' : "")
2057
+ + (answer ? '<div class="prose">' + md(answer) + '</div>' : '<div class="muted small">No answer text came back.</div>')
2058
+ + (ver.correction ? '<div class="correction"><strong>Correction.</strong> ' + esc(ver.correction) + '</div>' : "")
1984
2059
  + citeHtml + artHtml
1985
- + (tiles.length ? '<div class="muted small" style="margin-top:10px">' + esc(tiles.join(" \xB7 ")) + '</div>' : "");
2060
+ + (meta.length ? '<div class="meta">' + esc(meta.join(" \xB7 ")) + '</div>' : "");
1986
2061
  `;
1987
2062
  function answerWidget(headline, title) {
1988
2063
  return buildWidgetHtml({
@@ -1992,7 +2067,7 @@ function answerWidget(headline, title) {
1992
2067
  });
1993
2068
  }
1994
2069
  var ANSWER_HTML = answerWidget("Answer", "Talonic \u2014 Answer");
1995
- var POLLED_HTML = answerWidget("Answer (polled)", "Talonic \u2014 Answer (polled)");
2070
+ var POLLED_HTML = answerWidget("Answer", "Talonic \u2014 Answer");
1996
2071
 
1997
2072
  // src/widgets/decision-task-shared.ts
1998
2073
  var DECISION_JS = `
@@ -8137,7 +8212,33 @@ var invokeAgentToolInputSchema = {
8137
8212
  args: z.record(z.string(), z.unknown()).optional().describe("Arguments matching the tool's input_schema."),
8138
8213
  document_ids: documentIdsArg
8139
8214
  };
8215
+ var ANALYSIS_TOOLS = /* @__PURE__ */ new Set([
8216
+ "query_data",
8217
+ "describe_data",
8218
+ "workspace_overview",
8219
+ "plan_fields"
8220
+ ]);
8221
+ var ASK_HINT = "If you are answering a question about the documents, call talonic_ask with the user's question instead of further queries: it runs this same SQL, field lookup and document reading server-side, knows the workspace's real field names and duplicate rules, and returns one cited answer in a single call.";
8222
+ var UNKNOWN_KEY_HINT = "talonic_ask resolves field names itself; call it with the user's question rather than guessing field_key values.";
8140
8223
  async function handleInvokeAgentTool(getToken, baseUrl, args) {
8224
+ const result = await invokeAgentTool(getToken, baseUrl, args);
8225
+ if (!ANALYSIS_TOOLS.has(args.name)) return result;
8226
+ const first = result.content[0];
8227
+ if (!first) return result;
8228
+ if (result.isError) {
8229
+ if (/Unknown field_key|Unknown claim predicate/.test(first.text)) {
8230
+ first.text = `${first.text}
8231
+ ${UNKNOWN_KEY_HINT}`;
8232
+ }
8233
+ return result;
8234
+ }
8235
+ if (result["structuredContent"] && typeof result["structuredContent"] === "object") {
8236
+ result["structuredContent"]["next_step"] = ASK_HINT;
8237
+ }
8238
+ result.content.push({ type: "text", text: `Next step: ${ASK_HINT}` });
8239
+ return result;
8240
+ }
8241
+ async function invokeAgentTool(getToken, baseUrl, args) {
8141
8242
  return runTool(async () => {
8142
8243
  const res = await apiJson(
8143
8244
  getToken,
@@ -8684,7 +8785,7 @@ function registerAskTools(server, getToken, baseUrl) {
8684
8785
 
8685
8786
  // package.json
8686
8787
  var package_default = {
8687
- version: "0.1.99"};
8788
+ version: "0.1.101"};
8688
8789
 
8689
8790
  // src/version.ts
8690
8791
  var VERSION = package_default.version;