@sonordev/site-kit 7.2.0 → 7.3.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/CHANGELOG.md +9 -0
- package/agent-manifest.json +6 -4
- package/dist/{AnalyticsProvider-SLFFBRPE.js → AnalyticsProvider-DJQA66AG.js} +4 -4
- package/dist/{ArticleViewTracker-TM5AMGN2.js → ArticleViewTracker-GFOAXFV7.js} +3 -3
- package/dist/{BlocksPopup-YJNJIVPO.js → BlocksPopup-AHDU34TL.js} +4 -4
- package/dist/{ChatWidget-XKOSH66S.js → ChatWidget-FHBAHFZX.js} +5 -5
- package/dist/{FileField-CI4UL5SH.js → FileField-J5W5MIAZ.js} +3 -3
- package/dist/{FormSpotlight-F2AAEGBN.js → FormSpotlight-PE5YZBFZ.js} +1 -1
- package/dist/{FormStage-BI5R5CNC.js → FormStage-OOPQC27J.js} +1 -1
- package/dist/{ManagedForm-G6COGHXL.js → ManagedForm-JRZAJ7SZ.js} +6 -6
- package/dist/{ManagedNewsletterForm-BO3WCGXX.js → ManagedNewsletterForm-TC5542ZG.js} +4 -4
- package/dist/{SignalCore-ZA6WHKBR.js → SignalCore-2YP5FCAS.js} +3 -3
- package/dist/{SiteChat-YJADDTKG.js → SiteChat-EGEZJJVV.js} +1 -1
- package/dist/{SiteDesignReporter-5YAW36AQ.js → SiteDesignReporter-YEEWJKWN.js} +5 -5
- package/dist/{SitePopups-ST5PMKZE.js → SitePopups-LQBIXIFV.js} +4 -4
- package/dist/SitemapSync-LSZ2EYOF.js +8 -0
- package/dist/_client/booking-widget.js +5 -5
- package/dist/affiliates/index.js +3 -3
- package/dist/analytics/index.js +4 -4
- package/dist/articles/index.js +1 -1
- package/dist/articles/server-ui.js +1 -1
- package/dist/chat/index.js +6 -6
- package/dist/{chunk-VO3JYRT5.js → chunk-2AD3CDRR.js} +8 -8
- package/dist/{chunk-BKY2ZNM7.js → chunk-2ECWEUHP.js} +1 -1
- package/dist/{chunk-F24FNCTK.js → chunk-56KNHB4U.js} +1 -1
- package/dist/{chunk-D6ZC7XKZ.js → chunk-BEBR4OJD.js} +2 -2
- package/dist/{chunk-S54ECQGY.js → chunk-CYUFBKJQ.js} +1 -1
- package/dist/{chunk-RPZ7OQGD.js → chunk-DNPNYWVL.js} +1 -1
- package/dist/{chunk-FR6BYFPC.js → chunk-EPT6FJUY.js} +1 -1
- package/dist/{chunk-JJ3DELUL.js → chunk-I2YX3HVD.js} +2 -2
- package/dist/{chunk-GGORNBSC.js → chunk-L7U23XI2.js} +1 -1
- package/dist/{chunk-JWTQS5F5.js → chunk-MKMD2HJW.js} +1 -1
- package/dist/{chunk-5YCEMV2L.js → chunk-MRQ2U4LZ.js} +1 -1
- package/dist/{chunk-OWZ7ATLZ.js → chunk-MVR4FY5R.js} +1 -1
- package/dist/{chunk-VHKEF5ZB.js → chunk-NI2XNEMR.js} +1 -1
- package/dist/{chunk-64DKGVEI.js → chunk-O5RGXTWU.js} +2 -2
- package/dist/{chunk-NV72HZ4W.js → chunk-RDPW4D33.js} +1 -1
- package/dist/{chunk-GEXT7BTE.js → chunk-T4DLETKR.js} +1 -1
- package/dist/{chunk-CF5QNFYU.js → chunk-UPRSH6Q4.js} +2 -2
- package/dist/{chunk-HGFAEDG3.js → chunk-VF4F5WXZ.js} +1 -1
- package/dist/{chunk-BC4Y3S3D.js → chunk-WDQB4OXY.js} +7 -3
- package/dist/{chunk-K4ZHAURD.js → chunk-WGG6GTKW.js} +1 -1
- package/dist/{chunk-IAM3D3RL.js → chunk-WGIDC6QP.js} +3 -3
- package/dist/{chunk-5V2V5C3Y.js → chunk-XLSQTTUE.js} +1 -1
- package/dist/{chunk-R46IQIGK.js → chunk-Y6LP36UW.js} +1 -1
- package/dist/{chunk-EJVQJCG5.js → chunk-YJLS6JBI.js} +2 -2
- package/dist/{chunk-QL6XNPSD.js → chunk-Z65DHMTW.js} +24 -7
- package/dist/{chunk-JMLK6MH7.js → chunk-ZHS2XFLV.js} +1 -1
- package/dist/{chunk-D5DCBD4Y.js → chunk-ZKHI4E2B.js} +1 -1
- package/dist/client/index.js +3 -3
- package/dist/commerce/index.js +4 -4
- package/dist/engage/index.js +7 -7
- package/dist/fleet/index.js +4 -4
- package/dist/forms/index.js +7 -7
- package/dist/forms/server.js +2 -2
- package/dist/images/index.js +4 -4
- package/dist/index.js +1 -1
- package/dist/layout/client.js +7 -7
- package/dist/layout/index.js +8 -8
- package/dist/llms/agent-access.d.ts +4 -0
- package/dist/llms/index.js +4 -4
- package/dist/maps/index.js +3 -3
- package/dist/mcp/WebMcpTools.d.ts +5 -4
- package/dist/mcp/client.js +14 -7
- package/dist/mcp/discovery.d.ts +48 -0
- package/dist/mcp/handlers.d.ts +13 -7
- package/dist/mcp/index.d.ts +5 -3
- package/dist/mcp/index.js +61 -17
- package/dist/mcp/serverCard.d.ts +6 -7
- package/dist/mcp/sonor.js +6 -6
- package/dist/revalidate/index.js +2 -2
- package/dist/seo/client.js +4 -4
- package/dist/seo/index.js +4 -4
- package/dist/seo/llms.js +4 -4
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/sitemap.js +2 -2
- package/dist/server/index.js +2 -2
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +2 -2
- package/dist/sitemap/index.js +2 -2
- package/dist/sync/index.js +5 -5
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +5 -5
- package/dist/website/popups.js +4 -4
- package/dist/{writeLLMsTxt-OV24LQVL.js → writeLLMsTxt-2NQVDGYI.js} +1 -1
- package/package.json +1 -1
- package/src/forms/README.md +2 -2
- package/src/llms/README.md +69 -0
- package/src/mcp/README.md +50 -16
- package/dist/SitemapSync-RJTEBINX.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { countStageViews, countStageQuestions, useFieldControls } from './chunk-
|
|
2
|
+
import { countStageViews, countStageQuestions, useFieldControls } from './chunk-ZKHI4E2B.js';
|
|
3
3
|
import { HoneypotField } from './chunk-DXO6SBMD.js';
|
|
4
4
|
import { DelightStyles, FormMomentum, FormField } from './chunk-4NTBQNHA.js';
|
|
5
|
-
import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-
|
|
5
|
+
import { useFormLoadedAt, useFormTracking, submitForm, useRecaptchaWarmup, useForm } from './chunk-EPT6FJUY.js';
|
|
6
6
|
import { readAgentSubmit, formToolAttributes } from './chunk-Q6E4OPGG.js';
|
|
7
7
|
import { isFieldVisible, validateField, isFieldComplete, isDisplayOnly, unseenControlValues } from './chunk-C2FZBUSS.js';
|
|
8
8
|
import { DEFAULT_FORM_SUCCESS_MESSAGE } from './chunk-5SQK3D53.js';
|
|
@@ -63,7 +63,7 @@ function FormClient({
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
let cancelled = false;
|
|
66
|
-
const load = resolvedExperience === "stage" ? import('./FormStage-
|
|
66
|
+
const load = resolvedExperience === "stage" ? import('./FormStage-OOPQC27J.js').then((m) => m.FormStage) : import('./FormSpotlight-PE5YZBFZ.js').then((m) => m.FormSpotlight);
|
|
67
67
|
load.then((Component) => {
|
|
68
68
|
if (!cancelled) setExperience(() => Component);
|
|
69
69
|
}).catch((err) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSiteConfig } from './chunk-Z22QVHT4.js';
|
|
2
|
-
import { writeLLMsTxtToPublic } from './chunk-
|
|
2
|
+
import { writeLLMsTxtToPublic } from './chunk-Z65DHMTW.js';
|
|
3
3
|
import { buildFetch } from './chunk-VX5CMNMM.js';
|
|
4
4
|
import { findAppDirForDiscovery } from './chunk-ZEGVKVD5.js';
|
|
5
5
|
import { stripEmbeddedDomain, locToPath, inferPageType, isMalformedSitemapPath, resolveTrailingSlash, stripTrailingSlash, llmsWriteTimeoutMs, applyTrailingSlash } from './chunk-YVKRYQRG.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { DEFAULT_WIDGET_Z_INDEX } from './chunk-27FISYK4.js';
|
|
3
3
|
import { getOrCreateVisitorId } from './chunk-24QZEO3Q.js';
|
|
4
4
|
import { resolveAnalyticsTarget } from './chunk-43OCZ3JA.js';
|
|
5
|
-
import { sonorFetch } from './chunk-
|
|
5
|
+
import { sonorFetch } from './chunk-BEBR4OJD.js';
|
|
6
6
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
7
7
|
import ReactDOM from 'react-dom';
|
|
8
8
|
import dynamic from 'next/dynamic';
|
|
@@ -160,7 +160,7 @@ function activatePopup(active, id, popups) {
|
|
|
160
160
|
return [...active, id];
|
|
161
161
|
}
|
|
162
162
|
var LazyBlocksPopup = dynamic(
|
|
163
|
-
() => import('./BlocksPopup-
|
|
163
|
+
() => import('./BlocksPopup-AHDU34TL.js').then((m) => ({ default: m.BlocksPopup })),
|
|
164
164
|
{ ssr: false }
|
|
165
165
|
);
|
|
166
166
|
function SitePopups(props) {
|
|
@@ -19,24 +19,39 @@ function formatAgentAccessSection(baseUrl, options = {}) {
|
|
|
19
19
|
return [
|
|
20
20
|
AGENT_ACCESS_HEADING,
|
|
21
21
|
"",
|
|
22
|
-
"
|
|
22
|
+
"AI assistants can use this site\u2019s Model Context Protocol tools to look up information and, with the user\u2019s approval, take supported actions.",
|
|
23
23
|
"",
|
|
24
24
|
`- [MCP endpoint](${endpoint}): Streamable HTTP. Call tools/list for the current tools.`,
|
|
25
25
|
`- [Server card](${card}): what the server is and how to connect.`,
|
|
26
|
+
...options.catalog ? [`- [AI catalog](${absolute(baseUrl, options.catalog)}): experimental domain discovery.`] : [],
|
|
26
27
|
...tools.length ? ["", `Tools include ${tools.map((t) => `\`${t}\``).join(", ")}.`] : []
|
|
27
28
|
].join("\n");
|
|
28
29
|
}
|
|
29
30
|
function appendAgentAccessSection(markdown, baseUrl, options = {}) {
|
|
30
31
|
if (!baseUrl || describesMcp(markdown)) return markdown;
|
|
32
|
+
const section = formatAgentAccessSection(baseUrl, options);
|
|
33
|
+
if (options.position === "after-intro") {
|
|
34
|
+
const firstSection = /^## /m.exec(markdown);
|
|
35
|
+
if (firstSection) {
|
|
36
|
+
const intro = markdown.slice(0, firstSection.index).trimEnd().replace(/\n---$/, "").trimEnd();
|
|
37
|
+
return `${intro}
|
|
38
|
+
|
|
39
|
+
${section}
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
${markdown.slice(firstSection.index)}`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
31
46
|
return `${markdown.trimEnd()}
|
|
32
47
|
|
|
33
48
|
---
|
|
34
49
|
|
|
35
|
-
${
|
|
50
|
+
${section}
|
|
36
51
|
`;
|
|
37
52
|
}
|
|
38
53
|
function describesMcp(markdown) {
|
|
39
|
-
return markdown.includes(AGENT_ACCESS_HEADING) || markdown.includes("/.well-known/mcp-server-card") || markdown.includes("/.well-known/mcp.json");
|
|
54
|
+
return markdown.includes(AGENT_ACCESS_HEADING) || markdown.includes("/.well-known/mcp-server-card") || markdown.includes("/.well-known/mcp.json") || markdown.includes("/api/mcp/server-card");
|
|
40
55
|
}
|
|
41
56
|
var MCP_ROUTE_FILES = ["route.ts", "route.tsx", "route.js", "route.jsx", "route.mjs"];
|
|
42
57
|
var SERVER_CARD_DIRS = ["mcp-server-card", "mcp.json"];
|
|
@@ -362,16 +377,18 @@ async function generateLLMsTxt(options) {
|
|
|
362
377
|
}
|
|
363
378
|
}
|
|
364
379
|
}
|
|
365
|
-
if (options.mcp && baseUrl) {
|
|
366
|
-
sections.push(formatAgentAccessSection(baseUrl, options.mcp === true ? {} : options.mcp));
|
|
367
|
-
sectionNames.push("agent-access");
|
|
368
|
-
}
|
|
369
380
|
for (const custom of customSections) {
|
|
370
381
|
sections.push(`## ${custom.title}
|
|
371
382
|
|
|
372
383
|
${custom.content}`);
|
|
373
384
|
sectionNames.push(custom.title.toLowerCase().replace(/\s+/g, "-"));
|
|
374
385
|
}
|
|
386
|
+
if (options.mcp && baseUrl) {
|
|
387
|
+
const agentOptions = options.mcp === true ? {} : options.mcp;
|
|
388
|
+
const index = agentOptions.position === "after-intro" ? sectionNames[0] === "header" ? 1 : 0 : sections.length;
|
|
389
|
+
sections.splice(index, 0, formatAgentAccessSection(baseUrl, agentOptions));
|
|
390
|
+
sectionNames.splice(index, 0, "agent-access");
|
|
391
|
+
}
|
|
375
392
|
return {
|
|
376
393
|
// Every own-site link (pages, clusters, portfolio, custom sections) takes
|
|
377
394
|
// the site's trailing-slash shape in one pass.
|
|
@@ -26,7 +26,7 @@ function useFieldControls(fields) {
|
|
|
26
26
|
}
|
|
27
27
|
if (needsFile && !requested.current.file) {
|
|
28
28
|
requested.current.file = true;
|
|
29
|
-
import('./FileField-
|
|
29
|
+
import('./FileField-J5W5MIAZ.js').then((m) => {
|
|
30
30
|
if (!cancelled) setControls((prev) => ({ ...prev, File: m.FileField }));
|
|
31
31
|
}).catch(() => {
|
|
32
32
|
requested.current.file = false;
|
package/dist/client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { publishSiteCredential } from '../chunk-
|
|
2
|
+
import { publishSiteCredential } from '../chunk-VF4F5WXZ.js';
|
|
3
3
|
export { useDeferredActivation } from '../chunk-YC7ELZS3.js';
|
|
4
4
|
import '../chunk-FESKKJAS.js';
|
|
5
5
|
import '../chunk-A4CC4ZG3.js';
|
|
@@ -7,8 +7,8 @@ export { trackConversion, trackEvent } from '../chunk-LCDVPAMR.js';
|
|
|
7
7
|
export { VISUAL_VIEWPORT_GAP_PROPERTY, VisualViewportGap, useVisualViewportGap } from '../chunk-6T6CQVNL.js';
|
|
8
8
|
export { getOrCreateSessionId, getOrCreateVisitorId, useSiteKitIdentity } from '../chunk-24QZEO3Q.js';
|
|
9
9
|
import '../chunk-GJWI74ZZ.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-WGG6GTKW.js';
|
|
11
|
+
import '../chunk-56KNHB4U.js';
|
|
12
12
|
import '../chunk-PKBMQBKP.js';
|
|
13
13
|
|
|
14
14
|
// src/client/SiteKitCredential.tsx
|
package/dist/commerce/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import '../chunk-P5GB6NEO.js';
|
|
3
|
-
import { useAnalyticsOptional } from '../chunk-
|
|
3
|
+
import { useAnalyticsOptional } from '../chunk-MKMD2HJW.js';
|
|
4
4
|
import '../chunk-LCDVPAMR.js';
|
|
5
5
|
import '../chunk-24QZEO3Q.js';
|
|
6
6
|
import '../chunk-L2V5PUFN.js';
|
|
7
7
|
import '../chunk-GJWI74ZZ.js';
|
|
8
8
|
import '../chunk-43OCZ3JA.js';
|
|
9
9
|
import '../chunk-EKBEOXTH.js';
|
|
10
|
-
import { sonorFetch } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
10
|
+
import { sonorFetch } from '../chunk-BEBR4OJD.js';
|
|
11
|
+
import '../chunk-WGG6GTKW.js';
|
|
12
|
+
import '../chunk-56KNHB4U.js';
|
|
13
13
|
import '../chunk-PKBMQBKP.js';
|
|
14
14
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
import React5, { useState, useEffect, useMemo, useRef, useCallback } from 'react';
|
package/dist/engage/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
export { SONOR_PUBLIC_ECHO_DEFAULTS, getEchoWidgetProps } from '../chunk-HODO5BX5.js';
|
|
3
|
-
export { ChatWidget } from '../chunk-
|
|
4
|
-
import { SiteChat } from '../chunk-
|
|
3
|
+
export { ChatWidget } from '../chunk-O5RGXTWU.js';
|
|
4
|
+
import { SiteChat } from '../chunk-RDPW4D33.js';
|
|
5
5
|
import '../chunk-6T6CQVNL.js';
|
|
6
6
|
import '../chunk-JE4A5S4F.js';
|
|
7
|
-
import { SitePopups } from '../chunk-
|
|
7
|
+
import { SitePopups } from '../chunk-YJLS6JBI.js';
|
|
8
8
|
import '../chunk-27FISYK4.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-EPT6FJUY.js';
|
|
10
10
|
import '../chunk-Q6E4OPGG.js';
|
|
11
11
|
import '../chunk-C2FZBUSS.js';
|
|
12
12
|
import '../chunk-5SQK3D53.js';
|
|
@@ -18,9 +18,9 @@ import '../chunk-L2V5PUFN.js';
|
|
|
18
18
|
import '../chunk-GJWI74ZZ.js';
|
|
19
19
|
import '../chunk-43OCZ3JA.js';
|
|
20
20
|
import '../chunk-EKBEOXTH.js';
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
23
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-BEBR4OJD.js';
|
|
22
|
+
import '../chunk-WGG6GTKW.js';
|
|
23
|
+
import '../chunk-56KNHB4U.js';
|
|
24
24
|
import '../chunk-PKBMQBKP.js';
|
|
25
25
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
26
26
|
|
package/dist/fleet/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-
|
|
2
|
+
export { FLEET_HEARTBEAT_PATH, FleetHeartbeat, detectNextVersion, sendFleetHeartbeat } from '../chunk-UPRSH6Q4.js';
|
|
3
3
|
export { FLEET_CONTRACT_VERSION, FLEET_MODULES, FLEET_MODULES_MAX, FLEET_SITE_MAX_LENGTH, FLEET_VERSION_MAX_LENGTH, FLEET_VERSION_PATTERN, buildFleetHeartbeatPayload, isFleetModule, normalizeFleetModules, normalizeFleetSite, sanitizeFleetVersion } from '../chunk-ZTZQPYP6.js';
|
|
4
4
|
import '../chunk-YC7ELZS3.js';
|
|
5
5
|
import '../chunk-43OCZ3JA.js';
|
|
6
6
|
import '../chunk-EKBEOXTH.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-BEBR4OJD.js';
|
|
8
|
+
import '../chunk-WGG6GTKW.js';
|
|
9
|
+
import '../chunk-56KNHB4U.js';
|
|
10
10
|
import '../chunk-PKBMQBKP.js';
|
package/dist/forms/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
export { FormCelebration } from '../chunk-YGGDU6C3.js';
|
|
3
|
-
export { FormClient, ManagedForm } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
export { FormClient, ManagedForm } from '../chunk-WGIDC6QP.js';
|
|
4
|
+
import '../chunk-ZKHI4E2B.js';
|
|
5
5
|
export { DatePicker } from '../chunk-SOD2F6C2.js';
|
|
6
|
-
export { FormEnhancer } from '../chunk-
|
|
6
|
+
export { FormEnhancer } from '../chunk-MVR4FY5R.js';
|
|
7
7
|
import '../chunk-YC7ELZS3.js';
|
|
8
8
|
import '../chunk-DXO6SBMD.js';
|
|
9
9
|
export { FormField as FormFieldComponent } from '../chunk-4NTBQNHA.js';
|
|
10
|
-
export { useForm, useFormTracking } from '../chunk-
|
|
10
|
+
export { useForm, useFormTracking } from '../chunk-EPT6FJUY.js';
|
|
11
11
|
import '../chunk-Q6E4OPGG.js';
|
|
12
12
|
import '../chunk-C2FZBUSS.js';
|
|
13
13
|
export { DEFAULT_FORM_SUCCESS_MESSAGE } from '../chunk-5SQK3D53.js';
|
|
@@ -15,9 +15,9 @@ import '../chunk-HW7B43E5.js';
|
|
|
15
15
|
import '../chunk-NJCTQH2P.js';
|
|
16
16
|
import '../chunk-L2V5PUFN.js';
|
|
17
17
|
import '../chunk-GJWI74ZZ.js';
|
|
18
|
-
import { sonorFetch } from '../chunk-
|
|
19
|
-
import '../chunk-
|
|
20
|
-
import '../chunk-
|
|
18
|
+
import { sonorFetch } from '../chunk-BEBR4OJD.js';
|
|
19
|
+
import '../chunk-WGG6GTKW.js';
|
|
20
|
+
import '../chunk-56KNHB4U.js';
|
|
21
21
|
import '../chunk-PKBMQBKP.js';
|
|
22
22
|
|
|
23
23
|
// src/forms/formsApi.ts
|
package/dist/forms/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ServerForm, getFormConfig } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ServerForm, getFormConfig } from '../chunk-XLSQTTUE.js';
|
|
2
|
+
import '../chunk-MVR4FY5R.js';
|
|
3
3
|
import '../chunk-YC7ELZS3.js';
|
|
4
4
|
export { StaticForm } from '../chunk-ZTLMPUO6.js';
|
|
5
5
|
import '../chunk-DXO6SBMD.js';
|
package/dist/images/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-
|
|
1
|
+
export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-ZHS2XFLV.js';
|
|
2
2
|
export { ManagedFavicon, getManagedFaviconUrl } from '../chunk-GW7GSBO7.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-BEBR4OJD.js';
|
|
4
|
+
import '../chunk-WGG6GTKW.js';
|
|
5
|
+
import '../chunk-56KNHB4U.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SITE_KIT_VERSION } from './chunk-
|
|
1
|
+
export { SITE_KIT_VERSION } from './chunk-56KNHB4U.js';
|
|
2
2
|
import './chunk-PKBMQBKP.js';
|
package/dist/layout/client.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { SiteKitClientProviders } from '../chunk-
|
|
2
|
+
export { SiteKitClientProviders } from '../chunk-2AD3CDRR.js';
|
|
3
3
|
import '../chunk-6G43IRWR.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-VF4F5WXZ.js';
|
|
5
|
+
import '../chunk-UPRSH6Q4.js';
|
|
6
6
|
import '../chunk-ZTZQPYP6.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-CYUFBKJQ.js';
|
|
8
8
|
import '../chunk-YC7ELZS3.js';
|
|
9
9
|
import '../chunk-FESKKJAS.js';
|
|
10
10
|
import '../chunk-A4CC4ZG3.js';
|
|
@@ -12,7 +12,7 @@ import '../chunk-24QZEO3Q.js';
|
|
|
12
12
|
import '../chunk-GJWI74ZZ.js';
|
|
13
13
|
import '../chunk-43OCZ3JA.js';
|
|
14
14
|
import '../chunk-EKBEOXTH.js';
|
|
15
|
-
import '../chunk-
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-BEBR4OJD.js';
|
|
16
|
+
import '../chunk-WGG6GTKW.js';
|
|
17
|
+
import '../chunk-56KNHB4U.js';
|
|
18
18
|
import '../chunk-PKBMQBKP.js';
|
package/dist/layout/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SiteKitClientProviders } from '../chunk-
|
|
1
|
+
import { SiteKitClientProviders } from '../chunk-2AD3CDRR.js';
|
|
2
2
|
import '../chunk-6G43IRWR.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-VF4F5WXZ.js';
|
|
4
|
+
import '../chunk-UPRSH6Q4.js';
|
|
5
5
|
import '../chunk-ZTZQPYP6.js';
|
|
6
6
|
import { ManagedFavicon } from '../chunk-GW7GSBO7.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-CYUFBKJQ.js';
|
|
8
8
|
import '../chunk-YC7ELZS3.js';
|
|
9
|
-
import { resolveClientCredential } from '../chunk-
|
|
9
|
+
import { resolveClientCredential } from '../chunk-DNPNYWVL.js';
|
|
10
10
|
import '../chunk-VX5CMNMM.js';
|
|
11
11
|
import { ManagedScripts } from '../chunk-MVLMXC44.js';
|
|
12
12
|
import { resolveApiOrigin } from '../chunk-X6F6SO4S.js';
|
|
@@ -17,9 +17,9 @@ import '../chunk-24QZEO3Q.js';
|
|
|
17
17
|
import '../chunk-GJWI74ZZ.js';
|
|
18
18
|
import '../chunk-43OCZ3JA.js';
|
|
19
19
|
import '../chunk-EKBEOXTH.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
22
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-BEBR4OJD.js';
|
|
21
|
+
import '../chunk-WGG6GTKW.js';
|
|
22
|
+
import '../chunk-56KNHB4U.js';
|
|
23
23
|
import '../chunk-PKBMQBKP.js';
|
|
24
24
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
25
25
|
|
|
@@ -14,6 +14,10 @@ export interface AgentAccessOptions {
|
|
|
14
14
|
endpoint?: string;
|
|
15
15
|
/** The server card's path (default `/.well-known/mcp-server-card`). */
|
|
16
16
|
card?: string;
|
|
17
|
+
/** Optional AI catalog path. Only set when the site serves this experimental discovery document. */
|
|
18
|
+
catalog?: string;
|
|
19
|
+
/** Place discovery before the first content section, preserving the title and introduction. */
|
|
20
|
+
position?: 'after-intro' | 'end';
|
|
17
21
|
/** Tool names worth naming, e.g. the built-in ones. Optional. */
|
|
18
22
|
tools?: string[];
|
|
19
23
|
}
|
package/dist/llms/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-
|
|
1
|
+
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-WDQB4OXY.js';
|
|
2
2
|
export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
|
|
3
3
|
export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler } from '../chunk-QLTDFUJ7.js';
|
|
4
|
-
export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-
|
|
4
|
+
export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-NI2XNEMR.js';
|
|
5
5
|
import '../chunk-XTRZGXB2.js';
|
|
6
6
|
export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
|
|
7
|
-
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-
|
|
7
|
+
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-Z65DHMTW.js';
|
|
8
8
|
export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-6U3VLV2C.js';
|
|
9
9
|
import '../chunk-L5UOHS6E.js';
|
|
10
10
|
import '../chunk-WMVK77ND.js';
|
|
@@ -15,5 +15,5 @@ import '../chunk-MJP63SSS.js';
|
|
|
15
15
|
import '../chunk-YVKRYQRG.js';
|
|
16
16
|
import '../chunk-FESKKJAS.js';
|
|
17
17
|
import '../chunk-A4CC4ZG3.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-56KNHB4U.js';
|
|
19
19
|
import '../chunk-PKBMQBKP.js';
|
package/dist/maps/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { monotonicMs } from '../chunk-MH2DSGC6.js';
|
|
3
|
-
import { sonorFetch } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import { sonorFetch } from '../chunk-BEBR4OJD.js';
|
|
4
|
+
import '../chunk-WGG6GTKW.js';
|
|
5
|
+
import '../chunk-56KNHB4U.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
|
7
7
|
import { useState, useCallback, useEffect } from 'react';
|
|
8
8
|
import { APIProvider, Map as Map$1, AdvancedMarker, Pin, InfoWindow } from '@vis.gl/react-google-maps';
|
|
@@ -29,11 +29,12 @@ export interface WebMcpToolsProps {
|
|
|
29
29
|
/** MCP endpoint on this origin (default `/api/mcp`). */
|
|
30
30
|
endpoint?: string;
|
|
31
31
|
/**
|
|
32
|
-
* Wait for the page to go quiet before registering (default
|
|
32
|
+
* Wait for the page to go quiet before registering (default false).
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* Supported browsers discover tools as soon as this component mounts, so
|
|
35
|
+
* an agent need not wait for window load, idle, or a human interaction.
|
|
36
|
+
* Pass true to retain load + idle activation. Unsupported browsers never
|
|
37
|
+
* fetch a catalog or register tools, regardless of this setting.
|
|
37
38
|
*/
|
|
38
39
|
defer?: boolean;
|
|
39
40
|
/**
|
package/dist/mcp/client.js
CHANGED
|
@@ -6,21 +6,28 @@ import { useEffect } from 'react';
|
|
|
6
6
|
function getModelContext() {
|
|
7
7
|
if (typeof window === "undefined") return null;
|
|
8
8
|
const doc = document;
|
|
9
|
-
if (doc.modelContext) return doc.modelContext;
|
|
10
9
|
const nav = navigator;
|
|
11
|
-
|
|
10
|
+
for (const context of [doc.modelContext, nav.modelContext]) {
|
|
11
|
+
if (typeof context?.registerTool === "function" || typeof context?.provideContext === "function") {
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
12
16
|
}
|
|
13
17
|
function isWebMcpAvailable() {
|
|
14
18
|
return getModelContext() !== null;
|
|
15
19
|
}
|
|
20
|
+
var EMPTY_TOOLS = [];
|
|
21
|
+
var EMPTY_LOCAL_TOOLS = [];
|
|
16
22
|
function WebMcpTools({
|
|
17
|
-
tools =
|
|
18
|
-
localTools =
|
|
23
|
+
tools = EMPTY_TOOLS,
|
|
24
|
+
localTools = EMPTY_LOCAL_TOOLS,
|
|
19
25
|
endpoint = "/api/mcp",
|
|
20
|
-
defer =
|
|
26
|
+
defer = false,
|
|
21
27
|
discover = true
|
|
22
28
|
}) {
|
|
23
|
-
const
|
|
29
|
+
const deferredReady = useDeferredActivation(defer);
|
|
30
|
+
const ready = !defer || deferredReady;
|
|
24
31
|
useEffect(() => {
|
|
25
32
|
if (!ready) return;
|
|
26
33
|
const modelContext = getModelContext();
|
|
@@ -113,7 +120,7 @@ function WebMcpTools({
|
|
|
113
120
|
await modelContext.provideContext({ tools: definitions });
|
|
114
121
|
}
|
|
115
122
|
} catch (error) {
|
|
116
|
-
if (process.env.NODE_ENV !== "production") {
|
|
123
|
+
if (!controller.signal.aborted && process.env.NODE_ENV !== "production") {
|
|
117
124
|
console.warn("[site-kit/mcp] WebMCP registration failed:", error);
|
|
118
125
|
}
|
|
119
126
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Experimental domain discovery from the MCP Server Cards discovery draft.
|
|
3
|
+
* The catalog points at the existing card; it never copies tools or identity
|
|
4
|
+
* metadata whose authoritative source is the server/card itself.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/modelcontextprotocol/ext-server-card/blob/main/docs/discovery.md
|
|
7
|
+
*/
|
|
8
|
+
import type { McpServerInfo } from './types';
|
|
9
|
+
import { MCP_SERVER_CARD_MEDIA_TYPE } from './serverCard';
|
|
10
|
+
export declare const MCP_AI_CATALOG_PATH = "/.well-known/ai-catalog.json";
|
|
11
|
+
export declare const MCP_AI_CATALOG_MEDIA_TYPE = "application/ai-catalog+json";
|
|
12
|
+
export interface McpAiCatalog {
|
|
13
|
+
specVersion: '1.0';
|
|
14
|
+
entries: {
|
|
15
|
+
identifier: string;
|
|
16
|
+
type: typeof MCP_SERVER_CARD_MEDIA_TYPE;
|
|
17
|
+
url: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export interface BuildMcpAiCatalogOptions {
|
|
21
|
+
/** Reuse the server identity; `io.example/weather` becomes `mcp:weather`. */
|
|
22
|
+
info: Pick<McpServerInfo, 'name'>;
|
|
23
|
+
/** Explicit public site origin. Never inferred from an untrusted Host header. */
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
/** Origin-relative card path, e.g. `/api/mcp/server-card`. */
|
|
26
|
+
serverCardPath: string;
|
|
27
|
+
}
|
|
28
|
+
/** Build the small, experimental catalog without duplicating the server card. */
|
|
29
|
+
export declare function buildMcpAiCatalog(options: BuildMcpAiCatalogOptions): McpAiCatalog;
|
|
30
|
+
export interface McpAiCatalogHandlerOptions extends BuildMcpAiCatalogOptions {
|
|
31
|
+
/** Seconds for `Cache-Control: public, max-age=…` (default 3600). */
|
|
32
|
+
maxAge?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface McpDiscoveryRouteHandlers {
|
|
35
|
+
GET: (request?: Request) => Promise<Response>;
|
|
36
|
+
OPTIONS: () => Promise<Response>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Serve the experimental catalog at `MCP_AI_CATALOG_PATH`. This static-safe
|
|
40
|
+
* handler leaves conditional ETag requests to the host/CDN, like llms.txt and
|
|
41
|
+
* the default card handler; it never reads incoming request headers.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createMcpAiCatalogHandler(options: McpAiCatalogHandlerOptions): McpDiscoveryRouteHandlers;
|
|
44
|
+
/** Shared public response policy for catalogs and cards; not an auth surface. */
|
|
45
|
+
export declare function createMcpDiscoveryHandlers(document: unknown, options: {
|
|
46
|
+
mediaType: string;
|
|
47
|
+
maxAge?: number;
|
|
48
|
+
}): McpDiscoveryRouteHandlers;
|
package/dist/mcp/handlers.d.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { MCP_SUPPORTED_PROTOCOL_VERSIONS, type DispatchOutcome, type JsonRpcRequest, type McpServerDefinition } from './protocol';
|
|
16
16
|
import type { McpToolCallRecord } from './types';
|
|
17
|
-
import { type BuildMcpServerCardOptions } from './serverCard';
|
|
17
|
+
import { type BuildMcpServerCardOptions, MCP_SERVER_CARD_MEDIA_TYPE } from './serverCard';
|
|
18
|
+
import { type McpDiscoveryRouteHandlers } from './discovery';
|
|
18
19
|
/**
|
|
19
20
|
* Undo the spec's Base64 sentinel wrapper: `=?base64?{b64}?=`.
|
|
20
21
|
* Values that aren't wrapped come back untouched.
|
|
@@ -74,18 +75,23 @@ export declare function createMcpHandler(options: McpHandlerOptions): McpRouteHa
|
|
|
74
75
|
export interface McpServerCardHandlerOptions extends BuildMcpServerCardOptions {
|
|
75
76
|
/** Seconds for `Cache-Control: public, max-age=…` (default 3600). */
|
|
76
77
|
maxAge?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Use the draft media type for a new canonical card URL. Existing routes
|
|
80
|
+
* default to application/json for compatibility. Both remain static-safe.
|
|
81
|
+
*/
|
|
82
|
+
contentType?: 'application/json' | typeof MCP_SERVER_CARD_MEDIA_TYPE;
|
|
77
83
|
}
|
|
78
|
-
export interface McpServerCardRouteHandlers {
|
|
79
|
-
GET: () => Promise<Response>;
|
|
80
|
-
OPTIONS: () => Promise<Response>;
|
|
84
|
+
export interface McpServerCardRouteHandlers extends McpDiscoveryRouteHandlers {
|
|
81
85
|
}
|
|
82
86
|
/**
|
|
83
|
-
* Serve the
|
|
87
|
+
* Serve the server card. Keep both existing well-known paths available; the
|
|
88
|
+
* experimental AI Catalog can also point to an alias under the MCP endpoint.
|
|
84
89
|
*
|
|
85
|
-
* The handler never reads
|
|
90
|
+
* The handler never reads Request, so the route stays statically
|
|
86
91
|
* prerenderable — the same constraint the llms.txt handlers document, and for
|
|
87
92
|
* the same reason: touching `request.headers` opts the route into dynamic
|
|
88
|
-
* rendering
|
|
93
|
+
* rendering. ETag validation is left to the host/CDN. Canonical card routes
|
|
94
|
+
* can use `contentType: MCP_SERVER_CARD_MEDIA_TYPE`; legacy aliases keep JSON.
|
|
89
95
|
*
|
|
90
96
|
* @example
|
|
91
97
|
* ```ts
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 1. Remote MCP endpoint — `createMcpHandler`. Streamable HTTP, dual-era
|
|
10
10
|
* (2026-07-28 modern + the `initialize` handshake older clients speak).
|
|
11
|
-
* 2. Discovery — `
|
|
12
|
-
*
|
|
11
|
+
* 2. Discovery — `createMcpAiCatalogHandler` (experimental draft) points to
|
|
12
|
+
* `createMcpServerCardHandler`; existing well-known card URLs still work.
|
|
13
13
|
* 3. In-page WebMCP — `<WebMcpTools>` (imperative) and
|
|
14
14
|
* `declarativeToolForm` (declarative), for browser-driving agents.
|
|
15
15
|
*
|
|
@@ -20,8 +20,10 @@ export type { JsonSchemaNode, JsonSchemaObject, McpContent, McpTextContent, McpR
|
|
|
20
20
|
export { defineMcpTool } from './types';
|
|
21
21
|
export { MCP_PROTOCOL_VERSION_MODERN, MCP_PROTOCOL_VERSIONS_LEGACY, MCP_SUPPORTED_PROTOCOL_VERSIONS, META_PROTOCOL_VERSION, META_CLIENT_INFO, META_SERVER_INFO, MCP_ERROR_HEADER_MISMATCH, MCP_ERROR_UNSUPPORTED_PROTOCOL_VERSION, JSONRPC_METHOD_NOT_FOUND, dispatch, toToolResult, toolErrorResult, toToolDescriptor, validateArgs, isSupportedVersion, } from './protocol';
|
|
22
22
|
export type { JsonRpcRequest, JsonRpcResponse, JsonRpcError, DispatchOutcome, DispatchOptions, McpServerDefinition, McpToolDescriptor, } from './protocol';
|
|
23
|
-
export { buildMcpServerCard, validateMcpServerCard, MCP_SERVER_CARD_SCHEMA, MCP_SERVER_CARD_PATH, MCP_SERVER_CARD_LEGACY_PATH, SITE_KIT_CARD_META_KEY, } from './serverCard';
|
|
23
|
+
export { buildMcpServerCard, validateMcpServerCard, MCP_SERVER_CARD_SCHEMA, MCP_SERVER_CARD_PATH, MCP_SERVER_CARD_LEGACY_PATH, MCP_SERVER_CARD_MEDIA_TYPE, SITE_KIT_CARD_META_KEY, } from './serverCard';
|
|
24
24
|
export type { McpServerCard, McpRemote, BuildMcpServerCardOptions, } from './serverCard';
|
|
25
|
+
export { buildMcpAiCatalog, createMcpAiCatalogHandler, MCP_AI_CATALOG_PATH, MCP_AI_CATALOG_MEDIA_TYPE, } from './discovery';
|
|
26
|
+
export type { McpAiCatalog, BuildMcpAiCatalogOptions, McpAiCatalogHandlerOptions, McpDiscoveryRouteHandlers, } from './discovery';
|
|
25
27
|
export { createMcpHandler, createMcpServerCardHandler, decodeHeaderValue, toolCallRecord, WEBMCP_SURFACE_HEADER, } from './handlers';
|
|
26
28
|
export type { McpHandlerOptions, McpRouteHandlers, McpServerCardHandlerOptions, McpServerCardRouteHandlers, } from './handlers';
|
|
27
29
|
export { declarativeToolForm, declarativeToolField } from './declarative';
|