@talonic/mcp 0.1.57 → 0.1.59
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/http-server.js +38 -8
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/dist/server.js +25 -8
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/http-server.js
CHANGED
|
@@ -246,7 +246,9 @@ var BOOTSTRAP_JS = `
|
|
|
246
246
|
renderFromHost();
|
|
247
247
|
}, { passive: true });
|
|
248
248
|
window.addEventListener("message", function (event) {
|
|
249
|
+
if (event.source !== window.parent) return;
|
|
249
250
|
var msg = event.data;
|
|
251
|
+
if (!msg || msg.jsonrpc !== "2.0") return;
|
|
250
252
|
if (!msg || msg.method !== "ui/notifications/tool-result") return;
|
|
251
253
|
var sc = msg.params && msg.params.structuredContent;
|
|
252
254
|
if (sc) { window.openai = window.openai || {}; window.openai.toolOutput = sc; renderFromHost(); }
|
|
@@ -913,6 +915,7 @@ function registerExtract(server, getTalonic) {
|
|
|
913
915
|
openWorldHint: true
|
|
914
916
|
},
|
|
915
917
|
_meta: {
|
|
918
|
+
ui: { resourceUri: EXTRACTION_RESULT_WIDGET_URI },
|
|
916
919
|
"openai/outputTemplate": EXTRACTION_RESULT_WIDGET_URI
|
|
917
920
|
}
|
|
918
921
|
},
|
|
@@ -1062,9 +1065,11 @@ function registerFilter(server, getTalonic) {
|
|
|
1062
1065
|
annotations: {
|
|
1063
1066
|
title: "Filter Talonic Documents",
|
|
1064
1067
|
readOnlyHint: true,
|
|
1065
|
-
|
|
1068
|
+
destructiveHint: false,
|
|
1069
|
+
openWorldHint: false
|
|
1066
1070
|
},
|
|
1067
1071
|
_meta: {
|
|
1072
|
+
ui: { resourceUri: WIDGET_URIS.filter },
|
|
1068
1073
|
"openai/outputTemplate": WIDGET_URIS.filter
|
|
1069
1074
|
}
|
|
1070
1075
|
},
|
|
@@ -1129,9 +1134,11 @@ function registerGetBalance(server, getTalonic) {
|
|
|
1129
1134
|
annotations: {
|
|
1130
1135
|
title: "Get Talonic Credit Balance",
|
|
1131
1136
|
readOnlyHint: true,
|
|
1132
|
-
|
|
1137
|
+
destructiveHint: false,
|
|
1138
|
+
openWorldHint: false
|
|
1133
1139
|
},
|
|
1134
1140
|
_meta: {
|
|
1141
|
+
ui: { resourceUri: WIDGET_URIS.getBalance },
|
|
1135
1142
|
"openai/outputTemplate": WIDGET_URIS.getBalance
|
|
1136
1143
|
}
|
|
1137
1144
|
},
|
|
@@ -1237,9 +1244,11 @@ function registerGetDocument(server, getTalonic) {
|
|
|
1237
1244
|
annotations: {
|
|
1238
1245
|
title: "Get Talonic Document",
|
|
1239
1246
|
readOnlyHint: true,
|
|
1240
|
-
|
|
1247
|
+
destructiveHint: false,
|
|
1248
|
+
openWorldHint: false
|
|
1241
1249
|
},
|
|
1242
1250
|
_meta: {
|
|
1251
|
+
ui: { resourceUri: WIDGET_URIS.getDocument },
|
|
1243
1252
|
"openai/outputTemplate": WIDGET_URIS.getDocument
|
|
1244
1253
|
}
|
|
1245
1254
|
},
|
|
@@ -1323,9 +1332,11 @@ function registerListSchemas(server, getTalonic) {
|
|
|
1323
1332
|
annotations: {
|
|
1324
1333
|
title: "List Talonic Schemas",
|
|
1325
1334
|
readOnlyHint: true,
|
|
1326
|
-
|
|
1335
|
+
destructiveHint: false,
|
|
1336
|
+
openWorldHint: false
|
|
1327
1337
|
},
|
|
1328
1338
|
_meta: {
|
|
1339
|
+
ui: { resourceUri: WIDGET_URIS.listSchemas },
|
|
1329
1340
|
"openai/outputTemplate": WIDGET_URIS.listSchemas
|
|
1330
1341
|
}
|
|
1331
1342
|
},
|
|
@@ -1402,9 +1413,10 @@ function registerSaveSchema(server, getTalonic) {
|
|
|
1402
1413
|
title: "Save Talonic Schema",
|
|
1403
1414
|
readOnlyHint: false,
|
|
1404
1415
|
destructiveHint: false,
|
|
1405
|
-
openWorldHint:
|
|
1416
|
+
openWorldHint: false
|
|
1406
1417
|
},
|
|
1407
1418
|
_meta: {
|
|
1419
|
+
ui: { resourceUri: WIDGET_URIS.saveSchema },
|
|
1408
1420
|
"openai/outputTemplate": WIDGET_URIS.saveSchema
|
|
1409
1421
|
}
|
|
1410
1422
|
},
|
|
@@ -1503,9 +1515,11 @@ function registerSearch(server, getTalonic) {
|
|
|
1503
1515
|
annotations: {
|
|
1504
1516
|
title: "Search Talonic Workspace",
|
|
1505
1517
|
readOnlyHint: true,
|
|
1506
|
-
|
|
1518
|
+
destructiveHint: false,
|
|
1519
|
+
openWorldHint: false
|
|
1507
1520
|
},
|
|
1508
1521
|
_meta: {
|
|
1522
|
+
ui: { resourceUri: WIDGET_URIS.search },
|
|
1509
1523
|
"openai/outputTemplate": WIDGET_URIS.search
|
|
1510
1524
|
}
|
|
1511
1525
|
},
|
|
@@ -1599,9 +1613,11 @@ function registerRequestUpload(server, getToken, baseUrl) {
|
|
|
1599
1613
|
annotations: {
|
|
1600
1614
|
title: "Request File Upload",
|
|
1601
1615
|
readOnlyHint: false,
|
|
1602
|
-
|
|
1616
|
+
destructiveHint: false,
|
|
1617
|
+
openWorldHint: false
|
|
1603
1618
|
},
|
|
1604
1619
|
_meta: {
|
|
1620
|
+
ui: { resourceUri: WIDGET_URIS.requestUpload },
|
|
1605
1621
|
"openai/outputTemplate": WIDGET_URIS.requestUpload
|
|
1606
1622
|
}
|
|
1607
1623
|
},
|
|
@@ -1726,6 +1742,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1726
1742
|
openWorldHint: true
|
|
1727
1743
|
},
|
|
1728
1744
|
_meta: {
|
|
1745
|
+
ui: { resourceUri: WIDGET_URIS.toMarkdown },
|
|
1729
1746
|
"openai/outputTemplate": WIDGET_URIS.toMarkdown
|
|
1730
1747
|
}
|
|
1731
1748
|
},
|
|
@@ -1735,7 +1752,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1735
1752
|
|
|
1736
1753
|
// package.json
|
|
1737
1754
|
var package_default = {
|
|
1738
|
-
version: "0.1.
|
|
1755
|
+
version: "0.1.59"};
|
|
1739
1756
|
|
|
1740
1757
|
// src/version.ts
|
|
1741
1758
|
var VERSION = package_default.version;
|
|
@@ -1818,6 +1835,10 @@ var ALLOWED_ORIGINS = /* @__PURE__ */ new Set([
|
|
|
1818
1835
|
"https://claude.ai",
|
|
1819
1836
|
"https://www.claude.ai",
|
|
1820
1837
|
"https://app.claude.ai",
|
|
1838
|
+
"https://chatgpt.com",
|
|
1839
|
+
"https://www.chatgpt.com",
|
|
1840
|
+
"https://chat.openai.com",
|
|
1841
|
+
"https://platform.openai.com",
|
|
1821
1842
|
"https://cursor.directory",
|
|
1822
1843
|
"https://glama.ai",
|
|
1823
1844
|
"https://mcp.so",
|
|
@@ -1836,6 +1857,7 @@ var FAVICON_BYTES = Buffer.from(FAVICON_BASE64, "base64");
|
|
|
1836
1857
|
var PORT = Number(process.env["PORT"] ?? 3e3);
|
|
1837
1858
|
var RESOURCE_URL = process.env["MCP_RESOURCE_URL"] ?? "https://mcp.talonic.com";
|
|
1838
1859
|
var AUTHORIZATION_SERVER = process.env["OAUTH_AUTHORIZATION_SERVER"] ?? "https://api.talonic.com";
|
|
1860
|
+
var APPS_CHALLENGE_TOKEN = process.env["OPENAI_APPS_CHALLENGE_TOKEN"] ?? "gnHvYDsKH6NV8NIeDkVK1vSt5QKZqsg8AIcXdS1pR_U";
|
|
1839
1861
|
function renderProtectedResourceMetadata() {
|
|
1840
1862
|
return {
|
|
1841
1863
|
resource: RESOURCE_URL,
|
|
@@ -1906,6 +1928,14 @@ function createRequestHandler() {
|
|
|
1906
1928
|
res.end(JSON.stringify(renderProtectedResourceMetadata()));
|
|
1907
1929
|
return;
|
|
1908
1930
|
}
|
|
1931
|
+
if (path === "/.well-known/openai-apps-challenge") {
|
|
1932
|
+
res.writeHead(200, {
|
|
1933
|
+
"Content-Type": "text/plain; charset=utf-8",
|
|
1934
|
+
"Cache-Control": "public, max-age=300"
|
|
1935
|
+
});
|
|
1936
|
+
res.end(APPS_CHALLENGE_TOKEN);
|
|
1937
|
+
return;
|
|
1938
|
+
}
|
|
1909
1939
|
if (path === "/" && req.method === "GET") {
|
|
1910
1940
|
const accept = String(req.headers["accept"] ?? "");
|
|
1911
1941
|
if (!accept.includes("text/event-stream")) {
|