@talonic/mcp 0.1.96 → 0.1.97

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/dist/index.js CHANGED
@@ -441,15 +441,30 @@ var WIDGET_DESCRIPTIONS = {
441
441
  releaseDecisionTask: "Confirmation that the decision task was released back to available for another claimant.",
442
442
  failDecisionTask: "Confirmation that the task was reported undecidable: a Human Review is raised and the app's fallback applies."
443
443
  };
444
+ var CARD_TOOL_KEYS = /* @__PURE__ */ new Set([
445
+ "extract",
446
+ "ask",
447
+ "getAnswer",
448
+ "getRunResults",
449
+ "requestUpload",
450
+ "getBalance",
451
+ "getUsage",
452
+ "getPricing",
453
+ "saveSchema",
454
+ "createAccount"
455
+ ]);
444
456
  function widgetToolMeta(key) {
445
457
  const uri = WIDGET_URIS[key];
446
458
  const status3 = TOOL_INVOCATION_STATUS[key];
447
- return {
448
- ui: { resourceUri: uri },
449
- "openai/outputTemplate": uri,
459
+ const meta = {
450
460
  "openai/toolInvocation/invoking": status3.invoking,
451
461
  "openai/toolInvocation/invoked": status3.invoked
452
462
  };
463
+ if (CARD_TOOL_KEYS.has(key)) {
464
+ meta["ui"] = { resourceUri: uri };
465
+ meta["openai/outputTemplate"] = uri;
466
+ }
467
+ return meta;
453
468
  }
454
469
 
455
470
  // src/widgets/shared.ts
@@ -1847,9 +1862,9 @@ var RENDER_BODY27 = `
1847
1862
  var pg = payload.pagination && typeof payload.pagination === "object" ? payload.pagination : {};
1848
1863
  if (!rows.length) { empty("No result rows yet."); return; }
1849
1864
  function tone(s) { return s === "complete" || s === "completed" ? "good" : s === "error" ? "bad" : s === "partial" ? "warn" : "info"; }
1850
- var shownCols = cols.slice(0, 10);
1865
+ var shownCols = cols.slice(0, 6);
1851
1866
  var head = '<tr><th>Document</th><th>Status</th>' + shownCols.map(function (c) { return '<th>' + esc(c.display_name || c.field_key || "") + '</th>'; }).join("") + '</tr>';
1852
- var body = rows.slice(0, 50).map(function (r) {
1867
+ var body = rows.slice(0, 12).map(function (r) {
1853
1868
  r = r && typeof r === "object" ? r : {};
1854
1869
  var f = r.fields && typeof r.fields === "object" ? r.fields : {};
1855
1870
  return '<tr><td class="val">' + esc(r.filename || shortId(r.document_id)) + '</td><td>' + chip(r.status, tone(r.status)) + '</td>'
@@ -1858,10 +1873,10 @@ var RENDER_BODY27 = `
1858
1873
  var total = typeof pg.total === "number" ? pg.total : rows.length;
1859
1874
  var held = typeof payload.pending_review_count === "number" ? payload.pending_review_count : 0;
1860
1875
  var more = [];
1861
- if (rows.length > 50) more.push("+" + (rows.length - 50) + " more rows");
1862
- if (cols.length > 10) more.push("+" + (cols.length - 10) + " more columns");
1876
+ if (rows.length > 12) more.push("+" + (rows.length - 12) + " more rows");
1877
+ if (cols.length > 6) more.push("+" + (cols.length - 6) + " more columns");
1863
1878
  root.innerHTML = ''
1864
- + '<div class="header"><div><div class="title">Run results</div><div class="subtitle">' + Math.min(rows.length, 50) + ' of ' + total + ' rows' + (pg.has_more ? " \xB7 more available" : "") + '</div></div>'
1879
+ + '<div class="header"><div><div class="title">Run results</div><div class="subtitle">' + Math.min(rows.length, 12) + ' of ' + total + ' rows' + (pg.has_more ? " \xB7 more available" : "") + '</div></div>'
1865
1880
  + '<div>' + chip(payload.status, payload.status === "completed" ? "good" : payload.status === "failed" ? "bad" : "info") + (held ? chip(held + " held for review", "warn") : "") + '</div></div>'
1866
1881
  + '<table><thead>' + head + '</thead><tbody>' + body + '</tbody></table>'
1867
1882
  + (more.length ? '<div class="muted small" style="margin-top:6px">' + esc(more.join(" \xB7 ")) + '</div>' : "");
@@ -8579,7 +8594,7 @@ function registerAskTools(server, getToken, baseUrl) {
8579
8594
 
8580
8595
  // package.json
8581
8596
  var package_default = {
8582
- version: "0.1.96"};
8597
+ version: "0.1.97"};
8583
8598
 
8584
8599
  // src/version.ts
8585
8600
  var VERSION = package_default.version;